* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    background: #000;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

/* Canvas + wrapper */

#game-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at top, #1b2735 0, #090a0f 60%, #000 100%);
}

#game {
    display: block;
    background: transparent;
    width: 100%;
    height: 100%;
}

/* Általános overlay a canvas fölött */

.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.hidden {
    display: none;
}

/* ========= FŐMENÜ ========= */

#main-menu {
    background: linear-gradient(135deg, rgba(6, 18, 30, 0.95), rgba(5, 10, 30, 0.98));
}

.menu-box {
    text-align: center;
    padding: 30px 40px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
}

/* HexaDefens logó */

.logo {
    font-size: 52px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #f5f5f5;
}

.logo span {
    color: #00e5ff;
}

.subtitle {
    font-size: 14px;
    color: #a5b1c2;
    margin-bottom: 30px;
}

/* Menü gombok */

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.menu-item {
    position: relative;
    background: transparent;
    border: none;
    color: #e0e6ff;
    font-size: 20px;
    padding: 10px 30px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.25s ease, transform 0.2s ease;
}

/* animált aláhúzás */

.menu-item::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #00e5ff, #7c4dff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.menu-item:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.menu-item:hover::after {
    transform: scaleX(1);
}

/* ========= ALAP PANEL STÍLUS ========= */

.panel-box {
    background: #050814;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.7);
    text-align: center;
    min-width: 280px;
}

.panel-box h2 {
    margin-bottom: 10px;
}

.panel-box p {
    margin-bottom: 20px;
    line-height: 1.4;
    color: #c5d0ff;
}

.panel-btn {
    padding: 8px 20px;
    font-size: 16px;
    border-radius: 999px;
    border: 1px solid #00e5ff;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border 0.25s ease;
}

.panel-btn:hover {
    background: #00e5ff;
    color: #050814;
}

.panel-btn.secondary {
    border-color: #7c4dff;
}

/* ========= BEÁLLÍTÁSOK / KÉSZÍTŐK – KÖZÉPRŐL KINYÍLÓ CSÍK ========= */

.settings-overlay {
    background: transparent;
}

/* középső csík, ami szétnyílik */

.settings-strip {
    position: relative;
    width: 0;
    max-width: 900px;
    height: auto;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(3, 7, 25, 0.96);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.8);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s ease-out, width 0.4s ease-out;
}

.settings-strip.open {
    width: 90vw;
    transform: scaleX(1);
}

.settings-inner {
    position: relative;
    padding: 20px 28px 24px 28px;
    color: #fff;
}

/* Beállítások cím + oszlopok */

.settings-inner h2 {
    margin-bottom: 12px;
}

.settings-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 10px;
    margin-bottom: 16px;
}

.settings-column {
    flex: 1 1 260px;
}

.settings-column h3 {
    margin-bottom: 8px;
    font-size: 16px;
    color: #e0e6ff;
}

/* Sorok a beállításokban */

.setting-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 12px;
}

.setting-row label {
    font-size: 14px;
    color: #c5d0ff;
}

/* Keybind gombok */

.key-bind-btn {
    min-width: 80px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #3b425a;
    background: #0c1026;
    color: #e0e6ff;
    cursor: pointer;
    font-size: 14px;
    transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.key-bind-btn:hover {
    border-color: #00e5ff;
    background: #111632;
}

.key-bind-btn.waiting {
    border-color: #ffca28;
    background: #33250a;
    color: #ffecb3;
}

/* Slider: hangerő / érzékenység + új zene/robbanás slider */

#volume-slider,
#sens-slider,
#music-volume-slider,
#explosion-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 4px;
    background: #1b2238;
    outline: none;
}

#volume-slider::-webkit-slider-thumb,
#sens-slider::-webkit-slider-thumb,
#music-volume-slider::-webkit-slider-thumb,
#explosion-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00e5ff;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.7);
}

#volume-slider::-moz-range-thumb,
#sens-slider::-moz-range-thumb,
#music-volume-slider::-moz-range-thumb,
#explosion-volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00e5ff;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.7);
}

/* Toggle kapcsolók */

.toggle-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.toggle-label input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 40px;
    height: 20px;
    background-color: #3b425a;
    border-radius: 999px;
    transition: background 0.25s ease;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #c5d0ff;
    transition: transform 0.25s ease, background 0.25s ease;
}

.toggle-label input:checked + .toggle-slider {
    background: #00e5ff;
}

.toggle-label input:checked + .toggle-slider::before {
    transform: translateX(18px);
    background: #050814;
}

.settings-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

/* ========= GAME OVER SCORE MODAL ========= */

.score-box {
    position: relative;
    min-width: 280px;
    padding-top: 30px;
}

.score-value {
    font-size: 32px;
    font-weight: bold;
    margin: 10px 0 20px 0;
    color: #00e5ff;
}

/* X gomb a jobb felső sarokban (score modal) */

.score-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #22293d;
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.score-close-btn:hover {
    background: #ff5252;
    transform: scale(1.05);
}

/* X gomb a beállítások jobb felső sarkában */

.settings-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #22293d;
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 5;
}

.settings-close-btn:hover {
    background: #ffca28;
    transform: scale(1.05);
}

/* ========= FÜGGÖNY ÁTMENET (játék indításnál) ========= */

#transition-curtain {
    position: absolute;
    inset: 0;
    background: #050814;
    pointer-events: none;
    transform: translateY(-100%);
    z-index: 50;
}

#transition-curtain.show {
    animation: curtain-slide 0.8s ease-in-out forwards;
}

@keyframes curtain-slide {
    0% {
        transform: translateY(-100%);
    }
    40% {
        transform: translateY(0%);
    }
    60% {
        transform: translateY(0%);
    }
    100% {
        transform: translateY(100%);
    }
}

/* ========= NEHÉZSÉG VÁLASZTÓ ========= */

.difficulty-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}

.diff-btn {
    min-width: 120px;
}

/* ========= ZENE KI/BE GOMB (jobb alsó sarok) ========= */

.music-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 60;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #00e5ff;
    background: rgba(5, 8, 20, 0.85);
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease, border 0.2s ease;
}

.music-btn:hover {
    background: #00e5ff;
    color: #050814;
    transform: scale(1.05);
}

.music-btn.off {
    border-color: #ff5252;
    background: rgba(40, 5, 10, 0.9);
}

/* ========= PAUSE MENÜ ========= */

.pause-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

/* ========= 3-2-1 VISSZASZÁMLÁLÓ ========= */

#countdown-overlay {
    background: rgba(0, 0, 0, 0.6);
    z-index: 70;
}

#countdown-text {
    font-size: 80px;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}
