/* Font Face Declarations */
@font-face {
    font-family: 'Gyparody';
    src: local('Gyparody'), local('Gyparody-Regular');
    font-weight: normal;
    font-style: normal;
}

/* ============================================
   VISUAL POLISH PASS
   ============================================ */

html {
    scroll-behavior: smooth;
}

body {
    background: radial-gradient(circle at 20% 10%, #1b2348 0%, #0e1224 45%, #090d1a 100%);
}

.container {
    backdrop-filter: blur(2px);
}

.start-screen-content,
.settings-modal-content,
.statistics-modal-content,
.final-scores-content,
.modal-content {
    border-radius: 12px;
    box-shadow:
        0 14px 36px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 215, 0, 0.08) inset;
}

.btn,
.score-btn,
.player-btn,
.settings-btn,
.help-btn,
.question-tile,
.player-score,
.category-header {
    transition: transform 0.18s ease, box-shadow 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, filter 0.22s ease;
}

.btn:hover,
.score-btn:hover,
.player-btn:hover,
.settings-btn:hover,
.help-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.btn:active,
.score-btn:active,
.player-btn:active,
.settings-btn:active,
.help-btn:active {
    transform: translateY(0);
}

.player-score {
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(11, 20, 54, 0.95), rgba(7, 12, 34, 0.95));
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.player-score.active {
    box-shadow:
        0 0 0 2px rgba(255, 215, 0, 0.75),
        0 12px 24px rgba(0, 0, 0, 0.35);
}

.category-header {
    border-radius: 8px;
    background: linear-gradient(180deg, #1a2fe0, #0e20be);
}

.question-tile {
    border-radius: 10px;
    background: linear-gradient(180deg, #1324d7, #0b1aa2 75%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 8px 18px rgba(0, 0, 0, 0.28);
}

.question-tile:hover:not(.used) {
    filter: brightness(1.06);
    transform: translateY(-2px);
}

.question-tile.used {
    background: linear-gradient(180deg, #3f3f3f, #2f2f2f);
}

.modal {
    background-color: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(2px);
}

.modal.show .modal-content {
    animation-duration: 0.38s;
}

.timer-bar {
    border-radius: 999px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

input,
textarea,
select {
    border-radius: 8px;
}

.help-modal-body {
    scrollbar-width: thin;
}

@font-face {
    font-family: 'ITC Korinna';
    src: local('ITC Korinna'), local('Korinna');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Swiss 911';
    src: local('Swiss 911'), local('Swiss911');
    font-weight: normal;
    font-style: normal;
}

/* Reset some default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables for Styling */
:root {
    --bg-primary: #0e1224;
    --bg-secondary: #0e1224;
    --bg-tertiary: #0e1224;
    --tile-bg: #060ce9;
    --accent-color: #ffd700;
    --text-primary: #ffffff;
    --text-accent: #ffd700;
    --border-color: #060ce9;
    --border-accent: #ffd700;
    --correct-color: #4caf50;
    --incorrect-color: #f44336;
    --used-tile-bg: #333333;
    --used-tile-text: #666666;
    /* Blue-Purple Gradient Glow */
    --glow-start: #2A2F9E;
    --glow-end: #3A3FB8;
}

/* Hide AI-related UI (remove class ai-features-hidden from elements to re-enable) */
.ai-features-hidden {
    display: none !important;
}

/* Help button - always visible top left */
.help-btn {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 3000;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-accent);
    background-color: var(--tile-bg);
    color: var(--accent-color);
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: transform 0.2s, background-color 0.2s;
}
.help-btn:hover {
    background-color: var(--border-color);
    transform: scale(1.1);
}

/* Body styling - dark background like Jeopardy */
body {
    font-family: 'ITC Korinna', 'Korinna', 'Arial', sans-serif;
    background-color: #0e1224;
    color: var(--text-primary);
    padding: 5px;
    min-height: 100vh;
    margin: 0;
    text-shadow: 2px 2px 0px #000000;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

/* Start Screen Styling */
.start-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0e1224;
    z-index: 2000;
    overflow-y: auto;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

.start-screen.show {
    display: flex;
}

.start-screen-content {
    max-width: 900px;
    width: 100%;
    background-color: var(--bg-secondary);
    border: 3px solid var(--border-accent);
    border-radius: 0;
    padding: 30px;
    margin: 20px auto;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    box-shadow: 
        0 0 20px rgba(42, 47, 158, 0.5),
        0 0 40px rgba(58, 63, 184, 0.4),
        inset 0 0 30px rgba(42, 47, 158, 0.2);
}

.start-screen-content h1 {
    font-family: 'Gyparody', 'Impact', sans-serif;
    text-align: center;
    font-size: 3em;
    color: #c0c0c0;
    margin-bottom: 10px;
    text-shadow: 
        1px 1px 0px #e8e8e8,
        2px 2px 0px #d0d0d0,
        3px 3px 0px #b0b0b0,
        4px 4px 0px #000000,
        5px 5px 0px #000000,
        6px 6px 0px #000000,
        7px 7px 0px #000000;
    transition: color 0.3s ease;
    background: linear-gradient(135deg, #e8e8e8 0%, #c0c0c0 30%, #a8a8a8 50%, #c0c0c0 70%, #e8e8e8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(3px 3px 0px #000000);
    letter-spacing: 3px;
    transform: perspective(500px) rotateX(8deg) scaleY(1.1);
    position: relative;
}

.start-screen-content h2 {
    font-family: 'ITC Korinna', 'Korinna', 'Arial', sans-serif;
    text-align: center;
    font-size: 1.8em;
    color: var(--accent-color);
    margin-bottom: 30px;
    text-shadow: 2px 2px 0px #000000;
    transition: color 0.3s ease;
}

.start-screen-content h3 {
    font-family: 'ITC Korinna', 'Korinna', 'Arial', sans-serif;
    font-size: 1.3em;
    color: var(--accent-color);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    text-shadow: 2px 2px 0px #000000;
    transition: color 0.3s ease, border-color 0.3s ease;
}

/* Setup Section */
.setup-section {
    margin-bottom: 30px;
}

/* Player Inputs */
.player-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.player-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.player-input-group label {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1em;
    text-shadow: 2px 2px 0px #000000;
    transition: color 0.3s ease;
}

.player-input-group input {
    font-family: 'ITC Korinna', 'Korinna', 'Arial', sans-serif;
    padding: 12px;
    font-size: 1em;
    border: 2px solid var(--border-color);
    border-radius: 0;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

/* Number inputs should use Swiss 911 */
input[type="number"] {
    font-family: 'Swiss 911', 'Arial Black', sans-serif;
    text-shadow: 4px 4px 0px #000000, 2px 2px 0px #000000;
}

.player-input-group input:focus {
    outline: none;
    border-color: var(--border-accent);
}

/* Timer Input Group */
.timer-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timer-input-group label {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1em;
    text-shadow: 2px 2px 0px #000000;
}

.timer-input-group input {
    font-family: 'Swiss 911', 'Arial Black', sans-serif;
    padding: 12px;
    font-size: 1em;
    border: 2px solid var(--border-color);
    border-radius: 0;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    text-shadow: 4px 4px 0px #000000, 2px 2px 0px #000000;
    transition: border-color 0.3s ease;
    max-width: 200px;
}

.timer-input-group input:focus {
    outline: none;
    border-color: var(--border-accent);
}

/* Import Controls */
.import-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.import-label {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.9em;
    text-shadow: 2px 2px 0px #000000;
}

.import-file-name {
    color: var(--text-primary);
    font-size: 0.9em;
    font-style: italic;
}

.import-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 0;
    font-weight: bold;
    min-height: 20px;
}

/* AI Generation Controls */
.ai-generation-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.api-key-input {
    font-family: monospace;
}

.category-textarea {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    border: 2px solid var(--border-color);
    border-radius: 0;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.category-textarea:focus {
    outline: none;
    border-color: var(--border-accent);
}

/* AI Model Select */
#ai-model-select {
    transition: border-color 0.3s ease;
}

#ai-model-select:focus {
    outline: none;
    border-color: var(--border-accent);
}

/* Helpful links in small text */
.ai-generation-controls small a {
    color: var(--accent-color);
    text-decoration: underline;
}

.ai-generation-controls small a:hover {
    color: var(--border-accent);
}

/* Loading Spinner */
.loading-spinner {
    border: 4px solid var(--bg-tertiary);
    border-top: 4px solid var(--accent-color);
    border-radius: 0;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Editor Controls */
.editor-controls {
    margin-bottom: 15px;
}

.editor-toggle {
    padding: 10px 20px;
    font-size: 1em;
    border: 2px solid var(--border-color);
    border-radius: 0;
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--tile-bg);
    color: var(--accent-color);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.editor-toggle:hover {
    background-color: var(--tile-bg);
    opacity: 0.9;
    transform: scale(1.05);
}

/* Player Setup Container */
.player-setup-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.player-setup-item {
    padding: 20px;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}


/* Question Editor */
.question-editor {
    max-height: 500px;
    overflow-y: auto;
    border: 2px solid var(--border-color);
    border-radius: 0;
    padding: 15px;
    background-color: var(--bg-tertiary);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.question-editor.hidden {
    display: none;
}

.editor-category {
    margin-bottom: 30px;
    padding: 15px;
    background-color: var(--bg-secondary);
    border-radius: 0;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.editor-category-header {
    margin-bottom: 15px;
}

.editor-category-name {
    width: 100%;
    padding: 10px;
    font-size: 1.2em;
    font-weight: bold;
    border: 2px solid var(--border-color);
    border-radius: 0;
    background-color: var(--bg-tertiary);
    color: var(--accent-color);
    text-shadow: 2px 2px 0px #000000;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.editor-category-name:focus {
    outline: none;
    border-color: var(--border-accent);
}

.editor-questions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.editor-question-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 10px;
    padding: 15px;
    background-color: var(--bg-tertiary);
    border-radius: 0;
    border: 1px solid var(--border-color);
    align-items: start;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.editor-question-item label {
    color: var(--accent-color);
    font-weight: bold;
    padding-top: 8px;
    text-shadow: 2px 2px 0px #000000;
    transition: color 0.3s ease;
}

.editor-question-item input,
.editor-question-item textarea {
    padding: 8px;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: Arial, sans-serif;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.editor-question-item input:focus,
.editor-question-item textarea:focus {
    outline: none;
    border-color: var(--border-accent);
}

.editor-value {
    width: 100px;
}

.editor-clue,
.editor-answer,
.editor-explanation {
    width: 100%;
    resize: vertical;
    min-height: 50px;
}

/* Start Button */
.start-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.5em;
    font-weight: bold;
    border: none;
    border-radius: 0;
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--accent-color);
    color: #ffd700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.start-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Main container */
.container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    position: relative;
    z-index: 1;
}

/* Header styling */
header {
    text-align: center;
    margin-bottom: 2px;
    position: relative;
    padding: 3px;
}

.header-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    position: relative;
    margin-bottom: 2px;
    min-height: 30px;
}

/* Hide h1 in game screen */
#game-container header h1 {
    display: none;
}

header h1 {
    font-family: 'Gyparody', 'Impact', sans-serif;
    font-size: 3em;
    color: #c0c0c0;
    text-shadow: 
        1px 1px 0px #e8e8e8,
        2px 2px 0px #d0d0d0,
        3px 3px 0px #b0b0b0,
        4px 4px 0px #000000,
        5px 5px 0px #000000,
        6px 6px 0px #000000,
        7px 7px 0px #000000;
    margin: 0;
    transition: color 0.3s ease;
    background: linear-gradient(135deg, #e8e8e8 0%, #c0c0c0 30%, #a8a8a8 50%, #c0c0c0 70%, #e8e8e8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(3px 3px 0px #000000);
    letter-spacing: 3px;
    transform: perspective(500px) rotateX(8deg) scaleY(1.1);
    position: relative;
}

/* Settings Button */
.settings-btn {
    position: relative;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    width: 28px;
    height: 28px;
    font-size: 0.85em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--accent-color);
}

.settings-btn:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--border-accent);
    transform: scale(1.1);
}

/* Score board styling - Three Player Layout */
.score-board {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

/* Individual player score box */
.player-score {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 6px 12px;
    min-width: 90px;
    text-align: center;
    transition: all 0.3s ease;
}

/* Active player highlight */
.player-score.active {
    border-color: var(--border-accent);
    background-color: var(--bg-tertiary);
    transform: scale(1.05);
}

.player-label {
    font-size: 1.2em;
    color: var(--accent-color);
    margin-bottom: 5px;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 2px 2px 0px #000000;
    transition: color 0.3s ease;
}

.score-value {
    font-family: 'Swiss 911', 'Arial Black', sans-serif;
    font-size: 2.5em;
    color: #ffba59;
    font-weight: bold;
    text-shadow: 4px 4px 0px #000000, 2px 2px 0px #000000;
    transition: color 0.3s ease;
    line-height: 1;
}

/* Current player section - hide label, keep buttons */
.current-player-section {
    text-align: center;
    margin: 1px 0;
}

.current-player-label {
    display: none;
}

.player-btn {
    padding: 8px 16px;
    font-size: 1em;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-secondary);
    color: var(--accent-color);
    cursor: pointer;
    font-weight: bold;
    text-shadow: 2px 2px 0px #000000;
    transition: all 0.3s ease;
}

.player-btn:hover {
    background-color: var(--bg-tertiary);
    transform: scale(1.05);
}

.player-btn.active {
    background-color: var(--tile-bg);
    border-color: var(--border-accent);
    color: var(--accent-color);
}

/* Score action buttons */
.score-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 2px;
    margin-bottom: 2px;
}

.score-btn {
    padding: 4px 10px;
    font-size: 0.7em;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-weight: bold;
    text-shadow: 2px 2px 0px #000000;
    transition: all 0.3s ease;
}

.score-btn:hover {
    transform: scale(1.05);
}

.score-btn.correct {
    background-color: var(--correct-color);
    color: white;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.6);
}

.score-btn.correct:hover {
    box-shadow: 0 0 25px rgba(76, 175, 80, 0.9);
}

.score-btn.incorrect {
    background-color: var(--incorrect-color);
    color: white;
    box-shadow: 0 0 15px rgba(244, 67, 54, 0.6);
}

.score-btn.incorrect:hover {
    box-shadow: 0 0 25px rgba(244, 67, 54, 0.9);
}

.score-btn.no-answer {
    background-color: #666;
    color: white;
    box-shadow: 0 0 15px rgba(102, 102, 102, 0.6);
}

.score-btn.no-answer:hover {
    box-shadow: 0 0 25px rgba(102, 102, 102, 0.9);
}

/* Game board styling */
.game-board {
    display: grid;
    gap: 6px;
    margin-bottom: 5px;
    width: 100%;
    height: calc(100vh - 230px);
    min-height: 600px;
    position: relative;
    padding: 8px;
    background-color: #0e1224;
    box-shadow: 
        0 0 20px rgba(42, 47, 158, 0.6),
        0 0 40px rgba(58, 63, 184, 0.4),
        inset 0 0 30px rgba(42, 47, 158, 0.3);
}

/* Final Jeopardy Skip Button */
.final-jeopardy-skip-container {
    text-align: center;
    padding: 10px;
    margin-top: 5px;
}

.final-jeopardy-skip-btn {
    padding: 8px 20px;
    font-size: 0.9em;
    border: 2px solid var(--border-accent);
    border-radius: 0;
    background-color: var(--bg-secondary);
    color: var(--accent-color);
    cursor: pointer;
    font-weight: bold;
    text-shadow: 2px 2px 0px #000000;
    transition: all 0.3s ease;
}

.final-jeopardy-skip-btn:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-color);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Category header row */
.category-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 6px;
    margin-bottom: 6px;
}

/* Category header tile */
.category-header {
    background-image: 
        linear-gradient(rgba(42, 47, 158, 0.25), rgba(58, 63, 184, 0.25)),
        url('background.png');
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    background-color: var(--tile-bg);
    color: #ffffff;
    padding: 8px 4px;
    text-align: center;
    font-size: 0.7em;
    font-weight: bold;
    border-radius: 0;
    text-transform: uppercase;
    text-shadow: 2px 2px 0px #000000;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 20px rgba(42, 47, 158, 0.5),
        0 0 30px rgba(58, 63, 184, 0.3);
    border: 1px solid transparent;
}

.category-header:hover {
    box-shadow: 
        0 0 30px rgba(42, 47, 158, 0.7),
        0 0 50px rgba(58, 63, 184, 0.5);
    border-color: rgba(58, 63, 184, 0.6);
}

/* Question rows */
.question-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 6px;
    grid-auto-rows: 1fr;
}

/* Individual question tile */
.question-tile {
    font-family: 'Swiss 911', 'Arial Black', sans-serif;
    background-image: 
        linear-gradient(rgba(42, 47, 158, 0.25), rgba(58, 63, 184, 0.25)),
        url('background.png');
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    background-color: var(--tile-bg);
    color: #ffba59;
    padding: 8px 4px;
    text-align: center;
    font-size: 3.5em;
    font-weight: bold;
    line-height: 1;
    border-radius: 0;
    text-shadow: 4px 4px 0px #000000, 2px 2px 0px #000000;
    cursor: pointer;
    min-height: 120px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 
        0 0 20px rgba(42, 47, 158, 0.5),
        0 0 30px rgba(58, 63, 184, 0.3);
    border: 1px solid transparent;
}

/* Hover effect on question tiles */
.question-tile:hover:not(.used) {
    opacity: 0.9;
    transform: scale(1.05);
    box-shadow: 
        0 0 40px rgba(42, 47, 158, 0.8),
        0 0 60px rgba(58, 63, 184, 0.6);
    border-color: rgba(58, 63, 184, 0.8);
}

/* Used tiles - faded out and not clickable */
.question-tile.used {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: #050a2a;
    color: var(--used-tile-text);
}

/* Daily Double tiles */
.question-tile.daily-double {
    background-color: #8B4513; /* Brown color for Daily Double */
    color: #FFD700;
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 2px 2px 0px #000000;
    animation: pulse 2s infinite;
    box-shadow: 
        0 0 30px rgba(42, 47, 158, 0.6),
        0 0 50px rgba(58, 63, 184, 0.4);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 
            0 0 30px rgba(42, 47, 158, 0.6),
            0 0 50px rgba(58, 63, 184, 0.4);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
        box-shadow: 
            0 0 50px rgba(42, 47, 158, 0.9),
            0 0 70px rgba(58, 63, 184, 0.7);
    }
}

.question-tile.daily-double:hover:not(.used) {
    background-color: #A0522D;
    transform: scale(1.1);
    box-shadow: 
        0 0 50px rgba(42, 47, 158, 0.9),
        0 0 70px rgba(58, 63, 184, 0.7);
}

/* Modal overlay - covers the entire screen */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent black */
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform-origin: bottom right;
}

/* Show the modal when it has the 'show' class */
.modal.show {
    display: flex;
    animation: modalExpand 0.6s ease-out forwards;
}

/* Animation for modal expanding from bottom right */
@keyframes modalExpand {
    0% {
        opacity: 0;
        transform: scale(0) translate(50%, 50%);
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
        transform: scale(1) translate(0, 0);
    }
}

/* Modal content box */
.modal-content {
    background-color: var(--bg-primary);
    border: 3px solid var(--border-accent);
    border-radius: 0;
    padding: 40px;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    overflow-y: auto;
    position: relative;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    transform-origin: bottom right;
    opacity: 0;
    transform: scale(0.3) translate(100%, 100%);
}

/* Animation for modal content expanding */
@keyframes contentExpand {
    0% {
        opacity: 0;
        transform: scale(0.3) translate(100%, 100%);
    }
    60% {
        opacity: 0.9;
        transform: scale(1.05) translate(0, 0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translate(0, 0);
    }
}

/* When modal is shown, trigger content animation */
.modal.show .modal-content {
    animation: contentExpand 0.6s ease-out forwards;
}

/* Modal header with category and value */
.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-accent);
    transition: border-color 0.3s ease;
}

/* Timer Container */
.timer-container {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--bg-secondary);
    border-radius: 0;
    border: 2px solid var(--border-color);
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.timer-container.fade-out {
    opacity: 0;
    pointer-events: none;
}

.timer-display {
    text-align: center;
    margin-bottom: 10px;
}

#timer-text {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 2px 2px 0px #000000;
    transition: color 0.3s ease;
}

#timer-seconds {
    font-family: 'Swiss 911', 'Arial Black', sans-serif;
    font-size: 2em;
    color: #ffba59;
    text-shadow: 4px 4px 0px #000000, 2px 2px 0px #000000;
    line-height: 1;
}

.timer-bar-container {
    width: 100%;
    height: 20px;
    background-color: var(--bg-tertiary);
    border-radius: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.timer-bar {
    height: 100%;
    width: 100%;
    background-color: #4caf50;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 0;
}

.modal-header span {
    font-family: 'ITC Korinna', 'Korinna', 'Arial', sans-serif;
    color: var(--accent-color);
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 2px 2px 0px #000000;
    transition: color 0.3s ease;
}

/* Modal value (dollar amount) should use Swiss 911 */
#modal-value {
    font-family: 'Swiss 911', 'Arial Black', sans-serif;
    font-size: 1.8em;
    color: #ffba59;
    text-shadow: 4px 4px 0px #000000, 2px 2px 0px #000000;
    line-height: 1;
}

/* Modal body with the clue */
.modal-body {
    margin: 30px 0;
    min-height: 100px;
}

.modal-body p {
    font-size: 2em;
    line-height: 1.6;
    color: var(--text-primary);
    text-shadow: 2px 2px 0px #000000;
    transition: color 0.3s ease;
    font-weight: 500;
}

/* Answer section - hidden by default */
.modal-answer {
    margin: 20px 0;
    padding: 20px;
    background-color: rgba(42, 47, 158, 0.1);
    border-left: 4px solid rgba(58, 63, 184, 0.8);
    border-radius: 0;
    transition: border-color 0.3s ease;
}

.modal-answer.hidden {
    display: none;
}

.modal-answer p {
    color: var(--accent-color);
    font-size: 1.8em;
    margin-top: 10px;
    text-shadow: 2px 2px 0px #000000;
    transition: color 0.3s ease;
    font-weight: 500;
}

/* Explanation section in modal */
.modal-explanation {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--border-color);
    border-radius: 0;
    transition: border-color 0.3s ease;
}

.modal-explanation p {
    color: var(--text-primary);
    font-size: 1.4em;
    line-height: 1.6;
    margin: 10px 0;
    text-shadow: 2px 2px 0px #000000;
    transition: color 0.3s ease;
}

.modal-explanation p:first-child {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.2em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px #000000;
}

/* Modal buttons */
.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    font-size: 1em;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-weight: bold;
    text-shadow: 2px 2px 0px #000000;
    transition: all 0.3s;
}

.reveal-btn {
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--accent-color);
    color: var(--bg-primary);
    transition: all 0.3s ease;
}

.reveal-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.close-btn {
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #666;
    color: white;
    box-shadow: 0 0 10px rgba(136, 136, 136, 0.5);
}

.close-btn:hover {
    background-color: #888;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(136, 136, 136, 0.8);
}

/* Settings Modal */
.settings-modal-content {
    max-width: 700px;
    width: 90%;
}

.settings-modal-content .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-accent);
}

.settings-modal-content .modal-header h2 {
    margin: 0;
    color: var(--accent-color);
    font-size: 1.8em;
    text-shadow: 2px 2px 0px #000000;
}

.close-settings-btn {
    background: none;
    border: none;
    font-size: 2em;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: all 0.3s ease;
}

.close-settings-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--accent-color);
    transform: scale(1.1);
}

.settings-body {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.settings-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.settings-section:last-of-type {
    border-bottom: none;
}

.settings-section h3 {
    color: var(--accent-color);
    font-size: 1.3em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0px #000000;
}

/* Score Adjustments */
.score-adjustments {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.score-adjust-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.score-adjust-item label {
    color: var(--text-primary);
    font-weight: bold;
    min-width: 150px;
    text-shadow: 2px 2px 0px #000000;
}

.score-input {
    flex: 1;
    padding: 10px;
    font-size: 1em;
    border: 2px solid var(--border-color);
    border-radius: 0;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.score-input:focus {
    outline: none;
    border-color: var(--border-accent);
}

/* Name Changes */
.name-changes {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.name-change-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.name-change-item label {
    color: var(--text-primary);
    font-weight: bold;
    min-width: 150px;
    text-shadow: 2px 2px 0px #000000;
}

.name-input {
    flex: 1;
    padding: 10px;
    font-size: 1em;
    border: 2px solid var(--border-color);
    border-radius: 0;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.name-input:focus {
    outline: none;
    border-color: var(--border-accent);
}


/* Settings Buttons */
.settings-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.apply-btn {
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--accent-color);
    color: var(--bg-primary);
    padding: 12px 30px;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.apply-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.restart-btn {
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--incorrect-color);
    color: white;
    padding: 12px 30px;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(244, 67, 54, 0.6);
}

.restart-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(244, 67, 54, 0.9);
}

/* Statistics Modal */
.statistics-modal-content .modal-header h2 {
    margin: 0;
    color: var(--accent-color);
    font-size: 1.8em;
    text-shadow: 2px 2px 0px #000000;
}

/* Help modal — must stack above start-screen (z-index 2000) or it opens invisibly behind it */
#help-modal {
    z-index: 4000;
}

/* Help modal */
.help-modal-content {
    max-width: 800px;
    width: 94%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    padding: 20px 22px 24px;
    background: linear-gradient(165deg, #151a32 0%, #0e1224 100%);
    border: 2px solid var(--border-accent);
}

.help-modal-content .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-accent);
    flex-shrink: 0;
}

.help-modal-content .modal-header h2 {
    margin: 0;
    color: var(--accent-color);
    font-size: 1.75em;
    text-shadow: 2px 2px 0 #000;
}

.help-modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 8px 8px 4px;
    flex: 1;
    min-height: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
    text-shadow: none;
    color: #e6e9f2;
    -webkit-font-smoothing: antialiased;
}

.help-modal-body .help-intro {
    margin: 0 0 1.1em 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #c8d0e0;
}

.help-downloads {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-bottom: 1.25rem;
    padding: 14px 16px;
    background: rgba(6, 12, 233, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 6px;
}

.help-downloads-label {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 0.95rem;
    margin-right: 4px;
}

.help-download-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0e1224;
    background: var(--accent-color);
    border: 2px solid #fff8dc;
    border-radius: 6px;
    text-decoration: none;
    text-shadow: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.help-download-link:hover,
.help-download-link:focus {
    filter: brightness(1.08);
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.35);
    transform: translateY(-1px);
    outline: none;
}

.help-download-link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.help-download-hint {
    margin: 0 0 1.1rem 0;
    padding: 12px 14px;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #ffe8a8;
    background: rgba(180, 60, 30, 0.35);
    border: 1px solid rgba(255, 200, 120, 0.45);
    border-radius: 6px;
}

.help-section {
    margin-bottom: 1.1rem;
    padding: 16px 18px 14px;
    background: rgba(0, 0, 0, 0.28);
    border-left: 4px solid var(--accent-color);
    border-radius: 0 8px 8px 0;
}

.help-section-summary {
    border-left-color: #6b9fff;
    background: rgba(107, 159, 255, 0.08);
}

.help-modal-body h3 {
    color: #ffd700;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.65em 0;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.25);
    letter-spacing: 0.02em;
}

.help-modal-body h4 {
    color: #b8c5e0;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 1em 0 0.4em 0;
}

.help-modal-body h4:first-of-type {
    margin-top: 0;
}

.help-modal-body p {
    margin: 0 0 0.55em 0;
    font-size: 1rem;
    line-height: 1.65;
    color: #dce2ef;
}

.help-modal-body p:last-child {
    margin-bottom: 0;
}

.help-modal-body strong {
    color: #fff;
    font-weight: 700;
}

.help-modal-body code {
    display: inline-block;
    background: rgba(0, 0, 0, 0.45);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: 'Consolas', 'Cascadia Code', monospace;
    color: #a8e6a8;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.statistics-body {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.stats-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.stats-section:last-child {
    border-bottom: none;
}

.stats-section h3 {
    color: var(--accent-color);
    font-size: 1.2em;
    margin-bottom: 12px;
    text-shadow: 2px 2px 0px #000000;
}

.stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stats-list li {
    color: var(--text-primary);
    padding: 6px 0;
    font-size: 1em;
    text-shadow: 1px 1px 0px #000000;
}

.stats-list li strong {
    color: var(--accent-color);
}

.stats-category-list li {
    padding: 8px 0;
}

.stats-empty {
    color: var(--text-primary);
    font-size: 1.1em;
    text-align: center;
    padding: 30px;
    text-shadow: 2px 2px 0px #000000;
}

.stats-team-block {
    margin-bottom: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.stats-team-block:last-child {
    border-bottom: none;
}

.stats-team-block h4 {
    color: var(--accent-color);
    font-size: 1.1em;
    margin-bottom: 8px;
    text-shadow: 2px 2px 0px #000000;
}

.stats-team-cats {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Daily Double Modal */
.daily-double-content {
    max-width: 600px;
    width: 90%;
}

.daily-double-content .modal-header h2 {
    color: var(--accent-color);
    font-size: 2.5em;
    text-align: center;
    margin: 0;
    text-shadow: 2px 2px 0px #000000;
}

.daily-double-body {
    text-align: center;
    padding: 20px 0;
}

.daily-double-message {
    font-size: 1.5em;
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px #000000;
}

.current-score-display,
.max-wager-info {
    font-size: 1.2em;
    color: var(--text-primary);
    margin: 10px 0;
    text-shadow: 2px 2px 0px #000000;
}

.current-score-display span,
.max-wager-info span {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.3em;
    text-shadow: 2px 2px 0px #000000;
}

.wager-input-group {
    margin: 30px 0;
}

.wager-input-group label {
    display: block;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px #000000;
}

.wager-input-group input {
    font-family: 'Swiss 911', 'Arial Black', sans-serif;
    padding: 15px;
    font-size: 1.5em;
    font-weight: bold;
    border: 3px solid var(--border-color);
    border-radius: 0;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    text-align: center;
    width: 200px;
    text-shadow: 4px 4px 0px #000000, 2px 2px 0px #000000;
    transition: border-color 0.3s ease;
}

.wager-input-group input:focus {
    outline: none;
    border-color: var(--border-accent);
}

/* Final Jeopardy Intro Modal */
.final-jeopardy-intro-content {
    max-width: 100%;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.final-jeopardy-intro-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.final-jeopardy-intro-text h1 {
    font-family: 'Gyparody', 'Impact', sans-serif;
    font-size: 8em;
    color: #ffd700;
    margin: 20px 0;
    text-shadow: 
        3px 3px 0px #000000,
        6px 6px 0px #000000,
        9px 9px 0px #000000;
    letter-spacing: 10px;
    animation: pulse 2s infinite;
}

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

/* Round 2 Intro Modal */
.round2-intro-content {
    max-width: 100%;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.round2-intro-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.round2-intro-text h1 {
    font-family: 'Gyparody', 'Impact', sans-serif;
    font-size: 8em;
    color: #ffd700;
    margin: 20px 0;
    text-shadow: 
        3px 3px 0px #000000,
        6px 6px 0px #000000,
        9px 9px 0px #000000;
    letter-spacing: 10px;
    animation: pulse 2s infinite;
}

.round2-intro-text p {
    font-size: 1.5em;
    color: var(--text-primary);
    margin: 20px 0;
}

/* Final Scores Modal (Two Rounds Summary) */
.final-scores-content {
    max-width: 600px;
    width: 90%;
}

.final-scores-body {
    padding: 20px 0;
}

.final-scores-summary h2 {
    color: var(--accent-color);
    margin-bottom: 20px;
    text-align: center;
}

.final-scores-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.1em;
}

.final-scores-table th,
.final-scores-table td {
    padding: 12px 16px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.final-scores-table th {
    background-color: var(--tile-bg);
    color: var(--accent-color);
    font-weight: bold;
}

.final-scores-table td {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.final-scores-table td:last-child {
    text-align: right;
    color: var(--accent-color);
}

/* Final Jeopardy Wager Modal */
.final-jeopardy-wager-content {
    max-width: 700px;
    width: 90%;
}

.final-jeopardy-wager-body {
    padding: 20px 0;
}

.final-jeopardy-instructions {
    font-size: 1.2em;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 0px #000000;
}

.final-jeopardy-wagers {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.final-jeopardy-wager-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.final-jeopardy-wager-item label {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.1em;
    text-shadow: 2px 2px 0px #000000;
}

.final-wager-input {
    font-family: 'Swiss 911', 'Arial Black', sans-serif;
    padding: 12px;
    font-size: 1.3em;
    font-weight: bold;
    border: 3px solid var(--border-color);
    border-radius: 0;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    text-align: center;
    text-shadow: 4px 4px 0px #000000, 2px 2px 0px #000000;
    transition: border-color 0.3s ease;
}

.final-wager-input:focus {
    outline: none;
    border-color: var(--border-accent);
}

/* Final Jeopardy Question Modal */
.final-jeopardy-question-content {
    max-width: 900px;
    width: 90%;
}

.final-jeopardy-category {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-accent);
    border-radius: 0;
}

.final-jeopardy-category p {
    font-size: 2em;
    color: var(--accent-color);
    font-weight: bold;
    text-shadow: 2px 2px 0px #000000;
    margin: 0;
}

/* Final Jeopardy Answer Modal */
.final-jeopardy-answer-content {
    max-width: 900px;
    width: 90%;
}

.final-jeopardy-results {
    margin: 30px 0;
    padding: 20px;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0;
}

.final-jeopardy-results h3 {
    color: var(--accent-color);
    font-size: 1.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px #000000;
    text-align: center;
}

.final-jeopardy-player-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.final-result-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0;
}

.final-result-item span:first-child {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2em;
    text-shadow: 2px 2px 0px #000000;
}

.final-result-item span:nth-child(2) {
    color: var(--text-primary);
    font-size: 1.1em;
    font-weight: bold;
    text-shadow: 2px 2px 0px #000000;
}

.final-answer-buttons {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.final-answer-btn {
    flex: 1;
    padding: 8px 16px;
    font-size: 0.9em;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .header-top {
        padding-right: 60px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .settings-btn {
        width: 28px;
        height: 28px;
        font-size: 0.85em;
    }
    
    .settings-modal-content {
        max-width: 95%;
        padding: 20px;
    }
    
    .score-adjust-item,
    .name-change-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .score-adjust-item label,
    .name-change-item label {
        min-width: auto;
    }
    
    .score-input,
    .name-input {
        width: 100%;
    }
    
    .settings-buttons {
        flex-direction: column;
    }
    
    .apply-btn,
    .restart-btn {
        width: 100%;
    }
    
    .start-screen-content {
        padding: 20px;
        margin: 10px;
    }
    
    .start-screen-content h1 {
        font-size: 2em;
    }
    
    .start-screen-content h2 {
        font-size: 1.4em;
    }
    
    .editor-question-item {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .editor-question-item label {
        padding-top: 0;
    }
    
    .player-setup-item {
        padding: 15px;
    }
    
    .score-board {
        gap: 10px;
    }
    
    .player-score {
        min-width: 90px;
        padding: 6px 12px;
    }
    
    .score-value {
        font-size: 1.8em;
    }
    
    .player-label {
        font-size: 1em;
    }
    
    .current-player-label {
        font-size: 1em;
    }
    
    .player-selector {
        flex-wrap: wrap;
    }
    
    .player-btn {
        padding: 6px 12px;
        font-size: 0.85em;
    }
    
    .category-header {
        font-size: 0.6em;
        padding: 6px 3px;
        min-height: 35px;
        color: #ffffff;
    }
    
    .question-tile {
        font-size: 2em;
        padding: 6px 3px;
        min-height: 80px;
        color: #ffba59;
    }
    
    .score-value {
        font-size: 1.8em;
        color: #ffba59;
    }
    
    .player-label {
        font-size: 1em;
    }
    
    .player-btn {
        padding: 6px 12px;
        font-size: 0.85em;
    }
    
    .modal-content {
        padding: 25px;
        max-width: 100%;
        width: 100%;
    }
    
    .modal-body p {
        font-size: 1.5em;
    }
    
    .modal-header span {
        font-size: 1.2em;
    }
}

