/* ============================================================
   Quiz Hero (QIRO) — style-quizhero.css
   Follows the same pattern as style-topupwar.css
   ============================================================ */

/* ── Page ── */
/* .container {
    padding-bottom: 0px !important;
} */
.main-content {
    padding-top: 0 !important;
    height: auto !important;
    min-height: 0 !important;
}
.qh-page {
    background: transparent;
}
.qh-header {
    padding: 16px 16px 8px;
}
.qh-header-name {
    font-size: 1.3rem;
    font-weight: 900;
    color: #1a1a2e;
    line-height: 1.2;
}
.qh-header-meta {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 4px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.qh-winner-quota-pill {
    background: rgba(192, 57, 43, 0.1);
    border: 1px solid rgba(192, 57, 43, 0.25);
    color: #c0392b;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ── LOBBY ── */
.qh-lobby {
    text-align: center;
    padding: 40px 16px;
}
.qh-lobby-icon {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 12px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    min-height: 88px;
}
.qh-lobby-thumb {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.qh-lobby-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: #1a1a2e;
    margin-bottom: 8px;
}
.qh-lobby-countdown {
    font-size: 2.2rem;
    font-weight: 900;
    color: #c0392b;
    margin: 0;
    font-variant-numeric: tabular-nums;
}
.qh-lobby-desc {
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.55;
    margin-bottom: 20px;
}
.qh-join-btn {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    background: linear-gradient(180deg, #fef08a 0%, #facc15 50%, #eab308 100%);
    color: #1a1a1a;
    border: 2.5px solid #a16207;
    border-radius: 12px;
    padding: 13px 28px;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    animation: qh-join-float 3s ease-in-out infinite, qh-join-glow 2s infinite;
}
.qh-join-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 80%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.65),
        transparent
    );
    animation: qh-join-shine 3s infinite;
}
.qh-join-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #92400e, 0 2px 8px rgba(146, 64, 14, 0.2) !important;
}
@keyframes qh-join-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}
@keyframes qh-join-glow {
    0%,
    100% {
        box-shadow: 0 4px 0 #92400e, 0 6px 18px rgba(250, 204, 21, 0.4);
    }
    50% {
        box-shadow: 0 4px 0 #92400e, 0 6px 28px rgba(250, 204, 21, 0.75);
    }
}
@keyframes qh-join-shine {
    100% {
        left: 150%;
    }
}
.qh-already-joined {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #16a34a;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}
.qh-member-required {
    background: rgba(192, 57, 43, 0.08);
    border: 1px solid rgba(192, 57, 43, 0.25);
    color: #c0392b;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

/* ── UPGRADE BUTTON ── */
.qh-member-only-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}
.qh-member-only-badge {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
}
.qh-upgrade-btn {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    background: linear-gradient(180deg, #fef08a 0%, #facc15 50%, #eab308 100%);
    color: #1a1a1a;
    border: 2.5px solid #a16207;
    border-radius: 12px;
    padding: 13px 28px;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    animation: qh-join-float 3s ease-in-out infinite, qh-join-glow 2s infinite;
}
.qh-upgrade-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 80%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.65),
        transparent
    );
    animation: qh-join-shine 3s infinite;
}
.qh-upgrade-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #92400e, 0 2px 8px rgba(146, 64, 14, 0.2) !important;
}

/* ── DRAMATIC PRE-START (final 10s — full black screen) ── */
#qh-dramatic-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9988;
    pointer-events: none;
}
#qh-thumb-countdown {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9989;
}
#qh-thumb-countdown.visible {
    display: flex;
}
.qh-thumb-number {
    font-size: 2.8rem;
    font-weight: 900;
    color: #f0eded;
    line-height: 1;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.85);
}
.qh-thumb-label {
    font-size: 0.65rem;
    color: rgba(255, 200, 200, 0.85);
    font-weight: 700;
    margin-top: 6px;
    letter-spacing: 0.04em;
}
@keyframes qh-dramatic-pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}
.qh-thumb-number {
    animation: qh-dramatic-pulse 0.9s ease-in-out;
}
.qh-dramatic-active .qh-lobby-icon {
    z-index: 9989;
}
.qh-dramatic-active #qh-join-form,
.qh-dramatic-active #qh-join-form-mid,
.qh-dramatic-active a.qh-join-btn,
.qh-dramatic-active .qh-upgrade-btn,
.qh-dramatic-active .qh-already-joined,
.qh-dramatic-active .qh-member-only-wrap {
    position: relative;
    z-index: 9989;
}
/* Black-screen countdown (last 10s): enlarge the number 2x and show only the
   countdown + join button — hide the joined badge, quick actions and any
   non-join CTA state so the screen is distraction-free. */
.qh-dramatic-active .qh-thumb-number {
    font-size: 5.6rem;
}
.qh-dramatic-active .qh-hero-badge-tr,
.qh-dramatic-active .qh-quick-actions-right,
.qh-dramatic-active .qh-hype-bubble {
    display: none !important;
}
.qh-dramatic-active .qh-hero-cta-top .qh-member-required,
.qh-dramatic-active .qh-hero-cta-top .qh-member-only-wrap {
    display: none;
}

/* ── QUESTION ── */
.qh-question-area {
    padding: 12px;
}
.qh-progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.qh-q-counter {
    font-size: 0.8rem;
    color: #374151;
    font-weight: 700;
}
.qh-timer-pill {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 900;
    color: #c0392b;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.qh-timer-bar-wrap {
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    margin-bottom: 14px;
    overflow: hidden;
}
.qh-timer-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #8b0000, #e74c3c);
    border-radius: 999px;
    transition: width 0.5s linear;
}
.qh-question-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 14px;
    line-height: 1.45;
    min-height: 64px;
    display: flex;
    align-items: center;
}

/* ── OPTIONS (Kahoot-style) ── */
.qh-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}
.qh-option {
    border: none;
    border-radius: 14px;
    padding: 16px 10px 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-weight: 700;
    color: #fff;
    font-size: 0.82rem;
    position: relative;
    min-height: 86px;
    transition: transform 0.12s, opacity 0.2s, box-shadow 0.2s;
}
.qh-option:active {
    transform: scale(0.97);
}
.qh-option:disabled {
    cursor: not-allowed;
}
.qh-opt-red {
    background: #e53935;
}
.qh-opt-blue {
    background: #1e88e5;
}
.qh-opt-yellow {
    background: #f9a825;
    color: #111;
}
.qh-opt-green {
    background: #43a047;
}
.qh-opt-key {
    font-size: 0.65rem;
    font-weight: 900;
    opacity: 0.7;
    letter-spacing: 0.04em;
}
.qh-opt-text {
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
}
.qh-opt-correct {
    outline: 3px solid #16a34a;
    box-shadow: 0 0 16px rgba(22, 163, 74, 0.55);
    filter: brightness(1.06);
}
.qh-opt-wrong {
    outline: 3px solid #dc2626;
    box-shadow: 0 0 14px rgba(220, 38, 38, 0.5);
    opacity: 0.85;
}
.qh-opt-dimmed {
    opacity: 0.38;
}
.qh-opt-selected {
    outline: 2px solid rgba(255, 255, 255, 0.55);
}

/* ── FEEDBACK ── */
.qh-answer-feedback {
    margin-bottom: 10px;
}
.qh-feedback-correct {
    background: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(22, 163, 74, 0.3);
    color: #15803d;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}
.qh-feedback-wrong {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: #b91c1c;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}
.qh-feedback-pending {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}
.qh-feedback-wait {
    opacity: 0.72;
    font-size: 0.82em;
    font-weight: 400;
}

/* ── LEADERBOARD ── */
.qh-leaderboard {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
    margin-top: 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.qh-lb-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.qh-lb-title i {
    color: #c0392b;
}
.qh-lb-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #f3f4f6;
}
.qh-lb-row:last-child {
    border-bottom: none;
}
.qh-lb-rank {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 700;
    width: 24px;
    flex-shrink: 0;
}
.qh-lb-name {
    flex: 1;
    font-size: 0.82rem;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.qh-lb-score {
    font-size: 0.85rem;
    font-weight: 900;
    color: #c0392b;
}
.qh-lb-me .qh-lb-name {
    color: #c0392b;
    font-weight: 900;
}
.qh-lb-me-highlight {
    background: rgba(192, 57, 43, 0.07);
    border-radius: 8px;
}
.qh-lb-empty {
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: center;
    padding: 8px 0;
}

/* ── ENDED ── */
.qh-ended-area {
    padding: 0;
}
.qh-ended-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #c0392b;
    margin-bottom: 4px;
    padding: 16px 16px 0;
    text-align: center;
}
.qh-ended-sub {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 16px;
    text-align: center;
}
.qh-ended-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #16a34a;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.qh-ended-area .qh-leaderboard {
    margin: 12px 12px 0;
}
.qh-winner-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 14px;
    margin: 0 12px 8px;
    text-align: left;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.qh-winner-gold {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.4);
}
.qh-winner-me {
    outline: 2px solid #c0392b;
}
.qh-winner-rank {
    font-size: 1.5rem;
    color: #f59e0b;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
}
.qh-winner-name {
    font-size: 0.9rem;
    font-weight: 900;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 6px;
}
.qh-winner-score {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 2px;
}
.qh-me-badge {
    font-size: 0.6rem;
    background: #c0392b;
    color: #fff;
    border-radius: 999px;
    padding: 1px 6px;
    font-weight: 900;
}
.qh-podium-wrap {
    padding: 0 0 4px;
}

/* ── INBETWEEN WINDOW (REVEAL phase) ── */
.qh-inbetween-area {
    padding: 14px;
    animation: qh-slide-in 0.2s ease;
}
@keyframes qh-slide-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
.qh-ib-header {
    text-align: center;
    padding: 10px 0 14px;
}
.qh-ib-title {
    font-size: 1.12rem;
    font-weight: 900;
    color: #1a1a2e;
    margin-bottom: 3px;
}
.qh-ib-subtitle {
    font-size: 0.74rem;
    color: #6b7280;
}
.qh-ib-correct-box {
    background: rgba(22, 163, 74, 0.07);
    border: 2px solid rgba(22, 163, 74, 0.3);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
.qh-ib-correct-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #15803d;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.qh-ib-correct-text {
    font-size: 0.98rem;
    font-weight: 900;
    color: #14532d;
    line-height: 1.4;
}
.qh-ib-user-feedback {
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.qh-ib-user-feedback.correct {
    background: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(22, 163, 74, 0.3);
    color: #15803d;
}
.qh-ib-user-feedback.wrong {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: #b91c1c;
}
.qh-ib-user-feedback.noans {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #6b7280;
}
.qh-ib-rank-highlight {
    text-align: center;
    background: rgba(192, 57, 43, 0.07);
    border: 1px solid rgba(192, 57, 43, 0.2);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
.qh-ib-rank-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.qh-ib-rank-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: #c0392b;
    line-height: 1;
}
.qh-ib-rank-score {
    font-size: 0.72rem;
    color: #6b7280;
    margin-top: 4px;
}
.qh-ib-leaderboard {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.qh-ib-countdown-wrap {
    padding: 2px 0 6px;
}
.qh-ib-countdown-text {
    text-align: center;
    font-size: 0.76rem;
    color: #6b7280;
    margin-bottom: 6px;
}
.qh-ib-countdown-bar-wrap {
    height: 4px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}
.qh-ib-countdown-bar {
    height: 100%;
    background: linear-gradient(90deg, #8b0000, #e74c3c);
    border-radius: 999px;
    transition: width 0.3s linear;
}

/* ── INBETWEEN with thumbnailInterval hero ── */
.qh-ib-has-hero {
    padding: 0;
}
.qh-ib-has-hero .qh-ib-leaderboard {
    margin: 0 12px 10px;
}
.qh-ib-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 8px;
    margin-bottom: 10px;
}
.qh-ib-hero-img {
    display: block;
    width: 100%;
    height: auto;
}
.qh-ib-score-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.qh-ib-score-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.qh-ib-score-value {
    font-size: 1.3rem;
    font-weight: 900;
    color: #fbbf24;
    line-height: 1.15;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.qh-ib-bubble {
    position: absolute;
    top: 33%;
    left: 8%;
    right: 8%;
    padding: 6px 12px;
    /* text-only bubble — no background box */
    /* background: rgba(10, 16, 45, 0.42); */
    /* backdrop-filter: blur(10px); */
    /* -webkit-backdrop-filter: blur(10px); */
    /* border: 1px solid rgba(255, 255, 255, 0.14); */
    border-radius: 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.qh-ib-bubble > * {
    margin-bottom: 0 !important;
}
/* @media (max-width: 375px) {
    .qh-ib-bubble {
        top: 25%;
    }
} */
.qh-ib-bubble-seq {
    font-size: 0.62rem;
    font-weight: 700;
    opacity: 0.58;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.qh-ib-bubble-answer {
    margin-bottom: 8px;
}
.qh-ib-answer-label {
    display: block;
    font-size: 0.58rem;
    font-weight: 700;
    color: #86efac;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.qh-ib-answer-text {
    font-size: 1rem;
    font-weight: 900;
    color: #4ade80;
    line-height: 1.35;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.qh-ib-bubble-result {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.qh-ib-bubble-result.correct {
    color: #4ade80;
}
.qh-ib-bubble-result.wrong {
    color: #f87171;
}
.qh-ib-bubble-result.noans {
    color: rgba(255, 255, 255, 0.45);
}
.qh-ib-rank-pill {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 8px;
}
.qh-ib-bubble-countdown .qh-ib-countdown-text {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.7rem;
    text-align: left;
    margin-bottom: 4px;
}
.qh-ib-bubble-countdown .qh-ib-countdown-bar-wrap {
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    overflow: hidden;
}
.qh-ib-bubble-countdown .qh-ib-countdown-bar {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    border-radius: 999px;
    transition: width 0.3s linear;
}

/* ── WAITING BUBBLE (shown after answering, before REVEAL) ── */
.qh-waiting-bubble {
    margin-bottom: 12px;
    animation: qh-slide-in 0.25s ease;
}
.qh-waiting-hero {
    margin-bottom: 0;
}
.qh-ib-wait-text {
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    opacity: 0.92;
}
.qh-ib-wait-text-plain {
    text-align: center;
    color: #1a1a2e;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 10px;
    text-shadow: none;
}

/* ── COMPACT HERO (thumbnail present — lobby & ended) ── */
.qh-lobby-compact {
    padding: 0;
}
.qh-lobby-compact .qh-lobby-title {
    padding: 4px 16px 0;
}
.qh-lobby-compact .qh-lobby-desc {
    padding: 0 16px;
}
.qh-hero-compact {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin: 0.5rem 0 0;
}
.qh-hero-compact-img {
    display: block;
    width: 100%;
    height: auto;
}
.qh-hero-compact-fallback {
    width: 100%;
    min-height: 180px;
    display: none;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    font-size: 3rem;
    color: #d1d5db;
}
.qh-hero-compact #qh-thumb-countdown {
    border-radius: 0;
}
.qh-quick-actions-right {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 4px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
    z-index: 8;
}
.qh-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.qh-action-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(180, 20, 20, 0.82);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 3px 0 rgba(80, 12, 8, 0.2), 0 5px 10px rgba(0, 0, 0, 0.3);
}
.qh-action-circle:active {
    transform: scale(0.93);
}
.qh-action-label {
    font-size: 0.46rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
    text-align: center;
}
/* No z-index elevation here on purpose: .qh-hero-compact-img must stay
   below #qh-dramatic-overlay (z-index 9988) so the thumbnail is fully
   hidden on the black-screen countdown. Only the countdown box and join
   button/badge (each individually elevated to z-index 9989 above) should
   render above the overlay. */

/* ── EVENT INFO OVERLAY (date/time + reward) — center of compact hero, like IB bubble ── */
.qh-hero-event-info {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    width: 75%;
    z-index: 7;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    pointer-events: none;
}
.qh-hero-info-time {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 7px 12px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
    max-width: 100%;
}
.qh-hero-info-time i {
    font-size: 1.5rem;
    color: #1a2e6b;
    flex-shrink: 0;
}
.qh-time-day-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    flex: 1;
    min-width: 0;
}
.qh-time-day {
    font-size: 1rem;
    font-weight: 900;
    color: #1a2e6b;
    white-space: nowrap;
}
.qh-time-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
}
.qh-time-val {
    font-size: 1.75rem;
    font-weight: 900;
    color: #c0392b;
    letter-spacing: -0.5px;
    line-height: 1;
    flex-shrink: 0;
}
.qh-time-wib {
    font-size: 0.62rem;
    font-weight: 700;
    color: #fff;
    background: #1a2e6b;
    border-radius: 4px;
    padding: 2px 5px;
    align-self: center;
    white-space: nowrap;
    flex-shrink: 0;
}
.qh-info-time-val {
    font-weight: 900;
}
.qh-hero-info-reward {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: rgba(23, 37, 84, 0.92);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.38);
    max-width: 100%;
    line-height: 1.3;
    text-align: center;
}
.qh-hero-info-reward i {
    flex-shrink: 0;
    color: #fde68a;
}
.qh-info-reward-header {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
}
.qh-info-reward-val {
    font-weight: 900;
    color: #fde68a;
    font-size: 1.15rem;
    line-height: 1.2;
}
.qh-info-reward-sub {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 600;
}
/* ── LOBBY COUNTDOWN inside hero-event-info (renamed from qh-hero-info-reward) ── */
.qh-hero-info-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(23, 37, 84, 0.88);
    border: 1px solid rgba(250, 204, 21, 0.45);
    border-radius: 10px;
    padding: 16px;
    font-size: 1.75rem;
    font-weight: 900;
    color: #facc15;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1;
    text-shadow: 0 0 14px rgba(250, 204, 21, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.38);
}
/* ── ONE-LINE REWARD TEXT (below time panel) ── */
.qh-hero-reward-line {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fbbf24;
    text-align: center;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
        1px 1px 0 #000;
    line-height: 1.3;
}
@media (min-width: 480px) {
    .qh-time-val {
        font-size: 2rem;
    }
    .qh-time-day {
        font-size: 1.1rem;
    }
    .qh-info-reward-val {
        font-size: 1.35rem;
    }
}
.qh-dramatic-active .qh-hero-event-info {
    display: none;
}

/* ── HYPE BUBBLE (last 1 minute before start — rally-up tips) ── */
.qh-hype-bubble {
    position: absolute;
    top: 36%;
    left: 8%;
    right: 8%;
    padding: 14px 16px;
    /* text-only bubble — no background box */
    /* background: rgba(10, 16, 45, 0.55); */
    /* backdrop-filter: blur(10px); */
    /* -webkit-backdrop-filter: blur(10px); */
    /* border: 1px solid rgba(255, 255, 255, 0.14); */
    border-radius: 20px;
    color: #fff;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    z-index: 6;
}
.qh-hype-bubble-icon {
    font-size: 1.3rem;
    color: #fbbf24;
}
.qh-hype-bubble-text {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    min-height: 2.4em;
}
@media (max-width: 375px) {
    .qh-hype-bubble {
        top: 31%;
    }
}

/* ── PRO badge pinned to top-center of compact hero ── */
.qh-hero-pro-badge-top {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9;
    pointer-events: none;
}
.qh-dramatic-active .qh-hero-pro-badge-top {
    display: none;
}

/* ── CTA top overlay inside hero (join / already-joined) ── */
/* Positioned just above .qh-hero-event-info (top:40%), with 14px gap (2× the 7px info gap) */
.qh-hero-cta-top {
    position: absolute;
    bottom: 60%;
    margin-bottom: 14px;
    top: auto;
    left: 0;
    right: 0;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    z-index: 9;
}
.qh-hero-cta-top .qh-join-btn {
    width: auto;
    max-width: 100%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    margin: 0;
}
.qh-hero-cta-top .qh-member-required {
    max-width: 100%;
    background: rgba(192, 57, 43, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    border-color: rgba(192, 57, 43, 0.4);
}
.qh-hero-cta-top .qh-member-only-wrap {
    max-width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.qh-hero-cta-top .qh-member-only-badge {
    background: none;
    border: none;
    padding: 0;
}
.qh-dramatic-active .qh-hero-cta-top {
    z-index: 9990;
}

/* ── TOP-RIGHT STATUS LABEL (joined / ended) — overlaid on qh-hero-compact-img ── */
.qh-hero-badge-tr {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
    max-width: calc(100% - 20px);
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(0, 0, 0, 0.22);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.qh-hero-badge-joined {
    color: #4ade80;
}
.qh-hero-badge-ended {
    color: #4ade80;
}
.qh-dramatic-active .qh-hero-badge-tr {
    z-index: 9990;
}
.qh-lb-link-btn {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ── MODALS (red header + white body, centered) ── */
.qh-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    z-index: 9995;
    align-items: center;
    justify-content: center;
}
.qh-modal-overlay.open {
    display: flex;
}
.qh-modal-sheet {
    background: #fff;
    border-radius: 16px;
    width: calc(100% - 40px);
    max-width: 440px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.qh-modal-handle {
    display: none;
}
.qh-modal-header {
    padding: 12px 16px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #8b0000 0%, #c0392b 100%);
    flex-shrink: 0;
}
.qh-modal-title {
    font-size: 0.95rem;
    font-weight: 900;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 7px;
}
.qh-modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.qh-modal-body {
    padding: 16px 20px 32px;
    overflow-y: auto;
    flex: 1;
    background: #fff;
}
.qh-cara-list {
    padding: 0;
    margin: 0;
    list-style: none;
}
.qh-cara-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.82rem;
    color: #374151;
    line-height: 1.5;
}
.qh-cara-list li:last-child {
    border-bottom: none;
}
.qh-cara-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #c0392b;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.qh-prize-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 11px 14px;
    margin-bottom: 8px;
}
.qh-prize-rank-icon {
    width: 28px;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qh-rank-num {
    font-size: 0.85rem;
    font-weight: 900;
    color: #6b7280;
}
.qh-prize-label {
    font-size: 0.82rem;
    font-weight: 900;
    color: #1a1a2e;
}
.qh-prize-value {
    font-size: 0.78rem;
    color: #c0392b;
    font-weight: 700;
    margin-top: 2px;
}

/* ── TIKTOK LIVE CHAT ── */
.qh-chat-popup-host {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: calc(480px - 24px);
    bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 68px);
    z-index: 201;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: flex-end;
    padding-right: 56px; /* leave space for potential right-side actions */
}

/* Chat form fixed above bottom navbar */
.qh-chat-form {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: calc(480px - 24px);
    bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 10px);
    z-index: 200;
    padding: 8px;
    gap: 8px;
    align-items: center;
    display: flex;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}
.qh-chat-input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    padding: 9px 13px;
    background: #f3f4f6;
    color: #1a1a2e;
    font-size: 0.82rem;
    outline: none;
}
.qh-chat-input::placeholder {
    color: rgba(107, 114, 128, 0.7);
}
.qh-chat-send-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(180deg, #3b82f6 0, #1d4ed8 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 4px 0 rgba(10, 30, 90, 0.4);
    flex-shrink: 0;
    cursor: pointer;
}
.qh-chat-send-btn:disabled {
    opacity: 0.6;
}

/* TikTok message pills */
.qh-tiktok-msg {
    display: inline-flex;
    align-items: flex-start;
    gap: 5px;
    background: rgba(
        255,
        255,
        255,
        0.12
    ); /* barely-there — blur visible on dark tiles, invisible on white */
    border-radius: 8px;
    padding: 2px 4px 2px 0;
    max-width: 72%;
    align-self: flex-start;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: qh-msg-appear 0.2s ease;
    pointer-events: none;
}
.qh-tiktok-msg.system {
    background: rgba(255, 255, 255, 0.08);
    max-width: 82%;
}
@keyframes qh-msg-appear {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
.qh-tiktok-msg-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.8);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    overflow: hidden;
}
.qh-tiktok-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.qh-tiktok-msg-body {
    flex: 1;
    min-width: 0;
}
.qh-tiktok-msg-name {
    font-size: 0.68rem;
    font-weight: 900;
    color: #fff;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
        1px 1px 0 #000;
    display: inline;
    margin-right: 3px;
}
.qh-tiktok-msg-text {
    font-size: 0.75rem;
    color: #fff;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
        1px 1px 0 #000;
    line-height: 1.35;
    word-break: break-word;
    display: inline;
}
.qh-tiktok-msg.system .qh-tiktok-msg-text {
    color: #fff;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
        1px 1px 0 #000;
    font-style: italic;
}
.qh-chat-login-note {
    display: none;
}
