body {
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #0c0c0c, #1a1a2e, #16213e);
    color: white;
    font-family: 'Courier New', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.title {
    text-align: center;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff33;
    margin-bottom: 20px;
    font-size: 2.5rem;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff33;
    }
    to {
        text-shadow: 0 0 15px #00ffff, 0 0 30px #00ffff66, 0 0 40px #00ffff33;
    }
}

#game-container {
    border: 2px solid #00ffff;
    border-radius: 10px;
    box-shadow: 0 0 20px #00ffff33, inset 0 0 20px #00ffff11;
    background: radial-gradient(circle at center, #000011, #000000);
    position: relative;
    overflow: hidden;
}

#game-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00ffff, #0080ff, #8000ff, #ff0080, #00ffff);
    border-radius: 12px;
    z-index: -1;
    animation: borderRotate 4s linear infinite;
}

@keyframes borderRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

#ui {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    font-size: 18px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat {
    background: rgba(0, 255, 255, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #00ffff;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.3);
}

.stat:hover::before {
    left: 100%;
}

.stat span {
    color: #00ff00;
    font-weight: bold;
    text-shadow: 0 0 5px #00ff0050;
}

.instructions {
    margin-top: 30px;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #444;
    backdrop-filter: blur(10px);
    max-width: 600px;
}

.instructions h3 {
    color: #ffff00;
    margin-bottom: 15px;
    text-shadow: 0 0 8px #ffff0050;
}

.instructions p {
    margin: 8px 0;
    color: #cccccc;
    line-height: 1.4;
}


@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    #ui {
        gap: 10px;
        font-size: 16px;
    }
    
    .stat {
        padding: 10px 12px;
    }
    
    .instructions {
        margin-top: 20px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.4rem;
    }
    
    #ui {
        gap: 8px;
        font-size: 14px;
    }
    
    .stat {
        padding: 8px 10px;
    }
}

/* Additional cosmic effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 0, 120, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -2;
    animation: cosmicShift 20s ease-in-out infinite;
}

@keyframes cosmicShift {
    0%, 100% { 
        background: 
            radial-gradient(circle at 20% 80%, rgba(120, 0, 255, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(255, 0, 120, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 40% 40%, rgba(0, 255, 255, 0.05) 0%, transparent 50%);
    }
    50% { 
        background: 
            radial-gradient(circle at 80% 20%, rgba(120, 0, 255, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 20% 80%, rgba(255, 0, 120, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 60% 60%, rgba(0, 255, 255, 0.05) 0%, transparent 50%);
    }
}
