body {
    font-family: 'Roboto', sans-serif;
    background-color: #e0f2e0;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#game-container {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Start Screen */
#start-screen {
    text-align: center;
}

#start-button {
    font-size: 1.2em;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#start-button:hover {
    background-color: #45a049;
}

/* Settings Form */
#settings-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}

.step::before {
    content: '';
    position: absolute;
    top: 15px;
    left: -50%;
    width: 100%;
    height: 2px;
    background-color: #ddd;
    z-index: 1;
    transition: background-color 0.3s ease;
}

.step:first-child::before {
    display: none;
}

.step-number {
    width: 30px;
    height: 30px;
    background-color: #ddd;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    z-index: 2;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.step.active .step-number {
    background-color: #4CAF50;
    color: white;
}

.step.active::before {
    background-color: #4CAF50;
}

.step-title {
    margin-top: 5px;
    font-size: 12px;
    text-align: center;
}

.form-step {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.form-step label {
    display: block;
    margin-bottom: 10px;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}


.operation-setting {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.operation-setting h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.operation-setting label {
    display: block;
    margin-bottom: 5px;
}

.operation-setting input[type="number"],
.operation-setting input[type="text"] {
    width: 100%;
    padding: 5px;
    margin-top: 2px;
}

.operation-setting > div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Button styles */
button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background-color: #ddd;
    cursor: not-allowed;
}
#start-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

#countdown {
    font-size: 48px;
    margin: 0;
}
/* Game Screen */
#goal-indicators {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.team-goal {
    display: flex;
    align-items: center;
}

.goal-count {
    font-size: 1.5em;
    font-weight: bold;
    margin-left: 10px;
}

#timer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2em;
    font-weight: bold;
}

#football-field {
    position: relative;
    height: 400px;
    background-image: repeating-linear-gradient(to right, rgb(74, 222, 128), rgb(74, 222, 128) 5%, rgb(34, 197, 94) 5%, rgb(34, 197, 94) 10%);
    border: 2px solid white;
    margin-bottom: 20px;
    overflow: hidden;
}

.goal {
    position: absolute;
    width: 10px;
    height: 100px;
    background-color: white;
    top: 50%;
    transform: translateY(-50%);
}

.left-goal {
    left: 0;
}

.right-goal {
    right: 0;
}

.center-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: white;
}

.center-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 2px solid white;
    border-radius: 50%;
}

.penalty-area {
    position: absolute;
    width: 100px;
    height: 200px;
    border: 2px solid white;
    top: 50%;
    transform: translateY(-50%);
}

.left-penalty-area {
    left: 0;
}

.right-penalty-area {
    right: 0;
}

.penalty-arc {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px solid white;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.left-penalty-area .penalty-arc {
    left: 58px;
    clip-path: inset(0 0 0 50%);
}

.right-penalty-area .penalty-arc {
    right: 58px;
    clip-path: inset(0 50% 0 0);
}

.player {
    position: absolute;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 5;
}

/* Team 1 (Left side) */
.team-1.player-1 {
    left: 15%;
    top: 30%;
    transform: translate(-100%, -50%);
}

.team-1.player-2 {
    left: 40%;
    top: 50%;
    transform: translate(-100%, -50%);
}

.team-1.player-3 {
    left: 65%;
    top: 70%;
    transform: translate(-100%, -50%);
}

/* Team 2 (Right side) */
.team-2.player-1 {
    right: 15%;
    top: 30%;
    transform: translate(100%, -50%);
}

.team-2.player-2 {
    right: 40%;
    top: 50%;
    transform:  translate(100%, -50%);
}

.team-2.player-3 {
    right: 65%;
    top: 70%;
    transform: translate(100%, -50%);
}

#ball {
    position: absolute;
    font-size: 24px;
    transform: translate(-50%, -50%);
    z-index: 10;
    transition: all 0.3s ease;
}

#question-section {
    text-align: center;
    margin-bottom: 20px;
}

#question {
    font-size: 1.2em;
    margin-bottom: 10px;
}

#options-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 20px;
}

.options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

#options-team-1 {
    justify-content: flex-end;
}

#options-team-2 {
    justify-content: flex-start;
}

.options button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.options button:hover {
    background-color:  #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.options button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

@media (max-width: 600px) {
    #options-container {
        flex-direction: column;
    }

    .options {
        justify-content: center;
    }

    #options-team-1, 
    #options-team-2 {
        justify-content: center;
    }
}

/* Winner Popup Styles */
#winner-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.winner-content {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    max-width: 90%;
    width: 400px;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.winner-title {
    font-size: 3em;
    color: #4CAF50;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.trophy-icon {
    font-size: 5em;
    margin-bottom: 20px;
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

.winner-message {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 20px;
}

.winner-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 5px solid #4CAF50;
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.restart-button {
    font-size: 1.2em;
    padding: 10px 30px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.restart-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.restart-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Confetti Animation */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f0f0f0;
    animation: confetti-fall 3s linear infinite;
}

.confetti:nth-child(2n) {
    background-color: #4CAF50;
}

.confetti:nth-child(3n) {
    background-color: #FFC107;
}

.confetti:nth-child(4n) {
    background-color: #2196F3;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100%) rotate(0deg);
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
    }
}

.confetti:nth-child(1) { left: 10%; animation-delay: 0s; }
.confetti:nth-child(2) { left: 20%; animation-delay: 0.5s; }
.confetti:nth-child(3) { left: 30%; animation-delay: 1s; }
.confetti:nth-child(4) { left: 40%; animation-delay: 1.5s; }
.confetti:nth-child(5) { left: 50%; animation-delay: 2s; }
.confetti:nth-child(6) { left: 60%; animation-delay: 2.5s; }
.confetti:nth-child(7) { left: 70%; animation-delay: 3s; }
.confetti:nth-child(8) { left: 80%; animation-delay: 3.5s; }
.confetti:nth-child(9) { left: 90%; animation-delay: 4s; }
.confetti:nth-child(10) { left: 100%; animation-delay: 4.5s; }

/* Celebration Overlay */
#celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3em;
    color: white;
}

/* Player Animations */
@keyframes jump {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes celebrate {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

.player.passing {
    animation: jump 0.5s ease;
}

.player.shooting {
    animation: jump 0.7s ease;
}

.player.celebrating {
    animation: celebrate 0.5s ease infinite;
}

/* Added styles for team name */
.team-name {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.team-name.active {
    background-color: #4CAF50;
    color: white;
}

/* Added styles for game controls */
#game-controls {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.icon-button {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 16px;
    color: #4CAF50;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding: 0;
}

.icon-button:hover {
    background-color: #4CAF50;
    color: white;
}

.icon-button:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

.icon-button i {
    font-size: 18px;
}

/* New styles for team image upload */
.team-image-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 10px; /* Reduced margin */
}

.team-image-upload label {
    margin-bottom: 5px;
    font-size: 0.9em; /* Smaller font size */
}

#team1-image-preview,
#team2-image-preview {
    width: 100px; /* Reduced width */
    height: 100px; /* Reduced height */
    border-radius: 50%;
    border: 3px solid #4CAF50; /* Thinner border */
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3); /* Reduced shadow */
    margin-top: 5px;
}

#winner-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 5px solid #4CAF50;
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

/* Align team images horizontally with "VS" in between */
.team-images-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.team-image-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}

.vs {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* Optional: Adjust image preview sizes */
#team1-image-preview,
#team2-image-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #4CAF50;
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    margin-top: 10px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .team-images-container {
        flex-direction: column;
    }
    
    .vs {
        margin: 10px 0;
    }
}