* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary-glow: #00f0ff;
    --secondary-glow: #ff006e;
    --tertiary-glow: #ffbe0b;
    --dark-bg: #050508;
    --ui-bg: rgba(5, 5, 8, 0.85);
}
body {
    background: var(--dark-bg);
    overflow: hidden;
    font-family: 'Rajdhani', sans-serif;
    color: white;
}
#game-container {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 1;
}
#main-canvas, #webgl-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
#main-canvas { z-index: 1; }
#webgl-canvas { z-index: 2; pointer-events: none; }
#ui-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10;
    pointer-events: none;
}
.hud-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    padding: 20px 40px;
}
.player-hud {
    position: absolute;
    top: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.player-hud.left { left: 40px; align-items: flex-start; }
.player-hud.right { right: 40px; align-items: flex-end; }
.player-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px currentColor;
}
.player-hud.left .player-name { color: var(--primary-glow); }
.player-hud.right .player-name { color: var(--secondary-glow); }
.health-bar-container {
    width: 300px; height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transform: skewX(-15deg);
}
.health-bar {
    height: 100%;
    transition: width 0.3s ease-out;
    position: relative;
}
.health-bar.left {
    background: linear-gradient(90deg, #00a8ff, #00f0ff, #00ffff);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
}
.health-bar.right {
    background: linear-gradient(90deg, #ff006e, #ff2a6d, #ff5c8d);
    box-shadow: 0 0 30px rgba(255, 0, 110, 0.5);
}
.health-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 50%, rgba(0,0,0,0.3) 100%);
}
.energy-bar-container {
    width: 200px; height: 8px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform: skewX(-15deg);
    margin-top: 5px;
}
.energy-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffbe0b, #ffd700);
    box-shadow: 0 0 15px rgba(255, 190, 11, 0.4);
    transition: width 0.2s ease-out;
}
.cinematic-text {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 100;
}
.cinematic-title {
    font-family: 'Syncopate', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 15px;
    background: linear-gradient(180deg, #fff 0%, #a0a0a0 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 60px rgba(255, 255, 255, 0.5);
    opacity: 0;
    transform: scale(0.8);
    animation: titleReveal 3s ease-out forwards;
}
@keyframes titleReveal {
    0% { opacity: 0; transform: scale(0.8) translateY(30px); }
    30% { opacity: 1; transform: scale(1.1) translateY(0); }
    50% { opacity: 1; transform: scale(1) translateY(0); }
    80% { opacity: 1; transform: scale(1) translateY(0); }
    100% { opacity: 0; transform: scale(1.2) translateY(-50px); }
}
.cinematic-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 8px;
    color: var(--primary-glow);
    text-shadow: 0 0 30px var(--primary-glow);
    margin-top: 20px;
    opacity: 0;
    animation: subtitleReveal 3s ease-out 0.5s forwards;
}
@keyframes subtitleReveal {
    0% { opacity: 0; transform: translateY(20px); }
    30% { opacity: 1; transform: translateY(0); }
    70% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}
.scene-indicator {
    position: absolute;
    bottom: 30px; left: 50%;
    transform: translateX(-50%);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}
.combo-counter {
    position: absolute;
    top: 50%; right: 100px;
    transform: translateY(-50%);
    text-align: right;
    opacity: 0;
}
.combo-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 6rem;
    font-weight: 900;
    color: var(--tertiary-glow);
    text-shadow: 0 0 40px var(--tertiary-glow);
    line-height: 1;
}
.combo-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 4px;
    color: white;
    text-transform: uppercase;
}
.impact-frame {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    mix-blend-mode: overlay;
}
.vignette {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
    z-index: 5;
}
.scanlines {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px);
    pointer-events: none;
    z-index: 6;
    opacity: 0.3;
}
.chromatic-aberration {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 7;
    opacity: 0;
    mix-blend-mode: screen;
}
.transformation-aura {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 0; height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 190, 11, 0.8) 0%, transparent 70%);
    opacity: 0;
    pointer-events: none;
    z-index: 20;
}
.loading-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--dark-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease-out;
}
.loading-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 8px;
    color: var(--primary-glow);
    margin-bottom: 30px;
}
.loading-bar {
    width: 300px; height: 4px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}
.loading-progress {
    position: absolute;
    top: 0; left: 0;
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--primary-glow), var(--secondary-glow));
    box-shadow: 0 0 20px var(--primary-glow);
    transition: width 0.3s ease-out;
}
.controls-hint {
    position: absolute;
    bottom: 80px; left: 50%;
    transform: translateX(-50%);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
}
@media (max-width: 768px) {
    .cinematic-title { font-size: 2.5rem; letter-spacing: 8px; }
    .health-bar-container { width: 150px; height: 18px; }
    .player-name { font-size: 0.9rem; }
}
