/* General styles for the body */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(120deg, #1e3c72, #2a5298);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
}

/* Navigation bar styles */
nav {
    background: #333;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.nav-left h1 {
    margin: 0;
    font-size: 24px;
}

.nav-right {
    display: flex;
    gap: 10px;
}

.nav-right button {
    padding: 5px 15px;
    font-size: 14px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.nav-right button:hover {
    background-color: #45a049;
}

/* Default styles for each page */
.page {
    display: none;
    width: 100%;
    max-width: 1200px;
    text-align: center;
    padding: 20px;
}

.page#introduction {
    display: block;
}

/* Main container for the game and panels */
#main-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    gap: 20px;
}

/* Left panel for remaining balls */
#left-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#remaining-balls-counter {
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 20px;
    width: 150px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#remaining-balls-counter h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #333;
}

#remaining-count {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
}

/* Game container styles */
#game-container {
    position: relative;
    width: 600px;
    height: 400px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    overflow: hidden;
}

canvas {
    display: block;
    margin: 0 auto;
    background: black;
    border-radius: 10px;
}

/* Right panel for the time table */
#right-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#time-table {
    width: 150px; /* Adjust width */
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.8);
    color: black;
    text-align: center;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#time-table th, #time-table td {
    padding: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
}

#time-table th {
    background-color: #333;
    color: white;
}

#time-table td {
    background-color: #f9f9f9;
}

/* Controls section styles */
#controls {
    text-align: center;
    margin-top: 20px;
}

#controls button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    margin: 10px;
    cursor: pointer;
}

#controls button:hover {
    background-color: #45a049;
}

/* Message styling */
#message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: bold;
    color: yellow;
    text-align: center;
    display: none;
    z-index: 10;
}

/* Footer styles */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 10px 20px;
    margin-top: auto;
    width: 100%;
}
