/* ============================================================
   GAME ROOT — permanent fullscreen
   ============================================================ */
#game-root {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: transparent;
}

#world {
    width: 100%;
    height: 100%;
    display: block;
    cursor: none;
    touch-action: none;
}

/* ============================================================
   DANGER LINE — always visible, accent on near-miss
   ============================================================ */
.danger-line {
    position: absolute;
    top: 160px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(239, 68, 68, 0.4) 8%,
        rgba(239, 68, 68, 0.4) 92%,
        transparent 100%);
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.25s var(--ease-out);
    z-index: 5;
}
.danger-line::before {
    content: '';
    position: absolute;
    inset: -1px 0;
    background: repeating-linear-gradient(90deg,
        transparent 0,
        transparent 6px,
        rgba(239, 68, 68, 0.95) 6px,
        rgba(239, 68, 68, 0.95) 14px);
    -webkit-mask: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
            mask: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.danger-line-label {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.3em;
    color: rgba(239, 68, 68, 0.75);
    text-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
    font-family: 'Inter', 'Rajdhani', sans-serif;
}
.danger-line.active {
    opacity: 1;
    animation: dangerPulse 0.9s ease-in-out infinite;
}
.danger-line.active .danger-line-label {
    color: #fecaca;
    text-shadow: 0 0 14px rgba(239, 68, 68, 0.9);
}
@keyframes dangerPulse {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.3)); }
    50% { filter: drop-shadow(0 0 18px rgba(239, 68, 68, 0.95)); }
}

/* ============================================================
   CURSOR GUIDE
   ============================================================ */
#cursor-guide {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.2) 30%,
        transparent 100%);
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s var(--ease-out);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
    will-change: transform, opacity;
}

/* ============================================================
   SCREEN SHAKE
   ============================================================ */
.shake-screen { animation: shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
@keyframes shake {
    10%, 90% { transform: translate(-2px, 1px); }
    20%, 80% { transform: translate(2px, -1px); }
    30%, 50%, 70% { transform: translate(-4px, 0); }
    40%, 60% { transform: translate(4px, 0); }
}

/* ============================================================
   BG CANVAS POSITION
   ============================================================ */
#bg-canvas {
    width: 100vw;
    height: 100vh;
}
