:root {
    --bg-color: #0b0c10;
    --primary: #ff6a00;
    --secondary: #c5c6c7;
    --danger: #ff0044;
    --wall: #1f2833;
    --text-main: #ffffff;
    --ui-bg: rgba(11, 12, 16, 0.9);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    font-family: 'Teko', sans-serif;
}

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

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, #111, var(--bg-color));
}

canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    display: block;
}

#ui-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 5;
    pointer-events: none;
    display: none;
}

#top-bar {
    position: absolute;
    top: 20px; left: 50%;
    transform: translateX(-50%);
    display: flex;
}

.hud-item {
    background: rgba(31, 40, 51, 0.8);
    border: 2px solid var(--primary);
    padding: 5px 30px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 0 15px rgba(255, 106, 0, 0.3);
}

.hud-item .label {
    font-size: 24px;
    color: var(--secondary);
    letter-spacing: 2px;
}

.hud-item .value {
    font-size: 36px;
    font-weight: 600;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

.icon-btn {
    position: absolute;
    width: 45px; height: 45px;
    border-radius: 50%;
    background: rgba(31, 40, 51, 0.8);
    border: 2px solid var(--secondary);
    color: var(--text-main);
    font-size: 20px;
    display: flex; justify-content: center; align-items: center;
    pointer-events: auto; cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--wall);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

#pause-btn { top: 20px; right: 20px; }
#sound-toggle { top: 20px; right: 75px; }

/* Screens */
.screen {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--ui-bg);
    backdrop-filter: blur(8px);
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    z-index: 10;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}

.screen.active {
    opacity: 1; pointer-events: auto;
}

.logo-box {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 80px;
    color: var(--text-main);
    line-height: 0.8;
    letter-spacing: 5px;
    text-shadow: 2px 2px 0px var(--wall);
}

h2 {
    font-size: 60px;
    color: var(--primary);
    line-height: 1;
    letter-spacing: 5px;
    text-shadow: 0 0 15px var(--primary);
    margin-bottom: 20px;
}

.subtitle {
    font-size: 24px;
    color: var(--secondary);
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.btn {
    padding: 10px 40px;
    font-size: 28px; font-weight: 600;
    border: none; border-radius: 5px;
    cursor: pointer; margin: 10px;
    transition: all 0.2s;
    letter-spacing: 2px;
}

.primary-btn {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: inset 0 0 10px rgba(255, 106, 0, 0.2), 0 0 15px rgba(255, 106, 0, 0.2);
}

.primary-btn:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 30px var(--primary);
    transform: scale(1.05);
}

.secondary-btn {
    background: transparent;
    color: var(--secondary);
    border: 2px solid var(--secondary);
}

.secondary-btn:hover {
    color: var(--text-main);
    border-color: var(--text-main);
    transform: scale(1.05);
}

.instruction-content {
    background: rgba(31, 40, 51, 0.8);
    padding: 30px; border-radius: 10px;
    border-left: 5px solid var(--primary);
    margin-bottom: 30px;
    max-width: 500px; width: 90%;
}

.instruction-content p {
    margin: 15px 0; font-size: 24px; color: var(--secondary);
}

.stats-panel {
    text-align: center;
    margin-bottom: 40px;
}

.final-score {
    font-size: 32px; color: var(--secondary);
}

.final-score span {
    color: var(--primary); font-size: 48px;
    text-shadow: 0 0 10px var(--primary);
}

.best-score {
    font-size: 24px; color: #888; margin-top: 10px;
}
.best-score span { color: #fff; }

@media (max-width: 768px) {
    h1 { font-size: 60px; }
    h2 { font-size: 45px; }
    .btn { padding: 8px 30px; font-size: 22px; }
    .hud-item .value { font-size: 28px; }
}
