/**
 * Neon Runner - Style Sheet
 * Synthwave / neon aesthetic for endless runner
 */

/* ==================== BASE ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0a0a1a; }

.lg-game-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a1a;
}

#game-canvas {
    display: block;
    image-rendering: auto;
    cursor: default;
    border-radius: 0;
    box-shadow: none;
}

/* ==================== MENU OVERLAY ==================== */
.nr-menu {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(10,10,26,0.95) 0%, rgba(30,0,60,0.98) 100%);
    z-index: 100;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    text-align: center;
}

.nr-menu h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0,255,255,0.6), 0 0 60px rgba(0,255,255,0.3), 0 4px 8px rgba(0,0,0,0.5);
    margin-bottom: 8px;
    letter-spacing: 6px;
    text-transform: uppercase;
}

.nr-menu .nr-subtitle {
    font-size: 0.9rem;
    color: #ff00ff;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 40px;
    text-shadow: 0 0 10px rgba(255,0,255,0.5);
}

.nr-controls-hint {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-top: 30px;
    line-height: 1.8;
}

.nr-controls-hint span {
    color: #00ffff;
    font-weight: 700;
}

.nr-best-score {
    color: #ffcc00;
    font-size: 0.85rem;
    margin-top: 16px;
    letter-spacing: 1px;
}

/* Menu Buttons */
.nr-btn {
    display: block;
    width: 260px;
    margin: 10px auto;
    padding: 14px 28px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, rgba(0,255,255,0.15), rgba(255,0,255,0.15));
    border: 2px solid #00ffff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 8px rgba(0,255,255,0.4);
}

.nr-btn:hover {
    background: linear-gradient(135deg, rgba(0,255,255,0.3), rgba(255,0,255,0.3));
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0,255,255,0.4), 0 6px 20px rgba(0,0,0,0.3);
}

.nr-btn:active {
    transform: translateY(0);
}

.nr-btn-start {
    border-color: #00ffff;
    animation: nr-btn-glow 2s ease-in-out infinite alternate;
}

@keyframes nr-btn-glow {
    from { box-shadow: 0 0 8px rgba(0,255,255,0.2); }
    to { box-shadow: 0 0 20px rgba(0,255,255,0.5), 0 0 40px rgba(0,255,255,0.2); }
}

/* ==================== HUD ==================== */
.nr-hud {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 50;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.nr-hud-top {
    position: absolute;
    top: 10px; left: 10px; right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.nr-hud-item {
    padding: 6px 14px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(0,255,255,0.25);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.nr-distance {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(0,255,255,0.5);
    letter-spacing: 2px;
}

.nr-orbs {
    color: #00ffff;
}

.nr-score {
    color: #ffcc00;
    text-align: right;
}

/* Speed indicator */
.nr-speed-bar {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 120px;
}

.nr-speed-label {
    color: rgba(255,255,255,0.5);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.nr-speed-track {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,0,255,0.3);
    border-radius: 4px;
    overflow: hidden;
}

.nr-speed-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #ff00ff);
    border-radius: 4px;
    transition: width 0.2s linear;
    width: 30%;
}

/* Shield indicator */
.nr-shield-border {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 40;
    border: 3px solid rgba(0,128,255,0.5);
    border-radius: 0;
    animation: nr-shield-pulse 1.5s ease-in-out infinite alternate;
    display: none;
}

.nr-shield-border.active {
    display: block;
}

@keyframes nr-shield-pulse {
    from { border-color: rgba(0,128,255,0.3); box-shadow: inset 0 0 20px rgba(0,128,255,0.1); }
    to { border-color: rgba(0,128,255,0.6); box-shadow: inset 0 0 40px rgba(0,128,255,0.2); }
}

/* Pause controls */
.nr-hud-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    pointer-events: auto;
}

.nr-btn-sm {
    padding: 5px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: inherit;
    color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(0,255,255,0.2);
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: auto;
}

.nr-btn-sm:hover {
    background: rgba(0,255,255,0.15);
    border-color: rgba(0,255,255,0.5);
    color: #fff;
}

/* ==================== COUNTDOWN ==================== */
.nr-countdown {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    pointer-events: none;
}

.nr-countdown-num {
    font-size: 6rem;
    font-weight: 800;
    color: #00ffff;
    text-shadow: 0 0 30px rgba(0,255,255,0.6), 0 0 80px rgba(0,255,255,0.3);
    animation: nr-count-pop 0.8s ease-out;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

@keyframes nr-count-pop {
    0% { transform: scale(2); opacity: 0; }
    30% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0; }
}

/* ==================== GAME OVER ==================== */
.nr-gameover {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10,10,26,0.9);
    z-index: 100;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    text-align: center;
    color: #fff;
}

.nr-gameover h2 {
    font-size: 2.8rem;
    color: #ff0044;
    text-shadow: 0 0 20px rgba(255,0,68,0.5), 0 0 60px rgba(255,0,68,0.2);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.nr-gameover .nr-final-distance {
    font-size: 2.5rem;
    font-weight: 800;
    color: #00ffff;
    text-shadow: 0 0 15px rgba(0,255,255,0.4);
    margin: 8px 0;
}

.nr-gameover .nr-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 20px 0;
}

.nr-stat-item {
    text-align: center;
}

.nr-stat-item .value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffcc00;
}

.nr-stat-item .label {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 2px;
}

.nr-new-best {
    color: #ffcc00;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 8px;
    animation: nr-best-flash 0.5s ease-in-out infinite alternate;
    display: none;
}

.nr-new-best.active {
    display: block;
}

@keyframes nr-best-flash {
    from { opacity: 0.6; text-shadow: 0 0 5px rgba(255,204,0,0.3); }
    to { opacity: 1; text-shadow: 0 0 15px rgba(255,204,0,0.6); }
}

/* ==================== PAUSE OVERLAY ==================== */
.nr-paused {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10,10,26,0.8);
    z-index: 95;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    text-align: center;
    display: none;
}

.nr-paused.active {
    display: flex;
}

.nr-paused h2 {
    font-size: 2.5rem;
    color: #ff00ff;
    text-shadow: 0 0 20px rgba(255,0,255,0.5);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

/* ==================== CLOSE CALL FLASH ==================== */
.nr-close-call {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255,204,0,0.5);
    text-transform: uppercase;
    letter-spacing: 3px;
    pointer-events: none;
    z-index: 55;
    opacity: 0;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.nr-close-call.show {
    animation: nr-close-call-anim 1s ease-out forwards;
}

@keyframes nr-close-call-anim {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
    100% { opacity: 0; transform: translate(-50%, -80%) scale(1); }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 600px) {
    .nr-menu h1 { font-size: 2.2rem; letter-spacing: 3px; }
    .nr-menu .nr-subtitle { font-size: 0.7rem; }
    .nr-btn { width: 200px; padding: 10px 20px; font-size: 0.9rem; }
    .nr-hud-item { padding: 4px 8px; font-size: 0.75rem; }
    .nr-distance { font-size: 1rem; }
    .nr-controls-hint { font-size: 0.65rem; }
    .nr-gameover h2 { font-size: 2rem; }
    .nr-gameover .nr-final-distance { font-size: 1.8rem; }
    .nr-stat-item .value { font-size: 1.2rem; }
}
