@import url('./lobby.css');
@import url('./settings.css');
@import url('./reconnect.css');
@import url('./minimap.css');
@import url('./chat.css');
@import url('./hud-layout.css');

:root {
    --bg-dark: #111111;
    --text-main: #ffffff;
    --text-dim: #8b8b9b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Rajdhani', sans-serif;
}

html,
body {
    background: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    height: 100%;
    width: 100%;
}

.fullscreen-root {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    user-select: none;
}

.game-canvas {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;

    display: block;
    width: 100%;
    height: 100%;
    background-color: transparent;
}

/* Pointer Event Utilities */
.pe-none {
    pointer-events: none;
}

.pe-all {
    pointer-events: all;
}

/* HUDs */
.hud-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.hud-server-timer {
    position: absolute;
    top: calc(20px * var(--scale, 1));
    left: 50%;
    transform: translateX(-50%) scale(var(--scale, 1));
    transform-origin: top center;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 9999px;

    font-size: 18px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    pointer-events: none;
}

.hud-leaderboard {
    position: absolute;
    top: calc(20px * var(--scale, 1));
    right: calc(20px * var(--scale, 1));
    transform: scale(var(--scale, 1));
    transform-origin: top right;

    display: flex;
    flex-direction: column;
    align-items: flex-end;

    font-weight: 700;
    pointer-events: none;
}

.hud-leaderboard .lb-header {
    color: #ffd700;
    font-size: 24px;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.hud-leaderboard .lb-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.hud-leaderboard .lb-row {
    color: white;
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Pause HUD */
.pause-hud {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translate(-50%, 0);

    font-family: 'Rajdhani', sans-serif;
    font-size: 32px;
    /* Smaller text */
    color: #FFD700;
    /* Gold */
    font-weight: 800;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 50;
    /* Behind lobby overlay */
    letter-spacing: 4px;
    text-align: center;

    animation: pausePulse 2s infinite ease-in-out;
}

.pause-hud i {
    display: block;
    font-size: 48px;
    margin-bottom: 5px;
    color: #ffed4a;
}

@keyframes pausePulse {

    0%,
    100% {
        transform: translate(-50%, 0) scale(1);
        opacity: 0.7;
    }

    50% {
        transform: translate(-50%, 0) scale(1.1);
        opacity: 1;
    }
}

/* Stats HUD */
/* Stats HUD */
.stats-hud {
    display: flex;
    flex-direction: row;
    /* Horizontal layout for badges */
    gap: 10px;
    /* Positioning handled by hud-layout.css wrapper */
}

.stat-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-label {
    color: #aaa;
    font-size: 14px;
}

.stat-value {
    color: #fff;
}

.stat-ping {
    color: #00ff00;
}