/* ========================================
   Auth Page Styles
   ======================================== */

.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
}

.back-link {
    position: absolute;
    top: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.back-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(-4px);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(124, 58, 237, 0.1);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: 20px;
}

.auth-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ========================================
   Tabs
   ======================================== */
.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

/* ========================================
   Forms
   ======================================== */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition-fast);
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--purple);
    background: rgba(124, 58, 237, 0.05);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--purple);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.toggle-password:hover {
    color: var(--text-primary);
}

/* ========================================
   Password Strength
   ======================================== */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.strength-fill.weak { width: 33%; background: #EF4444; }
.strength-fill.medium { width: 66%; background: #F59E0B; }
.strength-fill.strong { width: 100%; background: #10B981; }

.strength-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 100px;
}

/* ========================================
   Buttons
   ======================================== */
.btn-full {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

.btn-text,
.btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.form-footer {
    text-align: center;
    margin-top: 20px;
}

.forgot-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.forgot-link:hover {
    color: var(--purple);
}

.form-terms {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 20px;
}

.form-terms a {
    color: var(--purple);
    text-decoration: none;
}

.form-terms a:hover {
    text-decoration: underline;
}

/* ========================================
   Verify Form
   ======================================== */
.verify-form {
    text-align: center;
}

.verify-icon {
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.verify-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.verify-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.verify-subtitle strong {
    color: var(--purple);
}

.code-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.code-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.code-input:focus {
    outline: none;
    border-color: var(--purple);
    background: rgba(124, 58, 237, 0.1);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.code-input.filled {
    border-color: var(--green);
    background: rgba(16, 185, 129, 0.1);
}

.code-input.error {
    border-color: #EF4444;
    background: rgba(239, 68, 68, 0.1);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.resend-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.resend-btn {
    background: none;
    border: none;
    color: var(--purple);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.resend-btn:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.resend-btn:not(:disabled):hover {
    text-decoration: underline;
}

.back-to-register {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.back-to-register:hover {
    color: var(--text-primary);
}

/* ========================================
   Success Message
   ======================================== */
.success-message {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.success-message.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.success-icon {
    margin-bottom: 20px;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.success-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--green);
}

.success-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 30px;
}

/* ========================================
   Messages
   ======================================== */
.auth-message {
    display: none;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-top: 20px;
    animation: slideDown 0.3s ease;
}

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

.auth-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #F87171;
}

.auth-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34D399;
}

.auth-message.info {
    display: block;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60A5FA;
}

.auth-error {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-top: 20px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #F87171;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.auth-success {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-top: 20px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34D399;
    text-align: center;
    animation: slideDown 0.3s ease;
}

/* ========================================
   Footer
   ======================================== */
.auth-footer {
    margin-top: 30px;
    text-align: center;
}

.auth-footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 24px;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .code-input {
        width: 42px;
        height: 52px;
        font-size: 1.3rem;
    }

    .code-inputs {
        gap: 6px;
    }

    .back-link {
        top: 20px;
        left: 20px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}


