body {
    font-family: 'Comic Sans MS', 'Comic Sans', "Chalkboard SE", sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #87CEEB, #055BAE);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: #333;
}

/* Tab buttons styles */
.tabs {
    display: flex;
    position: absolute;
    top: 0;
    width: 100%;
}

.tab-button {
    flex: 1; /* Each button takes up half the width */
    padding: 15px 0;
    cursor: pointer;
    border: none;
    color: #999999;
    background-color: #555555;
    font-size: 18px;
    text-align: center;
    border-bottom: 3px solid silver; /* Optional bottom border for active state */
}

/* Rounded corners only on the left-top for first button and right-top for second button */
.tab-button:first-child {
    border-top-left-radius: 10px;
}

.tab-button:last-child {
    border-top-right-radius: 10px;
}

/* Add active class styling */
.tab-button.active {
    background-color: white;
    color: black;
    border-bottom: 3px solid transparent;
}

.tab-button:last-child.active {
    border-bottom-right-radius: 0; /* Keep the bottom right corner flat */
}

.tab-button:first-child.active {
    border-bottom-left-radius: 0; /* Keep the bottom left corner flat */
}

/* Hide inactive tab content */
.tab-content {
    display: none;
    margin-top: 50px; /* Add space for the tabs above */
    padding: 20px;
    background-color: #f9f9f9;
}

.tab-content.active {
    display: block;
}

#setup-container {
    min-width: 500px; 
    padding: 80px 20px 20px 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px; /* Space between setup and game containers */
    position: relative;
}

#game-controller-div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#player-count, #question-count{
    font-size: 16px;
    padding: 10px;
    margin-bottom: 20px;
}

#start-button {
    padding: 10px 20px;
    margin-bottom: 20px;
    font-size: 23px;
    border: none;
    border-radius: 5px;
    background-color: #9b59b6;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

#start-button.stop {
    color: #FFFF00;
}

#correct-button {
    padding: 10px;
    margin: 5px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 0px 20px;
}

#incorrect-button {
    padding: 10px;
    margin: 5px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 0px 20px;
}

#game-container {
    width: 600px; /* Increased width to accommodate player boxes */
    max-width: 90%;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

#top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px;
    background-color: #007bff;
    color: white;
    box-sizing: border-box;
}

#score {
    width: 130px;
    font-size: 25px;
    font-weight: bold;
    text-align: left;
}

#image-counter {
    width: 100px;
    font-size: 25px;
    font-weight: bold;
}

#players {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;
}

.player-score {
    flex: 1;
    max-width: 120px;
    margin: 0 5px;
    text-align: center;
}

.name-box {
    background-color: #003366;
    color: white;
    padding: 5px 10px;
    border-radius: 5px 5px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.name-box .name {
    font-size: 14px;
    font-weight: bold;
    display: block;
}

.name-box.active {
    background-color: black;
}

.score-box {
    padding: 5px 10px;
    background-color: #0056b3;
    border-radius: 0 0 5px 5px;
}

.score-box .score {
    font-size: 16px;
    color: white;
    display: block;
}

.score-box.active {
    background-color: yellow;
}

.score-box.active .score {
    color: black;
}

#description-frame {
    width: 100%;
    min-height: 150px;
    background-color: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid #ccc;
    font-size:28px;
    font-weight:bold;
    color:tomato;
}

#word-box {
    width: 100%;
    padding: 15px;
    background-color: #fff;
    font-size: 24px;
    border-top: 1px solid #ddd;
    color: black;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 10px;
    justify-items: center;
    min-height: 64px;
}

#word-box label {
    font-family: 'Comic Sans MS', 'Comic Sans', "Chalkboard SE", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: black;
    padding: 10px;
    border-radius: 8px;
    width: 100%;
    text-align: center;
    cursor: pointer;
    text-transform: capitalize; /* Capitalize option text */
}

#word-box input[type="radio"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #28a745;
    transform: scale(1.5);
    margin-left: -30px;
}

#nav-index {
    text-align: center;
    width: 100%;
}

#controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px;
    color: black;
    box-sizing: border-box;
    background-color: #f1f1f1;
    border-top: 1px solid #ddd;
    margin-top: 10px;
    margin-bottom: 10px;
}

#controls button {
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    margin: 0 10px;
    border: none;
    border-radius: 50%; /* Fully rounded for all buttons */
    color: red; /* Red font color for pass button */
    cursor: pointer;
    transition: background-color 0.3s;
}

#pass-button {
    font-family: 'Comic Sans MS', 'Comic Sans', "Chalkboard SE", sans-serif;
    background-color: #ffcc80; /* Light orange background */
    border: none;
    cursor: pointer;
    position: relative;
    padding: 15px;
    font-size: 16px;
    width: 100px;  /* Smaller size for the button */
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Ensures the button is a perfect circle */
}

#pass-button .timer-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;  /* Larger circle size */
    height: 90px;
}

#pass-button .timer-bg {
    fill: none;
    stroke: none;
}

#pass-button .timer-progress {
    fill: none;
    stroke: red; /* Red circle color */
    stroke-width: 4;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 1s linear;
}

#pass-button:hover {
    background-color: #ffb74d; /* Darker orange on hover */
}

.wordList {
    display:none;
    background-color: red;
    color: white; padding:
    5px; border: none;
    border-radius: 5px;
    margin-top: 10px
}

.navigation-container {
    display: none;
    flex-direction: column;
}

.checkbox-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.checkbox-container label {
    margin: 0px 20px;
}

select {
    padding: 5px;
}

.button-container {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
}

.middle-buttons {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

#randomize-button, #A-AZ-button, #Q-AZ-button {
    margin: 2px;
    padding: 5px;
    border: 1px solid black;
    border-radius: 20px;
}

#randomize-button:hover, #A-AZ-button:hover, #Q-AZ-button:hover {
    background-color: #cdcaca;
}

.circle-button {
    border: none;
    border-radius: 50%; /* Full circle */
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Button shadow */
}

.small-button {
    width: 60px;
    height: 60px;
    font-family: 'Comic Sans MS', 'Comic Sans', "Chalkboard SE", sans-serif;
    font-size: 25px;
}

.large-button {
    width: 90px;
    height: 90px;
}

.middle-buttons button {
    margin-top: 5px;
}

.circle-button:hover {
    box-shadow: 0px 6px 8px rgba(0, 0, 0, 0.3); /* Enhanced shadow on hover */
}

.large-button svg {
    width: 75%;
    height: 75%;
}

.middle-button svg {
    width: 50%;
    height: 50%;
}

/* Red theme buttons */
.red-button {
    background-color: #ff4d4d; /* Red background */
    border-color: #b30000; /* Dark red border */
    color: white; /* White text */
}

/* Green theme buttons */
.green-button {
    background-color: #4CAF50; /* Green background */
    border-color: #2e7d32; /* Dark green border */
    color: white; /* White text */
}

/* Purple theme buttons */
.purple-button {
    background-color: #9b59b6; /* Purple background */
    border-color: #6e2c7e; /* Dark purple border */
    color: white; /* White text */
}

#play-answer-button::after  {
    content: "A";
}

#play-description-button::after  {
    content: "Q";
}

#showWordsContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
}

#showWordsContainer .close-btn {
  position: absolute;
  top: 10px;
  right: 20px;
  cursor: pointer;
  font-size: 22px;
  color: black;
}

#showWordsContainer .controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

#showWordsContainer button {
  padding: 6px 12px;
  font-size: 16px;
  cursor: pointer;
}

#showWordsContainer .list {
  font-size: 18px;
  line-height: 1.8;
  white-space: pre-line;
  text-align: left;
  padding: 10px;
}

.description_list {
    font-size: xxx-large;
    font-weight: bolder;
    cursor: pointer;
}

.answer_list {
    font-size: xxx-large;
    font-weight: bolder;
    cursor: pointer;
    color: red;
}

@media (max-width: 550px) {
    body {
        display: unset;
    }
    #word-box {
        display: unset;
    }
    label {
        display: block;
        margin-bottom: 10px;
    }
    .checkbox-container label {
        margin: 10px 20px;
    }
    .checkbox-container{
        display: unset;
    }
    .sound-label {
        height: unset;
        width: unset;
        display: unset;
        text-align: center;
    }
    #setup-container {
        min-width: 95%;
        padding: 80px 20px 20px 0px;
    }
    #game-container {
        max-width: 100%;
    }
    .checkbox-container {
        text-align: center;
    }
    .checkbox-container label {
        margin: 20px 20px;
    }
    #top-bar {
        align-items: unset;
        width: 100%;
    }
    #players {
        justify-content: flex-end;
    }
    #player-count {
        margin-bottom: unset;
    }
    .large-button {
        width: 80px;
        height: 80px;
    }
    .small-button {
        width: 55px;
        height: 55px;
    }
    .description_list, .answer_list {
        font-size: x-large;
    }
}