:root {
    --bg-color: #0a0a0c;
    --primary: #d4a373;
    --accent: #e9edc9;
    --text: #fefae0;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, #1a1a2e 0%, #16213e 100%);
    overflow: hidden;
    transform: scale(1.05);
    transform-origin: center center;
}

header {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 10;
}

h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
}

h1 span {
    font-weight: 300;
    color: var(--text);
}

#ui-overlay {
    display: flex;
    gap: 20px;
}

.stat-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.label {
    font-size: 0.6rem;
    font-weight: 600;
    opacity: 0.6;
    letter-spacing: 1px;
}

.value {
    font-size: 1.2rem;
    font-weight: 800;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

#instructions {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 0.7;
    font-weight: 300;
    font-size: 0.9rem;
    pointer-events: none;
}

#instructions span {
    background: var(--glass);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

#game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.4s ease;
}

#game-over.hidden {
    opacity: 0;
    pointer-events: none;
}

#game-over h2 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: #e63946;
}

#restart-btn {
    background: var(--primary);
    color: var(--bg-color);
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    text-transform: uppercase;
}

#restart-btn:hover {
    transform: scale(1.05);
    background: #e6b89c;
}