:root {
    --bg-color: #050505;
    --panel-bg: rgba(10, 10, 15, 0.7);
    --panel-border: rgba(0, 255, 204, 0.3);
    --accent-color: #00ffcc;
    --danger-color: #ff0055;
    --text-color: #e0e0e0;
}

* {
    box-sizing: border-box;
    user-select: none;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: optimizeSpeed;
}

#flash-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease-out;
    z-index: 10;
}

#flash-overlay.flash {
    opacity: 1;
    transition: none;
}

/* UI HUD */
#hud {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20%;
    max-height: 120px;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--panel-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 5;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

.hud-panel {
    display: flex;
    flex-direction: column;
    width: 250px;
}

.center-panel {
    align-items: center;
    width: auto;
}

.hud-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.hud-label-progress {
    margin-top: 5px;
}

.hud-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    color: var(--accent-color);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

.level-value {
    font-size: 48px;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.hud-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}

.hud-bar-fill {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    box-shadow: 0 0 10px var(--accent-color);
    transition: width 0.1s linear;
}

#ui-progress-bar {
    background: var(--accent-color);
}

#ui-lives {
    font-size: 20px;
    letter-spacing: 5px;
}

/* Menu */
#menu-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    padding: 50px;
    border-radius: 15px;
    text-align: center;
    z-index: 20;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(0, 255, 204, 0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#menu-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 48px;
    color: #fff;
    margin: 0;
    text-shadow:
        0 0 20px var(--accent-color),
        0 0 40px var(--accent-color);
    letter-spacing: 5px;
}

#menu-desc {
    color: #aaa;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

#menu-desc kbd {
    display: inline-block;
    min-width: 28px;
    padding: 3px 8px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-bottom-color: rgba(0, 255, 204, 0.45);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    line-height: 1.4;
    box-shadow:
        inset 0 -2px 0 rgba(0, 0, 0, 0.35),
        0 0 8px rgba(0, 255, 204, 0.12);
}

#menu-desc .key-group {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    vertical-align: middle;
}

#start-btn {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    padding: 15px 40px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 700;
    letter-spacing: 2px;
    box-shadow:
        0 0 15px rgba(0, 255, 204, 0.2),
        inset 0 0 15px rgba(0, 255, 204, 0.1);
}

#start-btn:hover {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.6);
    transform: scale(1.05);
}

.hidden {
    display: none !important;
}
