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

body {
    font-family: 'Orbitron', monospace;
    background: #0a0a0a;
    color: #fff;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background Effects */
.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 10s linear infinite;
    z-index: 1;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.bg-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 20%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 60%, rgba(255, 255, 0, 0.05) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
    z-index: 1;
}

@keyframes particleFloat {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

/* Game Canvas */
#gameCanvas {
    position: relative;
    z-index: 2;
    border: 2px solid #00ffff;
    border-radius: 10px;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.5),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.8);
}

/* Game UI */
.game-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 3;
}

.score-display, .high-score-display, .speed-display, .audio-controls {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ffff;
    border-radius: 10px;
    padding: 10px 15px;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.score-label, .high-score-label, .speed-label {
    font-size: 12px;
    color: #00ffff;
    margin-bottom: 5px;
    font-weight: 700;
    letter-spacing: 1px;
}

.score-value, .high-score-value, .speed-value {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Start Screen */
.start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.start-content {
    text-align: center;
    max-width: 500px;
    padding: 40px;
}

.game-title {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #ffff00);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

@keyframes titleGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.game-subtitle {
    font-size: 1.2rem;
    color: #00ffff;
    margin-bottom: 40px;
    letter-spacing: 3px;
    opacity: 0.8;
}

.controls-info {
    margin-bottom: 40px;
}

.control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 20px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
}

.control-key {
    font-weight: 900;
    color: #ffff00;
    font-size: 1.1rem;
}

.control-desc {
    color: #00ffff;
    font-size: 0.9rem;
}

/* Buttons */
.start-btn, .restart-btn {
    position: relative;
    background: transparent;
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    letter-spacing: 2px;
}

.start-btn:hover, .restart-btn:hover {
    color: #000;
    background: #00ffff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
    transform: translateY(-2px);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.start-btn:hover .btn-glow, .restart-btn:hover .btn-glow {
    left: 100%;
}

/* Game Over Screen */
.game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.game-over-content {
    text-align: center;
    max-width: 400px;
    padding: 40px;
}

.game-over-title {
    font-size: 3rem;
    font-weight: 900;
    color: #ff0066;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(255, 0, 102, 0.8);
    animation: pulseRed 2s ease-in-out infinite;
}

@keyframes pulseRed {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.final-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 700;
}

.new-record {
    color: #ffff00;
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 30px;
    display: none;
    text-shadow: 0 0 15px rgba(255, 255, 0, 0.8);
    animation: recordBlink 1s ease-in-out infinite;
}

@keyframes recordBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Mobile Controls */
.mobile-controls {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    display: none;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 5;
}

.mobile-btn {
    width: 80px;
    height: 80px;
    background: rgba(0, 255, 255, 0.2);
    border: 2px solid #00ffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    user-select: none;
}

.mobile-btn:active {
    background: rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    transform: scale(0.95);
}

.btn-arrow {
    font-size: 2rem;
    color: #00ffff;
    font-weight: 900;
}

/* Audio Controls */
.audio-controls {
    padding: 8px;
    min-width: auto;
}

.audio-btn {
    background: transparent;
    border: none;
    color: #00ffff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    border-radius: 5px;
}

.audio-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: scale(1.1);
}

.audio-btn.muted .audio-icon {
    color: #ff0066;
    opacity: 0.6;
}

.audio-icon {
    transition: all 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }
    
    .start-content {
        padding: 20px;
        max-width: 90%;
    }
    
    .game-ui {
        flex-direction: column;
        gap: 10px;
        top: 10px;
        left: 10px;
        right: 10px;
    }
    
    .score-display, .high-score-display, .speed-display {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
    }
    
    .score-label, .high-score-label, .speed-label {
        margin-bottom: 0;
        font-size: 10px;
    }
    
    .score-value, .high-score-value, .speed-value {
        font-size: 18px;
    }
    
    .mobile-controls {
        display: flex;
    }
    
    .mobile-only {
        display: flex;
    }
    
    #gameCanvas {
        width: 95vw !important;
        height: 60vh !important;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none;
    }
}

/* Game States */
.game-running .start-screen {
    display: none;
}

.game-over-state .game-over {
    display: flex;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.start-content, .game-over-content {
    animation: fadeIn 0.8s ease-out;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
