/* ============================================
   TWO TRUTHS AND AI - DOCTORHUMP DESIGN SYSTEM
   Purple accent (#6366f1) for game elements
   ============================================ */

:root {
    /* Typography */
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Brand Colors - Warm Amber Palette (doctorhump) */
    --amber-400: #e8a560;
    --amber-500: #c86d3a;

    /* Game Purple Accent */
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --accent-light: #818cf8;
    --gradient-start: #6366f1;
    --gradient-end: #a855f7;

    /* Game Feedback Colors */
    --correct: #10b981;
    --incorrect: #ef4444;
    --ai-highlight: #a855f7;

    /* Neutrals */
    --slate-900: #1a1a2e;
    --slate-800: #2d2d44;
    --slate-700: #3d3d5c;
    --slate-600: #4a4a6a;
    --slate-500: #6b6b8a;
    --slate-400: #9090a8;
    --slate-300: #b8b8c8;

    /* Glass Effects */
    --glass-white: rgba(255, 255, 255, 0.88);
    --glass-dark: rgba(26, 26, 46, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
}

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

body {
    font-family: var(--font-body);
    font-weight: 400;
    background-color: #03001e;
    background-image: url('../james-webb-background_smallest.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
    color: var(--slate-800);
    line-height: 1.6;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    body {
        background-attachment: scroll;
        padding: 16px;
    }
}

/* ============================================
   STARFIELD CANVAS
   ============================================ */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ============================================
   NEBULA OVERLAY
   ============================================ */
.nebula-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 30%, rgba(200, 109, 58, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 70%, rgba(109, 50, 24, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 50% 60% at 50% 90%, rgba(3, 0, 30, 0.1) 0%, transparent 50%);
    animation: nebulaShift 30s ease-in-out infinite alternate;
}

@keyframes nebulaShift {
    0% {
        background:
            radial-gradient(ellipse 80% 50% at 20% 30%, rgba(200, 109, 58, 0.08) 0%, transparent 50%),
            radial-gradient(ellipse 60% 40% at 80% 70%, rgba(109, 50, 24, 0.06) 0%, transparent 50%),
            radial-gradient(ellipse 50% 60% at 50% 90%, rgba(3, 0, 30, 0.1) 0%, transparent 50%);
    }
    100% {
        background:
            radial-gradient(ellipse 70% 60% at 30% 40%, rgba(200, 109, 58, 0.1) 0%, transparent 50%),
            radial-gradient(ellipse 50% 50% at 70% 60%, rgba(109, 50, 24, 0.08) 0%, transparent 50%),
            radial-gradient(ellipse 60% 50% at 40% 80%, rgba(3, 0, 30, 0.12) 0%, transparent 50%);
    }
}

/* ============================================
   COSMIC VIGNETTE
   ============================================ */
.cosmic-vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(3, 0, 30, 0.4) 100%);
}

/* ============================================
   NAVIGATION (matches homepage exactly)
   ============================================ */
nav {
    background: var(--glass-white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px 32px;
    max-width: 920px;
    margin: 20px auto 28px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--slate-900);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.nav-brand:hover {
    color: var(--amber-500);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--slate-600);
    position: relative;
    padding: 4px 0;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--amber-400), var(--amber-500));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover {
    color: var(--amber-600);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-links a.active {
    color: var(--amber-600);
    font-weight: 600;
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 16px;
        padding: 20px 24px;
        margin: 16px 16px 28px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px 24px;
    }
}

/* ============================================
   SOCIAL BAR (matches homepage exactly)
   ============================================ */
.social-bar-wrapper {
    display: flex;
    justify-content: center;
    margin: -12px auto 24px;
    position: relative;
    z-index: 99;
}

.social-bar {
    background: linear-gradient(135deg, var(--amber-400), var(--amber-500), #9c4a24);
    border-radius: 100px;
    padding: 10px 24px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12),
                0 0 30px rgba(200, 109, 58, 0.25);
    position: relative;
    overflow: hidden;
}

.social-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(50%); }
}

.social-bar-label {
    font-family: var(--font-mono);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.social-bar-icons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.social-bar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
}

.social-bar-icon:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.social-bar-icon.email:hover { background: #fef3e2; }
.social-bar-icon.linkedin:hover { background: #e8f4fc; }
.social-bar-icon.youtube:hover { background: #ffe8e8; }
.social-bar-icon.tiktok:hover { background: #f0f0f0; }

.social-bar-icon svg {
    width: 15px;
    height: 15px;
    transition: transform 0.3s ease;
}

.social-bar-icon:hover svg {
    transform: scale(1.1);
}

.social-bar-icon.email svg { fill: #c86d3a; }
.social-bar-icon.linkedin svg { fill: #0077b5; }
.social-bar-icon.youtube svg { fill: #ff0000; }
.social-bar-icon.tiktok svg { fill: #000000; }

.social-bar-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 480px) {
    .social-bar {
        padding: 8px 16px;
        gap: 10px;
    }

    .social-bar-label {
        font-size: 0.6rem;
        letter-spacing: 1px;
    }

    .social-bar-icon {
        width: 28px;
        height: 28px;
    }

    .social-bar-icon svg {
        width: 13px;
        height: 13px;
    }
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.container {
    max-width: 920px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    position: relative;
    z-index: 10;
}

/* ============================================
   HEADER CARD
   ============================================ */
.header-card {
    background: var(--glass-white);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.agentic-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 1.25rem;
}

h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--slate-900);
}

.subtitle {
    color: var(--slate-600);
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.steps {
    text-align: left;
    color: var(--slate-600);
    font-size: 0.95rem;
    line-height: 1.9;
    margin: 0;
    padding-left: 1.5rem;
    list-style-position: outside;
}

.steps li {
    margin-bottom: 0.3rem;
}

.steps li:last-child {
    margin-bottom: 0;
}

.steps li::marker {
    color: var(--accent);
    font-weight: 600;
}

.hourly-note {
    margin-top: 1rem;
    margin-bottom: 0;
    font-size: 0.85rem;
    color: var(--slate-500);
    font-style: italic;
}

/* ============================================
   GAME SECTION
   ============================================ */
.game {
    margin-bottom: 2rem;
}

.topic-container {
    background: var(--glass-white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    text-align: center;
}

.topic-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

.topic {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    margin: 0;
    color: var(--accent);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   OPTIONS (Game Cards)
   ============================================ */
.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option {
    background: var(--glass-white);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.option:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.2);
}

.option:active {
    transform: translateY(-1px);
}

.option-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.option-text {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--slate-800);
}

/* Option states after voting */
.option.selected {
    border-color: var(--accent);
    border-width: 3px;
}

.option.correct {
    border-color: var(--correct);
    background: rgba(220, 252, 231, 0.95);
}

.option.incorrect {
    border-color: var(--incorrect);
    background: rgba(254, 226, 226, 0.95);
}

.option.ai-revealed {
    border-color: var(--ai-highlight);
    background: rgba(243, 232, 255, 0.95);
}

.option.ai-revealed .option-label::after {
    content: ' - AI Generated';
    color: var(--ai-highlight);
    font-weight: 600;
}

.option.disabled {
    pointer-events: none;
    cursor: default;
}

.option.disabled:hover {
    transform: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ============================================
   RESULT SECTION
   ============================================ */
.result {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--glass-white);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.result.hidden {
    display: none;
}

#result-text {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--slate-900);
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-secondary {
    background: white;
    border: 2px solid var(--slate-300);
    color: var(--slate-600);
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
}

.prompt-display {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--slate-900);
    border-radius: 10px;
    text-align: left;
}

.prompt-display.hidden {
    display: none;
}

.prompt-display code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--slate-300);
    white-space: pre-wrap;
    word-break: break-word;
}

/* ============================================
   COUNTDOWN
   ============================================ */
.countdown {
    text-align: center;
    margin-top: 2rem;
    color: var(--slate-500);
    font-size: 0.95rem;
}

.countdown-top {
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--glass-white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

#countdown-time {
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: 600;
    font-size: 1.1rem;
}

/* ============================================
   STATS FOOTER
   ============================================ */
.stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    padding: 2rem;
    background: var(--glass-white);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.stat {
    text-align: center;
}

.stat span:first-child {
    display: block;
    font-size: 2rem;
    font-family: var(--font-mono);
    font-weight: 600;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.25rem;
}

/* ============================================
   IMAGE CREDIT FOOTER
   ============================================ */
.image-credit {
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.image-credit-text {
    color: var(--slate-600);
    font-size: 0.8rem;
    text-align: center;
}

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

.image-credit a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem 1rem 2rem;
    }

    .header-card {
        padding: 1.75rem 1.25rem;
        border-radius: 16px;
    }

    h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .topic {
        font-size: 1.3rem;
    }

    .option {
        padding: 1.25rem;
    }

    .stats {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .result-actions {
        flex-direction: column;
    }

    .btn-secondary {
        width: 100%;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden {
    display: none !important;
}
