body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f0f0;
    font-family: Arial, sans-serif;
    margin: 0;
}

.game-container {
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
    max-width: 100%;
}

.score-board {
    font-size: 24px;
    margin-bottom: 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    gap: 10px;
    margin-bottom: 20px;
}

.hole {
    width: 100px;
    height: 100px;
    background-color: #ccc;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white;
    font-weight: bold;
    transition: transform 0.3s ease-in-out;
}

.hole.active {
    background-color: green;
    transform: scale(1.1);
}

.key {
    position: absolute;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    margin: 5px;
}

.progress-bar-container,
.score-progress-container {
    width: 320px;
    height: 20px;
    background-color: #ddd;
    margin-bottom: 10px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.progress-bar,
.score-progress-bar {
    height: 100%;
    background-color: #4caf50;
    border-radius: 10px 0 0 10px;
    transition: width 0.1s linear;
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: left;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.hidden {
    display: none;
}

.timed-mode {
    display: inline;
}

.infinite-mode .timed-mode {
    display: none;
}

.infinite-mode .progress-bar,
.infinite-mode .score-progress-bar {
    background-color: #ddd;
    transition: none;
}

#tutorial {
    display: none;
}

.tutorial-show {
    display: block;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(3, 80px);
        gap: 5px;
    }
    .hole {
        width: 80px;
        height: 80px;
        font-size: 18px;
    }
    .progress-bar-container,
    .score-progress-container {
        width: 260px;
        height: 15px;
    }
    button {
        padding: 8px 16px;
        font-size: 14px;
    }
    .score-board {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: repeat(3, 60px);
        gap: 5px;
    }
    .hole {
        width: 60px;
        height: 60px;
        font-size: 14px;
    }
    .progress-bar-container,
    .score-progress-container {
        width: 200px;
        height: 10px;
    }
    button {
        padding: 6px 12px;
        font-size: 12px;
    }
    .score-board {
        font-size: 18px;
    }
}
