* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

html, body {
    height: 100%;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100vh;
    max-width: 100vw;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
}

.menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    z-index: 10;
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hidden {
    display: none;
}

button {
    background-color: black;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 0;
}

button:hover {
    background-color: #333;
}

h1, h2 {
    color: black;
    margin-bottom: 20px;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes rubberBand {
    0% {
        transform: translateX(-50%) scale(0.3);
    }
    30% {
        transform: translateX(-50%) scale(1.25);
    }
    40% {
        transform: translateX(-50%) scale(0.75);
    }
    50% {
        transform: translateX(-50%) scale(1.15);
    }
    65% {
        transform: translateX(-50%) scale(0.9);
    }
    75% {
        transform: translateX(-50%) scale(1.05);
    }
    100% {
        transform: translateX(-50%) scale(1);
    }
}

#score {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    color: white;
    font-weight: 900;
    z-index: 100;
    background-color: transparent;
    padding: 15px 30px;
    border-radius: 30px;
    display: none;
    text-shadow: 2px 2px 0 black, -2px 2px 0 black, 2px -2px 0 black, -2px -2px 0 black;
    font-family: Arial, sans-serif;
    letter-spacing: 1px;
    transform-origin: center;
    text-align: center;
    width: 100%;
}

#score.old {
    animation: fadeOut 0.3s ease forwards;
}

#score.new {
    animation: rubberBand 0.5s ease forwards;
}

#score, #finalScore {
    font-size: 48px;
    color: white;
    margin: 10px 0;
    font-weight: 900;
}

#gameOver {
    background-color: white;
}

#gameOver h2 {
    color: black;
    font-size: 28px;
    margin-bottom: 20px;
}

#gameOver #currentScore {
    font-size: 72px;
    color: black;
    margin: 20px 0;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    transform-origin: center;
    animation: rubberBand 0.5s ease forwards;
    text-align: center;
    width: 100%;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

#gameOver #finalScore {
    font-size: 32px;
    color: black;
    margin: 10px 0;
    font-weight: bold;
    transform-origin: center;
    text-align: center;
    width: 100%;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

#gameOver button {
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 30px 0;
}

.circle-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: white;
    border: 3px solid black;
    position: relative;
    cursor: pointer;
    margin-top: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 3px black, -12px 6px 15px rgba(0, 0, 0, 1);
}

.circle-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 15px solid black;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin-left: 3px;
}

.circle-button:hover {
    transform: scale(1.1);
    background-color: #f5f5f5;
    box-shadow: 0 0 0 3px black, -16px 8px 20px rgba(0, 0, 0, 1);
}

.start-image {
    width: 200px;
    height: auto;
    margin-bottom: 30px;
    object-fit: contain;
}

#menu {
    background-color: white;
}

#menu button {
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 30px 0;
}

#menu #score {
    display: none;
}

.instructions {
    color: #333;
    font-size: 22px;
    margin-top: 20px;
    font-weight: 600;
    text-align: center;
    width: 100%;
    padding: 0 20px;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.sound-button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid black;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sound-button:hover {
    transform: scale(1.1);
    background-color: #f5f5f5;
}

.sound-button.muted {
    opacity: 0.5;
}

.sound-button.muted::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 30px;
    background-color: black;
    transform: rotate(45deg);
} 