:root {
    --bg-primary: #050508;
    --bg-secondary: #0c0c12;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --accent-glow: rgba(139, 92, 246, 0.25);
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ===== SOFT GLOW BACKGROUND ===== */
.soft-glow-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    /* CRITICAL: Allow clicks to pass through */
    overflow: hidden;
}

/* Base Ambient Glow (From Backup 1/landing.css - ENLARGED) */
.soft-glow-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        /* Faded top-down light (shines from top) - INTENSIFIED */
        linear-gradient(180deg, rgba(139, 92, 246, 0.28) 0%, transparent 55%),
        /* Main purple glow at top center */
        radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.35) 0%, transparent 70%),
        /* Secondary glow at bottom right */
        radial-gradient(ellipse at 80% 80%, rgba(99, 102, 241, 0.25) 0%, transparent 60%);
    z-index: 1;
    animation: gentlePulse 8s ease-in-out infinite alternate, colorShift 15s ease-in-out infinite;
    opacity: 1;
}

/* Color-shifting animation */
@keyframes colorShift {

    0%,
    100% {
        filter: hue-rotate(0deg);
    }

    33% {
        filter: hue-rotate(-20deg);
    }

    /* More blue */
    66% {
        filter: hue-rotate(20deg);
    }

    /* More pink */
}

/* Clear other refined layers */
.soft-glow-background::after,
.wave-1,
.wave-2,
.wave-3 {
    display: none;
}

@keyframes gentlePulse {
    0% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
    }
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

@media (max-width: 900px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        display: none;
    }
}

.auth-form-section {
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 40px;
    transition: color 0.2s;
}

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

.auth-form-wrapper {
    max-width: 400px;
    margin: auto;
    width: 100%;
}

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

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 0px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.6rem;
    margin-bottom: 32px;
}

.auth-logo-text {
    /* Vibrant Purple to Pink Gradient matching the bird in logo */
    background: linear-gradient(135deg, #a78bfa 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 15px rgba(236, 72, 153, 0.4));
    margin-left: -4px;
}

.beta-badge {
    font-size: 0.65rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #ec4899);
    color: white;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transform: translate(2px, -8px);
}

.logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
}

.social-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 40px;
    padding: 0 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent);
}

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.divider span {
    padding: 0 16px;
}

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

.auth-form label {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.forgot-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
}

.auth-form input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

.auth-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-checkbox label {
    display: block;
    /* Override flex behavior from generic label rule */
    margin: 0;
    line-height: 1.4;
}

.form-checkbox input {
    width: auto;
    margin-top: 3px;
}

.form-checkbox a {
    color: var(--accent);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.auth-switch {
    text-align: center;
    margin-top: 32px;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.auth-visual {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.visual-content {
    text-align: center;
}

.visual-content h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.visual-content p {
    color: var(--text-secondary);
}

/* Password Toggle */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 40px;
    /* Make space for the eye icon */
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    /* Changed from secondary to accent for better visibility */
    cursor: pointer;
    font-size: 1.4rem;
    /* Slightly bigger */
    z-index: 1000;
    /* Force on top */
    transition: all 0.2s;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: auto;
    /* Ensure clickable */
}

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

/* ===== COOKIE CONSENT BANNER ===== */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: rgba(5, 5, 8, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 24px;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#cookie-consent-banner.cookie-banner-hidden {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-banner-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.cookie-banner-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0;
}

.cookie-banner-text a {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-banner-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: var(--font-main);
}

.cookie-btn-primary {
    background: var(--accent);
    color: white;
}

.cookie-btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.cookie-btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.cookie-btn-outline:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.cookie-settings-panel {
    max-width: 1200px;
    margin: 24px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.cookie-category {
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.cookie-category label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 8px;
}

.cookie-category label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.cookie-category label input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-category label strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.cookie-category p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-banner-buttons {
        justify-content: center;
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
        min-width: 120px;
    }
}

/* ===== UTILITY CLASSES (replaces inline styles) ===== */

/* Logo image in auth pages */
.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Auth subtitle styling */
.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Google button container */
.google-btn-container {
    width: 100%;
}

/* Guest login button */
.guest-login-btn {
    display: none;
    background: rgba(139, 92, 246, 0.1);
    border: 1px dashed var(--accent);
    color: var(--accent);
    margin-top: 10px;
}

/* Password input with right padding for toggle */
.password-input {
    padding-right: 40px;
}

/* Centered verification header */
.verification-center {
    text-align: center;
}

/* Verify button with margin */
.verify-btn {
    margin-top: 20px;
}

/* Success button with margin */
.success-btn {
    margin-top: 24px;
}

/* Timer center alignment */
.timer-center {
    text-align: center;
}

/* Resend center alignment */
.resend-center {
    text-align: center;
    margin-top: 16px;
}

/* Resend link disabled state */
.resend-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Webkit backdrop-filter prefix for Safari - fix ordering */
#cookie-consent-banner {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}