/* ==========================================================
   BOARDSVG.CSS — WSPÓLNY DESIGN SYSTEM ORAZ WIDOK SZACHOWNICY
   Ładować jako pierwszy: boardsvg.css > nav.css > desktop/mobile.css
   :root to jedyne wspólne źródło kolorów, typografii i rozmiarów.
   Nie zmieniać nazw zmiennych pobieranych przez istniejący kod.
========================================================== */

:root {
    /* =========================================================
       DESIGN TOKENS
    ========================================================= */

    /* --- Tła --- */
    --bg-base: #121212;
    --bg-pattern: #ffffff15;
    --surface-1: #1e232b;
    --surface-2: #2f3a46;

    /* --- Tekst --- */
    --text-primary: #FCF9EE;
    --text-muted: #b8b2b2;

    /* --- Akcenty --- */
    --accent: #00e1ff;          /* premium błękit */
    --accent-strong: #00c8ff;
    --success: #4caf50;
    --success-strong: #45a049;
    --danger: #d44747;
    --danger-strong: #b33a3a;
    --warning: #ffb300;

    /* --- Podświetlenie ruchu na planszy (skąd / dokąd) --- */
    --move-from: rgba(255, 225, 80, 0.35);
    --move-to: rgba(255, 225, 80, 0.55);

    /* --- Motyw nawigacji (bronze) --- */
    --nav-from: #363f4b;
    --nav-to: #c27f41;
    --nav-to-hover: #854f1c;

    /* --- Obramowania --- */
    --border-subtle: #444;
    --hairline: rgba(255, 255, 255, 0.08);

    /* --- Subtelne wypełnienia powierzchni (glass) --- */
    --surface-tint: rgba(255, 255, 255, 0.04);
    --surface-tint-strong: rgba(255, 255, 255, 0.08);

    /* --- Promienie --- */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 100rem;

    /* --- Cienie --- */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.3);

    /* --- Odstępy --- */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --nav-height: 70px;
    --primary: transparent;
    --secondary: red;
    /* Kolor dla ClearPosition */
    --focus: green;
    /* Kolor po najechaniu */
    --light: #FCF9EE;
    /* Jasny kolor tekstu */
    --border-color: #bdc3c7;
    /* Kolor obramowania */
    --color: #5a5e61;

    /* ---------------------------------------------------------
       WSPÓLNY SYSTEM WYGLĄDU — HOME, PROFIL, HEADER I STOPKA
       Nazwy historycznych zmiennych pozostają kompatybilne.
    --------------------------------------------------------- */
    --font-family-system: system-ui, -apple-system, BlinkMacSystemFont,
                          "Segoe UI", Roboto, Arial, sans-serif;
    --page-max-width: 1920px;
    --page-gutter: 40px;

    /* Panele strony głównej i profilu */
    --home-bg: #0b1424;
    --home-panel-bg: #182742;
    --tx: #f8eacf;
    --gold-tx: #584017;
    --home-text-muted: #665044;
    --home-text-secondary: #e4ddce;
    --home-danger: #c62828;
    --home-success: #008000;
    --home-gold: #b19015;
    --home-gold-bright: #a58a26;
    --home-panel-border: rgba(248, 234, 207, 0.15);

    /* Nawigacja, stopka, formularze i statusy */
    --footer-bg: #43474bde;
    --footer-text: #a9b6cc;
    --task-description-text: #e9e6e6;
    --ui-blue: #3b82f6;
    --ui-blue-hover: #2563eb;
    --ring-bad: #e74c3c;
    --ring-good: green;
    --legacy-card-to: #493a2c;

    /* Ostateczny wygląd header.php — wcześniej lokalnie w nav.css */
    --nav-bar: var(--footer-bg);
    --nav-card: rgb(0 0 0 / 18%);
    --nav-card-hover: var(--home-gold);
    --nav-text: var(--tx);
    --nav-muted: var(--footer-text);
    --nav-gold: var(--home-gold);

    /* Banner cookies — teraz zarządzany w jednym miejscu */
    --cookie-bg: #10181f;
    --cookie-bg-secondary: #17242d;
    --cookie-border: rgba(217, 169, 79, 0.55);
    --cookie-text: var(--light);
    --cookie-text-muted: #c7d0d2;
    --cookie-gold: #d9a94f;
    --cookie-gold-light: #f0c66b;
    --cookie-gold-dark: #b98332;
    --cookie-blue: #5b8e9f;
    --cookie-blue-light: #82aebb;
}

.device-mobile {
   /* height: calc(var(--vh, 1vh) * 100); */
}
.device-desktop {}

body.mode-pwa .nav-menu {
    border-radius: 0;
}

html,
body {
    height: 100%;
    margin: 0;
}
body {
    overflow: hidden;
    font-family: var(--font-family-system);
    font-size: 1rem;
    font-weight: 400;
    font-style: normal;
    line-height: 1.5;
    letter-spacing: normal;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
	    background-color: var(--bg-base);
    background-image: radial-gradient(var(--bg-pattern) 8px, transparent 28px);
    background-size: 20px 20px;
/*background: radial-gradient(circle at 50% 30%, #2f3a46 0%, #1e232b 60%, #15181d 100%); */
    background-attachment: scroll;
    user-select: none;
    touch-action: manipulation;
}

.main {
	height:100%;
  flex: 1;
  padding-top: 50px;
  color: var(--light);
  margin: 0;
 overflow-y: auto;
  position: relative;
	min-height: 0;
}
.premium-icon {
    color: #00e1ff; /* błękit */
    margin-right: 5px;
    text-shadow:
        0 0 5px #00e1ff,
        0 0 10px #00c8ff,
        0 0 15px rgba(0, 225, 255, 0.6);
}
.info {
    font-size: 20px;
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #000;
    width: fit-content;
}

.user-game,
.useropponent-game {
    max-width: 800px;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
}

.user-game {
    margin-top: 10px;
}
.device-desktop .user-game {
	font-size: clamp(16px, 0.9vw + 0.5rem, 20px);
}
.useropponent-game {
    margin-bottom: 15px;
}
.user-info-wrapper,
.useropponent-info-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.user-info,
.useropponent-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-image,
.useropponent-image {
    width: 50px;
    height: 50px;
}
.username-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 6px;
}

.username, .username-opponent {
    font-size: 1rem;
    font-weight: bold;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    /* NIE POZWALA SIĘ ZMNIEJSZAĆ */
}
.user-timegame,
.useropponent-timegame {
    padding: 0.35rem 0.75rem;
    font-family: inherit;
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    letter-spacing: 0.08em;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-pill);
    color: var(--light);
    background: var(--surface-tint);
    transition: .2s;
    text-align: center;
}
.user-timegame.time-warning {
    background-color: var(--home-danger);
    color: #fff;
}
.user-timegame {
    align-items: center;
    justify-content: center;
    gap: .4rem;
}

/* setne sekundy */
.user-timegame .time-ms {
    font-size: 0.65em;        /* mniejsze niż MM:SS */
    letter-spacing: 0.05rem; /* mniej rozstrzelone */
    opacity: 0.85;
    margin-top: -0.15em;     /* lekkie podniesienie */
}

/* ostatnie 10 sekund */
.user-timegame.time-warning {
    background-color: var(--home-danger);
    color: #fff;
}

/* setne w warningu jeszcze czytelne */
.user-timegame.time-warning .time-ms {
    opacity: 1;
}
.fire-icon {
    color: transparent;
    position: relative;
    /* potrzebne dla absolutnego pozycjonowania flasha */
    display: inline-block;
    margin-left: 4px;
}

/* Ikona ognia */
.fire-icon i {
    transition: transform 0.3s ease;
}

/* Kolory w zależności od stanu */
.fire-icon-low {
    color: #ff9800;
    /* pomarańczowy */
}

.fire-icon-high {
    color: #e53935;
    /* czerwony */
}

/* Animacja powiększenia */
@keyframes fire-bonus-anim {
    0% {
        transform: scale(1) translateY(0);
    }

    50% {
        transform: scale(1.2) translateY(-5px);
    }

    100% {
        transform: scale(1) translateY(0);
    }
}

.fire-bonus-anim {
    animation: fire-bonus-anim 1s ease forwards;
}

/* Rozbłysk */
.fire-bonus-flash {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(229, 57, 53, 0.8) 0%, rgba(229, 57, 53, 0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    pointer-events: none;
    animation: fire-flash 0.6s ease forwards;
    z-index: -1;
    /* za ikoną */
}

@keyframes fire-flash {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }

    50% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.5);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2);
    }
}

/* =========================================
   HOME — WIDOK NIEZALOGOWANEGO
========================================= */

.home-guest {
    width: min(1920px, calc(100% - 40px));
    min-width: 0;
    margin: 0 auto;
    padding: 20px 0 35px;
    box-sizing: border-box;
    font-family: system-ui, -apple-system,
                 BlinkMacSystemFont, "Segoe UI",
                 Roboto, Arial, sans-serif;
}

/* Zdjęcie — bez zmiany plików i proporcji */

.home-guest .dashboard-hero {
    width: 100%;
    max-width: none;
    margin: 0 0 24px;
}

.home-guest .dashboard-hero picture {
    display: block;
    width: 100%;
}

.home-guest .dashboard-image {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(248, 234, 207, 0.2);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
}

/* Główna sekcja informacyjna */

.home-guest .dashboard-info {
    width: 100%;
    min-width: 0;
    padding: clamp(18px, 3vw, 32px);
    border: 1px solid rgba(248, 234, 207, 0.15);
    border-radius: 20px;
    background: none;
    color: var(--tx);
    box-sizing: border-box;
}

.home-guest .dashboard-info h1 {
    margin: 0 0 14px;
    color: var(--tx);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    line-height: 1.25;
}

.home-guest .home-guest-intro {
    max-width: 950px;
    margin: 0 0 25px;
    color: #e4ddce;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.7;
}

/* Sekcje z opisami */

.home-guest .dashboard-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    min-width: 0;
}

.home-guest .feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    min-height: 125px;
    margin: 0;
    padding: 20px;
    background: var(--tx);
    border: 2px solid var(--gold-tx);
    border-radius: 16px;
    color: var(--home-text-muted);
    box-sizing: border-box;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.home-guest .feature-item:hover {
    border-color: #b7791f;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.home-guest .feature-item > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 52px;
    width: 52px;
    height: 60px;
    margin: 0;
    font-size: 38px;
    line-height: 1;
}

.home-guest .feature-item > span {
    display: block;
    flex: 1;
    min-width: 0;
    color: var(--home-text-muted);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.65;
    overflow-wrap: break-word;
}

.home-guest .feature-item strong {
    color: var(--gold-tx);
    font-weight: 800;
}

/* =========================================
   IKONA FIRE — CIĄGŁE FALOWANIE
========================================= */

.home-guest .feature-item .home-guest-fire {
    color: #e53935;
    transform-origin: 50% 90%;
    animation: homeGuestFireWave 1.6s ease-in-out infinite;
    will-change: transform;
}

@keyframes homeGuestFireWave {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
        text-shadow: 0 0 3px rgba(229, 57, 53, 0.2);
    }

    25% {
        transform: translateY(-3px) rotate(-7deg) scale(1.08);
        text-shadow: 0 0 10px rgba(229, 57, 53, 0.6);
    }

    50% {
        transform: translateY(-5px) rotate(4deg) scale(1.14);
        text-shadow: 0 0 16px rgba(255, 100, 30, 0.7);
    }

    75% {
        transform: translateY(-2px) rotate(-4deg) scale(1.06);
        text-shadow: 0 0 8px rgba(229, 57, 53, 0.45);
    }
}

/* =========================================
   IKONA PUCHARU — MIGAJĄCY ZŁOTY BLASK
========================================= */

.home-guest .feature-item .home-guest-trophy {
    color: #b8860b;
    animation: homeGuestTrophyGlow 2.8s ease-in-out infinite;
}

@keyframes homeGuestTrophyGlow {
    0%, 100% {
        color: #b8860b;
        text-shadow: none;
        filter: brightness(1);
    }

    35% {
        color: #e0ae21;
        text-shadow:
            0 0 5px rgba(255, 215, 0, 0.5);
        filter: brightness(1.15);
    }

    50% {
        color: #ffd700;
        text-shadow:
            0 0 8px rgba(255, 215, 0, 0.9),
            0 0 20px rgba(255, 185, 0, 0.65);
        filter: brightness(1.35);
    }

    65% {
        color: #e0ae21;
        text-shadow:
            0 0 6px rgba(255, 215, 0, 0.5);
        filter: brightness(1.15);
    }
}

/* =========================================
   RESPONSYWNOŚĆ
========================================= */

@media (max-width: 1100px) {
    .home-guest .dashboard-features {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .home-guest .feature-item {
        min-height: 90px;
    }
}

@media (max-width: 600px) {
    .home-guest {
        width: calc(100% - 24px);
        padding-top: 12px;
        padding-bottom: 22px;
    }

    .home-guest .dashboard-hero {
        margin-bottom: 16px;
    }

    .home-guest .dashboard-image {
        border-radius: 14px;
    }

    .home-guest .dashboard-info {
        padding: 16px;
        border-radius: 16px;
    }

    .home-guest .dashboard-info h1 {
        font-size: 24px;
    }

    .home-guest .home-guest-intro {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .home-guest .feature-item {
        padding: 14px;
        gap: 12px;
        min-height: 80px;
    }

    .home-guest .feature-item > i {
        flex-basis: 42px;
        width: 42px;
        height: 48px;
        font-size: 32px;
    }

    .home-guest .feature-item > span {
        font-size: 14px;
    }
}

/* Dostępność — ograniczenie ruchu */

@media (prefers-reduced-motion: reduce) {
    .home-guest .feature-item .home-guest-fire,
    .home-guest .feature-item .home-guest-trophy {
        animation: none;
        filter: none;
    }

    .home-guest .feature-item {
        transition: none;
    }
}

/* Styl standardowy */
.chessboard-standard {
    background-image: url(/img/board-background-standard.png);
}

.chessboard-standard .white-label {
    fill: #f0d9b5;
}

.chessboard-standard .black-label {
    fill: #b58863;
}

.chessboard-standard.flip .white-label {
    fill: #b58863;
    /* Kolor tekstu na białym tle po obrocie */
}

.chessboard-standard.flip .black-label {
    fill: #f0d9b5;
    /* Kolor tekstu na czarnym tle po obrocie */
}

/* Styl green */
.chessboard-green {
    background-image: url(/img/board-background-green.png);
}

.chessboard-green .white-label {
    fill: #e1e3ac;
}

.chessboard-green .black-label {
    fill: #779556;
}

.chessboard-green.flip .white-label {
    fill: #779556;
}

.chessboard-green.flip .black-label {
    fill: #e1e3ac;
}

/* Styl orange */
.chessboard-orange {
    background-image: url(/img/board-background-orange.png);
}

.chessboard-orange .white-label {
    fill: #ffe6c7;
}

.chessboard-orange .black-label {
    fill: #fd8d0d;
}

.chessboard-orange.flip .white-label {
    fill: #fd8d0d;
}

.chessboard-orange.flip .black-label {
    fill: #ffe6c7;
}

/* Styl marmur */
.chessboard-stone {
    background-image: url(/img/board-background-stone.png);
}

.chessboard-stone .white-label {
    fill: #f0f1f0;
}

.chessboard-stone .black-label {
    fill: #6d6d6d;
}

.chessboard-stone.flip .white-label {
    fill: #6d6d6d;
}

.chessboard-stone.flip .black-label {
    fill: #f0f1f0;
}
/* Styl fiolet */
.chessboard-purple {
    background-image: url(/img/board-background-purple.png);
}

.chessboard-purple .white-label {
    fill: #f0f1f0;
}

.chessboard-purple .black-label {
    fill: #8476ba;
}

.chessboard-purple.flip .white-label {
    fill: #8476ba;
}

.chessboard-purple.flip .black-label {
    fill: #f0f1f0;
}
/* Styl czerwony */
.chessboard-red {
    background-image: url(/img/board-background-red.png);
}

.chessboard-red .white-label {
    fill: #f5dbc3;
}

.chessboard-red .black-label {
    fill: #bb5746;
}

.chessboard-red.flip .white-label {
    fill: #bb5746;
}

.chessboard-red.flip .black-label {
    fill: #f5dbc3;
}
.chessboard-icy-sea {
    background-image: url(/img/board-background-icy-sea.png);
}
/* Styl lodowy */
.chessboard-icy-sea .white-label {
    fill: #d4dfe5;
}

.chessboard-icy-sea .black-label {
    fill: #7094a9;
}

.chessboard-icy-sea.flip .white-label {
    fill: #7094a9;
}

.chessboard-icy-sea.flip .black-label {
    fill: #d4dfe5;
}

/* Styl piekiełko */
.chessboard-hell {
    background-image: url(/img/board-background-hell.png);
}
.chessboard-hell .white-label {
    fill: #e2e2e2;
}
.chessboard-hell .black-label {
    fill: #cfcfcf;
}
.chessboard-hell.flip .white-label {
    fill: #cfcfcf;
}

.chessboard-hell.flip .black-label {
    fill: #e2e2e2;
}
/* Styl drewno */
.chessboard-wood {
    background-image: url(/img/board-background-wood.png);
}
.chessboard-wood .white-label {
    fill: #f9dba6;
}
.chessboard-wood .black-label {
    fill: #8d4d20;
}
.chessboard-wood.flip .white-label {
    fill: #8d4d20;
}

.chessboard-wood.flip .black-label {
    fill: #f9dba6;
}
/* Styl blue */
.chessboard-blue {
    background-image: url(/img/board-background-blue.png);
}
.chessboard-blue .white-label {
    fill: #aac9de;
}
.chessboard-blue .black-label {
    fill: #44799f;
}
.chessboard-blue.flip .white-label {
    fill: #44799f;
}

.chessboard-blue.flip .black-label {
    fill: #aac9de;
}
.draggable {
    cursor: grab;
}

.highlight-start {
    fill: var(--move-from);
}
.highlight-end {
    fill: var(--move-to);
}

.highlight {
    outline: 3px solid rgb(241, 242, 245) !important;
    outline-offset: -3px;
    z-index: 15;
    position: relative;
    width: 75px;
    height: 75px;
}

.square {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
    pointer-events: auto;
}

.temp-color {
    position: relative;
    z-index: 12;
    /* Wyższy z-index, aby temp-color było na wierzchu */
}

.temp-arrow, .temp-arrowhead {
    position: relative;
    pointer-events: none;
}
.piece {
    position: absolute;
    background-size: cover;
    background-position: center;
    cursor: grab;
    transition: transform 0.5s ease;
}
.piece:active {
    cursor: grabbing;
}
/* Style do ruchów i ataków */
.possibleMoveCircle {
    fill: rgba(1, 26, 60, 0.247);
    /* Półprzezroczysty kolor */
    /* Brak obramowania */
    pointer-events: none;
    /* Zablokowanie interakcji z okręgiem */
    z-index: 12;
}

.possibleAttackCircle {
    fill: none;
    stroke: rgba(1, 26, 60, 0.247);
    stroke-width: 5px;
    pointer-events: none;
    /* Umożliwia pozycjonowanie pseudo-elementu wewnątrz kwadratu */
    z-index: 12;
}

.possibleCheckCircle {
    fill: rgba(177, 3, 3, 0.1);
    stroke: transparent;
    stroke-width: 5px;
    pointer-events: none;
    /* Umożliwia pozycjonowanie pseudo-elementu wewnątrz kwadratu */
    z-index: 12;
    /* Glow efekt (mocny, neonowy styl) */
    filter: drop-shadow(0 0 3px rgba(255, 0, 0, 0.9)) drop-shadow(0 0 3px rgba(255, 80, 80, 0.8)) drop-shadow(0 0 3px rgba(255, 120, 120, 0.7));
}
.captured-pieces {
  display: flex;
  flex: 0 0 24px;
  align-items: center;
  gap: 3px;
  width: 100%;
  min-width: 0;
  height: 24px;
  min-height: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  box-sizing: border-box;
  margin-left: 10px;
}

.captured-pieces::-webkit-scrollbar {
  display: none;
}

.captured-piece-group {
  flex: 0 0 auto;
  position: relative;
  display: inline-block;
  height: 20px;
}

.captured-piece {
  position: absolute;
  top: 0;
  width: 20px;
  height: 20px;
  transition: left 0.3s ease;
  pointer-events: none;
}
.score-diff {
  flex: 0 0 auto;
  margin-left: 4px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}
/* Koniec */
/* Dodany styl dla option-labels plus ikony */
.option-labels {
  display: flex;
  justify-content: flex-end;
  min-height: 24px;
}

.no-interaction {
  pointer-events: none;
}

.option-icon {
  position: relative;
  width: 20px;
  margin-left: 10px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: #f2f2f2;
  transition: transform 0.2s ease, color 0.2s ease;
}

/* Efekt hover (desktop) */
.option-icon:hover {
  color: var(--focus);
  transform: translateY(-0.2rem);
}

/* Efekt aktywny (mobile, sterowany JS) */
.option-icon.active {
  color: var(--focus);
  transform: translateY(-0.2rem);
}

/* Tooltip */
.option-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
  transform-origin: bottom center;
}

/* Pokazanie tooltipa (hover lub aktywne na mobile) */
.option-icon:hover::after,
.option-icon.show-tooltip::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* Stylizacja paska przewijania dla #pgn */
#pgn::-webkit-scrollbar {
    height: 8px;
}

#pgn::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

#pgn::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

#pgn::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
/* Stylizacja kontrolek */
#pgn-controls {
    display: flex;
    justify-content: center;   /* równe wyśrodkowanie */
    align-items: center;
    gap: 10px;
    margin-left: 10px;
    margin-top: 4px;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* aktywacja */
#savePGN,
#pgn-controls.active {
    opacity: 1;
    pointer-events: auto;
}

#pgn-controls button {
    all: unset;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 60px;   /* równa szerokość */
    height: 32px;
    border: 1px solid #aaa;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* hover tylko gdy aktywne */
#savePGN,
#pgn-controls.active button:hover {
    background-color: #ddd;
}
.move-number {
    color: gray;
}
.white-move,
.black-move {
    cursor: pointer;
    letter-spacing: 1.5px;
}
.game-result {
    grid-column: 1 / -1;
    text-align: left;
}
#fen {
    width: 100%;
    color: #f2f2f2;
    font-family: inherit;
    letter-spacing: .2rem;
    font-size: small;
    overflow-x: auto;
    white-space: nowrap;
     /*  border: 1px solid #aaa;
    border-radius: 6px;   */
    padding: 10px;

    box-sizing: border-box;
    /* Uwzględnia padding w szerokości */
}

/* Stylizacja paska przewijania */
#fen::-webkit-scrollbar {
    height: 8px;
    /* Wysokość paska przewijania */
}

#fen::-webkit-scrollbar-thumb {
    background-color: #888;
    /* Kolor uchwytu paska */
    border-radius: 4px;
    /* Zaokrąglone rogi uchwytu */
    transition: background-color 0.3s ease;
}

#fen::-webkit-scrollbar-thumb:hover {
    background-color: #555;
    /* Kolor uchwytu po najechaniu */
}

#fen::-webkit-scrollbar-track {
    background: #f1f1f1;
    /* Tło paska przewijania */
    border-radius: 4px;
    /* Zaokrąglone rogi tła */
}

/* Stylowanie chmurki */
.copy-icon {
    font-size: 1.3rem;
    cursor: pointer;
    color: #007bff;
    position: relative;
    float: right;
}

.copy-icon:hover {
    color: var(--focus);
    transform: translateY(-.2rem);
}

/* Stylowanie chmurki */
.tooltip {
    font-size: 1.6vh;
    font-family: inherit;
    letter-spacing: .2rem;
    position: absolute;
    top: 100%;
    /* Pozycjonowanie poniżej ikony */
    right: 50%;
    transform: translateX(-10%);
    background: var(--primary);
    color: #fff;
    padding: auto;
    visibility: hidden;
    opacity: 0;
    z-index: 10;
    white-space: nowrap;
    /* Zapobiega zawijaniu tekstu */
}

/* Wyświetl chmurkę podczas najechania na ikonę */
.copy-icon:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Dodajemy animację dla pokazania chmurki po kliknięciu */
.tooltip.show {
    visibility: visible;
    opacity: 1;
}

#gamestatus {
    height: 30px;
    color: var(--light);
}


/* Przyciski */
/* Zmiana koloru przycisku, gdy najechano */
button:hover,
button:focus {
    border-color: var(--focus);
    transform: translateY(-.2rem);
}

.close {
    color: var(--secondary);
    float: right;
    font-size: 2.4rem;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: var(--focus);
    text-decoration: none;
    cursor: pointer;
    transform: translateY(-.2rem);
}

button {
    padding: 1rem 1rem;
    font-size: 1.1rem;
    font-family: inherit;
    letter-spacing: .2rem;
    border: 1px solid var(--border-color);
    border-radius: 100rem;
    color: var(--light);
    background: transparent;
    cursor: pointer;
    transition: .2s;
    text-align: center;
    margin: 0.5rem;
    /* Dodanie odległości między przyciskami */
}
/* Mały przycisk (small) */
.btn-sm {
  font-size: 12px;
  padding: 4px 8px;
  min-width: 60px;
}

/* Lekko większy przycisk (large-medium - lm) */
.btn-lm {
  font-size: 16px;
  padding: 10px 18px;
  min-width: 90px;
}
#promotionBox {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: transparent;
    border-radius: 5px;
    padding: 5px 0;
}
#promotionBox img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#closePromotionBox {
    position: absolute;
    top: -25px;
    left: 0;
    width: 100%;
    height: 25px;
    font-size: 16px;
    text-align: center;
    line-height: 25px;
    cursor: pointer;
    color: black;
    background-color: white;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}
.promotion-selection {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    justify-content: space-between;
    align-items: center;
}
.selectSquare {
    width: 100%;
    flex: 1;
    /* automatycznie 1/4 wysokości boxa */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    /* białe tło w kształcie koła */
    background-color: rgba(105, 105, 105, 0.9);
    border-radius: 50%;
    margin: 2px 0;
}
.selectSquare img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}
.lang-flag {
    width: 20px;
}
#task {
    margin: 5px;
}

.button-disabled {
  text-decoration: line-through;
  opacity: 0.5;
  pointer-events: none;
}
