/* LIVE TRIVIA CAGE - PREMIUM UFC STYLE STYLING */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;700&family=Outfit:wght@300;400;600;700;900&display=swap');

:root {
    --bg-dark: #070708;
    --card-dark: rgba(13, 13, 16, 0.95);
    --ka-red: #E10600;
    --ka-red-glow: rgba(225, 6, 0, 0.35);
    --ka-border: rgba(255, 255, 255, 0.04);
    --text-main: #ffffff;
    --text-muted: #7e7e86;
    --neon-green: #10b981;
    --neon-green-glow: rgba(16, 185, 129, 0.35);
    --neon-red: #ef4444;
    --neon-red-glow: rgba(239, 68, 68, 0.35);
}

.trivia-body {
    background-color: var(--bg-dark);
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
}

/* 3-COLUMN DASHBOARD GRID */
.trivia-grid {
    display: grid;
    grid-template-columns: 280px 1fr 295px;
    gap: 20px;
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 15px 40px 15px;
}

@media (max-width: 1300px) {
    .trivia-grid {
        grid-template-columns: 240px 1fr 250px;
        gap: 12px;
    }
}

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

/* SIDEBAR CONTAINER & PREMIUM GLASSMORPHISM */
.trivia-sidebar-card {
    background: #0d0d10; /* Solid background to avoid massive repaint lag on scroll/chat updates */
    border: 1px solid var(--ka-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.trivia-sidebar-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LEFT SIDEBAR: LIVE LEADERBOARD */
.trivia-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom Scrollbars */
.trivia-leaderboard-list::-webkit-scrollbar,
.trivia-chat-messages::-webkit-scrollbar {
    width: 4px;
}
.trivia-leaderboard-list::-webkit-scrollbar-thumb,
.trivia-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.trivia-leaderboard-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.trivia-leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.05);
}

.trivia-leaderboard-item.user-self {
    background: rgba(225, 6, 0, 0.08);
    border: 1px solid rgba(225, 6, 0, 0.3);
    box-shadow: 0 0 10px rgba(225, 6, 0, 0.1);
}

.trivia-rank-num {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    width: 25px;
    color: var(--text-muted);
}
.trivia-leaderboard-item.user-self .trivia-rank-num {
    color: var(--ka-red);
}

.trivia-leaderboard-pfp {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-right: 12px;
}
.trivia-leaderboard-item.user-self .trivia-leaderboard-pfp {
    border-color: var(--ka-red);
}

.trivia-leaderboard-info {
    flex: 1;
}

.trivia-leaderboard-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.trivia-leaderboard-streak {
    font-size: 0.7rem;
    color: var(--ka-red);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
}

.trivia-leaderboard-score {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

/* WINS SUMMARY BOX */
.trivia-last-winners-box {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

.trivia-last-winners-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.trivia-winner-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #eee;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}
.trivia-winner-row:last-child {
    border-bottom: none;
}

.trivia-winner-name {
    font-weight: 700;
}

.trivia-winner-prize {
    color: #eab308;
    font-weight: 800;
}

/* MIDDLE COLUMN: THE TRIVIA OCTAGON */
.trivia-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.trivia-octagon-wrapper {
    position: relative;
    width: 654px;
    height: 621px;
    margin: 0 auto;
}

.trivia-octagon-container {
    position: relative;
    width: 654px;
    height: 621px;
    margin: 0 auto;
    background: transparent;
    user-select: none;
    transform-origin: top center;
}

@media (max-width: 1300px) and (min-width: 1100px) {
    .trivia-octagon-wrapper {
        width: 556px;
        height: 528px;
    }
    .trivia-octagon-container {
        transform: scale(0.85);
    }
}

.trivia-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* OVERLAID INTERACTIVE CONTROLS */

/* LIVE STATUS LED PULSE */
.trivia-live-indicator {
    position: absolute;
    left: 7px;
    top: 19px;
    width: 102.5px;
    height: 28.32px;
    overflow: hidden;
    z-index: 10;
}

.trivia-live-bg {
    position: absolute;
    left: -7px;
    top: -19px;
    width: 654px;
    height: 621px;
    max-width: none;
    pointer-events: none;
}

.pulse-dot-green {
    position: absolute;
    left: 10px;
    top: 14px;
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: ledPulseGreen 1.5s infinite;
    z-index: 2;
}

@keyframes ledPulseGreen {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

/* TIMER COUNTDOWN TEXT */
.trivia-timer-num {
    position: absolute;
    left: 544.5px;
    top: 19px;
    width: 102.5px;
    height: 28.32px;
    overflow: hidden;
    z-index: 10;
}

.trivia-timer-bg {
    position: absolute;
    left: -544.5px;
    top: -19px;
    width: 654px;
    height: 621px;
    max-width: none;
    pointer-events: none;
}

.timer-mask-count {
    position: absolute;
    left: 61.5px;
    top: 0;
    width: 35px;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 2;
}

#timer-sec-count {
    font-family: 'Oswald', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.trivia-timer-num.critical {
    color: var(--ka-red);
    text-shadow: 0 0 12px var(--ka-red);
    animation: blinkCritical 0.5s infinite alternate;
}

@keyframes blinkCritical {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* HEADER QUESTION/CATEGORY */
.trivia-header-info {
    position: absolute;
    left: 75px;
    top: 124px;
    width: 504px;
    height: 34px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 10;
}

.trivia-index-container {
    position: relative;
    display: flex;
    align-items: center;
}

.trivia-header-mask {
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 20px;
    background: linear-gradient(to right, #8a0000, #7d0000);
    z-index: 1;
}

.trivia-question-index {
    position: relative;
    z-index: 2;
    color: #fff;
    padding-bottom: 2px;
}

/* QUESTION TEXT BOX */
.trivia-question-text {
    position: absolute;
    left: 140px;
    top: 168px;
    width: 373px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    padding: 10px;
    line-height: 1.4;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* OPTION BUTTONS OVERLAY */
.trivia-option {
    position: absolute;
    width: 438px;
    height: 41px;
    left: 107px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 20px;
    color: #d1d1d6;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    text-align: left;
    outline: none;
}

.trivia-option::before {
    content: attr(data-letter) ". ";
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-right: 12px;
    transition: color 0.2s;
}

/* POSITION ACCORDING TO SVG COORDINATES */
.trivia-option[data-option="0"] { top: 277px; }
.trivia-option[data-option="1"] { top: 328px; }
.trivia-option[data-option="2"] { top: 379px; }
.trivia-option[data-option="3"] { top: 430px; }

/* HOVER & FEEDBACK GLOW STATES */
.trivia-option:hover:not(:disabled) {
    color: #fff;
    border-style: solid;
    border-color: var(--ka-red);
    background: rgba(225, 6, 0, 0.04);
    box-shadow: 0 0 10px rgba(225, 6, 0, 0.15);
}
.trivia-option:hover::before {
    color: var(--ka-red);
}

.trivia-option.selected {
    color: #fff;
    border-style: solid;
    border-color: var(--ka-red);
    background: rgba(225, 6, 0, 0.12);
    box-shadow: 0 0 15px rgba(225, 6, 0, 0.35);
}
.trivia-option.selected::before {
    color: #fff;
}

.trivia-option.correct {
    color: #fff !important;
    border: 2.5px solid var(--neon-green) !important;
    background: rgba(16, 185, 129, 0.2) !important;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.5) !important;
}
.trivia-option.correct::before {
    color: var(--neon-green) !important;
}

.trivia-option.incorrect {
    color: #fff !important;
    border: 2.5px solid var(--neon-red) !important;
    background: rgba(239, 68, 68, 0.2) !important;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.5) !important;
}
.trivia-option.incorrect::before {
    color: var(--neon-red) !important;
}

/* PROGRESS INDICATOR DOTS */
.trivia-progress-dots {
    position: absolute;
    left: 75px;
    top: 590px;
    width: 504px;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.trivia-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trivia-dot.active {
    background: #fff;
    box-shadow: 0 0 8px #fff;
    transform: scale(1.2);
}

.trivia-dot.correct {
    background: var(--neon-green);
    border-color: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green);
}

.trivia-dot.incorrect {
    background: var(--neon-red);
    border-color: var(--neon-red);
    box-shadow: 0 0 8px var(--neon-red);
}

/* NOTE BOX INFO */
.trivia-note-text-container {
    position: absolute;
    left: 76px;
    top: 508px;
    width: 502px;
    height: 51px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.trivia-note-text {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    transition: color 0.3s;
}

.trivia-note-text.highlight {
    color: #eab308;
    text-shadow: 0 0 8px rgba(234, 179, 8, 0.3);
}

/* RESPONSIVE SCALING OCTAGON FOR SMALL MOBILE DEVICES */
@media (max-width: 680px) {
    :root {
        --trivia-scale: calc((100vw - 20px) / 680);
    }
    .trivia-octagon-wrapper {
        width: 100%;
        height: calc(621px * var(--trivia-scale));
        position: relative;
        overflow: visible;
    }
    .trivia-octagon-container {
        transform: scale(var(--trivia-scale));
        transform-origin: top center;
        position: absolute;
        top: 0;
        left: 50%;
        margin-left: -327px; /* Centering half of 654px width */
        margin-bottom: 0 !important;
    }
}
@media (max-width: 480px) {
    :root {
        --trivia-scale: calc((100vw - 20px) / 654);
    }
}

/* RIGHT SIDEBAR: LIVE CHAT SIMULATION */
.trivia-chat-messages {
    flex: 1;
    min-height: 250px;
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 5px;
    margin-bottom: 15px;
}

.trivia-chat-msg {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.02);
    padding: 8px 12px;
    border-radius: 8px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.trivia-chat-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.trivia-chat-username {
    font-size: 0.8rem;
    font-weight: 700;
    color: #eee;
}

.trivia-chat-role {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
    text-transform: uppercase;
}
.trivia-chat-role.mod { background: rgba(225, 6, 0, 0.2); color: var(--ka-red); border: 1px solid rgba(225, 6, 0, 0.3); }
.trivia-chat-role.user { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }

.trivia-chat-content {
    font-size: 0.8rem;
    color: #b3b3b8;
    line-height: 1.35;
}

.trivia-chat-input-wrap {
    display: flex;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
}

.trivia-chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 8px 12px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.3s;
}

.trivia-chat-input:focus {
    border-color: var(--ka-red);
    background: rgba(255, 255, 255, 0.05);
}

.trivia-chat-send {
    background: var(--ka-red);
    border: none;
    color: #fff;
    padding: 0 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.3s;
}

.trivia-chat-send:hover {
    background: #b00500;
    box-shadow: 0 0 10px rgba(225, 6, 0, 0.3);
}

/* HORIZONTAL BOTTOM INFORMATION ROW */
.trivia-bottom-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1440px;
    margin: 24px auto 0 auto;
    padding: 0 20px;
}

@media (max-width: 992px) {
    .trivia-bottom-row {
        grid-template-columns: 1fr;
    }
}

.trivia-bottom-card {
    background: var(--card-dark);
    border: 1px solid var(--ka-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.trivia-bottom-card h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
    color: #fff;
}

.trivia-bottom-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.trivia-bottom-leader-card {
    display: flex;
    align-items: center;
    gap: 15px;
}

.trivia-bottom-leader-pfp {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #eab308;
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.3);
}

.trivia-bottom-leader-info {
    flex: 1;
}

.trivia-bottom-leader-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
}

.trivia-bottom-leader-badge {
    font-size: 0.75rem;
    color: #eab308;
    font-weight: 700;
    margin-top: 2px;
}

/* CAGE OWNER REWARDS */
.trivia-reward-value {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #eab308;
    text-shadow: 0 0 15px rgba(234, 179, 8, 0.3);
    margin: 5px 0;
}

/* SHARING UTILITIES */
.trivia-share-section {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-trivia-share {
    background: transparent;
    border: 1px solid var(--ka-red);
    color: var(--ka-red);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-trivia-share:hover {
    background: var(--ka-red);
    color: #fff;
    box-shadow: 0 0 15px rgba(225, 6, 0, 0.4);
}

/* PREMIUM SHARE MODAL STYLING */
.trivia-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

.trivia-modal-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.trivia-modal-container {
    background: #0f0f12;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.trivia-modal-overlay.active .trivia-modal-container {
    transform: translateY(0);
}

.trivia-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.trivia-modal-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 0.5px;
}

.trivia-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.trivia-modal-close:hover {
    color: #fff;
}

.trivia-share-preview-card {
    background: #15151a;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.trivia-share-image-wrap {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    aspect-ratio: 1200/630;
    position: relative;
    background: radial-gradient(circle at center, #2c0404, #09090b);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.trivia-share-image-logo {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ka-red);
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(225, 6, 0, 0.4);
    margin-bottom: 4px;
}

.trivia-share-image-subtitle {
    font-size: 0.7rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.trivia-share-image-badge {
    background: rgba(225, 6, 0, 0.1);
    border: 1px solid rgba(225, 6, 0, 0.3);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
}

.trivia-share-text {
    font-size: 0.85rem;
    color: #b3b3b8;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 6px;
    word-break: break-word;
}

.trivia-share-platforms {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.platform-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #15151a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px;
    color: #fff;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.3s;
}

.platform-btn i {
    font-size: 1.4rem;
}

.platform-btn.x-twitter:hover {
    background: #000;
    border-color: #333;
    color: #fff;
}

.platform-btn.telegram:hover {
    background: #0088cc;
    border-color: #0088cc;
    color: #fff;
}

.platform-btn.whatsapp:hover {
    background: #25d366;
    border-color: #25d366;
    color: #fff;
}

/* INTERACTIVE NOTIFICATIONS */
.trivia-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trivia-toast {
    background: rgba(15, 15, 18, 0.9);
    border: 1px solid var(--ka-red);
    border-radius: 8px;
    padding: 12px 20px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* REPLAY GAME MODAL */
.trivia-summary-box {
    text-align: center;
    padding: 20px;
}

.trivia-summary-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.6rem;
    color: #eab308;
    text-shadow: 0 0 15px rgba(234, 179, 8, 0.3);
    margin-bottom: 10px;
}

.trivia-summary-stat {
    font-size: 1rem;
    margin: 15px 0;
    color: #fff;
}

.trivia-btn-restart {
    background: var(--ka-red);
    border: 1px solid var(--ka-red);
    color: #fff;
    padding: 12px 30px;
    border-radius: 6px;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(225, 6, 0, 0.4);
    transition: all 0.3s;
}

.trivia-btn-restart:hover {
    background: #b00500;
    box-shadow: 0 0 25px rgba(225, 6, 0, 0.6);
}

/* MULTIPLAYER LOBBY STYLES */
.trivia-lobby-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    animation: fadeIn 0.4s ease;
}

.trivia-lobby-header {
    text-align: center;
    margin-bottom: 40px;
}

.trivia-rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.trivia-room-card {
    background: var(--card-dark);
    border: 1px solid var(--ka-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.trivia-room-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(to right, var(--ka-red), #ff5a5a);
}

.trivia-room-card:hover {
    transform: translateY(-5px);
    border-color: rgba(225, 6, 0, 0.3);
    box-shadow: 0 20px 45px rgba(225, 6, 0, 0.08);
}

.trivia-room-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 10px 0;
}

.trivia-room-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 20px;
    flex: 1;
}

.trivia-room-stats {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #eee;
    margin-bottom: 20px;
    border-top: 1px solid rgba(255,255,255,0.03);
    padding-top: 15px;
}

.trivia-room-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.trivia-room-status-badge {
    position: absolute;
    top: 24px; right: 24px;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}
.trivia-room-status-badge.lobby {
    background: rgba(16, 185, 129, 0.1);
    color: var(--neon-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.trivia-room-status-badge.active {
    background: rgba(225, 6, 0, 0.1);
    color: var(--ka-red);
    border: 1px solid rgba(225, 6, 0, 0.2);
}

.btn-trivia-enter {
    background: var(--ka-red);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    display: block;
    width: 100%;
}

.btn-trivia-enter:hover {
    background: #b00500;
    box-shadow: 0 0 15px rgba(225, 6, 0, 0.4);
}

/* ACTIVE PLAYER INDICATOR & READY STYLES */
.trivia-leaderboard-item.ready {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.05);
}

.trivia-ready-tag {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--neon-green);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: auto;
    text-transform: uppercase;
}

.trivia-not-ready-tag {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: auto;
    text-transform: uppercase;
}

/* SPECTATOR MODE BANNER */
.trivia-spectator-banner {
    position: absolute;
    top: 75px; left: 50%;
    transform: translateX(-50%);
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid #eab308;
    color: #ffd700;
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    pointer-events: none;
}

.trivia-spectator-banner i {
    animation: flash 1s infinite alternate;
}

@keyframes flash {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* LOBBY CONTROLS INSIDE GAME VIEW */
.trivia-game-controls {
    position: relative;
    display: flex;
    gap: 8px;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    z-index: 10;
}

.btn-game-control {
    flex: 1;
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.btn-game-control.ready {
    background: var(--neon-green);
    color: #fff;
}
.btn-game-control.ready:hover {
    background: #0f9f6e;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.btn-game-control.leave {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ccc;
}
.btn-game-control.leave:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.btn-game-control.start {
    background: #eab308;
    color: #000;
}
.btn-game-control.start:hover {
    background: #facc15;
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.4);
}
.btn-game-control.start.ready-to-start {
    animation: startPulseCompact 1.2s infinite alternate;
}

@keyframes startPulseCompact {
    0% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(234, 179, 8, 0.4);
    }
    100% {
        transform: scale(1.02);
        box-shadow: 0 0 15px rgba(234, 179, 8, 0.7);
    }
}

.btn-invite-compact {
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.25);
    color: #eab308;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    height: 28px;
}
.btn-invite-compact:hover {
    background: #eab308;
    color: #000;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.4);
}

/* STICKER STYLES */
.trivia-chat-sticker-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.trivia-chat-sticker-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--ka-red);
}
.trivia-sticker-panel {
    position: absolute;
    bottom: 50px;
    left: 0;
    background: #0f0f12;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
}
.trivia-sticker-item {
    font-size: 1.8rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: transform 0.2s, background 0.2s;
    text-align: center;
    user-select: none;
}
.trivia-sticker-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.15);
}

/* MOBILE OPTIMIZATIONS & STICKY FOOTER CONTROLS */
@media (max-width: 992px) {
    .trivia-grid > .trivia-sidebar-card {
        display: none !important;
    }
    .trivia-grid {
        grid-template-columns: 1fr !important;
    }
    .trivia-body {
        padding-bottom: 80px !important;
    }
    .mobile-trivia-sticky-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 12, 0.95);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding: 12px 20px;
        z-index: 99999;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
        display: flex;
        gap: 10px;
        box-sizing: border-box;
    }
    .mobile-trivia-sticky-bar .btn-game-control {
        flex: 1;
        font-family: 'Oswald', sans-serif;
        font-size: 0.85rem;
        font-weight: 700;
        text-transform: uppercase;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s;
        border: 1px solid transparent;
    }
    .mobile-trivia-sticky-bar .btn-game-control.ready {
        background: var(--neon-green);
        color: #fff;
    }
    .mobile-trivia-sticky-bar .btn-game-control.start {
        background: #eab308;
        color: #000;
    }
    .mobile-trivia-sticky-bar .btn-game-control.leave {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
        color: #ccc;
    }
}

/* SCORE UPDATE & FINAL LEADERBOARD STYLING */
@keyframes scorePop {
    0% { transform: scale(1); color: #fff; text-shadow: none; }
    30% { transform: scale(1.25); color: var(--neon-green); text-shadow: 0 0 10px rgba(16, 185, 129, 0.6); }
    100% { transform: scale(1); color: #fff; text-shadow: none; }
}
.score-added-animation {
    display: inline-block;
    animation: scorePop 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.summary-leaderboard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 8px 12px;
}
.summary-leaderboard-row.winner {
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.03);
}
.summary-leaderboard-row.user-self {
    border-color: rgba(225, 29, 72, 0.3);
    background: rgba(225, 29, 72, 0.03);
}
