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

body {
    font-family: 'Arial', sans-serif;
    background-color: #0c0c2a;
    color: white;
    overflow: hidden;
    touch-action: none; /* Prevent default touch actions */
}

.game-container {
    width: 100%;
    height: 100vh;
    position: relative;
}

.score {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 24px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 10px;
}

.sound-control {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

#sound-toggle {
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

#sound-toggle:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

#game-area {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

#nyan-cat {
    position: absolute;
    left: 100px;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: 70px;
    z-index: 5;
}

/* CSS-based Nyan Cat */
.nyan-cat-img {
    position: relative;
    width: 100%;
    height: 100%;
}

.pop-tart {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #ff66cc;
    border-radius: 10px;
    border: 3px solid #663366;
    z-index: 1;
}

.cat-head {
    position: absolute;
    width: 60px;
    height: 40px;
    background-color: #999999;
    border-radius: 50%;
    top: 15px;
    left: 45px;
    z-index: 2;
}

.cat-eye {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #000;
    border-radius: 50%;
    top: 15px;
    z-index: 3;
}

.cat-eye.left {
    left: 10px;
}

.cat-eye.right {
    left: 30px;
}

.cat-mouth {
    position: absolute;
    width: 10px;
    height: 5px;
    background-color: #000;
    border-radius: 0 0 5px 5px;
    top: 25px;
    left: 20px;
    z-index: 3;
}

.rainbow {
    position: absolute;
    top: 35px;
    right: 120px;
    width: 200px;
    height: 10px;
    z-index: 0;
}

.rainbow-segment {
    position: absolute;
    height: 10px;
    width: 100%;
    background: linear-gradient(
        to bottom,
        #ff0000 0%,
        #ff9900 16.6%,
        #ffff00 33.2%,
        #33cc33 49.8%,
        #3399ff 66.4%,
        #cc66ff 83%,
        #ff99cc 100%
    );
}

.star {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: #ffffff;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    z-index: 3;
    animation: twinkle 1s infinite alternate;
}

@keyframes twinkle {
    from {
        opacity: 0.7;
    }
    to {
        opacity: 1;
    }
}

#game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    z-index: 20;
}

#restart-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #ff66cc;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

#restart-btn:hover {
    background-color: #ff33bb;
}

.hidden {
    display: none;
}

/* Mobile instructions */
#mobile-instructions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 16px;
    z-index: 10;
    animation: fadeOut 3s forwards 3s;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Hide mobile instructions on desktop */
.mobile-only {
    display: none;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
    
    #nyan-cat {
        left: 50px;
        width: 90px;
        height: 50px;
    }
    
    .rainbow {
        right: 90px;
        width: 150px;
    }
    
    .score {
        font-size: 18px;
    }
    
    .star {
        width: 25px;
        height: 25px;
    }
    
    #game-over {
        width: 80%;
        padding: 20px;
    }
    
    #sound-toggle {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
} 