* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    overflow: hidden;
    background-color: #f5f5f5;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 10px;
    color: white;
    font-size: 1.2rem;
    display: flex;
    gap: 20px;
}

#score-container, #time-container {
    display: flex;
    align-items: center;
}

#score, #time {
    font-weight: bold;
    margin-left: 5px;
}

.stacked-bonus {
    position: absolute;
    color: #00ff00;
    font-weight: bold;
    font-size: 1.5rem;
    pointer-events: none;
    animation: float-up 1s ease-out forwards;
    z-index: 15;
}

@keyframes float-up {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-30px); opacity: 0; }
}

#game-over {
    position: absolute;
    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: 20;
}

.game-over-content {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.game-over-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #333;
}

#final-score {
    font-size: 2rem;
    font-weight: bold;
    color: #ff6b00;
}

#restart-button, #start-button {
    margin-top: 30px;
    padding: 15px 30px;
    font-size: 1.2rem;
    background-color: #ff6b00;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#restart-button:hover, #start-button:hover {
    background-color: #e05e00;
}

.hidden {
    display: none !important;
}

#start-screen {
    position: absolute;
    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: 20;
}

.start-content {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 600px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.start-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #333;
}

.instructions {
    margin-top: 30px;
    text-align: left;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.instructions h3 {
    margin-bottom: 15px;
    color: #333;
}

.instructions p {
    margin-bottom: 10px;
    color: #555;
    font-size: 1.1rem;
    line-height: 1.4;
}

#controls-help {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    text-align: center;
    z-index: 10;
    font-size: 1.1rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    width: 400px;
}

.controls-details {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    flex-wrap: wrap;
}

.control-item {
    display: flex;
    align-items: center;
    margin: 5px 10px;
}

.control-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.control-text {
    font-size: 0.95rem;
}