/* ==========================================================================
   EKRAN STARTOWY / MENU GŁÓWNE
   ========================================================================== */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
}

.menu-container {
    background: #1a1c20;
    border: 2px solid var(--gold-dim);
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 0 40px rgba(243, 156, 18, 0.15), inset 0 0 20px rgba(0,0,0,0.8);
    max-width: 450px;
    width: 90%;
    color: #ecf0f1;
}

.menu-container h1 {
    color: var(--gold);
    font-size: 2.8em;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(241, 196, 15, 0.4);
    letter-spacing: 2px;
}

.menu-subtitle {
    color: #95a5a6;
    margin-bottom: 35px;
    font-style: italic;
    font-size: 0.9em;
}

/* --- SEKCJE FORMULARZA --- */
.menu-section {
    margin-bottom: 25px;
    text-align: left;
}

.menu-section label, 
.menu-section p {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-dim);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-section input[type="text"] {
    width: 100%;
    padding: 12px;
    background: #2c3e50;
    border: 1px solid #34495e;
    color: white;
    border-radius: 4px;
    font-size: 1.1em;
    box-sizing: border-box;
    transition: 0.3s;
}

.menu-section input[type="text"]:focus {
    outline: none;
    border-color: var(--gold-dim);
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
}

/* --- PRZYCISKI TRYBÓW I STARTU --- */
.toggle-group {
    display: flex;
    gap: 10px;
}

.mode-btn {
    flex: 1;
    padding: 12px;
    background: #2c3e50;
    border: 1px solid #34495e;
    color: #95a5a6;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.3s;
    font-weight: bold;
}

.mode-btn.active {
    background: var(--gold-dim);
    color: #1a1c20;
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.4);
}

.mode-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- SELEKTOR LICZBY GRACZY --- */
.number-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: #2c3e50;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #34495e;
}

.number-selector button {
    background: var(--gold-dim);
    border: none;
    color: #1a1c20;
    font-size: 1.8em;
    width: 45px;
    height: 45px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.number-selector button:hover {
    background: var(--gold);
    transform: scale(1.05);
}

.number-selector input {
    width: 50px;
    text-align: center;
    font-size: 2em;
    background: transparent;
    border: none;
    color: var(--gold);
    font-weight: bold;
    pointer-events: none;
}

/* Ukrywamy domyślne strzałki w inputach number */
.number-selector input[type=number]::-webkit-inner-spin-button, 
.number-selector input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}

.start-btn {
    width: 100%;
    padding: 18px;
    background: var(--red-dark);
    color: white;
    border: 2px solid var(--red);
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.3s;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.start-btn:hover {
    background: var(--red);
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.6);
}

/* --- INSTRUKCJE W MENU --- */
.game-instructions {
    text-align: left; 
    font-size: 0.8em; 
    color: var(--text-dim); 
    background: rgba(0,0,0,0.3);
    padding: 15px; 
    border-radius: 5px; 
    border-left: 3px solid var(--gold); 
    margin-bottom: 20px;
}
.game-instructions p { 
    margin-bottom: 8px; 
    font-weight: bold; 
    color: var(--gold); 
    text-transform: uppercase; 
}
.game-instructions ul { 
    margin: 0; 
    padding-left: 18px; 
}
.game-instructions li { 
    margin-bottom: 6px; 
    line-height: 1.3; 
}