:root {
    --bg-color: #0b0c10;
    --panel-bg: rgba(15, 16, 22, 0.75);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f0f5;
    --text-muted: #8a8b98;
    --neon-cyan: #00d0ff;
    --neon-purple: #a855f7;
    --target-color: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: radial-gradient(circle at center, #1a1b26 0%, var(--bg-color) 100%);
    height: 100vh;
    overflow: hidden;
    color: var(--text-primary);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.gridshot-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* LEWY PANEL BOCZNY */
#menu {
    width: 320px;
    background: var(--panel-bg);
    border-right: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    padding: 35px 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.4);
}

#settings-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 2px solid var(--neon-cyan);
    padding-bottom: 12px;
    margin-bottom: 10px;
}

#settings-title i {
    color: var(--neon-cyan);
    margin-right: 5px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 5px;
}

#menu label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#menu select {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

#menu select:focus {
    border-color: var(--neon-cyan);
    background: rgba(0, 208, 255, 0.05);
}

#apply-settings {
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    border: none;
    color: white;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(0, 114, 255, 0.3);
    transition: all 0.2s ease;
}

#apply-settings:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 114, 255, 0.5);
}

.back-to-hub {
    margin-top: auto;
    text-align: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 10px;
    border-radius: 6px;
    border: 1px dashed var(--card-border);
    transition: all 0.2s ease;
}

.back-to-hub:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
    background: rgba(255,255,255,0.02);
}

/* PRAWA STRONA: ARENA */
.game-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

#game-container {
    position: relative;
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Rozmiary planszy sterowane z JS */
#game-container.small { width: 450px; height: 450px; }
#game-container.medium { width: 650px; height: 650px; }
#game-container.large { width: 850px; height: 850px; }

/* PANEL GÓRNY STATYSTYK */
#header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--card-border);
    font-size: 1.15rem;
    font-weight: 600;
}

.text-cyan { color: var(--neon-cyan); }
.text-purple { color: var(--neon-purple); }

#balls-container {
    position: relative;
    flex: 1;
    width: 100%;
    /* Siatka celownicza w tle dla profesjonalnego klimatu Aim Trainera */
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
}

/* STYLIZACJA KULEK (CELÓW) */
.ball {
    position: absolute;
    background: var(--target-color);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.6);
    cursor: crosshair;
    transition: transform 0.1s ease;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.ball:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.ball.circle {
    border-radius: 50%;
}

/* Rozmiary kulek */
.ball.mini { width: 24px; height: 24px; }
.ball.small { width: 42px; height: 42px; }
.ball.medium { width: 60px; height: 60px; }
.ball.large { width: 85px; height: 85px; }

/* Responsywność */
@media (max-width: 1024px) {
    .gridshot-wrapper { flex-direction: column; overflow-y: auto; }
    #menu { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--card-border); }
    #game-container.large, #game-container.medium { width: 90vw; height: 90vw; }
}