* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #fff;
    min-height: 100vh;
    overflow: hidden;
    user-select: none;
}

.game-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.game-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.game-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.game-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.score-info, .high-score-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.game-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

.star:nth-child(1) {
    width: 3px;
    height: 3px;
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.star:nth-child(2) {
    width: 2px;
    height: 2px;
    top: 40%;
    left: 80%;
    animation-delay: 0.5s;
}

.star:nth-child(3) {
    width: 4px;
    height: 4px;
    top: 70%;
    left: 30%;
    animation-delay: 1s;
}

.star:nth-child(4) {
    width: 3px;
    height: 3px;
    top: 10%;
    left: 70%;
    animation-delay: 1.5s;
}

.star:nth-child(5) {
    width: 2px;
    height: 2px;
    top: 80%;
    left: 60%;
    animation-delay: 2s;
}

.star:nth-child(6) {
    width: 3px;
    height: 3px;
    top: 30%;
    left: 50%;
    animation-delay: 2.5s;
}

.star:nth-child(7) {
    width: 2px;
    height: 2px;
    top: 60%;
    left: 10%;
    animation-delay: 1.2s;
}

.star:nth-child(8) {
    width: 4px;
    height: 4px;
    top: 90%;
    left: 90%;
    animation-delay: 0.8s;
}

.planet-container {
    position: absolute;
    bottom: -150px;
    right: -150px;
    width: 300px;
    height: 300px;
    animation: rotate 60s linear infinite;
    z-index: 1;
}

.planet {
    position: absolute;
    width: 150px;
    height: 150px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 50px rgba(255, 107, 107, 0.5);
}

.planet-ring {
    position: absolute;
    width: 250px;
    height: 70px;
    border: 10px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(60deg);
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3;
    pointer-events: none;
}

.instructions {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    max-width: 80%;
    transition: opacity 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.instructions h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #4ecdc4;
}

.instructions p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.perfect-message {
    background: rgba(78, 205, 196, 0.2);
    backdrop-filter: blur(5px);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    position: absolute;
    top: 20%;
    transition: opacity 0.5s ease;
    border: 2px solid #4ecdc4;
    opacity: 0;
}

.perfect-message h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #4ecdc4;
}

.perfect-message p {
    font-size: 1.2rem;
}

.restart-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    pointer-events: all;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.restart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

.game-controls {
    display: none;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.control-btn {
    width: 200px;
    height: 60px;
    border-radius: 30px;
    background: rgba(78, 205, 196, 0.3);
    border: 2px solid #4ecdc4;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn.active {
    background: rgba(78, 205, 196, 0.6);
    transform: scale(0.95);
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.2;
    }
    50% {
        opacity: 1;
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .game-title {
        font-size: 1.2rem;
    }

    .game-info {
        gap: 1rem;
    }

    .score-info, .high-score-info {
        font-size: 0.8rem;
    }

    .instructions {
        padding: 1.5rem;
    }

    .instructions h2 {
        font-size: 1.3rem;
    }

    .instructions p {
        font-size: 0.9rem;
    }

    .game-controls {
        display: flex;
    }

    .planet-container {
        width: 200px;
        height: 200px;
        bottom: -100px;
        right: -100px;
    }

    .planet {
        width: 100px;
        height: 100px;
    }

    .planet-ring {
        width: 170px;
        height: 50px;
    }
}