/* ROOT VARIABLES & RESET */
:root {
    --navy: #0c1e3e;
    --navy-dark: #071224;
    --navy-light: #162b55;
    --red: #dc2626;
    --red-hover: #b91c1c;
    --turf: #f1f5f9;
    --yellow: #facc15;
    --yellow-hover: #eab308;
    --green: #22c55e;
    --white: #ffffff;
    --text-main: #334155;
    --text-light: #94a3b8;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--turf);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.oswald {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

.space-mono {
    font-family: 'Space Mono', monospace;
}

.hidden {
    display: none !important;
}

/* HERO SECTION */
.hero {
    position: relative;
    height: 350px;
    background-image: url('https://offertabs.s3.amazonaws.com/offer/8z9otm/site/media/69f11e081c10a6.14564491.jpg');
    background-size: cover;
    background-position: center 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top center, rgba(12, 30, 62, 0.6) 0%, rgba(7, 18, 36, 0.95) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.tagline {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--yellow);
    margin-bottom: 12px;
}

.hero h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 16px;
    text-transform: uppercase;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.accent-text {
    color: var(--yellow);
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* LAYOUT CONTAINER */
.container {
    max-width: 1200px;
    margin: -40px auto 40px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    position: relative;
    z-index: 10;
    flex: 1;
}

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

/* CARDS */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 24px;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-large {
    width: 100%;
    padding: 18px 24px;
    font-size: 1.25rem;
}

.btn-primary {
    background: var(--red);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover {
    background: var(--red-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--navy);
    color: var(--white);
    padding: 12px 20px;
    font-size: 1rem;
}

.btn-secondary:hover {
    background: var(--navy-light);
}

/* INTRO SCREEN */
.intro-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    flex: 1;
    background: var(--turf);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.stat-val {
    display: block;
    font-size: 2.5rem;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* QUIZ HEADER */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.q-counter {
    font-size: 1.5rem;
    color: var(--navy);
}

.streak-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(250, 204, 21, 0.2);
    color: #b45309;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.9rem;
    margin-top: 8px;
    border: 1px solid rgba(250, 204, 21, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.timer-box {
    background: var(--navy);
    color: var(--yellow);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(12, 30, 62, 0.3);
    border: 3px solid var(--navy-dark);
}

.timer-warning {
    color: var(--red);
    animation: flash 1s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* QUESTION CARD */
.question-card {
    border-top: 5px solid var(--navy);
}

.question-text {
    font-size: 1.5rem;
    color: var(--navy-dark);
    margin-bottom: 30px;
    font-weight: 700;
    line-height: 1.4;
}

.answers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .answers-grid {
        grid-template-columns: 1fr;
    }
}

.answer-btn {
    background: var(--turf);
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.answer-btn:hover:not(:disabled) {
    border-color: var(--navy);
    background: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.answer-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: background 0.2s;
}

.answer-btn:hover:not(:disabled)::before {
    background: var(--navy);
}

/* Answer States */
.answer-btn.selected {
    border-color: var(--navy);
    background: var(--navy);
    color: var(--white);
}

.answer-btn.correct {
    border-color: var(--green);
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
}
.answer-btn.correct::before { background: var(--green); }

.answer-btn.incorrect {
    border-color: var(--red);
    background: rgba(220, 38, 38, 0.1);
    color: #991b1b;
}
.answer-btn.incorrect::before { background: var(--red); }

.answer-btn:disabled {
    cursor: default;
}

/* FORMS */
.phase-title {
    font-size: 2rem;
    color: var(--navy);
    margin-bottom: 10px;
}

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

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--navy-dark);
}

input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 1.1rem;
    font-family: inherit;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    background: var(--turf);
    transition: all 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--navy);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(12, 30, 62, 0.1);
}

.error-box {
    background: #fef2f2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid var(--red);
    margin-bottom: 20px;
    font-weight: 500;
}

/* RESULTS SCREEN */
.result-hero {
    text-align: center;
    background: var(--navy);
    color: var(--white);
    border: none;
    position: relative;
    overflow: hidden;
}

.result-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(250, 204, 21, 0.15) 0%, transparent 70%);
}

.score-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    position: relative;
    z-index: 2;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 80%;
    max-height: 250px;
}

.circle-bg {
    fill: none;
    stroke: rgba(255,255,255,0.1);
    stroke-width: 2.5;
}

.circle {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dasharray 1.5s ease-out;
}

.score-circle[data-tier="high"] .circle { stroke: var(--green); }
.score-circle[data-tier="mid"] .circle { stroke: var(--yellow); }
.score-circle[data-tier="low"] .circle { stroke: var(--red); }

.percentage {
    fill: var(--white);
    font-family: 'Space Mono', monospace;
    font-size: 0.5em;
    text-anchor: middle;
    font-weight: bold;
}

.result-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--yellow);
}

.result-desc {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* FAKE CATEGORY BARS */
.section-heading {
    font-size: 1.25rem;
    color: var(--navy);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--turf);
    padding-bottom: 10px;
}

.breakdown-row {
    margin-bottom: 16px;
}

.bd-label {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

.bd-bar-bg {
    height: 10px;
    background: var(--turf);
    border-radius: 99px;
    overflow: hidden;
}

.bd-bar-fill {
    height: 100%;
    background: var(--navy);
    border-radius: 99px;
    transition: width 1s ease-out;
}

.bd-bar-fill.accent { background: var(--red); }

/* SHARE PANEL */
.share-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.share-input-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

#share-url {
    margin-top: 0;
    background: var(--white);
}

/* SIDEBAR */
.sidebar .card {
    padding: 24px;
}

.prize-tag {
    background: var(--yellow);
    color: var(--navy-dark);
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
    margin-bottom: 12px;
}

.prize-card h3 {
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 10px;
}

.prize-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.prize-img-placeholder {
    height: 120px;
    background: var(--turf);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
}

.prize-img-placeholder svg {
    width: 40px;
    height: 40px;
}

.lb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.lb-header h3 {
    font-size: 1.25rem;
    color: var(--navy);
}

.live-dot {
    width: 10px;
    height: 10px;
    background: var(--red);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.lb-sub {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.lb-list {
    list-style: none;
}

.lb-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.lb-item:last-child {
    border-bottom: none;
}

.lb-rank {
    width: 30px;
    font-weight: 700;
    color: var(--text-light);
    font-family: 'Space Mono', monospace;
}

.lb-item:nth-child(1) .lb-rank { color: #fbbf24; }
.lb-item:nth-child(2) .lb-rank { color: #94a3b8; }
.lb-item:nth-child(3) .lb-rank { color: #b45309; }

.lb-name {
    flex: 1;
    font-weight: 600;
}

.lb-score {
    font-weight: 700;
    color: var(--navy);
}

.current-user-fake {
    background: rgba(12, 30, 62, 0.05);
    border-radius: 6px;
    padding: 12px 10px;
    margin: 5px -10px;
    border: 1px dashed var(--navy);
}

.current-user-fake .lb-name {
    color: var(--navy);
    font-weight: 700;
}

/* POWERED BY SLOT */
#wbx-powered-by-slot {
    margin-top: 40px;
    text-align: center;
    width: 100%;
}
