* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body {
    background-color: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    touch-action: manipulation;
    font-family: 'Arial', sans-serif;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 414px; /* Common mobile width */
    height: 100vh;
    max-height: 736px; /* Common mobile height */
    overflow: hidden;
    background-color: #16213e;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.menu-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(22, 33, 62, 0.9);
    z-index: 10;
    color: #e94560;
    text-align: center;
    padding: 20px;
    transition: all 0.3s ease;
}

.menu-screen h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: #f8bbd0;
}

.menu-screen p {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #ffffff;
}

.menu-btn {
    width: 200px;
    padding: 15px 20px;
    margin: 10px 0;
    font-size: 1.2rem;
    background-color: #e94560;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.menu-btn:hover {
    background-color: #f8bbd0;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.menu-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hidden {
    display: none !important;
}

#hud {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 5;
    color: white;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

#hud div {
    background-color: rgba(22, 33, 62, 0.7);
    padding: 5px 10px;
    border-radius: 10px;
}

#pause-btn {
    background-color: rgba(233, 69, 96, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#pause-btn:hover {
    background-color: rgba(233, 69, 96, 1);
    transform: scale(1.1);
}

/* Animation for level complete */
@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #e94560;
    opacity: 0;
    animation: confetti 2s ease-out forwards;
    z-index: 20;
}

/* Responsive adjustments */
@media (max-height: 600px) {
    .menu-screen h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .menu-btn {
        padding: 12px 15px;
        font-size: 1rem;
        width: 180px;
    }
    
    #hud {
        font-size: 1rem;
    }
}