* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.scoreboard {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 10px; /* Reduced margin to fit messages */
}

.score-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    text-align: center;
    min-width: 100px; /* Ensure boxes are wide enough */
}

.score-box h3 {
    font-size: 0.9em;
    margin-bottom: 5px;
    opacity: 0.9;
}

.score-box div {
    font-size: 2em;
    font-weight: bold;
}

/* New CSS for messages and record glow */
.messages {
    text-align: center;
    margin-bottom: 20px;
}

#whackMessage {
    color: red;
    font-weight: bold;
    font-size: 1.5em;
    height: 1.5em; /* Reserve space */
}

#sessionScores {
    font-size: 0.9em;
    color: #333;
}

.new-record-glow { /* 6. "New Record!" Glow on Best Score */
    animation: glow 1s ease-out forwards;
}

@keyframes glow {
    0% {
        text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
    }
    50% {
        text-shadow: 0 0 15px yellow, 0 0 20px orange;
    }
    100% {
        text-shadow: none;
    }
}
/* End new CSS */


.start-btn {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 1.5em;
    font-weight: bold;
    background: #4ECDC4;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s;
}
.extra{
    display: flex;
    gap: 5%;
}
.reset {
    display: block;
    width: 50%;
    padding: 15px;
    font-size: 1.5em;
    font-weight: bold;
    background: orange;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s;
}
.pause {
    display: block;
    width: 50%;
    padding: 15px;
    font-size: 1.5em;
    font-weight: bold;
    background: green;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s;
}
.resume {
    display:none;
    width: 50%;
    padding: 15px;
    font-size: 1.5em;
    font-weight: bold;
    background: blue;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.start-btn:hover {
    background: #45b8b0;
    transform: translateY(-2px);
}

.start-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.hole {
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, #8B4513 0%, #654321 100%);
    border-radius: 50% 50% 0 0 / 20% 20% 0 0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.mole {
    width: 80%;
    height: 80%;
    content: "";
    background: #8B4513;
    border-radius: 50%;
    position: absolute;
    bottom: -100%;
    left: 50%;
    transform: translateX(-50%);
    transition: bottom 0.2s;
}

.mole::before {
    content: '🐹';
    font-size: 3em;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.mole.up {
    bottom: 20%;
}

.mole.bonked {
    bottom: -100%;
}

/* Removed redundant .whake class as text is added directly to #whackMessage */


@media (max-width: 600px) {
    .game-board {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hole {
        height: 120px;
    }
}