/* Nowoczesny Design System dopasowany do Gaming Hubu */
:root {
    --bg-color: #0b0c10;
    --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-red: #ff3333;
    --grid-line: rgba(255, 255, 255, 0.1);
}

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

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

.glownyKontener {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

/* Panel Graczy */
.naglowek {
    display: flex;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 600px;
    margin-bottom: 30px;
}

.graczJedenDiv, .graczDwDiv {
    flex: 1;
    padding: 15px;
    text-align: center;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.graczJedenDiv {
    border-bottom: 3px solid var(--neon-cyan);
    box-shadow: 0 4px 20px rgba(0, 208, 255, 0.1);
}

.graczDwDiv {
    border-bottom: 3px solid var(--neon-red);
    box-shadow: 0 4px 20px rgba(255, 51, 51, 0.1);
}

#Nickname1, #Nickname2 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#Nickname1 { color: var(--neon-cyan); }
#Nickname2 { color: var(--neon-red); }

/* Główna strefa rozgrywki */
.czescWlasciwa {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    position: relative;
}

/* Boczne podglądy wielkich figur */
.kolko, .krzyzyk {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 15%;
    transition: all 0.3s ease;
}

.kolko img, .krzyzyk img {
    width: 100%;
    max-width: 120px;
    opacity: 0.8;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

/* Plansza do gry */
.plansza {
    width: 45vh;
    height: 45vh;
    max-width: 450px;
    max-height: 450px;
    margin: 0 5%;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    padding: 10px;
}

.rzad1, .rzad2, .rzad3 {
    display: flex;
    height: 33.33%;
    width: 100%;
}

.rzad1 { border-bottom: 2px solid var(--grid-line); }
.rzad2 { border-bottom: 2px solid var(--grid-line); }

.pole1, .pole2, .pole3 {
    flex: 1;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.pole1, .pole2 {
    border-right: 2px solid var(--grid-line);
}

.pole1:hover, .pole2:hover, .pole3:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

/* Style dla postawionych krzyżyków i kółek na planszy */
.plansza img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: scaleUp 0.2s ease-out forwards;
}

.plansza img.X {
    filter: drop-shadow(0 0 8px var(--neon-red));
}

.plansza img.O {
    filter: drop-shadow(0 0 8px var(--neon-cyan));
}

@keyframes scaleUp {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Przyciski sterujące */
.Przyciski {
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.Wyjscie, .Reset {
    position: static; /* Reset starych absolutów */
    width: 140px;
}

.Wyjscie button, .Reset button {
    width: 100%;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.Wyjscie button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.Reset button {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.Reset button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}

/* Responsywność */
@media (max-width: 800px) {
    .kolko, .krzyzyk {
        display: none; /* Ukrywamy wielkie boczne ikony na tabletach/telefonach */
    }
    .plansza {
        width: 70vw;
        height: 70vw;
        margin: 0 auto;
    }
    .Przyciski {
        bottom: -90px;
    }
}

@media (max-width: 480px) {
    .naglowek {
        gap: 10px;
    }
    .plansza {
        width: 85vw;
        height: 85vw;
    }
    #Nickname1, #Nickname2 {
        font-size: 0.9rem;
    }
}