:root {
    --void-black: #000000;
    --cult-red: #FF003C;
    --amber-warn: #FF6600;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--void-black);
    font-family: 'JetBrains Mono', monospace, 'Courier New', Courier;
}

/* WebGL Viewport Container */
#webgl-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    cursor: grab;
    touch-action: none;
    overflow: hidden;
}

#webgl-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

#webgl-container:active {
    cursor: grabbing;
}

/* CRT Overlay and Scanlines */
.crt-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.4) 50%),
                linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
    background-size: 100% 3px, 4px 100%;
    opacity: 0.85;
}

.crt-vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999;
    box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.95), 
                inset 0 0 45px rgba(255, 0, 60, 0.2);
    animation: crtFlicker 0.15s infinite;
}

@keyframes crtFlicker {
    0% { opacity: 0.97; }
    50% { opacity: 1; }
    100% { opacity: 0.96; }
}

/* Neutral Minimalist Developer HUD */
.dev-hud {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 320px;
    background: rgba(18, 20, 26, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.65);
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    z-index: 2000;
    border-radius: 6px;
    backdrop-filter: blur(8px);
}

.dev-header {
    background: rgba(28, 32, 40, 0.95);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #cbd5e1;
}

.dev-close {
    cursor: pointer;
    color: #94a3b8;
    font-weight: bold;
    font-family: 'JetBrains Mono', monospace;
    transition: color 0.15s ease;
}

.dev-close:hover {
    color: #ef4444;
}

.dev-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dev-row {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 0.2px;
}

.dev-divider {
    color: #64748b;
    margin: 8px 0 2px 0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 3px;
}

.dev-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.dev-btn {
    background: #222732;
    border: 1px solid #333b4d;
    color: #cbd5e1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 6px 4px;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.15s ease;
    text-align: center;
}

.dev-btn:hover {
    background: #2d3444;
    border-color: #4b5873;
    color: #f8fafc;
}

.dev-btn.active {
    background: #2563eb;
    border-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

.dev-notify {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 20, 26, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
    padding: 8px 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 2001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.dev-notify.show {
    opacity: 1;
}

/* Accessibility text for screen readers */
.semantic-content {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile Touch Controls */
.mobile-controls {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 900;
    display: none;
}

.mobile-zone-left {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50vw;
    height: 70vh;
    pointer-events: auto;
    touch-action: none;
}

.mobile-zone-right {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50vw;
    height: 80vh;
    pointer-events: auto;
    touch-action: none;
}

.virtual-joystick-base {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 0, 60, 0.18) 0%, rgba(10, 13, 20, 0.65) 100%);
    border: 2px solid rgba(255, 0, 60, 0.45);
    box-shadow: 0 0 20px rgba(255, 0, 60, 0.25);
    transform: translate(-50%, -50%);
    pointer-events: none;
    display: none;
    z-index: 910;
}

.virtual-joystick-stick {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, #ff003c 0%, #aa0028 100%);
    border: 2px solid #ffffff;
    box-shadow: 0 0 15px #ff003c;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.mobile-sprint-btn {
    position: absolute;
    bottom: 35px;
    right: 25px;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: rgba(12, 16, 24, 0.85);
    border: 2px solid rgba(0, 240, 255, 0.5);
    color: #00f0ff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    touch-action: none;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
    user-select: none;
    -webkit-user-select: none;
    transition: all 0.15s ease;
    z-index: 920;
}

.mobile-sprint-btn.active {
    background: rgba(0, 240, 255, 0.35);
    border-color: #00f0ff;
    box-shadow: 0 0 25px #00f0ff;
    transform: scale(0.94);
}
