/* Quiz Bugs Website Styles - Based on admin.html */

:root {
    /* Colors - matching admin.html */
    --primary: #060CE9;
    --primary-dark: #0a0a2e;
    --accent: #FFD700;
    --text-white: #FFFFFF;
    --bg-dark: #1a1a2e;
    --success: #2ECC71;
    --danger: #E74C3C;
    --warning: #F39C12;
    --border: rgba(255, 215, 0, 0.3);
    
    /* Font sizes */
    --font-size-title: 3rem;
    --font-size-subtitle: 1.2rem;
    --font-size-card-title: 1.8rem;
    --font-size-button: 1.1rem;
    --font-size-form-input: 1.1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    min-height: 100vh;
    /* 광고 공간을 위한 좌우 여백 확보 */
    padding: 0;
    margin: 0;
}

/* Country Flag Image (IP-based) */
.country-flag-image {
    width: 100%;
    text-align: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid var(--border);
}

.country-flag-img {
    max-width: 67px;
    max-height: 40px;
    object-fit: contain;
    display: inline-block;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Banner */
.banner {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid var(--border);
    padding: 1rem;
    text-align: center;
}

.banner-placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.banner-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.banner-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
}

.banner-text {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 800;
    letter-spacing: 0.2px;
    font-size: 1.05rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .banner {
        padding: 0.6rem 0.75rem;
    }
    .banner-logo {
        width: 60px;
        height: 60px;
    }
    .banner-text {
        font-size: 0.95rem;
    }
}

/* Container - 광고 공간을 위한 중앙 배치 */
.container {
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: center;
}

/* Sidebar Ad Spaces */
.sidebar-ad {
    flex: 1 1 0;
    min-width: 0;
    max-width: 300px;
    position: sticky;
    top: 1rem;
}

.sidebar-ad-left {
    order: 1;
}

.sidebar-ad-right {
    order: 3;
}

/* Main Content Layout */
.main-content {
    display: block;
    width: 980px;  /* Fixed width for main content */
    flex: 0 0 980px;
    order: 2;
    padding: 0;
}

@media (max-width: 768px) {
    .main-content {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    .main-content {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }
}

.game-section {
    width: 100%;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .game-section {
        width: 100%;
        max-width: 100%;
    }
}

/* Flag Display */
.flag-display {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 0.8rem;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.country-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

/* Game board logo (top-left of the board area) */
.board-wrap {
    position: relative;
    width: 100%;
}

/* Episode complete overlay (keeps game board visible in the background) */
.episode-complete-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(1.5px);
    z-index: 50;
}

.score-detail-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.score-detail-content {
    width: min(560px, 92%);
    border-radius: 16px;
    border: 2px solid rgba(255, 215, 0, 0.8);
    background: rgba(0, 0, 0, 0.72);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65);
    padding: 1.1rem 1.2rem 1.2rem;
    position: relative;
}

.score-detail-close {
    position: absolute;
    top: 0.55rem;
    right: 0.6rem;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.score-detail-close:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.6);
}

.score-detail-title {
    margin: 0.2rem 0 0.9rem;
    font-size: 1.45rem;
    font-weight: 900;
    color: #FFD700;
    text-align: center;
}

.score-detail-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.score-detail-flag {
    width: 56px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.score-detail-emoji {
    font-size: 2rem;
    line-height: 1;
}

.score-detail-nickname {
    font-size: 1.25rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    margin-bottom: 0.8rem;
    word-break: break-word;
}

.score-detail-lines {
    display: grid;
    gap: 0.5rem;
    max-width: 420px;
    margin: 0 auto;
}

.score-detail-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.score-detail-key {
    font-weight: 800;
    opacity: 0.9;
}

.score-detail-val {
    font-weight: 900;
    color: #FFD700;
    font-size: 1.25rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .score-detail-content {
        width: min(560px, 94%);
        padding: 1rem 1rem 1.05rem;
    }
    .score-detail-title {
        font-size: 1.25rem;
    }
    .score-detail-val {
        font-size: 1.12rem;
    }
}

.episode-complete-card {
    width: min(520px, 92%);
    border-radius: 14px;
    border: 2px solid rgba(255, 215, 0, 0.75);
    background: rgba(0, 0, 0, 0.65);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    padding: 1rem 1.1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
}

.episode-complete-title {
    font-weight: 900;
    font-size: 1.25rem;
    color: #FFD700;
    margin-bottom: 0.6rem;
    line-height: 1.25;
}

.episode-complete-subtitle {
    margin: -0.2rem 0 0.85rem;
    font-size: 1rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.3;
}

.episode-complete-replay-btn {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 2px solid rgba(255, 215, 0, 0.75);
    background: rgba(255, 215, 0, 0.18);
    color: #FFD700;
    font-weight: 900;
    cursor: pointer;
}

.episode-complete-replay-btn:hover {
    background: rgba(255, 215, 0, 0.28);
}

.episode-complete-replay-question {
    margin-top: 0.9rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.92);
}

.episode-complete-replay-actions {
    margin-top: 0.55rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.episode-complete-replay-no {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

.episode-complete-replay-no:hover {
    background: rgba(255, 255, 255, 0.12);
}

.episode-complete-country {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.2rem 0 0.8rem;
    font-weight: 800;
}

.episode-complete-country img {
    width: 34px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.episode-complete-lines {
    display: grid;
    gap: 0.35rem;
    text-align: left;
    max-width: 360px;
    margin: 0 auto;
    font-size: 0.98rem;
}

.episode-complete-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.episode-complete-key {
    opacity: 0.9;
    font-weight: 700;
}

.episode-complete-val {
    font-weight: 900;
    color: #FFD700;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .episode-complete-card {
        width: min(520px, 94%);
        padding: 0.9rem 0.95rem;
    }
    .episode-complete-title {
        font-size: 1.1rem;
    }
    .episode-complete-lines {
        font-size: 0.92rem;
    }
}

/* (board logo removed on request) */

.country-flag-gameboard {
    max-width: 40px;
    max-height: 27px;
    object-fit: contain;
    display: inline-block;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.country-name {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    vertical-align: middle;
}

.flag-emoji {
    font-size: 1rem;
    margin-right: 0.3rem;
}

/* Game Board - 크기 축소 */
.game-board {
    display: grid;
    grid-template-columns: 100px repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.board-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--accent);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-align: center;
    padding: 0.6rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    min-height: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-cell {
    background: var(--primary);
    color: var(--text-white);
    font-size: 0.9rem;
    text-transform: uppercase;
    cursor: default;
    letter-spacing: 0.05em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.value-cell {
    background: var(--primary);
    color: var(--accent);
    font-size: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.value-cell:hover:not(.used) {
    border-color: #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
    background: linear-gradient(135deg, var(--primary) 0%, #ff0000 100%);
    transform: scale(1.05);
}

.value-cell.used {
    background: var(--primary-dark);
    color: rgba(255, 215, 0, 0.3);
    cursor: not-allowed;
    border-color: rgba(255, 215, 0, 0.3);
}

.value-cell.empty {
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.2);
}

.header-cell {
    background: rgba(0, 0, 0, 0.5);
    color: var(--accent);
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: default;
}

.points-cell {
    background: var(--accent);
    color: var(--primary-dark);
    font-size: 1.3rem;
    font-weight: bold;
}

/* Score Display */
.score-display-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border);
    border-radius: 8px;
}

.scores-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.daily-total-scores,
.individual-scores {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.scores-subtitle {
    font-size: 1rem;
    color: var(--accent);
    font-weight: bold;
    margin-bottom: 0.75rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.scores-subtitle-emoji {
    margin-right: 0.35rem;
    display: inline-block;
}

.scores-title-emoji {
    margin-right: 0.45rem;
    display: inline-block;
}

/* (Removed) Today visitors widget from index.html */

.my-rank-chip {
    margin-left: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 215, 0, 0.55);
    background: rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
}

.my-rank-chip:hover {
    background: rgba(255, 215, 0, 0.14);
    border-color: rgba(255, 215, 0, 0.9);
}

.my-rank-chip:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.22);
}

.individual-scores-list {
    /* Grid layout (Desktop: 4 cols x paging, Mobile: 2 cols x paging) */
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
    max-height: none;
    overflow: visible;
}

.individual-score-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.25);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    min-height: 0;
}

.individual-score-card.current-user-score {
    background: rgba(255, 215, 0, 0.15);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.8);
}

.isc-left {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0; /* allow ellipsis */
    flex: 1;
}

.individual-score-rank {
    flex-shrink: 0;
    width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.rank-medal {
    font-size: 1.05rem;
}

.rank-number {
    color: var(--accent);
    font-weight: bold;
}

.individual-score-flag {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.individual-flag-container {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.individual-flag-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 3px;
    display: block;
}

.individual-flag-emoji {
    font-size: 1.2rem;
    line-height: 1;
    display: inline-block;
}

.individual-score-nickname {
    color: var(--text-white);
    font-weight: 500;
    flex: 0 0 auto;
    cursor: pointer;
    padding: 0.12rem 0.25rem;
    border-radius: 3px;
    transition: background 0.2s;
    margin-left: 0;
    text-align: left;
    font-size: 0.85rem;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.individual-score-nickname:hover {
    background: rgba(255, 215, 0, 0.1);
}

.individual-score-nickname.current-user {
    color: var(--accent);
    font-weight: bold;
}

.individual-score-nickname.editing {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--accent);
}

.individual-score-value {
    color: var(--accent);
    font-weight: bold;
    font-size: 0.88rem;
    font-family: 'Courier New', monospace;
    margin-left: 0;
    text-align: center;
    flex-shrink: 0;
}

.scores-controls {
    display: none;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-content: center;
}

.score-control-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 215, 0, 0.6);
    background: rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease;
}

.score-control-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 215, 0, 0.18);
    border-color: rgba(255, 215, 0, 0.9);
}

.daily-total-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)); /* 5 x 3 on desktop */
    gap: 0.4rem;
}

.daily-total-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.25);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    text-align: left;
}

.daily-total-date {
    font-size: 0.78rem;
    opacity: 0.85;
    margin-bottom: 0;
    white-space: nowrap;
}

.daily-total-value {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--accent);
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

/* Mobile tweaks */
@media (max-width: 768px) {
    .individual-scores-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .scores-controls {
        display: flex;
    }

    .daily-total-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem;
    }
}

/* Nickname Modal */
.nickname-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.nickname-modal.active {
    display: flex;
}

.nickname-content {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary) 100%);
    padding: 2.5rem;
    border-radius: 15px;
    border: 3px solid var(--accent);
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.nickname-content h2 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.nickname-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.nickname-input-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.nickname-input {
    flex: 1;
    padding: 1rem;
    font-size: 1.2rem;
    border: 2px solid var(--accent);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-white);
    text-align: center;
    font-weight: bold;
}

.nickname-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.random-nickname-btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border: 2px solid var(--accent);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.random-nickname-btn:hover {
    background: var(--accent);
    color: var(--primary-dark);
    transform: scale(1.05);
}

.save-nickname-btn {
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: bold;
    background: var(--accent);
    color: var(--primary-dark);
    border: 3px solid var(--text-white);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.save-nickname-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.score-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.score-title {
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: bold;
}

#daily-scores-table-container {
    overflow-x: auto;
}

.daily-scores-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.daily-scores-table thead {
    background: rgba(0, 0, 0, 0.3);
}

.daily-scores-table th {
    padding: 1rem;
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: bold;
    border-bottom: 2px solid var(--border);
    border-right: 1px solid var(--border);
}

.daily-scores-table th:first-child {
    text-align: left;
}

.daily-scores-table th:not(:first-child) {
    text-align: right;
}

.daily-scores-table th:last-child {
    border-right: none;
}

.daily-scores-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.daily-scores-table td:first-child {
    text-align: left;
}

.daily-scores-table td:not(:first-child) {
    text-align: right;
}

.daily-scores-table td:last-child {
    border-right: none;
}

.daily-scores-table tbody tr:hover {
    background: rgba(255, 215, 0, 0.1);
}

.daily-scores-table tbody tr:last-child td {
    border-bottom: none;
}

.daily-score-date {
    color: var(--text-white);
    font-weight: 500;
}

.daily-score-value {
    color: var(--text-white);
    font-weight: bold;
    font-size: 1.1rem;
    text-align: right;
    font-family: 'Courier New', monospace;
}

/* Load More Button */
.load-more-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: bold;
    background: rgba(255, 215, 0, 0.2);
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.load-more-btn:hover:not(:disabled) {
    background: var(--accent);
    color: var(--primary-dark);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.daily-scores-table .loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 2rem;
}

/* Legacy score item styles (for backward compatibility) */
.score-item {
    text-align: center;
    flex: 1;
}

.score-label {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.score-value {
    font-size: 2.5rem;
    color: var(--text-white);
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Instructions Panel */
.instructions-panel {
    width: 100%;
    max-width: 980px;  /* Match game content width */
    margin: 0 auto 2rem auto;
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--border);
}

/* Actions panel (hidden by default; shown via media queries) */
.actions-panel {
    display: none;
}

.actions-panel .action-btn {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    background: rgba(255, 215, 0, 0.2);
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 10px;
    cursor: pointer;
}

.actions-panel .action-btn:active {
    transform: scale(0.99);
}

.instructions-title {
    font-size: var(--font-size-card-title);
    color: var(--accent);
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 1rem;
}

.instructions-list {
    list-style: none;
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    justify-content: center;
}

.instructions-list li {
    padding: 0.5rem 0;
    font-size: 1rem;
    line-height: 1.6;
    border-bottom: none;
}

.instructions-list li:last-child {
    border-bottom: none;
}

.instructions-list li::before {
    content: "✓ ";
    color: var(--success);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Supported Countries (flags only) - inside How to Play */
.supported-countries-panel {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 215, 0, 0.18);
}
.supported-countries-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 0.75rem;
}

.supported-countries-help {
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    margin-top: -0.35rem;
    margin-bottom: 0.65rem;
}
.supported-countries-grid.loading {
    opacity: 0.7;
    font-size: 0.9rem;
}

.supported-countries-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
}

@media (max-width: 768px) {
    .supported-countries-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
    }
    /* Mobile: make flags 1/2 size */
    .supported-country-flag {
        /* 2/3 of previous mobile size */
        width: 17px;
        height: 13px;
        border-radius: 4px;
    }
    .supported-country-flag .fallback-emoji {
        font-size: 0.6rem;
    }
    .supported-country-card {
        padding: 0.3rem 0.3rem;
        border-radius: 7px;
    }
    .supported-country-name {
        font-size: 0.55rem;
    }
}

.supported-country-flag {
    /* 2/3 of previous desktop size */
    width: 35px;
    height: 25px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 215, 0, 0.22);
    display: grid;
    place-items: center;
}
.supported-country-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.supported-country-flag .fallback-emoji {
    font-size: 1.2rem;
    display: none;
}

.supported-country-card {
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.22);
    background: rgba(0, 0, 0, 0.22);
    color: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    padding: 0.37rem 0.37rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
    text-align: left;
    transition: background 0.15s ease, transform 0.05s ease, border-color 0.15s ease;
}
.supported-country-card:hover {
    background: rgba(255, 215, 0, 0.08);
    border-color: rgba(255, 215, 0, 0.35);
}
.supported-country-card:active {
    transform: translateY(1px);
}
.supported-country-card:focus {
    outline: 2px solid rgba(255, 215, 0, 0.55);
    outline-offset: 2px;
}

.supported-country-name {
    font-weight: 850;
    /* 2/3 of previous size */
    font-size: 0.6rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Google Sign Up Button */
.btn-google {
    width: 100%;
    padding: 1rem;
    font-size: var(--font-size-button);
    font-weight: bold;
    background: #4285F4;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.btn-google:hover {
    background: #357AE8;
    transform: scale(1.02);
}

/* Embed Section */
.embed-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.embed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.embed-section h4 {
    font-size: 1.2rem;
    color: var(--accent);
    margin: 0;
    flex: 1;
}

.copy-embed-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: bold;
    background: rgba(255, 215, 0, 0.2);
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-embed-btn:hover {
    background: var(--accent);
    color: var(--primary-dark);
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
}

.copy-embed-btn:active {
    transform: scale(0.98);
}

.copy-embed-btn.copied {
    background: var(--success);
    color: var(--text-white);
    border-color: var(--success);
}

.copy-icon {
    font-size: 1rem;
}

.embed-code {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-white);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
}

.embed-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
}

/* Question Modal */
.question-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 999;
    overflow-y: auto;
    padding-top: 2rem;
}

.question-modal.active {
    display: flex;
}

.question-content {
    max-width: 1200px;
    width: 90%;
    padding: 2rem 3rem;
    text-align: center;
}

.question-header-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: nowrap;
}

/* Mobile question modal */
.question-modal.mobile-modal .question-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    font-size: 0.9rem;
    flex-wrap: nowrap;
}

.question-modal.mobile-modal .category-display,
.question-modal.mobile-modal .value-display,
.question-modal.mobile-modal .field-display {
    font-size: 0.85rem;
    flex: 1;
    text-align: center;
    padding: 0.3rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.category-display {
    display: inline;
    font-size: 2rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.value-display {
    display: inline;
    font-size: 2rem;
    color: var(--accent);
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
}

.field-display {
    display: inline;
    font-size: 2rem;
    color: var(--accent);
    font-style: italic;
    opacity: 0.9;
}

.question-text {
    font-size: 2.5rem;
    color: var(--text-white);
    margin: 2rem 0;
    line-height: 1.4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    min-height: 100px;
}

.question-modal.mobile-modal .question-text {
    font-size: 1.3rem;
    width: 98%;
    margin: 1rem auto;
    padding: 1rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.options-text {
    font-size: 1.8rem;
    color: var(--text-white);
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.question-modal.mobile-modal .options-text {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 98%;
    margin: 1rem auto;
    font-size: 1rem;
}

/* Desktop: make answer options wide and stacked vertically (A/B/C/D) */
@media (min-width: 769px) {
    .options-text .option-button {
        width: 100%;
    }
}

.option-button {
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    color: var(--text-white);
    font-family: inherit;
    min-height: 80px;
}

.question-modal.mobile-modal .option-button.mobile-option-button {
    padding: 1rem 1.5rem;
    width: 100%;
    min-height: 60px;
    font-size: 1rem;
    text-align: left;
    justify-content: flex-start;
    border-radius: 8px;
    border-width: 2px;
}

.option-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.option-button.selected {
    border-color: var(--accent);
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    transform: scale(1.02);
}

.option-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: var(--primary-dark);
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.option-button.selected .option-label {
    background: var(--primary-dark);
    color: var(--accent);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.option-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.option-button.correct {
    border-color: var(--success);
    background: rgba(46, 204, 113, 0.2);
}

.option-button.wrong {
    border-color: var(--danger);
    background: rgba(231, 76, 60, 0.2);
}

.option-text {
    flex: 1;
    line-height: 1.4;
}

/* Timer Display */
.timer-display {
    margin: 2rem auto;
    text-align: center;
    font-size: 12.5rem;
    font-weight: bold;
    color: var(--danger);
    text-shadow: 0 0 20px rgba(231, 76, 60, 0.8);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Answer Result */
.answer-result {
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    max-width: 800px;
}

.result-status {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.result-status.correct {
    color: var(--success);
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.result-status.wrong {
    color: var(--danger);
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.correct-answer {
    font-size: 1.3rem;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    color: var(--accent);
}

.explanation {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 1rem;
    text-align: left;
}

.next-question-btn {
    margin-top: 2rem;
    padding: 1rem 3rem;
    font-size: 1.3rem;
    font-weight: bold;
    background: var(--accent);
    color: var(--primary-dark);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.next-question-btn:hover {
    background: #FFC700;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

/* Legacy support for option-item */
.option-item {
    padding: 1.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.option-item.selected {
    border-color: var(--accent);
    background: rgba(255, 215, 0, 0.1);
}

.modal-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.control-button {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    border: 3px solid var(--text-white);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.submit-button {
    background: var(--accent);
    color: var(--primary-dark);
    min-width: 200px;
}

.submit-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.submit-button:disabled {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    opacity: 0.5;
}

.submit-button.enabled {
    background: var(--accent);
    color: var(--primary-dark);
    opacity: 1;
    cursor: pointer;
}

/* Final Results Modal */
.final-results-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.final-results-content {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary) 100%);
    padding: 4rem;
    border-radius: 20px;
    border: 4px solid var(--accent);
    text-align: center;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    width: 90%;
}

.final-results-content h2 {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 2rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

.final-stats {
    margin-bottom: 3rem;
}

.final-score-text {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.final-stats-text {
    font-size: 1.5rem;
    color: var(--text-white);
    margin-bottom: 2rem;
}

.answers-summary {
    margin-top: 2rem;
    text-align: left;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.answer-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    border-left: 4px solid var(--accent);
}

.answer-item.correct {
    background: rgba(46, 204, 113, 0.2);
    border-left-color: var(--success);
}

.answer-item.wrong {
    background: rgba(231, 76, 60, 0.2);
    border-left-color: var(--danger);
}

.answer-question {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.answer-correct {
    color: var(--success);
}

.answer-user {
    color: var(--text-white);
}

.start-button {
    padding: 1.5rem 4rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-dark);
    background: var(--accent);
    border: 4px solid var(--text-white);
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.start-button:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 8px solid rgba(255, 215, 0, 0.2);
    border-top: 8px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading p {
    margin-top: 2rem;
    font-size: 1.5rem;
    color: var(--accent);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        flex-direction: column;
        align-items: center;
    }
    
    .sidebar-ad {
        display: none;  /* Hide ads on smaller screens */
    }
    
    .main-content {
        padding: 1rem;
        max-width: 100%;
    }
    
    .instructions-panel {
        width: 100%;
    }
    
    .game-board {
        grid-template-columns: 90px repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    /* Remove side gutters on mobile */
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        gap: 0 !important;
    }

    .main-content {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .game-board {
        gap: 0.4rem;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Mobile board layout: Categories as first row (horizontal), Points below each category (vertical) */
    .game-board.mobile-board {
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: auto repeat(5, 1fr);
        width: 98% !important;
        max-width: 98% !important;
        margin: 0 auto;
    }
    
    /* Score display - 99% width */
    .score-display-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .daily-total-scores,
    .individual-scores {
        width: 100% !important;
    }
    
    /* Instructions panel - 99% width */
    .instructions-panel {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 12px 0 !important;
        padding: 0.75rem 0.6rem !important;
    }

    /* Instructions: compact + one item per line (mobile) */
    .instructions-title {
        margin-bottom: 0.6rem;
        padding-bottom: 0.55rem;
        font-size: 1.05rem;
    }

    .instructions-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.25rem;
        justify-content: start;
        margin: 0;
        padding: 0;
    }

    .instructions-list li {
        font-size: 0.85rem;
        line-height: 1.2;
        padding: 0.15rem 0;
        /* Mobile: do NOT truncate. Allow wrapping to next line without increasing line-height. */
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .instructions-list li::before {
        margin-right: 0.35rem;
    }

    /* Actions between How to Play and Footer (mobile) */
    .actions-panel {
        display: flex;
        width: 100%;
        max-width: 100%;
        padding: 0 0.5rem;
        margin: 0 0 20px 0;
        gap: 0.5rem;
        flex-direction: column;
        box-sizing: border-box;
    }

    /* Mobile uses A2HS (bookmark hidden) */
    #bookmark-btn {
        display: none !important;
    }
    
    /* Footer spacing - 20px from instructions */
    .footer {
        margin-top: 20px;
    }
    
    /* Footer links - all in one line */
    .footer-links {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 0.3rem;
    }
    
    .footer-links a {
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    /* Desktop board layout (when not mobile) */
    .game-board:not(.mobile-board) {
        grid-template-columns: 80px repeat(5, 1fr);
    }
    
    .board-cell {
        font-size: 0.75rem;
        padding: 0.5rem;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .category-cell {
        font-size: 0.7rem;
        line-height: 1.2;
        word-break: break-word;
        white-space: normal;
        text-align: center;
        padding: 0.3rem;
    }
    
    .value-cell {
        font-size: 0.9rem;
        font-weight: bold;
    }
    
    .question-text {
        font-size: 1.5rem;
    }
    
    .score-display-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .scores-layout {
        flex-direction: column;
        gap: 1rem;
    }
    
    .instructions-list {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .options-text {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .option-button {
        font-size: 1.2rem;
        padding: 1rem 1.5rem;
        min-height: 70px;
    }
    
    .option-label {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    /* Mobile question modal specific styles */
    .question-modal.mobile-modal .question-content {
        width: 98%;
        padding: 0.25rem;
        max-width: 98%;
        margin: 0 auto;
    }
    
    .question-modal.mobile-modal .question-header-info {
        font-size: 0.9rem;
        gap: 0.3rem;
        margin-bottom: 0.2rem;
        margin-top: 10px;
        padding: 0.25rem;
    }
    
    .question-modal.mobile-modal .category-display,
    .question-modal.mobile-modal .value-display,
    .question-modal.mobile-modal .field-display {
        font-size: 0.85rem;
        font-weight: bold;
        padding: 0.25rem;
        flex: 1;
        text-align: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }
    
    .question-modal.mobile-modal .question-text {
        font-size: 1.1rem;
        margin: 0.15rem auto;
        padding: 0.4rem;
        width: 98%;
    }
    
    .question-modal.mobile-modal .options-text {
        width: 98%;
        margin: 0.15rem auto;
        gap: 0.25rem;
        display: flex;
        flex-direction: column;
    }
    
    .question-modal.mobile-modal .option-button.mobile-option-button {
        padding: 0.4rem 0.6rem;
        min-height: 38px;
        font-size: 0.85rem;
        width: 100%;
    }
    
    .question-modal.mobile-modal .option-text {
        font-weight: bold;
    }
    
    .question-modal.mobile-modal .option-label {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    /* Mobile timer display - 70% of original size */
    .question-modal.mobile-modal .timer-display {
        margin: 0.15rem auto;
        font-size: 8.75rem; /* 12.5rem * 0.7 */
    }
    
    /* Mobile answer result - compact layout */
    .question-modal.mobile-modal .answer-result {
        margin: 0.15rem auto;
        padding: 0.5rem;
        width: 98%;
        max-width: 98%;
    }
    
    /* Mobile result status - same size as correct-answer */
    .question-modal.mobile-modal .result-status {
        font-size: 1.3rem;
        margin-bottom: 0.2rem;
    }
    
    /* Mobile correct answer */
    .question-modal.mobile-modal .correct-answer {
        font-size: 1.3rem;
        margin: 0.2rem 0;
        padding: 0.4rem;
        width: 98%;
    }
    
    /* Mobile explanation - 98% width */
    .question-modal.mobile-modal .explanation {
        font-size: 0.9rem;
        width: 98%;
        margin-top: 0.2rem;
        padding: 0.3rem;
        line-height: 1.4;
    }
    
    /* Mobile next question button - smaller */
    .question-modal.mobile-modal .next-question-btn {
        margin-top: 0.3rem;
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* Actions between How to Play and Footer (desktop): Copy URL + Bookmark */
@media (min-width: 769px) {
    .actions-panel {
        display: flex;
        width: 100%;
        max-width: 980px;
        margin: 0 auto 20px auto;
        gap: 0.75rem;
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    .actions-panel .action-btn {
        width: auto;
        min-width: 220px;
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }

    /* Desktop uses Bookmark (A2HS hidden) */
    #a2hs-btn {
        display: none !important;
    }
}

/* Footer Styles */
.footer {
    background: rgba(0, 0, 0, 0.5);
    border-top: 2px solid var(--border);
    padding: 2rem 1rem;
    margin-top: 3rem;
    text-align: center;
}

.footer-content {
    max-width: 980px;  /* Match game content width */
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--text-white);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    padding: 0.5rem;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-separator {
    color: rgba(255, 255, 255, 0.3);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-copyright p {
    margin: 0;
}

@media (max-width: 768px) {
    .footer {
        padding: 1.5rem 1rem;
        margin-top: 20px;
    }
    
    .footer-links {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.3rem;
        justify-content: center;
    }
    
    .footer-links a {
        font-size: 0.85rem;
        white-space: nowrap;
        padding: 0.3rem;
    }
    
    .footer-separator {
        display: inline;
    }
}