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

/* Auth Page Layout */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-dark));
    position: relative;
}

.auth-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.1), transparent 50%);
    pointer-events: none;
}

.auth-container {
    max-width: 480px;
    width: 100%;
    position: relative;
    z-index: 1;
}

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

.auth-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
}

.auth-header p {
    font-size: 16px;
    color: var(--text-secondary);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 24px;
    transition: color 0.2s;
}

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

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
}

.auth-form label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.auth-form label .required {
    color: #ef4444;
}

/* Password Input with Toggle */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    transition: color 0.2s;
}

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

/* Password Strength Indicator */
.password-strength-container {
    margin-top: 8px;
}

.password-strength-bar {
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s ease;
    width: 0%;
}

.password-strength-fill.weak {
    width: 25%;
    background: var(--danger);
}

.password-strength-fill.fair {
    width: 50%;
    background: var(--warning);
}

.password-strength-fill.good {
    width: 75%;
    background: #22d3ee;
}

.password-strength-fill.strong {
    width: 100%;
    background: var(--success);
}

.password-strength-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 8px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Google Button */
.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: #ffffff;
    color: #1f1f1f;
    border: 1px solid #dadce0;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-google:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

/* Auth Links */
.auth-links {
    text-align: center;
    margin-top: 24px;
}

.auth-links p {
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-links a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.forgot-password-link {
    display: block;
    text-align: right;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    margin-top: -12px;
    margin-bottom: 8px;
    transition: color 0.2s;
}

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

/* Email Verification Banner */
.verification-banner {
    padding: 16px 24px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: 24px;
}

.verification-banner.success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

.verification-banner.error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

.verification-banner h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.verification-banner p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.verification-banner .email-highlight {
    color: var(--primary);
    font-weight: 500;
}

/* Features List */
.auth-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-feature span {
    color: #22c55e;
}

/* Remember Me Checkbox */
.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.remember-me span {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Submit Button */
.btn-auth-submit {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    margin-top: 8px;
}

/* Loading State */
.btn-loading {
    display: none;
}

.btn-loading.show {
    display: inline;
}

.btn-text.hide {
    display: none;
}

/* Messages */
.auth-message {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    text-align: center;
    display: none;
    margin-top: 16px;
}

.auth-message.show {
    display: block;
}

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

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

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

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

    .auth-header h1 {
        font-size: 26px;
    }

    .auth-features {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}

/* ===== Nav Auth State ===== */
.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    overflow: hidden;
}

.nav-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Hide elements based on auth state */
.auth-only {
    display: none;
}

.guest-only {
    display: flex;
}

body.authenticated .auth-only {
    display: flex;
}

body.authenticated .guest-only {
    display: none;
}

/* ===== Verification Page States ===== */
.auth-state {
    animation: fadeIn 0.3s ease;
}

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

.verification-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(232, 149, 106, 0.1);
    color: var(--primary);
}

.verification-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.verification-icon.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.email-display {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    margin-top: 8px;
    word-break: break-all;
}

.verification-instructions {
    text-align: center;
    padding: 20px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.verification-instructions p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.verification-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.verification-success-message {
    text-align: center;
    padding: 20px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.verification-success-message p {
    font-size: 14px;
    color: var(--success);
    margin: 0;
}

/* Auth Links Spacing */
.auth-links p + p {
    margin-top: 8px;
}
