:root {
    --bg-color: #0f141a;
    --text-color: #ffffff;
    --panel-bg: rgba(20, 26, 35, 0.75);
    --primary-color: #ff4757;
    --secondary-color: #2ed573;
    --font-main: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* UI Layer */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    padding: 25px;
}

#score-board {
    background: var(--panel-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 18px 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
    height: fit-content;
}

.score-title, .kills-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.kills-title {
    margin-top: 12px;
}

#score-value, #kills-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

#minimap-container {
    width: 150px;
    height: 150px;
    background: var(--panel-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.15);
    pointer-events: auto;
    overflow: hidden;
}

#minimap-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Overlays */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 18, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 400px;
    width: 90%;
    transform: translateY(0);
    animation: floatIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--primary-color);
    text-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.panel h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
    text-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.panel p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
}

.panel input {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 12px;
    margin-bottom: 20px;
    font-family: var(--font-main);
    transition: border-color 0.25s, background-color 0.25s;
    outline: none;
}

.panel input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.panel button {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-main);
    transition: transform 0.1s, background-color 0.25s, box-shadow 0.25s;
    box-shadow: 0 8px 24px rgba(255, 71, 87, 0.35);
}

.panel button:hover {
    background: #ff2a3f;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 71, 87, 0.5);
}

.panel button:active {
    transform: translateY(0);
}

.controls {
    margin-top: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.stats {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.stats p {
    margin-bottom: 5px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}
.stats p:last-child {
    margin-bottom: 0;
}
