:root {
    /* PALETTE: Cyber-Slate & Warning Amber */
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7); /* Frosted Glass Slate */

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;

    --accent: #f59e0b; /* Amber 500 - The Warning Color */
    --accent-glow: rgba(245, 158, 11, 0.4);

    --success: #10b981; /* Emerald */
    --danger: #ef4444; /* Red */

    --font-head: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius: 16px;
    --shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    /* Subtle mesh gradient background */
    background-image:
        radial-gradient(at 50% 0%, rgba(30, 41, 59, 1) 0px, transparent 70%),
        radial-gradient(at 50% 100%, #020617 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

main {
    width: 100%;
    max-width: 650px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* UTILITIES */
.hidden { display: none !important; }
.view { display: none; opacity: 0; transform: translateY(10px); transition: opacity 0.4s ease, transform 0.4s ease; padding-bottom: 60px; }
.view.active { display: block; opacity: 1; transform: translateY(0); }

/* TYPOGRAPHY */
h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 700;
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
}

/* HEADER - ELECTRIC BLUE */
#header-container {
    text-align: center;
    margin: 30px 0 40px 0;
}

.header-box {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

h1.main-title {
    font-family: var(--font-head);
    font-size: clamp(1.2rem, 4.5vw, 1.5rem);
    line-height: 1.4;
    margin: 5px 0;
    font-weight: 700;
    display: block;
    /* Electric Blue */
    color: #38bdf8;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

/* ARROW DIVIDER */
.divider-visual {
    margin-top: 20px;
    font-family: var(--font-head);
    opacity: 0.5;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.arrow-anim { animation: flash 2s infinite; }
@keyframes flash { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; color: #38bdf8; } }


/* CARDS */
.quiz-container, .action-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.5s ease;
}

/* QUIZ STYLES */
#q-text {
    font-size: 1.35rem;
    line-height: 1.4;
    margin-bottom: 24px;
    color: #fff;
}

.option-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 20px;
    margin-bottom: 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.option-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}
.option-card:active { transform: scale(0.98); }

.option-card.correct {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
    color: #a7f3d0;
}

.option-card.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
    color: #fca5a5;
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

/* PROGRESS BAR */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    margin-bottom: 25px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    box-shadow: 0 0 10px var(--accent);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* STATIC CONTENT WARNING */
.warning-text-small {
    display: block;
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 10px;
    margin-bottom: 5px;
    text-align: right;
    font-weight: 600;
    opacity: 0.8;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* BUTTONS */
.btn-primary {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 16px 32px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.1rem;
    width: 100%;
    cursor: pointer;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s;
    box-shadow: 0 4px 15px var(--accent-glow);
    margin-top: 5px;
}

.btn-primary:hover {
    background-color: #fbbf24;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
    padding: 16px 24px;
    font-size: 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: var(--font-head);
    margin-top: 5px;
    flex: 1;
}
.btn-secondary:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,0.05); }

.btn-outline {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 14px;
    flex: 1;
    font-weight: 700;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}
.btn-outline:hover { background: var(--accent); color: #0f172a; }

.btn-group { display: flex; gap: 12px; margin-top: 20px; }

/* FEEDBACK OVERLAY */
#feedback-overlay {
    margin-top: 20px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    animation: slideUp 0.3s ease-out;
}
.feedback-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
#feedback-title { font-size: 1.3rem; margin: 0; }
#feedback-body { font-size: 1.05rem; color: var(--text-primary); margin-bottom: 20px; }

/* FEEDBACK ACTIONS: SIDE BY SIDE */
.feedback-actions { display: flex; gap: 12px; width: 100%; flex-wrap: wrap; }
.feedback-actions button { margin-top: 0; }
.feedback-actions #btn-source { flex: 1; }
.feedback-actions #btn-next { flex: 2; }

/* ACTION PAGE */
.action-header { text-align: center; margin-bottom: 40px; }
.score-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 20px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 16px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.intro-text { font-size: 1.1rem; color: var(--text-secondary); }

.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-header h3 { color: var(--accent); margin: 0; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.icon { font-size: 1.5rem; }

/* INPUTS & SENATORS */
select {
    width: 100%; padding: 14px; background: #020617; border: 1px solid #334155;
    color: #fff; font-size: 1rem; margin-top: 15px; border-radius: 8px; outline: none;
    font-family: var(--font-body); appearance: none;
}
select:focus { border-color: var(--accent); }

.script-box {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--accent);
    padding: 16px; margin-top: 20px; border-radius: 0 8px 8px 0;
}
.script-box h4 { color: var(--accent); font-size: 0.85rem; text-transform: uppercase; margin-bottom: 8px; }
.script-box p { font-size: 0.95rem; font-style: italic; color: #e2e8f0; margin: 0; }

.senator-card {
    background: rgba(0,0,0,0.2); padding: 16px; margin-top: 12px;
    border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
    display: flex; justify-content: space-between; align-items: center;
}
.call-btn {
    background: #fff; color: #000; text-decoration: none; padding: 8px 16px;
    font-weight: 700; border-radius: 6px; font-size: 0.9rem;
}

/* VIDEO CONTAINER */
.video-container {
    position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
    border-radius: 12px; background: #000; margin-top: 20px;
}
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* MODALS */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(5px);
}
.modal-content {
    background: #1e293b; border: 1px solid #334155; padding: 0;
    width: 90%; max-width: 500px; border-radius: 16px;
    max-height: 85vh; display: flex; flex-direction: column;
}
.modal-header {
    padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { margin: 0; color: var(--accent); font-size: 1rem; }
.modal-close-x { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; padding: 0; line-height: 0.5; }
#source-content, #legal-body { padding: 24px; overflow-y: auto; font-size: 0.95rem; color: #cbd5e1; }
/* SOURCE SCROLL */
.source-scroll { max-height: 300px; overflow-y: auto; padding-right: 10px; }
.source-scroll ul { padding-left: 20px; margin: 5px 0; }
.source-scroll li { margin-bottom: 5px; }

#source-content blockquote {
    border-left: 3px solid var(--accent); margin: 15px 0; padding: 10px 15px;
    background: rgba(255,255,255,0.05); font-style: italic; color: #fff;
}
#source-content a, #legal-body a { color: var(--accent); }

/* FOOTER */
.site-footer {
    text-align: center; margin-top: 40px; padding-bottom: 40px;
    font-size: 0.9rem; color: var(--text-secondary); border-top: 1px solid rgba(255,255,255,0.05); padding-top: 30px;
}
.site-footer a { color: var(--text-secondary); text-decoration: none; margin: 0 10px; }
.site-footer a:hover { color: var(--accent); }

/* WINNER LINK - MOBILE OPTIMIZED */
.winner-link {
    display: block;
    margin-top: 20px;
    font-size: 0.65rem; /* Approx 10px */
    opacity: 0.7;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0px;
}
.winner-link a { color: var(--accent); font-weight: 700; letter-spacing: 0.5px; }

/* COMING SOON / GLITCH (Clean Pulse) */
.coming-soon-container {
    height: 100vh; height: 100dvh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
}
.glitch {
    font-size: 3rem;
    font-weight: 700;
    position: relative;
    color: #38bdf8; /* Electric Blue */
    font-family: var(--font-head);
    letter-spacing: -2px;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
    animation: pulse 2s infinite ease-in-out;
}
@keyframes pulse { 0% { opacity: 0.8; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } 100% { opacity: 0.8; transform: scale(1); } }

.loader {
    width: 48px; height: 48px; border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%; border-top-color: #38bdf8;
    animation: spin 1s linear infinite; margin-top: 30px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes slideUp { from{opacity:0; transform: translateY(20px);} to{opacity:1; transform: translateY(0);} }
@keyframes shake { 10%, 90% { transform: translate3d(-1px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-4px, 0, 0); } 40%, 60% { transform: translate3d(4px, 0, 0); } }

/* FOOTER NOTE */
.footer-note {
    position: absolute; bottom: 30px;
    color: var(--text-secondary); font-family: var(--font-head);
    font-size: 0.8rem; letter-spacing: 1px;
}
