/* ==========================================
   CSS CUSTOM PROPERTIES - PREMIUM REGISTER
   ========================================== */
:root {
    /* Premium Color Palette */
    --primary-charcoal: #2D3748;
    --secondary-grey: #4A5568;
    --accent-red: #E53E3E;
    --success-green: #38A169;
    --warning-orange: #DD6B20;
    --light-grey: #A0AEC0;
    --very-light-grey: #F7FAFC;
    --glass-grey: #E2E8F0;
    --pure-white: #FFFFFF;
    
    /* Typography */
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Animation Easing */
    --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ==========================================
   GLOBAL RESET AND BASE
   ========================================== */
* {
    box-sizing: border-box;
}

.auth-page {
    min-height: 100vh;
    position: relative;
    font-family: var(--font-text);
    color: var(--primary-charcoal);
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

/* ==========================================
   PREMIUM BACKGROUND ANIMATION
   ========================================== */
.premium-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, 
        rgba(247, 250, 252, 0.9) 0%, 
        rgba(237, 242, 247, 0.9) 25%,
        rgba(226, 232, 240, 0.9) 50%,
        rgba(237, 242, 247, 0.9) 75%,
        rgba(247, 250, 252, 0.9) 100%);
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, 
        rgba(229, 62, 62, 0.1),
        rgba(56, 161, 105, 0.1));
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: -5s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 30%;
    animation-delay: -10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 30%;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.5;
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-40px) rotate(180deg);
        opacity: 0.3;
    }
    75% {
        transform: translateY(-20px) rotate(270deg);
        opacity: 0.8;
    }
}

.mesh-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(229, 62, 62, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(56, 161, 105, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 60% 20%, rgba(74, 85, 104, 0.02) 0%, transparent 50%);
    animation: meshMove 25s ease-in-out infinite;
}

@keyframes meshMove {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* ==========================================
   AUTH CONTAINER
   ========================================== */
.auth-container {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 252, 0.9));
    backdrop-filter: blur(15px);
    border: 2px solid var(--glass-grey);
    border-radius: var(--radius-2xl);
    padding: var(--space-3xl);
    box-shadow: var(--shadow-xl);
    transition: all 0.3s var(--ease-out-quart);
    max-width: 520px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.auth-container:hover {
    border-color: rgba(229, 62, 62, 0.3);
    box-shadow: var(--shadow-2xl);
}

.auth-container h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--primary-charcoal);
    margin-bottom: var(--space-xl);
    text-align: center;
    background: linear-gradient(135deg, var(--primary-charcoal), var(--secondary-grey));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.auth-container h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-red), var(--success-green));
    border-radius: 2px;
}

/* ==========================================
   FORM STYLES
   ========================================== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--primary-charcoal);
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border: 2px solid var(--glass-grey);
    border-radius: var(--radius-lg);
    font-family: var(--font-text);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    transition: all 0.3s var(--ease-out-quart);
    color: var(--primary-charcoal);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.form-group input:focus + label {
    color: var(--accent-red);
}

/* ==========================================
   PASSWORD STRENGTH INDICATOR
   ========================================== */
#password-strength {
    margin-top: var(--space-sm);
    margin-bottom: var(--space-md);
}

.strength-bar {
    height: 4px;
    background: var(--glass-grey);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.strength-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-red), var(--warning-orange), var(--success-green));
    transition: width 0.3s var(--ease-out-quart);
}

#password-rules {
    list-style: none;
    padding: 0;
    margin: var(--space-md) 0 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xs);
}

#password-rules li {
    font-size: 0.8rem;
    color: var(--light-grey);
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--ease-out-quart);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

#password-rules li::before {
    content: '✗';
    color: var(--accent-red);
    font-weight: bold;
}

#password-rules li.valid {
    color: var(--success-green);
    background: rgba(56, 161, 105, 0.1);
}

#password-rules li.valid::before {
    content: '✓';
    color: var(--success-green);
}

/* ==========================================
   ALERTS
   ========================================== */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
    font-family: var(--font-text);
    font-weight: 500;
    border: 2px solid;
    animation: slideIn 0.3s var(--ease-out-quart);
}

.alert-success {
    background: linear-gradient(145deg, rgba(56, 161, 105, 0.1), rgba(104, 211, 145, 0.05));
    border-color: var(--success-green);
    color: #22543d;
}

.alert-error {
    background: linear-gradient(145deg, rgba(229, 62, 62, 0.1), rgba(252, 129, 129, 0.05));
    border-color: var(--accent-red);
    color: #742a2a;
}

.error-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-list li {
    margin-bottom: var(--space-xs);
}

@keyframes slideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==========================================
   BUTTONS
   ========================================== */
.form-actions {
    margin-top: var(--space-xl);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s var(--ease-out-quart);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-red), #C53030);
    color: white;
    box-shadow: var(--shadow-md);
    width: 100%;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease-in-out;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #C53030, var(--accent-red));
}

/* ==========================================
   FORM LINKS
   ========================================== */
.form-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--glass-grey);
}

.form-links a {
    color: var(--accent-red);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s var(--ease-out-quart);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
}

.form-links a:hover {
    color: #C53030;
    background: rgba(229, 62, 62, 0.1);
    transform: translateY(-1px);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 768px) {
    .auth-page {
        padding: var(--space-md);
    }
    
    .auth-container {
        padding: var(--space-xl);
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    #password-rules {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: var(--space-lg);
    }
    
    .auth-container h2 {
        font-size: 1.8rem;
    }
}
