/* General styling for body */
body {
    font-family: Arial, sans-serif;
    background-color: #282c34;
    color: white;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh; /* Ensure body takes full viewport height */
    position: relative; /* For positioning #image-section */
}

/* Button styling */
button {
    padding: 15px 25px; /* Increase button padding */
    font-size: 1.5em; /* Increase button font size */
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Start game button styling */
#start-game-button {
    background-color: #2ecc71;
    margin-left: 15px; /* Increase margin left for better spacing */
}

#start-game-button:hover {
    background-color: #27ae60;
}

/* Section styling for adding teams */
#add-team-section {
    margin-top: 20px;
    text-align: center;
    flex: 1; /* Allow this section to grow and push image section down */
}

/* Form styling */
#add-team-form {
    margin-bottom: 20px;
}

/* Input field styling */
#team-name-input {
    padding: 15px; /* Increase padding for larger input */
    margin-right: 15px; /* Increase spacing between input and button */
    font-size: 1.5em; /* Increase font size */
}

/* Styling for added teams */
#added-teams {
    margin-top: 20px;
    text-align: center;
}

#team-list {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 20px; /* Increased space between teams */
    flex-wrap: wrap;
}

.team-list-item {
    background-color: #444;
    padding: 15px; /* Increase padding for larger items */
    border-radius: 5px;
    font-size: 1.5em; /* Increase font size */
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    50% {
        transform: translateX(10px);
    }
    75% {
        transform: translateX(-10px);
    }
}

/* Special question effect */
#special-question-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 3em;
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    z-index: 10;
    display: none;
    animation: fade-in-out 4s forwards;
}

@keyframes fade-in-out {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

.hidden {
    display: none;
}

/* Game section styling */
#game-section {
    width: 100%;
    max-width: 1800px;
    margin: 50px auto 0;
    padding-top: 20px;
}

/* Team scores styling */
#team-scores {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    gap: 5px;
    width: 100%;
}

.team {
    background-color: #444;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.round-winner {
    background-color: #00bfff;
    transition: background-color 0.3s ease;
}

.team h3 {
    word-wrap: break-word;
    margin: 0;
    padding: 5px 0;
    font-size: 1.2em;
}

.team p {
    margin: 10px 0 0;
    font-size: 1.5em;
    font-weight: bold;
}

#team-scores .team {
    flex: 1 1 auto;
}

#team-scores .team p {
    margin-top: auto;
}

/* Game board styling */
#game-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.category {
    background-color: #0055a5;
    padding: 20px;
    text-align: center;
    font-size: 2em;
    border-radius: 5px;
}

.question {
    background-color: #0055a5;
    color: gold;
    padding: 50px;
    text-align: center;
    font-size: 2em;
    border-radius: 5px;
    cursor: pointer;
}

.question:hover {
    background-color: #0068d8;
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #0056b3;
    padding: 40px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    text-align: center;
    position: relative;
}

#modal-image {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

/* Answer buttons styling */
#answer-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.score-button {
    padding: 15px 30px;
    font-size: 1.2em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.red {
    color: #ffffff;
    background-color: #e74c3c;
}

.green {
    color: #ffffff;
    background-color: #2ecc71;
}

.score-button:hover {
    opacity: 0.8;
}

/* Team selection buttons */
#team-selection-buttons {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 20px;
}

.team-select-button {
    background-color: #007bff;
    color: #ffffff;
    padding: 10px 20px;
    font-size: 1.2em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
}

.team-select-button:hover {
    background-color: #0068d7;
}

#kuldvillak-button {
    display: none;
    width: 100%;
    color: gold;
    background-color: #282c34;
    text-align: center;
    padding: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}
/* Image section styling */
#image-section {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%; /* Total width of image section */
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #333; /* Optional: Background color for better contrast */
    z-index: 1; /* Ensure it's on top of other content */
}

/* Styling for images */
#image-section img {
    height: 50vh; /* Set height to 50% of viewport height */
    max-height: 50vh; /* Ensure height does not exceed 50% of viewport height */
    width: auto; /* Maintain aspect ratio */
    object-fit: contain; /* Ensure images fit within their container without distortion */
    margin: 0 5px; /* Optional: Add spacing between images */
}

#cancel-selection {
    margin-top: 30px;
    background-color: #e74c3c; /* Red color */
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#cancel-selection:hover {
    background-color: #c0392b; /* Darker red on hover */
}

#cancel-selection:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.7); /* Glow effect on focus */
}

