/* ==========================================================================
   QUIZ.CSS – Modular Design System for WUPAD Live Quiz
   ========================================================================== */

:root {
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --btn-red: #ef4444;
    --btn-blue: #3b82f6;
    --btn-yellow: #eab308;
    --btn-green: #22c55e;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.25);
    --warning: #f59e0b;
    --success: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Layout & Container Primitives
   ========================================================================== */

.app-shell {
    display: flex;
    flex-direction: row;
    width: 100%;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 18px 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    text-align: center;
}

h1 {
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 800;
}

h2 {
    font-size: 22px;
    margin-bottom: 6px;
    font-weight: 900;
}

p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hidden,
[hidden],
.container.hidden,
.game-screen-layout.hidden {
    display: none !important;
}

/* ==========================================================================
   Form Controls & Buttons
   ========================================================================== */

input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: #0f172a;
    color: #fff;
    margin-bottom: 16px;
    text-align: center;
    font-weight: bold;
}

input:focus {
    outline: none;
    border-color: var(--btn-blue);
}

button {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    touch-action: manipulation;
}

button:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--btn-blue);
    color: white;
}

.btn-top10-toggle {
    width: auto;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 800;
    border-radius: 20px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    cursor: pointer;
    touch-action: manipulation;
}

.quiz-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid #334155;
    padding-bottom: 8px;
    width: 100%;
}

.btn-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid #475569;
    color: #cbd5e1;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-nav-back:hover {
    background: rgba(51, 65, 85, 0.95);
    border-color: #64748b;
    color: #ffffff;
    transform: translateX(-2px);
}

.custom-room-hero-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.custom-room-hero-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(168, 85, 247, 0.25);
}

.btn-custom-room-card:hover {
    background: rgba(168, 85, 247, 0.35) !important;
    border-color: #c084fc !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   Sidebar: Top 10 Leaderboard (Desktop & Drawer)
   ========================================================================== */

.sidebar-top10 {
    width: 300px;
    background: rgba(19, 28, 46, 0.95);
    border-right: 2px solid #1e293b;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-top10-title {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--accent);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.sidebar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    background: rgba(15, 23, 42, 0.6);
    font-size: 14px;
    font-weight: bold;
    border: 1px solid transparent;
}

.sidebar-row.is-me {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.15);
}

.sidebar-rank {
    font-weight: 900;
    width: 30px;
}

.sidebar-score {
    color: var(--warning);
    font-weight: 900;
}

.mobile-bottom-leaderboard {
    display: none;
    margin-top: 18px;
    padding: 14px;
    background: rgba(19, 28, 46, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 14px;
}

/* ==========================================================================
   Featured Quiz Card (Live Evigt Quiz Banner)
   ========================================================================== */

#featured-quiz-box {
    margin-bottom: 16px;
    border: 2px solid var(--accent);
    background: linear-gradient(180deg, #1e293b, #0f172a);
    text-align: left;
    padding: 18px 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.featured-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.featured-badge {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 900;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.featured-round-tag {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: bold;
}

.featured-title {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 6px;
}

.featured-timing {
    font-size: 14px;
    margin-bottom: 14px;
}

.featured-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.featured-alias-input {
    margin-bottom: 0 !important;
    padding: 12px 14px;
    font-size: 16px;
    width: 100%;
}

.featured-btn-wrap {
    display: flex;
    justify-content: flex-end;
}

.btn-featured-join {
    width: auto !important;
    padding: 12px 22px !important;
    font-size: 16px !important;
    white-space: nowrap;
    font-weight: 900 !important;
    background: linear-gradient(135deg, #0ea5e9, #2563eb) !important;
    touch-action: manipulation;
}

.verified-alias-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 12px;
}

.verified-alias-badge {
    color: var(--success);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-link-action {
    background: none !important;
    border: none !important;
    color: var(--accent) !important;
    font-size: 12px !important;
    font-weight: bold !important;
    cursor: pointer;
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: auto !important;
    padding: 0 !important;
}

.btn-link-action:hover {
    color: #fff !important;
}

/* ==========================================================================
   Channel Cards (Eviga Kategorier)
   ========================================================================== */

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.card-header-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 800;
}

/* ⚡ DEL 1: STARTAR JUST NU (ÖPPNA LOBBYER) */
.lobby-now-section {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(14, 165, 233, 0.1));
    border: 1.5px solid rgba(34, 197, 94, 0.45);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 20px;
    text-align: left;
}

.lobby-now-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.lobby-now-heading {
    font-size: 12px;
    font-weight: 900;
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.lobby-now-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 10px;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.lobby-now-row:hover {
    border-color: #4ade80;
    background: rgba(15, 23, 42, 0.9);
}

.lobby-now-info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.lobby-now-title {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lobby-now-timer {
    font-size: 11px;
    color: #4ade80;
    font-weight: 700;
    margin-top: 2px;
    white-space: nowrap;
}

.lobby-now-btn {
    width: auto !important;
    min-width: 105px !important;
    flex-shrink: 0 !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    background: #22c55e !important;
    color: #052e16 !important;
    border-radius: 8px !important;
    border: none !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4) !important;
    cursor: pointer;
}

/* 🏟️ ENHETLIGT ARENAGALLERI */
.arena-chips-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.arena-chip {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.arena-chip:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(56, 189, 248, 0.4);
    color: #fff;
}

.arena-chip.active {
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.arena-chip.chip-lobby {
    border-color: rgba(34, 197, 94, 0.35);
}

.arena-chip.chip-lobby.active {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #4ade80;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}

.chip-pulse-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.25); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.arena-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.channel-card.is-live-lobby {
    border-color: rgba(34, 197, 94, 0.45);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.15);
}

.channel-card.is-live-lobby:hover {
    border-color: #22c55e;
    box-shadow: 0 8px 28px rgba(34, 197, 94, 0.28);
}

.channel-card {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 22px; /* Generös luft och utfyllnad */
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    position: relative;
}

.channel-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.4);
}

.channel-card.card-highlighted {
    border: 2px solid var(--accent) !important;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95)) !important;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.35) !important;
}

.channel-card.card-highlighted::before {
    content: '⭐ REKOMMENDERAD KAMP';
    position: absolute;
    top: -11px;
    right: 18px;
    background: #38bdf8;
    color: #0b1120;
    font-size: 10px;
    font-weight: 900;
    padding: 4px;
    border-radius: 6px;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.channel-category {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 800;
    margin-bottom: 4px;
    width: 100%;
    letter-spacing: 0.5px;
}

h2.channel-title,
.channel-title {
    font-weight: 900;
    font-size: 18px;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 14px;
    width: 100%;
    display: block;
}

.channel-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    width: 100%;
    flex-wrap: wrap;
    margin-top: 4px;
}

.channel-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.channel-timing {
    margin: 0;
    display: flex;
    align-items: center;
}

/* Nästa start / gång: Utformad som en knapp med inverterade färger och fet-stil */
.next-round-btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 900 !important;
    font-size: 13px !important;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    text-transform: none;
    white-space: nowrap;
}

.next-round-btn-pill .sec-unit {
    text-transform: lowercase;
}

.next-round-btn-pill.pill-lobby {
    background: #22c55e !important; /* Ljus grön solid bakgrund */
    color: #052e16 !important;      /* Mörk grön inverterad text */
    border: 1px solid #16a34a !important;
}

.next-round-btn-pill.pill-active {
    background: #f59e0b !important; /* Ljus bärnsten solid bakgrund */
    color: #451a03 !important;      /* Mörk bärnsten inverterad text */
    border: 1px solid #d97706 !important;
}

.next-round-btn-pill.pill-finished {
    background: #38bdf8 !important; /* Ljus himmelsblå solid bakgrund */
    color: #082f49 !important;      /* Mörk blå inverterad text */
    border: 1px solid #0284c7 !important;
}

.next-round-btn-pill.pill-idle {
    background: #0ea5e9 !important; /* Solid accentblå bakgrund */
    color: #0b1120 !important;      /* Mörk inverterad text */
    border: 1px solid #0284c7 !important;
}

.channel-meta {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.channel-join-btn {
    width: 100%;
    white-space: nowrap;
    touch-action: manipulation;
    border-radius: 10px !important;
}

.channel-card .channel-join-btn,
.channel-card .btn-custom-room-card {
    width: 100% !important;
    margin: 0 !important;
    height: 42px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    padding: 10px 8px !important;
    border-radius: 10px !important;
}

/* ==========================================================================
   Rules & Feature Highlight Boxes
   ========================================================================== */

.rules-card {
    padding: 18px 10px;
    margin-top: 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    text-align: left;
}

.rules-heading {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--warning);
    font-weight: 900;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.rule-box {
    background: rgba(30, 41, 59, 0.7);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.rule-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.rule-title {
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 2px;
}

.rule-desc {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.3;
}

/* ==========================================================================
   Game Controls & Answer Buttons
   ========================================================================== */

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    margin-bottom: 12px;
}

.streak-pill {
    background: var(--warning);
    color: #000;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
}

.timer-track {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.timer-fill {
    height: 100%;
    background: var(--accent);
    width: 100%;
    transition: width 1s linear;
}

/* ==========================================================================
   Full-Height Game Screen with Fixed Bottom Action Deck & Middle Scroll
   ========================================================================== */

.game-screen-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    padding: 10px 14px 0 14px;
    box-sizing: border-box;
    overflow: hidden;
    justify-content: space-between;
    position: relative;
    max-width: 520px;
    margin: 0 auto;
}

.game-top-bar {
    flex-shrink: 0;
    width: 100%;
    z-index: 10;
    margin-bottom: 4px;
}

.game-timer-card {
    background: rgba(15, 23, 42, 0.7);
    padding: 4px 10px;
    border-radius: 8px;
    margin-bottom: 6px;
    border: 1px solid rgba(51, 65, 85, 0.4);
}

.game-scroll-body {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 2px 10px 2px;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
}

.game-scroll-body::-webkit-scrollbar {
    width: 4px;
}
.game-scroll-body::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
    border-radius: 4px;
}

.game-bottom-deck {
    flex-shrink: 0;
    width: 100%;
    z-index: 20;
    padding-top: 6px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
    box-sizing: border-box;
    border-top: 1px solid rgba(51, 65, 85, 0.5);
    background: rgba(11, 17, 32, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Question Number & Total Indicators */
.header-q-counter {
    font-size: 11.5px;
    font-weight: 800;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 999px;
    padding: 4px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 4px rgba(56, 189, 248, 0.15);
}

.game-q-meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 3px 0;
}

.deck-q-counter {
    font-size: 11px;
    font-weight: 800;
    color: #cbd5e1;
    letter-spacing: 0.5px;
    background: rgba(30, 41, 59, 0.75);
    padding: 1px 10px;
    border-radius: 999px;
    border: 1px solid rgba(100, 116, 139, 0.45);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.game-q-text {
    font-size: 16px;
    line-height: 1.35;
    font-weight: 800;
    color: #f8fafc;
    text-align: center;
    margin: 0 0 6px 0;
    padding: 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
}

/* Reveal mode: only right and wrong answer buttons side by side (intill varandra) */
.grid-buttons.reveal-mode {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 12px !important;
    margin-top: 10px !important;
    margin-bottom: 4px !important;
    width: 100% !important;
}

.grid-buttons.reveal-mode .ans-btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 80px !important;
    padding: 10px 12px !important;
}

.grid-buttons.reveal-mode .ans-btn.wrong-reveal {
    order: 1;
}

.grid-buttons.reveal-mode .ans-btn.correct-reveal {
    order: 2;
}

.grid-buttons.reveal-mode .ans-btn.fade-out {
    display: none !important;
}

.ans-btn {
    font-size: 18px;
    font-weight: 800;
    color: white;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 125px;
    text-align: center;
    padding: 12px 10px;
    position: relative;
    cursor: pointer;
    border: 3px solid transparent;
    transition: opacity 0.3s ease, filter 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.ans-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.btn-0 { background: var(--btn-red); }
.btn-1 { background: var(--btn-blue); }
.btn-2 { background: var(--btn-yellow); color: #000; }
.btn-3 { background: var(--btn-green); }

.ans-btn.selected {
    transform: scale(1.03);
    border: 4px solid #ffffff !important;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.75);
    z-index: 2;
}

.ans-btn.dimmed {
    opacity: 0.32;
    filter: grayscale(85%);
    pointer-events: none;
    transform: scale(0.98);
}

.ans-btn.fade-out {
    opacity: 0.05 !important;
    filter: grayscale(100%) blur(2px) !important;
    transform: scale(0.92) !important;
    pointer-events: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

@keyframes pop-correct {
    0% { transform: scale(1); }
    35% { transform: scale(1.08); box-shadow: 0 0 35px rgba(34, 197, 94, 0.95); }
    100% { transform: scale(1.04); box-shadow: 0 0 25px rgba(34, 197, 94, 0.7); }
}

@keyframes shake-wrong {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px) scale(1.02); }
    40%, 80% { transform: translateX(8px) scale(1.02); }
}

.ans-btn.correct-reveal {
    animation: pop-correct 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    border: 4px solid #22c55e !important;
    background: #15803d !important;
    color: #ffffff !important;
    opacity: 1 !important;
    filter: none !important;
    z-index: 5;
}

.ans-btn.wrong-reveal {
    animation: shake-wrong 0.5s ease-in-out;
    border: 4px solid #ef4444 !important;
    background: #b91c1c !important;
    color: #ffffff !important;
    opacity: 0.95 !important;
    filter: none !important;
    z-index: 4;
}

.ans-btn .choice-badge {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Modals & Dialogs
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal-card {
    background: #1e293b;
    border-radius: 18px;
    padding: 24px;
    max-width: 520px;
    width: 100%;
    border: 2px solid var(--border-color);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.modal-title {
    font-size: 19px;
    font-weight: 900;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    width: auto !important;
    padding: 6px 14px !important;
    background: var(--border-color) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 14px !important;
    cursor: pointer;
}

.highscore-tabs-container {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding: 2px 2px 8px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-overflow-scrolling: touch;
}

.hs-tab-btn {
    background: rgba(30, 41, 59, 0.6);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.hs-tab-btn:hover {
    color: #fff;
    border-color: #475569;
    background: rgba(51, 65, 85, 0.8);
}

.hs-tab-btn.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.35));
    color: #f59e0b;
    border-color: #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.hs-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 6px;
}

.hs-row.is-me {
    border: 1px solid var(--warning);
    background: rgba(245, 158, 11, 0.15);
}

.alias-pill {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s;
    touch-action: manipulation;
}

.alias-pill:hover {
    background: var(--accent);
    color: #0f172a;
}

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */

.alert-box {
    margin-bottom: 12px;
    font-size: 13px;
    padding: 10px;
    border-radius: 8px;
    text-align: left;
}

.alert-error {
    color: #f87171;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
}

.alert-success {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid #22c55e;
}

.alert-warning {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid #f59e0b;
}

/* ==========================================================================
   Countdown & Pulse Animations
   ========================================================================== */

.countdown-box {
    background: rgba(15, 23, 42, 0.7);
    border: 2px solid var(--accent);
    border-radius: 14px;
    padding: 14px;
    margin: 10px 0;
}

.countdown-box.warning {
    border-color: var(--warning);
}

.countdown-number {
    font-size: 42px;
    font-weight: 900;
    color: var(--accent);
    margin: 2px 0;
}

.countdown-number.warning {
    color: var(--warning);
}

.countdown-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 800;
}

.battle-again-box {
    margin: 10px 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.95));
    border: 1.5px solid var(--warning);
    text-align: center;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.18);
}

/* ==========================================================================
   Winner Champion Announcement & Celebratory Effects
   ========================================================================== */

@keyframes championGlow {
    0% {
        box-shadow: 0 0 12px rgba(245, 158, 11, 0.35), inset 0 0 8px rgba(245, 158, 11, 0.15);
        border-color: #f59e0b;
    }
    50% {
        box-shadow: 0 0 25px rgba(245, 158, 11, 0.65), inset 0 0 18px rgba(245, 158, 11, 0.3);
        border-color: #fbbf24;
    }
    100% {
        box-shadow: 0 0 12px rgba(245, 158, 11, 0.35), inset 0 0 8px rgba(245, 158, 11, 0.15);
        border-color: #f59e0b;
    }
}

@keyframes crownBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.15) rotate(4deg);
    }
}

@keyframes winnerPopIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    70% {
        transform: scale(1.03);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.winner-champion-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(15, 23, 42, 0.95), rgba(217, 119, 6, 0.18));
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 10px 14px;
    text-align: center;
    animation: championGlow 2.5s infinite ease-in-out, winnerPopIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.winner-champion-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.winner-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.winner-crown-badge {
    font-size: 36px;
    animation: crownBounce 2s infinite ease-in-out;
    filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.6));
    flex-shrink: 0;
}

.winner-text-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.winner-label {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #f59e0b;
}

.winner-name {
    font-size: 19px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 15px rgba(245, 158, 11, 0.6);
    line-height: 1.2;
}

.winner-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fbbf24;
    font-weight: 800;
    font-size: 13px;
    padding: 2px 10px;
    border-radius: 12px;
    margin-top: 2px;
}

.winner-my-placement {
    font-size: 12px;
    color: #cbd5e1;
    margin-top: 2px;
    font-weight: 700;
}

.confetti-particle {
    position: fixed;
    width: 8px;
    height: 12px;
    pointer-events: none;
    z-index: 9999;
    border-radius: 2px;
    will-change: transform, opacity;
}

/* ==========================================================================
   Network / Reconnection Status Floating Pill
   ========================================================================== */

@keyframes toastPulse {
    0%, 100% {
        opacity: 0.95;
        transform: translate(-50%, 0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1.03);
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
    }
}

.reconnect-toast {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translate(-50%, 0);
    z-index: 10000;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    background: #0f172a;
    border: 1.5px solid #f59e0b;
    color: #fbbf24;
    animation: toastPulse 1.8s infinite ease-in-out;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.reconnect-toast.success {
    border-color: #22c55e;
    color: #4ade80;
    animation: none;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
}

/* ==========================================================================
   Quiz Image Spotlight & Dynamic Presentation Zoom
   ========================================================================== */

.player-img-wrap {
    margin-bottom: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
    position: relative;
    overflow: visible;
    width: 100%;
}

.player-img-attribution {
    position: absolute;
    right: 8px;
    bottom: 2px;
    font-size: 11px;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.7);
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.2px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 25;
    line-height: 1.3;
}

.host-img-wrap {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 140px;
    position: relative;
    width: 100%;
}

.host-img-attribution {
    position: absolute;
    right: 20px;
    bottom: 2px;
    font-size: 13px;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.75);
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 25;
    line-height: 1.3;
}

.player-quiz-img {
    border-radius: 14px;
    border: 1.5px solid #1d4ed8;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    object-position: center top;
    background: rgba(15, 23, 42, 0.75);
    will-change: height, max-height, max-width, transform, box-shadow;
}

/* Spotlight mode (initial hero reveal: takes up ~32vh in the scroll body, never cropped) */
.player-quiz-img.spotlight {
    height: auto !important;
    max-height: 33vh !important;
    max-width: 90vw !important;
    width: auto !important;
    object-fit: contain !important;
    object-position: center top !important;
    box-shadow: 0 10px 32px rgba(29, 78, 216, 0.35), 0 0 25px rgba(0, 0, 0, 0.85);
    border-color: #1d4ed8;
    border-width: 1.5px;
    margin-top: 2px;
    z-index: 20;
    transition: none !important; /* Start big directly without initial resize animation */
}

/* Compact mode (normal layout: smooth 1.0s shrink transition down) */
.player-quiz-img.compact {
    height: auto !important;
    max-height: 120px !important;
    max-width: 220px !important;
    width: auto !important;
    object-fit: contain !important;
    object-position: center top !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
    border-color: #1d4ed8;
    border-width: 1.5px;
    transition: max-height 1.0s cubic-bezier(0.25, 1, 0.5, 1),
                max-width 1.0s cubic-bezier(0.25, 1, 0.5, 1),
                box-shadow 1.0s cubic-bezier(0.25, 1, 0.5, 1),
                border-color 1.0s cubic-bezier(0.25, 1, 0.5, 1);
}

.host-quiz-img {
    border-radius: 16px;
    border: 2px solid #1d4ed8;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    object-position: center top;
    background: rgba(15, 23, 42, 0.75);
    will-change: height, max-height, max-width, transform, box-shadow;
}

.host-quiz-img.spotlight {
    height: auto !important;
    max-height: 52vh !important;
    max-width: 80vw !important;
    width: auto !important;
    object-fit: contain !important;
    object-position: center top !important;
    box-shadow: 0 14px 40px rgba(29, 78, 216, 0.4), 0 0 35px rgba(0, 0, 0, 0.9);
    border-color: #1d4ed8;
    border-width: 2px;
    transition: none !important; /* Immediately large on render */
}

.host-quiz-img.compact {
    height: auto !important;
    max-height: 250px !important;
    max-width: 360px !important;
    width: auto !important;
    object-fit: contain !important;
    object-position: center top !important;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6);
    border-color: #1d4ed8;
    border-width: 2px;
    transition: max-height 1.0s cubic-bezier(0.25, 1, 0.5, 1),
                max-width 1.0s cubic-bezier(0.25, 1, 0.5, 1),
                box-shadow 1.0s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==========================================================================
   ⚡ Question Time Compression & Screen Punch Effect
   ========================================================================== */

@keyframes screenPunch {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(0.99); /* Trycks ihop 1% som en kraftfull puls */
    }
    65% {
        transform: scale(1.004); /* Liten elastisk rekyl */
    }
    100% {
        transform: scale(1);
    }
}

.punch-active {
    animation: screenPunch 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
    will-change: transform;
}

.badge-compress {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.35));
    border: 1px solid #f59e0b;
    color: #fbbf24;
    padding: 4px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.25px;
    margin-left: 6px;
    vertical-align: middle;
}

@keyframes pulseCompress {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(245, 158, 11, 0);
        border-color: #f59e0b;
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 14px rgba(245, 158, 11, 0.7);
        border-color: #fde047;
    }
}

.badge-compress.pulse {
    animation: pulseCompress 0.65s infinite ease-in-out;
}

.timer-fill.compressed {
    transition: width 0.05s linear !important;
    background: linear-gradient(90deg, #f59e0b, #ef4444) !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.7) !important;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.quiz-footer {
    text-align: center;
    margin-top: 28px;
    margin-bottom: 28px;
    color: #64748b;
    font-size: 13px;
}

.quiz-footer a {
    color: #94a3b8;
    text-decoration: none;
}

.quiz-footer a.highlight {
    color: var(--accent);
    font-weight: 600;
}

.quiz-footer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Mobile Responsive Rules (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
    .app-shell {
        flex-direction: column;
    }
    .sidebar-top10 {
        display: none !important;
    }
    .mobile-bottom-leaderboard {
        display: block;
    }
    .container {
        padding: 10px 14px;
    }
    .game-screen-layout {
        padding: 6px 10px 0 10px !important;
    }
    .header-bar {
        padding: 6px 10px;
        margin-bottom: 6px;
        font-size: 13.5px;
    }
    #player-q-img.compact {
        height: auto !important;
        max-height: 100px !important;
        max-width: 180px !important;
        object-fit: contain !important;
        object-position: center top !important;
        border-radius: 10px;
    }
    #player-q-img.spotlight {
        height: auto !important;
        max-height: 32vh !important;
        max-width: 90vw !important;
        object-fit: contain !important;
        object-position: center top !important;
        border-radius: 14px;
        transition: none !important;
    }
    .header-q-counter {
        font-size: 11px !important;
        padding: 1px 6px !important;
    }
    .deck-q-counter {
        font-size: 10.5px !important;
        padding: 1px 8px !important;
    }

.game-q-text {
        font-size: 14px !important;
        line-height: 1.25 !important;
        margin: 0 0 4px 0 !important;
    }
    .game-timer-card {
        padding: 3px 8px !important;
        margin-bottom: 4px !important;
    }
    .grid-buttons {
        gap: 6px !important;
        margin-top: 2px !important;
    }
    .ans-btn {
        min-height: 58px !important;
        font-size: 13.5px !important;
        padding: 5px 6px !important;
        border-radius: 10px !important;
    }
    .ans-btn .choice-badge {
        margin-top: 3px !important;
        font-size: 10.5px !important;
        padding: 2px 5px !important;
    }
    .ans-btn span {
        font-size: 13.5px !important;
    }
    #in-game-banner {
        margin: 4px 0 6px 0 !important;
        padding: 6px 8px !important;
        font-size: 13.5px !important;
    }
}

/* ==========================================================================
   QUESTION FEEDBACK & OPINION BAR (TYCK TILL) & ADMIN REVIEW MODAL
   ========================================================================== */

.question-feedback-bar {
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 10px;
    padding: 4px 8px;
    margin: 8px 0 10px 0;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    align-self: flex-start;
    text-align: left;
    gap: 6px;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    animation: feedbackFadeIn 0.2s ease-out;
    width: fit-content !important;
    max-width: 100%;
    box-sizing: border-box;
}
.question-feedback-bar::-webkit-scrollbar {
    display: none;
}

@keyframes feedbackFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.feedback-title {
    font-size: 11px;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 0.2px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 2px;
}

.feedback-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap !important;
    flex-shrink: 0;
    width: auto;
}

.btn-feedback {
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    white-space: nowrap;
    flex-shrink: 0;
    width: auto !important;
    flex: 0 0 auto !important;
}

@media (max-width: 480px) {
    .question-feedback-bar {
        padding: 3px 6px;
        gap: 4px;
        margin: 6px 0 8px 0;
    }
    .feedback-title {
        font-size: 10px;
        letter-spacing: 0;
    }
    .feedback-btn-group {
        gap: 3px;
    }
    .btn-feedback {
        font-size: 10.5px;
        padding: 2px 6px;
        gap: 2px;
    }
}

.btn-feedback.fb-fel {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}
.btn-feedback.fb-fel:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.35);
    border-color: #ef4444;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-feedback.fb-tveksam {
    background: rgba(234, 179, 8, 0.18);
    border-color: rgba(234, 179, 8, 0.5);
    color: #fde047;
}
.btn-feedback.fb-tveksam:hover:not(:disabled) {
    background: rgba(234, 179, 8, 0.35);
    border-color: #eab308;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-feedback.fb-dalig {
    background: rgba(249, 115, 22, 0.18);
    border-color: rgba(249, 115, 22, 0.5);
    color: #fdba74;
}
.btn-feedback.fb-dalig:hover:not(:disabled) {
    background: rgba(249, 115, 22, 0.35);
    border-color: #f97316;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-feedback.fb-bra {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.5);
    color: #86efac;
}
.btn-feedback.fb-bra:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.35);
    border-color: #22c55e;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-feedback.selected {
    box-shadow: 0 0 14px currentColor;
    transform: scale(1.04);
    filter: brightness(1.2);
}

.btn-feedback.dimmed {
    opacity: 0.32;
    filter: grayscale(60%);
    cursor: default;
}

.feedback-ack-text {
    font-size: 11px;
    font-weight: 800;
    color: #4ade80;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Feedback Review Modal Cards */
.feedback-summary-card {
    background: rgba(30, 41, 59, 0.85);
    border: 1.5px solid #334155;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}
.feedback-summary-card.has-error {
    border-color: rgba(239, 68, 68, 0.5);
}
.feedback-summary-card.is-reviewed {
    border-color: rgba(34, 197, 94, 0.4);
    opacity: 0.85;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}
.badge-pill.pill-fel { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-pill.pill-tveksam { background: rgba(234, 179, 8, 0.2); color: #fde047; border: 1px solid rgba(234, 179, 8, 0.4); }
.badge-pill.pill-dalig { background: rgba(249, 115, 22, 0.2); color: #fdba74; border: 1px solid rgba(249, 115, 22, 0.4); }
.badge-pill.pill-bra { background: rgba(34, 197, 94, 0.2); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.4); }
.badge-pill.pill-closed { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.4); }

/* Game Rules & Variants styling */
.rule-toggle-card {
    transition: all 0.2s ease;
}
.rule-toggle-card:hover {
    border-color: #64748b !important;
    background: rgba(51, 65, 85, 0.8) !important;
}
.rule-toggle-card.checked-blitz {
    border-color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.16) !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}
.rule-toggle-card.checked-deduction {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.16) !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}
.rule-toggle-card.checked-hard {
    border-color: #a855f7 !important;
    background: rgba(168, 85, 247, 0.16) !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

.rule-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.rule-badge.blitz {
    background: rgba(245, 158, 11, 0.18);
    border: 1.5px solid #f59e0b;
    color: #fbbf24;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}
.rule-badge.deduction {
    background: rgba(239, 68, 68, 0.18);
    border: 1.5px solid #ef4444;
    color: #fca5a5;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}
.rule-badge.hard {
    background: rgba(168, 85, 247, 0.18);
    border: 1.5px solid #a855f7;
    color: #d8b4fe;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}
.rule-badge-compact {
    font-size: 10px;
    padding: 2px 7px;
    gap: 3px;
}

/* Oraklets aktiva hjälpknapp (placerad mellan 'Tid kvar:' och sekundvisaren) */
.btn-oracle-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    flex: 0 0 auto;
    gap: 2px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.24) 0%, rgba(99, 102, 241, 0.32) 100%);
    color: #f3e8ff;
    border: 1.5px solid rgba(192, 132, 252, 0.6);
    padding: 4px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    box-shadow: 0 2px 10px rgba(168, 85, 247, 0.25);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-oracle-help:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.40) 0%, rgba(99, 102, 241, 0.48) 100%);
    border-color: #d8b4fe;
    color: #ffffff;
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.45);
}

.btn-oracle-help:active:not(:disabled) {
    transform: translateY(0) scale(0.97);
}

.btn-oracle-help:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(30, 41, 59, 0.45);
    color: var(--text-muted, #94a3b8);
    box-shadow: none;
    transform: none !important;
}

.btn-oracle-help.btn-oracle-help--pulse {
    animation: helpPulseGain 0.75s ease-out 1;
}

@keyframes helpPulseGain {
    0% { transform: scale(1); }
    40% { transform: scale(1.22); border-color: #ffd54a; color: #ffd54a; box-shadow: 0 0 16px rgba(255, 213, 74, 0.65); }
    100% { transform: scale(1); }
}

/* Oraklets borttagning av felaktigt svarsalternativ: tydligt eliminerat */
.ans-btn.oracle-hint-wrong {
    opacity: 0.30 !important;
    text-decoration: line-through;
    filter: grayscale(0.85);
    cursor: not-allowed !important;
    pointer-events: none !important;
    transform: scale(0.97) !important;
    border-color: rgba(239, 68, 68, 0.45) !important;
    background: rgba(15, 23, 42, 0.55) !important;
    transition: opacity 0.35s ease, transform 0.35s ease, filter 0.35s ease;
}

/* ==========================================================================
   Quiz Global Header / Navbar
   ========================================================================== */

.quiz-global-header {
    width: 100%;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1.5px solid rgba(51, 65, 85, 0.6);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.quiz-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.quiz-header-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.quiz-header-brand .logo-icon {
    font-size: 22px;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6));
}

.quiz-header-brand .logo-text {
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.quiz-header-brand .logo-accent {
    color: #38bdf8;
}

.quiz-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-header-action {
    width: auto !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    border: 1.5px solid rgba(148, 163, 184, 0.3);
    background: rgba(30, 41, 59, 0.6);
    color: #cbd5e1;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.btn-header-action:hover {
    border-color: #38bdf8;
    color: #ffffff;
    background: rgba(56, 189, 248, 0.15);
    transform: translateY(-1px);
}

.btn-header-action.action-synpunkter {
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
}
.btn-header-action.action-synpunkter:hover {
    background: rgba(56, 189, 248, 0.22);
    border-color: #38bdf8;
}

.btn-header-action.action-highscore {
    border-color: rgba(245, 158, 11, 0.4);
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}
.btn-header-action.action-highscore:hover {
    background: rgba(245, 158, 11, 0.22);
    border-color: #f59e0b;
}

.header-badge-count {
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    padding: 1px 6px;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

@media (max-width: 768px) {
    .quiz-header-inner {
        padding: 10px 14px;
    }
    .quiz-header-brand .logo-text {
        font-size: 16px;
    }
    .btn-header-action {
        padding: 6px 10px;
        font-size: 12px;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .btn-header-action .btn-label-text {
        display: none;
    }
    .btn-header-action {
        padding: 6px 9px;
        font-size: 14px;
    }
}




