:root {
    --player-color: #4CAF50;
    --text-color: white;
    --panel-bg: rgba(255, 255, 255, 0.8);
    --game-bg-start: #87CEEB;
    --game-bg-end: #E0F7FA;
}

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background-color: #f0f8ff;
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: manipulation;
}

#game-container {
    position: relative;
    width: 95%;
    max-width: 800px;
    height: 70vh;
    max-height: 500px;
    margin: 10px auto;
    background: linear-gradient(to bottom, var(--game-bg-start), var(--game-bg-end));
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 20px;
}

.cloud {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    filter: blur(5px);
    z-index: 1;
}

#player {
    position: absolute;
    width: 45px;
    height: 45px;
    bottom: 20px;
    background-color: var(--player-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-weight: bold;
    font-size: 24px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
    left: 0;
    transform: none;
}

.number {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    z-index: 5;
    color: var(--text-color);
}

.rock {
    position: absolute;
    background: 
        radial-gradient(circle at 30% 30%, #8B8B8B 0%, #696969 40%, #4A4A4A 100%),
        linear-gradient(135deg, #696969 0%, #808080 50%, #A9A9A9 100%);
    border-radius: 50% 20% 50% 20%;
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.2),
        inset -2px -2px 4px rgba(0, 0, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 5;
    border: 1px solid #2F2F2F;
    animation: rockFall 0.3s ease-out, rockFloat 4s linear infinite;
    transform-origin: center;
    position: relative;
}

.rock::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 25%;
    width: 30%;
    height: 30%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.rock::after {
    content: '';
    position: absolute;
    bottom: 15%;
    right: 20%;
    width: 25%;
    height: 25%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

@keyframes rockFall {
    0% {
        transform: rotate(0deg) scale(0.6);
        opacity: 0;
    }
    50% {
        transform: rotate(180deg) scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 1;
    }
}

@keyframes rockFloat {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#score-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--panel-bg);
    padding: 8px 12px;
    border-radius: 10px;
    z-index: 20;
}

#game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 30;
}

.controls {
    margin-top: 10px;
    text-align: center;
}

.btn-game {
    font-size: 1rem;
    padding: 8px 20px;
    margin: 0 5px;
    border-radius: 50px;
    font-weight: bold;
}

#sound-btn {
    transition: all 0.3s ease;
    border: 2px solid #6c757d;
}

#sound-btn:hover {
    background-color: #6c757d;
    color: white;
    transform: scale(1.05);
}

#sound-btn:active {
    transform: scale(0.95);
}

@media (min-width: 768px) {
    #player {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
    
    .number {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .rock {
        border-radius: 15% 25% 15% 25%;
        box-shadow: 
            inset 3px 3px 6px rgba(255, 255, 255, 0.2),
            inset -3px -3px 6px rgba(0, 0, 0, 0.4),
            0 6px 12px rgba(0, 0, 0, 0.4);
    }
    
    .btn-game {
        font-size: 1.2rem;
        padding: 10px 25px;
    }
}