:root {
    --background-color: #f4f4f4;
    --text-color: #000;
    --category-bg: #0074D9;
    --question-bg: #FF4136;
    --popup-bg: #fff;
    --button-bg: #0074D9;
    --button-hover-bg: #0056a3;
}

[data-theme="dark"] {
    --background-color: #121212;
    --text-color: #fff;
    --category-bg: #0056a3;
    --question-bg: #c0392b;
    --popup-bg: #1e1e1e;
    --button-bg: #0056a3;
    --button-hover-bg: #003f7f;
}

body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: var(--background-color);
    color: var(--text-color);
}

.jeopardy-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 800px;
    margin: 20px auto;
}

.category, .question {
    background-color: var(--category-bg);
    color: var(--text-color);
    padding: 20px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
}

.question {
    background-color: var(--question-bg);
    cursor: pointer;
}

.question:hover {
    background-color: var(--button-hover-bg);
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--popup-bg);
    padding: 20px;
    border: 2px solid var(--category-bg);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 1000;
}

.popup button {
    margin: 5px;
    padding: 10px 20px;
    background-color: var(--button-bg);
    color: var(--text-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.popup button:hover {
    background-color: var(--button-hover-bg);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 999;
}

.team-scores {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.team {
    background-color: var(--category-bg);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    min-width: 120px;
}

/* CSS class to adjust font size */
.adjust-font-size {
    font-size: 14px; /* Reduce font size */
}

.settings-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
}

.settings-menu {
    position: fixed;
    top: 50px;
    right: 10px;
    background-color: var(--popup-bg);
    color: var(--text-color);
    border: 2px solid var(--category-bg);
    border-radius: 10px;
    padding: 20px;
    display: none;
    z-index: 1001;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 30vw;      /* Never wider than 30% of the viewport width */
    width: 350px;         /* Optional: default width for desktop */
    min-width: 220px;     /* Optional: minimum width for usability */
    box-sizing: border-box;
}

.settings-menu input {
    margin-bottom: 10px;
    padding: 5px;
    width: 100%;
    border: 1px solid var(--category-bg);
    border-radius: 5px;
}

.settings-menu button {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: var(--button-bg);
    color: var(--text-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.settings-menu button:hover {
    background-color: var(--button-hover-bg);
}

.answered {
    background-color: gray !important;
    color: white !important;
}

.guess-question {
    border: 3px dashed gold;
}

.hint {
    margin: 4px 0;
    color: #ffd700;
}

.quiz-title-group {
    margin-top: 16px;
    gap: 8px;
}

.info-icon {
    position: fixed;
    top: 10px;
    left: 10px;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1100;
}

.info-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 10px;
    background: var(--popup-bg, #222);
    color: var(--text-color, #fff);
    border: 2px solid var(--category-bg, #444);
    border-radius: 10px;
    padding: 20px;
    z-index: 1101;
    max-width: 2000px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.info-menu a {
    color: #ffd700;
    text-decoration: underline;
    cursor: pointer;
    display: inline-block;
    margin-top: 10px;
}

.info-left {
    text-align: left;
}

.info-center {
    text-align: center;
}