body {  
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #e2d9d9; /* Dark background */
    font-family: 'Arial', sans-serif;
}

/* Wrapper for board (to keep it centered) */
.game-container {
    display: flex;
    justify-content: center; /* Keep the board centered */
    align-items: center;
    width: 100%;
}

/* Move buttons to the left */
.controls {
    position: absolute;
    left: 20px; /* Moves buttons to the left */
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px; /* Space between buttons */
}

/* Team input containers */
.team-container {
    position: absolute;
    top: 20%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px; /* Reduce space between inputs */

    /* Reduce box styling */
    background-color: rgba(110, 235, 7, 0.993);
    padding: 10px; /* Reduce padding inside the box */
    border-radius: 8px; /* Smaller rounded corners */
    border: 2px solid #333;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2); /* Softer shadow */
    width: 150px; /* Set a smaller width */
}

/* Move team inputs further left */
.team-left {
    left: 20px;
    background-color: #0766f5;
    border-color: #0766f5;
    font-size: 24px;
}

/* Move right team further left */
.team-right {
    right: 20px;
    background-color: #fcf807;
    border-color: #fcf807;
    font-size: 24px;
}

/* Input box styling */
input {
    padding: 5px; /* Reduce padding inside input fields */
    font-size: 24px; /* Reduce font size */
    border: 2px solid #fff;
    border-radius: 4px;
    background-color: #333;
    color: white;
    text-align: center;
    width: 120px; /* Reduce width of input fields */
}

/* Make team name input slightly bigger */
input[type="text"] {
    font-size: 24px; /* Slightly smaller than before */
    font-weight: bold;
}

/* Ensure inputs are editable */
input:focus {
    outline: none;
    border-color: #ffcc00;
}

input::placeholder {
    color: #bbb;
}

/* Style for buttons */
button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: white;
    background-color: #444;
    transition: 0.3s;
    width: 150px; /* Uniform button width */
}

button:hover {
    background-color: #666;
}

/* Timer Container (Hidden by default) */
#timerContainer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 30px;
    font-size: clamp(24px, 5vw, 48px); /* Responsive font size */
    font-weight: bold;
    border-radius: 10px;
    text-align: center;
    display: none; /* Initially hidden */
    z-index: 2000; /* Higher z-index to ensure visibility */
}

/* Move hexagonal board slightly down */
.board-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px; /* Move the board slightly down */
}

/* Board styles */
.board {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hexagon grid styling */
.row {
    display: flex;
    gap: 2px;
    margin-top: -20px;
}

.hexagon {
    width: 90px;
    height: 98px;
    background-color: #2a2a2a; /* Dark cell background */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    font-weight: bold;
    color: white; /* Text color for contrast */
    cursor: pointer;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

/* Winning glow animation */
@keyframes winning-glow {
    0% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
    100% { box-shadow: 0 0 20px rgba(255, 255, 255, 1); }
}

.hexagon.winning {
    animation: winning-glow 0.8s infinite alternate;
}

/* Blinking effect */
.hexagon.blink {
    animation: blink 0.5s infinite alternate;
}

@keyframes blink {
    0% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Adjust row positioning */
.row:nth-child(odd) {
    margin-right: 100px;
    margin-left: 8px;
}

/* Top and Bottom Rows - Red Team */
.row:first-child .hexagon,
.row:last-child .hexagon {
    background-color: #0766f5; /* Red */
    color: transparent;
}

/* First and Last Columns - Green Team */
.row .hexagon:first-child,
.row .hexagon:last-child {
    background-color: #0766f5; /* Green */
    color: transparent;
}
