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

body {
    font-family: 'Rajdhani', sans-serif;
    background: #0a0a1a;
    color: #fff;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(120, 0, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(0, 255, 200, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(255, 0, 100, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

.game-container {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    padding: 20px;
}

.main-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.game-title {
    text-align: center;
    margin-bottom: 15px;
}

.game-title h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 8px;
    color: #00f0ff;
    text-shadow: 
        0 0 10px #00f0ff,
        0 0 20px #00f0ff,
        0 0 40px #00a0ff,
        0 0 80px #0060ff;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 10px #00f0ff, 0 0 20px #00f0ff, 0 0 40px #00a0ff; }
    100% { text-shadow: 0 0 15px #00f0ff, 0 0 30px #00f0ff, 0 0 60px #00a0ff, 0 0 100px #0060ff; }
}

.neon-line {
    height: 3px;
    width: 200px;
    margin: 8px auto;
    background: linear-gradient(90deg, transparent, #00f0ff, #ff00a0, #00f0ff, transparent);
    border-radius: 2px;
    animation: lineShine 3s linear infinite;
}

@keyframes lineShine {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

#gameCanvas {
    border: 3px solid #00f0ff;
    border-radius: 4px;
    box-shadow: 
        0 0 15px rgba(0, 240, 255, 0.3),
        inset 0 0 30px rgba(0, 240, 255, 0.05);
    background: #0d0d1f;
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 160px;
}

.panel-box {
    background: rgba(15, 15, 35, 0.8);
    border: 2px solid rgba(0, 240, 255, 0.3);
    border-radius: 12px;
    padding: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.panel-box h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    color: #ff00a0;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(255, 0, 160, 0.5);
}

.hold-container, .next-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hold-container canvas, .next-container canvas {
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
}

.stats-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    color: #888;
    letter-spacing: 2px;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #00f0ff;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.controls-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #aaa;
}

.control-item .key {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: #ff00a0;
    background: rgba(255, 0, 160, 0.15);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 0, 160, 0.3);
    min-width: 50px;
    text-align: center;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.game-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.overlay-content {
    text-align: center;
    animation: overlayPop 0.5s ease-out;
}

@keyframes overlayPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.overlay-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: #ff00a0;
    text-shadow: 0 0 20px rgba(255, 0, 160, 0.8);
    margin-bottom: 15px;
}

.overlay-content p {
    color: #888;
    font-size: 1rem;
    margin-bottom: 25px;
}

.neon-btn {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: #00f0ff;
    background: transparent;
    border: 2px solid #00f0ff;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2), inset 0 0 20px rgba(0, 240, 255, 0.1);
    transition: all 0.3s ease;
    letter-spacing: 3px;
}

.neon-btn:hover {
    background: rgba(0, 240, 255, 0.15);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4), inset 0 0 30px rgba(0, 240, 255, 0.2);
    transform: scale(1.05);
}

@media (max-width: 800px) {
    .game-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .side-panel {
        flex-direction: row;
        width: 100%;
        justify-content: center;
    }
    
    .game-title h1 {
        font-size: 2.5rem;
    }
}
