/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800;900&family=Inter:wght@300;400;600;700&display=swap');

/* Reset & Basic Setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0d1b2a;
    color: #fff;
    overflow: hidden;
}

/* Main Wrapper - 3 Column Layout */
.game-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Left & Right Side Panels (Players) */
.player-panel {
    flex: 1;
    /* Takes up equal space on sides */
    background-color: #1b263b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 4px solid #415a77;
}

.player-right {
    border-right: none;
    border-left: 4px solid #415a77;
}

.player-name {
    font-size: 3rem;
    color: #e0e1dd;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.score-display {
    font-size: 8rem;
    font-weight: bold;
    color: #ffd60a;
    background: #000814;
    padding: 20px 30px;
    border-radius: 15px;
    border: 5px solid #ffd60a;
    margin-bottom: 30px;
    min-width: 200px;
    text-align: center;
    letter-spacing: 2px;
}

.score-controls {
    display: flex;
    gap: 10px;
}

.score-controls button {
    padding: 10px 20px;
    font-size: 1.2rem;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    background: #415a77;
    color: white;
    transition: 0.2s;
}

.score-controls button:hover {
    background: #778da9;
}

/* Center Panel (Game Board) */
.center-board {
    flex: 2.5;
    /* Takes up most of the screen */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: radial-gradient(circle, #1b263b 0%, #0d1b2a 100%);
}

.board-header {
    text-align: center;
    margin-bottom: 35px;
    width: 100%;
    background: linear-gradient(rgba(13, 27, 42, 0.9), rgba(13, 27, 42, 0.9)) padding-box,
        linear-gradient(135deg, #ffd60a 0%, #ff9e00 40%, #4cc9f0 70%, #ffd60a 100%) border-box;
    border: 3px solid transparent;
    border-radius: 24px;
    padding: 30px 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6),
        0 0 35px rgba(255, 214, 10, 0.1) inset,
        0 10px 30px rgba(255, 214, 10, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: relative;
    overflow: visible;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.1);
}

/* Special golden inner frame */
.board-header::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1.5px dashed rgba(255, 214, 10, 0.25);
    border-radius: 16px;
    pointer-events: none;
}

/* Beautiful royal star crest at the top center */
.board-header::after {
    content: '★   የውድድር ሰሌዳ   ★';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffd60a, #ff9e00);
    color: #0b132b;
    padding: 5px 25px;
    font-size: 0.8rem;
    font-weight: 900;
    border-radius: 30px;
    box-shadow: 0 6px 20px rgba(255, 214, 10, 0.4);
    letter-spacing: 2px;
    font-family: 'Outfit', 'Inter', sans-serif;
    text-transform: uppercase;
    white-space: nowrap;
}

.board-header:hover {
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.7),
        0 0 45px rgba(255, 214, 10, 0.2) inset,
        0 15px 40px rgba(255, 214, 10, 0.1);
    transform: translateY(-3px) scale(1.01);
}

.board-header h1 {
    font-family: 'Outfit', 'Inter', 'Segoe UI', sans-serif;
    font-size: 2.9rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    margin-top: 15px;
    margin-bottom: 0;
    background: linear-gradient(135deg, #ffffff 10%, #ffd60a 60%, #ff9e00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 15px rgba(255, 214, 10, 0.3));
    animation: title-pulse 3s ease-in-out infinite alternate;
    text-align: center;
}

@keyframes title-pulse {
    0% {
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 15px rgba(255, 214, 10, 0.3));
    }

    100% {
        filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 25px rgba(255, 214, 10, 0.5));
    }
}

.category-badge {
    display: inline-block;
    background: #e63946;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.question-container {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #778da9;
    padding: 25px 40px;
    border-radius: 15px;
    width: 100%;
    text-align: center;
    margin-bottom: 25px;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#question-text {
    font-size: 2.5rem;
    line-height: 1.4;
}

/* 2x2 Grid for Options */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    margin-bottom: 25px;
}

.option-card {
    background: #1b263b;
    border: 3px solid #415a77;
    border-radius: 10px;
    padding: 18px 25px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.option-card:hover {
    background: #2a3e5c;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.opt-letter {
    font-weight: bold;
    color: #ffd60a;
    margin-right: 15px;
    font-size: 2rem;
}

/* Answer Reveal Styles handled by JS */
.option-card.correct {
    background: #2a9d8f !important;
    border-color: #ffd60a !important;
    color: #fff !important;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(42, 157, 143, 0.5);
}

.option-card.correct .opt-letter {
    color: #fff !important;
}

.option-card.wrong {
    background: #e63946 !important;
    border-color: #ffd60a !important;
    color: #fff !important;
    transform: scale(0.95);
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.5);
}

.option-card.wrong .opt-letter {
    color: #fff !important;
}

/* Bottom Game Controls */
.board-controls {
    display: flex;
    gap: 15px;
}

.board-controls select,
.board-controls button {
    padding: 15px 25px;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 8px;
    border: none;
    font-weight: bold;
}

.board-controls select {
    background: #fff;
    color: #333;
}

#btn-next {
    background: #3a0ca3;
    color: white;
}

#btn-next:hover {
    background: #4361ee;
}

#btn-show-answer {
    background: #ff9e00;
    color: #0d1b2a;
    font-weight: 900;
    letter-spacing: 0.5px;
    animation: pulse-orange 1s ease-in-out infinite alternate;
}

#btn-show-answer:hover {
    background: #ffd60a;
}

@keyframes pulse-orange {
    from { box-shadow: 0 0 6px rgba(255, 158, 0, 0.4); }
    to   { box-shadow: 0 0 18px rgba(255, 158, 0, 0.9); }
}

#btn-answer {
    background: #f72585;
    color: white;
}

#btn-answer:hover {
    background: #b5179e;
}

#btn-end {
    background: #e63946;
    color: white;
}

#btn-end:hover {
    background: #c81d25;
}

/* Admin Panel Link */
#admin-link {
    position: fixed;
    bottom: 18px;
    right: 22px;
    background: rgba(65, 90, 119, 0.75);
    color: #e0e1dd;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid #778da9;
    backdrop-filter: blur(6px);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    z-index: 999;
}

#admin-link:hover {
    background: #415a77;
    color: #ffd60a;
    border-color: #ffd60a;
}

/* Fullscreen Winner Overlay */
.winner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(13, 27, 42, 0.95);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes heartbeat {
    from {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(76, 201, 240, 0.4));
    }

    to {
        transform: scale(1.15);
        filter: drop-shadow(0 0 25px rgba(76, 201, 240, 0.8));
    }
}

.winner-card {
    background: linear-gradient(rgba(13, 27, 42, 0.95), rgba(13, 27, 42, 0.95)) padding-box,
        linear-gradient(135deg, #ffd60a 0%, #ff9e00 50%, #4cc9f0 100%) border-box;
    border: 4px solid transparent;
    border-radius: 28px;
    padding: 45px 50px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(255, 214, 10, 0.1) inset;
    max-width: 1400px;
    width: 96vw;
    animation: scaleUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

@keyframes scaleUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.winner-title {
    font-size: 2.8rem;
    color: #ffd60a;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 214, 10, 0.5);
    font-family: 'Outfit', sans-serif;
}

.winner-name {
    font-size: 3.4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd60a 0%, #ff9e00 45%, #ff6b35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    text-transform: uppercase;
    line-height: 1.2;
    filter: drop-shadow(0 0 14px rgba(255, 158, 0, 0.55));
    position: relative;
    display: inline-block;
}

.winner-name::after {
    content: '';
    display: block;
    height: 4px;
    width: 60%;
    margin: 8px auto 20px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, #ffd60a 30%, #ff9e00 70%, transparent);
    opacity: 0.7;
}

.winner-scores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 24px;
    width: 100%;
    max-width: 100%;
    margin: 20px auto 30px auto;
    padding: 0 10px;
}

.winner-score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 6px solid rgba(76, 201, 240, 0.5);
    /* Sleek cyan border on left by default */
    border-radius: 18px;
    padding: 20px 30px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.winner-score-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.03) 50%, rgba(255, 255, 255, 0));
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.winner-score-row:hover::before {
    transform: translateX(100%);
}

.winner-score-row:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.1));
    border-color: rgba(76, 201, 240, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(76, 201, 240, 0.15);
}

/* Outstanding styling for the leader row! */
.winner-score-row.is-leader {
    border-left-color: var(--accent-gold);
    /* Gold border for leader */
    background: linear-gradient(135deg, rgba(255, 214, 10, 0.03), rgba(255, 255, 255, 0.07));
    border-color: rgba(255, 214, 10, 0.15) rgba(255, 214, 10, 0.15) rgba(255, 214, 10, 0.15) var(--accent-gold);
}

.winner-score-row.is-leader:hover {
    background: linear-gradient(135deg, rgba(255, 214, 10, 0.06), rgba(255, 255, 255, 0.12));
    border-color: rgba(255, 214, 10, 0.3) rgba(255, 214, 10, 0.3) rgba(255, 214, 10, 0.3) var(--accent-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 214, 10, 0.2);
}

.winner-score-player {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 2.2rem;
    color: #e0e1dd;
    font-weight: 700;
}

.player-avatar-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.winner-score-row:hover .player-avatar-circle {
    background: rgba(76, 201, 240, 0.1);
    border-color: rgba(76, 201, 240, 0.3);
    color: var(--accent-blue);
    transform: scale(1.1) rotate(5deg);
}

.winner-score-row.is-leader:hover .player-avatar-circle {
    background: rgba(255, 214, 10, 0.1);
    border-color: rgba(255, 214, 10, 0.3);
    color: var(--accent-gold);
}

.winner-score-value {
    font-size: 1.6rem;
    font-weight: 800;
    min-width: 110px;
    padding: 0 20px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 25px;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
}

/* Leader score badge: gold gradient fill */
.winner-score-value.leader-badge {
    background: linear-gradient(135deg, #ffd60a, #ff9e00);
    color: #0d1b2a;
    box-shadow: 0 4px 15px rgba(255, 214, 10, 0.4);
    border: none;
}

/* Regular player score badge: translucent blue fill */
.winner-score-value.regular-badge {
    background: linear-gradient(135deg, rgba(76, 201, 240, 0.12), rgba(76, 201, 240, 0.25));
    color: #4cc9f0;
    border: 1px solid rgba(76, 201, 240, 0.3);
    box-shadow: 0 4px 10px rgba(76, 201, 240, 0.05);
}

.winner-score-row:hover .winner-score-value.regular-badge {
    background: linear-gradient(135deg, rgba(76, 201, 240, 0.25), rgba(76, 201, 240, 0.4));
    box-shadow: 0 4px 15px rgba(76, 201, 240, 0.2);
}

.winner-btn {
    padding: 15px 35px;
    font-size: 1.3rem;
    font-weight: bold;
    background: #ffd60a;
    color: #0d1b2a;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.winner-btn:hover {
    background: #fff;
    transform: scale(1.05);
}

/* Active Turn & Result Banners */
.player-panel {
    border: 4px solid transparent;
    transition: all 0.3s ease;
}

.player-panel.active-turn {
    border-color: #ffd60a;
    box-shadow: 0 0 30px rgba(255, 214, 10, 0.35);
    background: #112240;
}

.result-banner {
    font-size: 2.8rem;
    font-weight: 900;
    text-transform: uppercase;
    animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 15px;
    letter-spacing: 2px;
}

.correct-flash {
    color: #4cc9f0;
    /* Glowing sky blue/teal */
    text-shadow: 0 0 15px rgba(76, 201, 240, 0.6);
}

.wrong-flash {
    color: #e63946;
    /* Glowing crimson */
    text-shadow: 0 0 15px rgba(230, 57, 70, 0.6);
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    70% {
        transform: scale(0.9);
        opacity: 0.9;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* =========================================
   DYNAMIC MULTI-PLAYER SCALING (3 to 6 Players)
   ========================================= */

/* 3 to 4 Players (2 columns, up to 2 per column) */
body.players-count-3 .player-name,
body.players-count-4 .player-name {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

body.players-count-3 .score-display,
body.players-count-4 .score-display {
    font-size: 5rem;
    padding: 15px 25px;
    margin-bottom: 10px;
    min-width: 150px;
}

body.players-count-3 .turn-indicator,
body.players-count-4 .turn-indicator {
    font-size: 0.85rem;
    padding: 4px 8px;
    margin-bottom: 5px;
}

/* 5 to 6 Players (2 columns, up to 3 per column) */
body.players-count-5 .player-name,
body.players-count-6 .player-name {
    font-size: 2.1rem;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

body.players-count-5 .score-display,
body.players-count-6 .score-display {
    font-size: 3.5rem;
    padding: 10px 20px;
    margin-bottom: 8px;
    border-width: 3px;
    min-width: 120px;
}

body.players-count-5 .turn-indicator,
body.players-count-6 .turn-indicator {
    font-size: 0.7rem;
    padding: 3px 6px;
    margin-bottom: 5px;
}

/* Adjust the side column gap for higher counts */
body.players-count-3 .side-panel-column,
body.players-count-4 .side-panel-column {
    gap: 10px !important;
}

body.players-count-5 .side-panel-column,
body.players-count-6 .side-panel-column {
    gap: 0px !important;
}

/* Question Countdown Timer Warning Animation */
@keyframes timer-blink {
    from {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 10px rgba(230, 57, 70, 0.4);
    }

    to {
        opacity: 0.7;
        transform: scale(1.05);
        box-shadow: 0 0 25px rgba(230, 57, 70, 0.8);
    }
}

.timer-warning {
    animation: timer-blink 0.5s ease-in-out infinite alternate !important;
}

/* =========================================
   BIG CIRCULAR PROGRESS TIMER STYLES
   ========================================= */
.big-timer-container {
    position: absolute;
    top: 20px;
    right: 35px;
    display: none;
    /* Managed dynamically via JavaScript ('flex') */
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #0b132b 0%, #000814 100%);
    border-radius: 50%;
    width: 95px;
    height: 95px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7),
        inset 0 0 15px rgba(255, 214, 10, 0.05),
        0 0 0 3px rgba(255, 255, 255, 0.05);
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1.15);
}

.big-timer-container:hover {
    transform: scale(1.06);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.85),
        0 0 15px rgba(76, 201, 240, 0.2);
}

.timer-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    /* Starts circular progress at 12 o'clock */
}

.timer-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.04);
    stroke-width: 6.5px;
}

.timer-circle-progress {
    fill: none;
    stroke: #4cc9f0;
    /* Dynamic color based on warning states */
    stroke-width: 6.5px;
    stroke-linecap: round;
    stroke-dasharray: 283;
    /* 2 * PI * r = 2 * 3.14159 * 45 = 282.7 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.1s linear, stroke 0.3s ease;
}

.big-timer-text {
    font-size: 2.3rem;
    font-weight: 900;
    color: #ffd60a;
    font-family: 'Outfit', 'Inter', 'Segoe UI', sans-serif;
    text-shadow: 0 0 15px rgba(255, 214, 10, 0.5);
    z-index: 10;
    user-select: none;
    transition: color 0.3s ease;
}

/* Pulsing golden/red warning states when timer reaches critical levels */
@keyframes big-timer-warning-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(230, 57, 70, 0.4),
            inset 0 0 10px rgba(230, 57, 70, 0.2),
            0 0 0 3px rgba(230, 57, 70, 0.2);
    }

    100% {
        transform: scale(1.1);
        box-shadow: 0 10px 45px rgba(230, 57, 70, 0.85),
            inset 0 0 25px rgba(230, 57, 70, 0.4),
            0 0 0 5px rgba(230, 57, 70, 0.5);
    }
}

.big-timer-warning {
    animation: big-timer-warning-pulse 0.5s ease-in-out infinite alternate !important;
}

/* Screen size adjustments for high density dashboards */
@media (max-width: 1200px) {
    .big-timer-container {
        width: 80px;
        height: 80px;
        top: 25px;
        right: 25px;
    }

    .big-timer-text {
        font-size: 1.9rem;
    }
}


/* =========================================
   FORCE LANDSCAPE OVERLAY (Portrait Mobile)
   ========================================= */

/* The rotate prompt — shown only when device is in portrait on a small screen */
#rotate-prompt {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #0d1b2a;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: #ffd60a;
    text-align: center;
    padding: 30px;
}

#rotate-prompt .rotate-icon {
    font-size: 5rem;
    animation: rotate-hint 1.5s ease-in-out infinite alternate;
}

@keyframes rotate-hint {
    from { transform: rotate(0deg); }
    to   { transform: rotate(90deg); }
}

#rotate-prompt p {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e0e1dd;
    max-width: 280px;
    line-height: 1.5;
}

/* Show the overlay when portrait on mobile (width < 768px and height > width) */
@media screen and (max-width: 768px) and (orientation: portrait) {
    #rotate-prompt {
        display: flex;
    }
    /* Hide everything else while in portrait */
    body > *:not(#rotate-prompt) {
        visibility: hidden;
    }
}

/* =========================================
   MOBILE LANDSCAPE RESPONSIVE LAYOUT
   ========================================= */

@media screen and (max-width: 900px) and (orientation: landscape) {

    body {
        overflow: hidden;
    }

    /* Tighten the main wrapper */
    .game-wrapper {
        height: 100vh;
        width: 100vw;
    }

    /* Side columns — narrower on mobile */
    .side-panel-column {
        gap: 6px !important;
        flex: 0 0 18vw;
        min-width: 0;
    }

    /* Player panels */
    .player-panel {
        padding: 4px 6px;
        border-width: 2px;
    }

    .player-name {
        font-size: 1rem !important;
        margin-bottom: 4px !important;
        letter-spacing: 0.5px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    /* Score box — big and readable in landscape */
    .score-display {
        font-size: 3.2rem !important;
        padding: 6px 10px !important;
        margin-bottom: 4px !important;
        min-width: 60px !important;
        border-width: 3px !important;
        letter-spacing: 1px !important;
    }

    /* Turn indicator badge */
    .turn-indicator {
        font-size: 0.55rem !important;
        padding: 2px 5px !important;
        margin-bottom: 3px !important;
    }

    /* Center board */
    .center-board {
        flex: 1;
        padding: 8px 12px;
        overflow: hidden;
    }

    /* Board header */
    .board-header {
        margin-bottom: 8px;
        padding: 8px 14px 10px;
        border-radius: 12px;
    }

    .board-header::after {
        font-size: 0.55rem;
        padding: 3px 12px;
        top: -10px;
    }

    .board-header h1 {
        font-size: 1.1rem !important;
        margin-top: 6px;
    }

    .category-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
        margin-bottom: 6px;
    }

    /* Circular timer */
    .big-timer-container {
        width: 52px;
        height: 52px;
        top: 10px;
        right: 14px;
    }

    .big-timer-text {
        font-size: 1.3rem;
    }

    /* Question container */
    .question-container {
        padding: 8px 14px;
        margin-bottom: 8px;
        min-height: 60px;
        border-radius: 10px;
    }

    #question-text {
        font-size: 1.1rem !important;
        line-height: 1.3;
    }

    /* Start screen text */
    #start-screen h2 {
        font-size: 1.2rem !important;
    }

    #start-screen p {
        font-size: 0.8rem !important;
    }

    #btn-start-game {
        font-size: 0.9rem !important;
        padding: 8px 18px !important;
    }

    /* Result banner */
    .result-banner {
        font-size: 1.3rem;
        margin-top: 6px;
    }

    /* Options grid */
    .options-grid {
        gap: 6px;
        margin-bottom: 8px;
    }

    .option-card {
        padding: 7px 10px;
        font-size: 0.85rem;
        border-radius: 7px;
        border-width: 2px;
    }

    .opt-letter {
        font-size: 0.9rem;
        margin-right: 6px;
    }

    /* Controls bar */
    .board-controls {
        gap: 6px;
        flex-wrap: nowrap;
    }

    .board-controls select,
    .board-controls button {
        padding: 6px 10px;
        font-size: 0.75rem;
        border-radius: 6px;
    }

    /* Timer bar */
    #timer-bar-container {
        height: 6px !important;
        margin-bottom: 8px !important;
    }

    /* Admin link */
    #admin-link {
        font-size: 0.65rem;
        padding: 4px 10px;
        bottom: 8px;
        right: 10px;
    }

    /* Multi-player overrides for mobile landscape */
    body.players-count-3 .score-display,
    body.players-count-4 .score-display {
        font-size: 2.6rem !important;
        padding: 5px 8px !important;
    }

    body.players-count-5 .score-display,
    body.players-count-6 .score-display {
        font-size: 2rem !important;
        padding: 4px 6px !important;
    }

    body.players-count-3 .player-name,
    body.players-count-4 .player-name,
    body.players-count-5 .player-name,
    body.players-count-6 .player-name {
        font-size: 0.85rem !important;
    }

    body.players-count-3 .side-panel-column,
    body.players-count-4 .side-panel-column,
    body.players-count-5 .side-panel-column,
    body.players-count-6 .side-panel-column {
        gap: 4px !important;
    }
}
