/* 80Quiz — Quiz Panel Styles (Retro-Neon 80s Dark Theme + Glassmorphism Bubbles) */

/* ===== QUIZ CARD — Glass Bubble ===== */
.quiz-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px 24px 18px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card), var(--glass-inner-glow);
    backdrop-filter: var(--glass-blur) var(--glass-saturate);
    -webkit-backdrop-filter: var(--glass-blur) var(--glass-saturate);
}

/* Subtle top highlight for glass bubble effect */
.quiz-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    pointer-events: none;
}

/* ===== QUIZ HEADER (category + question number + timer) ===== */
.quiz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 10px;
}

.category-badge {
    font-family: var(--font-system);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 12px;
    border-radius: 20px;
    color: #fff;
}

/* Neon category colors — glass style */
.category-movies { background: rgba(231, 76, 60, 0.7); box-shadow: 0 0 12px rgba(231, 76, 60, 0.25); backdrop-filter: blur(8px); }
.category-music { background: rgba(155, 89, 182, 0.7); box-shadow: 0 0 12px rgba(155, 89, 182, 0.25); backdrop-filter: blur(8px); }
.category-tv { background: rgba(52, 152, 219, 0.7); box-shadow: 0 0 12px rgba(52, 152, 219, 0.25); backdrop-filter: blur(8px); }
.category-bands { background: rgba(230, 126, 34, 0.7); box-shadow: 0 0 12px rgba(230, 126, 34, 0.25); backdrop-filter: blur(8px); }
.category-actors { background: rgba(26, 188, 156, 0.7); box-shadow: 0 0 12px rgba(26, 188, 156, 0.25); backdrop-filter: blur(8px); }
.category-games { background: rgba(46, 204, 113, 0.7); box-shadow: 0 0 12px rgba(46, 204, 113, 0.25); backdrop-filter: blur(8px); }
.category-toys { background: rgba(243, 156, 18, 0.7); box-shadow: 0 0 12px rgba(243, 156, 18, 0.25); backdrop-filter: blur(8px); }
.category-fashion { background: rgba(233, 30, 143, 0.7); box-shadow: 0 0 12px rgba(233, 30, 143, 0.25); backdrop-filter: blur(8px); }
.category-events { background: rgba(102, 126, 234, 0.7); box-shadow: 0 0 12px rgba(102, 126, 234, 0.25); backdrop-filter: blur(8px); }

.question-number {
    font-family: var(--font-system);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

/* ===== TIMER RING ===== */
.timer-container {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.timer-ring {
    transform: rotate(-90deg);
}

.timer-ring-bg {
    fill: none;
    stroke: rgba(0, 240, 255, 0.1);
    stroke-width: 3;
}

.timer-ring-progress {
    fill: none;
    stroke: var(--timer-safe);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke 0.3s;
    filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.5));
}

.timer-ring-progress.warn {
    stroke: var(--timer-warn);
    filter: drop-shadow(0 0 4px rgba(255, 255, 50, 0.5));
    animation: timerPulse 0.6s ease-in-out infinite;
}

.timer-ring-progress.danger {
    stroke: var(--timer-danger);
    filter: drop-shadow(0 0 4px rgba(255, 56, 96, 0.5));
    animation: timerPulse 0.4s ease-in-out infinite;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== QUESTION TEXT ===== */
.question-text {
    font-family: var(--font-body);
    font-size: 19px;
    line-height: 1.45;
    color: var(--text-primary);
    margin-bottom: 16px;
    min-height: auto;
    font-weight: 500;
}

/* ===== ANSWER CHOICES — Glass Bubbles ===== */
.choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.choice-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.15);
    transition: border-color 0.25s, background 0.25s, transform 0.2s, box-shadow 0.25s;
}

/* Top highlight shine on each bubble */
.choice-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    pointer-events: none;
}

.choice-btn:hover:not(.disabled) {
    border-color: rgba(0, 240, 255, 0.35);
    background: rgba(0, 240, 255, 0.06);
    transform: translateX(4px) scale(1.01);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 6px 24px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(0, 240, 255, 0.08);
}

.choice-btn .choice-letter {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--neon-cyan);
    min-width: 20px;
}

/* Answer states — glass glow */
.choice-btn.correct {
    border-color: rgba(57, 255, 20, 0.5);
    background: rgba(57, 255, 20, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(57, 255, 20, 0.15),
        0 0 20px rgba(57, 255, 20, 0.15),
        0 0 40px rgba(57, 255, 20, 0.06);
    animation: correctGlow 0.6s ease-out forwards;
}

.choice-btn.wrong {
    border-color: rgba(255, 56, 96, 0.5);
    background: rgba(255, 56, 96, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 56, 96, 0.1),
        0 0 12px rgba(255, 56, 96, 0.12);
    animation: wrongShake 0.4s ease-out;
}

.choice-btn.disabled {
    cursor: default;
    opacity: 0.5;
}

.choice-btn.correct .choice-letter {
    color: var(--correct-green);
}

.choice-btn.wrong .choice-letter {
    color: var(--wrong-red);
}

/* ===== FUN FACT — Glass Style ===== */
.fun-fact {
    background: rgba(255, 40, 160, 0.05);
    border-left: 3px solid var(--neon-pink);
    border-radius: 0 12px 12px 0;
    padding: 10px 14px;
    margin-bottom: 10px;
    animation: fadeIn 0.4s ease-out;
    display: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.fun-fact.visible {
    display: block;
}

.fun-fact-label {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    color: var(--neon-pink);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.fun-fact-text {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== PROGRESS DOTS ===== */
.progress-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.dot.active {
    background: var(--neon-cyan);
    border-color: transparent;
    transform: scale(1.15);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.dot.correct {
    background: var(--correct-green);
    border-color: transparent;
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
    animation: dotFill 0.3s ease-out;
}

.dot.wrong {
    background: var(--wrong-red);
    border-color: transparent;
    box-shadow: 0 0 8px rgba(255, 56, 96, 0.5);
    animation: dotFill 0.3s ease-out;
}

/* ===== SCORE FLOAT (+10) ===== */
.score-float {
    position: absolute;
    top: 20px;
    right: 28px;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--correct-green);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.6);
    pointer-events: none;
    animation: scoreFloat 1s ease-out forwards;
}

/* ===== NEXT BUTTON — Glass Pill ===== */
.next-btn {
    display: none;
    margin: 10px auto 4px;
    padding: 10px 28px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-family: var(--font-system);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 12px rgba(0, 240, 255, 0.15);
}

.next-btn.visible {
    display: block;
}

.next-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-button);
}

/* ===== START SCREEN ===== */
.quiz-start {
    text-align: center;
    padding: 24px 16px;
}

.quiz-start h2 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 8px rgba(255, 40, 160, 0.3));
}

.quiz-start p {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.quiz-start .start-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 12px 32px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-family: var(--font-system);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 12px rgba(0, 240, 255, 0.15);
}

.quiz-start .start-btn:hover {
    transform: scale(1.06);
    box-shadow: var(--shadow-button);
}

/* ===== COMPLETION SCREEN ===== */
.quiz-complete {
    text-align: center;
    padding: 16px 14px;
}

.score-display {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.score-display .score-value {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.4));
}

.score-display .score-total {
    color: var(--text-muted);
    font-size: 22px;
}

.result-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 6px 0 4px;
}

.result-dot {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.result-dot.correct { background: var(--correct-green-bg); border: 1px solid rgba(57, 255, 20, 0.15); }
.result-dot.wrong { background: var(--wrong-red-bg); border: 1px solid rgba(255, 56, 96, 0.15); }
.result-dot.timeout { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06); }

.result-message {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Name input — Glass Bubble */
.name-entry {
    margin: 12px 0;
}

.name-entry label {
    display: block;
    font-family: var(--font-system);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.name-input-group {
    display: flex;
    gap: 8px;
    max-width: 320px;
    margin: 0 auto;
}

.name-input-group input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 20px;
    outline: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.name-input-group input:focus {
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 16px rgba(0, 240, 255, 0.12);
}

.name-input-group input.error {
    border-color: var(--wrong-red);
}

.name-input-group button {
    padding: 12px 24px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-system);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 12px rgba(0, 240, 255, 0.15);
}

.name-input-group button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-button);
}

.char-count {
    font-family: var(--font-system);
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.name-error {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--wrong-red);
    margin-top: 6px;
    display: none;
}

.name-error.visible {
    display: block;
}

/* Yahoo Bonus — Glass Bubble */
.yahoo-bonus {
    margin: 10px 0 14px;
    padding: 16px 20px;
    background: rgba(0, 240, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 16px rgba(0, 0, 0, 0.15);
}

.yahoo-bonus-title {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 700;
    color: var(--neon-yellow);
    margin-bottom: 4px;
}

.yahoo-bonus-desc {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.yahoo-bonus-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.yahoo-bonus-actions button {
    border: none;
    border-radius: 50px;
    font-family: var(--font-system);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.yahoo-bonus-actions .accept {
    background: var(--accent-gradient);
    color: #fff;
    padding: 10px 24px;
    font-size: 14px;
    box-shadow: 0 2px 12px rgba(0, 240, 255, 0.15);
}

.yahoo-bonus-actions .accept:hover {
    box-shadow: var(--shadow-button);
    transform: scale(1.05);
}

.yahoo-bonus-actions .decline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-muted);
    padding: 10px 18px;
    font-size: 13px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.yahoo-bonus-actions .decline:hover {
    transform: scale(1.05);
}

/* Yahoo bonus auto-applied notice */
.yahoo-bonus-applied {
    margin: 8px 0 12px;
    padding: 10px 16px;
    background: rgba(57, 255, 20, 0.06);
    border: 1px solid rgba(57, 255, 20, 0.15);
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.yahoo-bonus-applied p {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--correct-green);
    font-weight: 600;
    margin: 0;
}

/* Streak & Share Row */
.post-quiz-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.streak-display {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-orange);
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 0 8px rgba(255, 170, 0, 0.4);
}

.share-btn {
    padding: 8px 18px;
    background: rgba(0, 240, 255, 0.05);
    border: 1.5px solid rgba(0, 240, 255, 0.2);
    border-radius: 50px;
    color: var(--neon-cyan);
    font-family: var(--font-system);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: background 0.2s, box-shadow 0.2s;
}

.share-btn:hover {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 14px rgba(0, 240, 255, 0.15);
}

.share-btn.copied {
    background: rgba(57, 255, 20, 0.06);
    border-color: rgba(57, 255, 20, 0.3);
    color: var(--correct-green);
}

/* Countdown to next quiz */
.next-quiz-countdown {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 10px;
}

.next-quiz-countdown span {
    color: var(--neon-cyan);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
}

/* ===== ALREADY PLAYED STATE ===== */
.already-played {
    text-align: center;
    padding: 16px 14px;
}

.already-played h2 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 500px) {
    .quiz-card {
        padding: 20px 16px 18px;
        border-radius: 16px;
    }

    .question-text {
        font-size: 18px;
    }

    .choice-btn {
        padding: 12px 14px;
        font-size: 15px;
    }

    .score-display {
        font-size: 22px;
    }

    .quiz-start h2 {
        font-size: 14px;
    }
}