:root {
    --bg: #0A0A14;
    --card-bg: #1A1A2A;
    --text: #F5F5F5;
    --text-secondary: #A0A0B0;
    --accent: #00CCFF;
    --danger: #FF4136;
    --success: #2ECC40;
    --warning: #FFDC00;
    --font-head: 'IBM Plex Mono', monospace;
    --font-body: 'Inter', Helvetica, sans-serif;
}
body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    /* FIX: Use Dynamic Viewport Height (dvh) for stable mobile layout, preventing scroll jumps */
    min-height: 100vh; /* Fallback for older browsers */
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}
main {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    box-sizing: border-box;
}

/* TYPOGRAPHY & HEADER - FORMATTING ADJUSTMENTS */
#header-container {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 20px;
}

.header-box {
    border: 1px solid #333;
    background: linear-gradient(180deg, rgba(26,26,42,0) 0%, rgba(26,26,42,0.4) 100%);
    padding: 25px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* EQUALIZED HEADER SIZES */
h1.main-title {
    font-family: var(--font-head);
    font-size: clamp(1.2rem, 4.5vw, 1.5rem);
    line-height: 1.4;
    margin: 0 0 15px 0;
    color: var(--text);
    font-weight: 700;
}

.subtitle-text {
    font-family: var(--font-head);
    color: var(--accent);
    font-weight: 700;
    font-size: clamp(1.2rem, 4.5vw, 1.5rem);
    line-height: 1.4;
    margin: 0;
}

/* Divider Visual */
.divider-visual {
    margin-top: 20px;
    color: #333;
    font-family: var(--font-head);
    font-size: 0.8rem;
    opacity: 0.6;
}
.arrow-anim {
    animation: flash 2s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; color: var(--accent); }
}

h2, h3, h4 { font-family: var(--font-head); font-weight: 700; margin: 0 0 10px 0; }

/* UTILS & LAYOUT */
.hidden { display: none !important; }

/* HONEYPOT FIX: Using display:none ensures it is invisible to humans */
.hidden-field { display: none !important; }

.view { display: none; animation: fadeIn 0.4s ease; padding-bottom: 20px; }
.view.active { display: block; }

/* BUTTONS */
.btn-primary {
    background: var(--accent); color: var(--bg); border: none; padding: 15px 25px;
    font-family: var(--font-head); font-weight: 700; font-size: 1.1rem;
    width: 100%; cursor: pointer; margin-top: 20px;
    border-radius: 4px; text-transform: uppercase;
    transition: transform 0.1s, background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 8px rgba(0, 204, 255, 0.3);
}
.btn-primary:hover { background-color: #009acd; box-shadow: 0 0 15px rgba(0, 204, 255, 0.5); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
    background: transparent; color: var(--text-secondary); border: 1px solid #444;
    padding: 10px 20px; font-size: 0.9rem; border-radius: 4px; cursor: pointer; font-family: var(--font-head);
}

.btn-outline {
    background: transparent; border: 1px solid var(--accent); color: var(--accent);
    padding: 12px; width: 48%; font-weight: 600; cursor: pointer; border-radius: 4px;
    transition: background-color 0.2s;
}
.btn-outline:hover {
    background-color: rgba(0, 204, 255, 0.1);
}
.btn-group { display: flex; justify-content: space-between; gap: 10px; margin-top: 15px; }

/* QUIZ SECTION */
.quiz-container { margin-top: 10px; }
#q-text { font-size: 1.4rem; margin-bottom: 25px; line-height: 1.5; }

.option-card {
    background: var(--card-bg);
    border: 1px solid #333;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 400;
    transition: all 0.1s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}
.option-card:hover { border-color: var(--accent); }
.option-card:active { transform: scale(0.97); }
.option-card.correct { background: #0a3a10; border-color: var(--success); color: #fff; }
.option-card.wrong { background: #4a0a0a; border-color: var(--danger); color: #fff; animation: shake 0.3s; }

/* PROGRESS BAR */
.progress-bar {
    width: 100%;
    background-color: var(--card-bg);
    height: 8px;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #333;
    transition: opacity 0.3s;
}
.progress-bar.hidden {
    opacity: 0;
    pointer-events: none;
    display: block !important;
    visibility: hidden;
}

#progress-fill {
    width: 0%;
    height: 100%;
    background-color: var(--accent);
    transition: width 0.4s ease;
}

/* FEEDBACK AREA */
#feedback-overlay { margin-top: 20px; border-top: 1px solid #333; padding-top: 20px; animation: slideUp 0.3s ease; }
#feedback-title { font-size: 1.5rem; margin-bottom: 10px; }
#feedback-body { font-size: 1.1rem; line-height: 1.5; color: var(--text); margin-bottom: 20px; }

/* ACTION SECTION */
.action-header { text-align: center; margin-bottom: 30px; }
.score-display { font-family: var(--font-head); font-size: 1.5rem; color: var(--accent); margin-bottom: 15px; }

.action-card {
    background: var(--card-bg); border: 1px solid #333; padding: 25px;
    margin-bottom: 30px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; border-bottom: 1px solid #2a2a3a; padding-bottom: 10px; }
.card-header h3 { color: var(--accent); margin: 0; font-size: 1.2rem; }
.icon { font-size: 1.5rem; }

/* SCRIPT BOX */
.script-box {
    background: #302b00; border: 1px solid var(--warning); padding: 15px;
    margin: 15px 0; border-radius: 6px; color: #eee;
}
.script-box h4 { color: var(--warning); margin-bottom: 5px; font-size: 0.9rem; }
.script-box p { font-size: 1rem; line-height: 1.4; margin: 0; }

/* INPUTS */
select, input[type="email"] {
    width: 100%; padding: 12px; background: var(--bg); border: 1px solid #444;
    color: #fff; font-size: 1rem; margin-top: 10px; border-radius: 4px; box-sizing: border-box;
}
.input-group { display: flex; gap: 5px; margin-top: 10px; }
.btn-go { background: var(--accent); border: none; font-weight: 700; padding: 0 20px; cursor: pointer; color: var(--bg); border-radius: 4px; }

/* MODALS */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 999;
    display: flex; align-items: center; justify-content: center;
}
.modal-content {
    background: var(--card-bg); border: 1px solid var(--accent);
    padding: 30px; width: 85%; max-width: 450px;
    text-align: left; border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 191, 255, 0.1);
    /* Added for X button positioning */
    position: relative;
}
.modal-content a { color: var(--accent); }

/* Modal Close X Button */
.modal-close-x {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
}
.modal-close-x:hover {
    color: var(--accent);
}


/* SOURCE BLOCKQUOTE STYLING */
#source-content blockquote {
    border-left: 3px solid var(--accent);
    margin: 15px 0;
    padding-left: 15px;
    /* FIX: Force white color so it doesn't blend into dark mode backgrounds */
    color: #ffffff !important;
    font-style: italic;
    background: rgba(255,255,255,0.1);
    padding: 10px;
}

.btn-text { background: none; border: none; color: var(--text-secondary); width: 100%; padding: 10px; margin-top: 15px; cursor: pointer; }
.legal-content { max-height: 80vh; overflow-y: auto; }

/* Added padding-top to prevent title overlap with X button on small screens */
.legal-content h3 {
    padding-top: 10px;
}

.legal-content p, .legal-content ul { font-size: 0.9rem; line-height: 1.6; color: var(--text-secondary); }

/* ANIMATIONS & MISC */
@keyframes shake { 0%{transform: translateX(0);} 25%{transform: translateX(-5px);} 75%{transform: translateX(5px);} 100%{transform: translateX(0);} }
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
@keyframes slideUp { from{transform: translateY(10px); opacity: 0;} to{transform: translateY(0); opacity: 1;} }

/* STEALTH MODE */
.coming-soon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* FIX: Consistent use of dvh for mobile stability */
    height: 100vh; /* Fallback */
    height: 100dvh;
    text-align: center;
    font-family: var(--font-head);
    color: var(--text);
    padding: 20px;
    box-sizing: border-box;
}
.coming-soon-container h1 {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 10px;
}
.coming-soon-container p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}
.footer-note {
    position: absolute;
    bottom: 20px;
    font-size: 0.9rem;
    color: #555;
}
.loader { margin-top: 20px; border: 4px solid #333; border-top: 4px solid var(--accent); border-radius: 50%; width: 40px; height: 40px; animation: spin 2s linear infinite; display: inline-block; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* SENATOR RESULTS */
.senator-card { background: var(--bg); padding: 15px; margin-top: 10px; border-left: 3px solid var(--accent); border-radius: 4px; }
.call-btn {
    display: inline-block; background: #333; color: #fff; text-decoration: none;
    padding: 10px 15px; margin-top: 10px; font-weight: 600; font-size: 1rem;
    border-radius: 4px; border: 1px solid #555; width: 100%; text-align: center; box-sizing: border-box;
}

/* FOOTER */
.site-footer {
    width: 100%;
    margin-top: 40px;
    padding-top: 20px;
    padding-bottom: 30px;
    border-top: 1px solid #333;
    text-align: center;
    font-size: 0.9rem;
}
.site-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 8px;
    cursor: pointer;
}
.site-footer a:hover {
    color: var(--accent);
}

/* Responsive Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin-top: 15px;
    border-radius: 8px;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
