/* =========================================
   1. GŁÓWNE USTAWIENIA I ZMIENNE
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --gold: #f1c40f;
    --blue: #3498db;
    --red: #e74c3c;
    --dark: #0a0a0a;
    --panel: #161616;
    --card-bg: #1a1a1a;
    /* Liczba bez jednostki. Poprzednie calc() mieszało liczbę z vw/vh, było nieprawidłowe i karty nacji
       rysowały się w pełnym rozmiarze na ekranach, których nie łapie żadne @media poniżej (szer. 1101-1499px, wys. > 820px). */
    --card-scale: 0.48;
    --card-w: calc(200px * var(--card-scale));
    --card-h: calc(279px * var(--card-scale));
}

body {
    background: var(--dark);
    color: white;
    font-family: 'MedievalSharp', cursive;
    margin: 0;
    overflow: hidden;
    /* Brak pasków przewijania strony */
}

button {
    font-family: 'MedievalSharp', cursive !important;
}

#game-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* =========================================
   2. PANELE KRÓLESTW (LEWY I PRAWY)
   ========================================= */
.kingdom {
    width: clamp(230px, 21vw, 340px);
    height: 100vh;
    box-sizing: border-box;
    padding: clamp(8px, 1.2vh, 15px) clamp(6px, 0.8vw, 12px);
    background: var(--panel);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #333;
    z-index: 100;
    overflow: visible;
    flex-shrink: 0;
    transition: width 0.2s ease, padding 0.2s ease;
}

.blue-side {
    border-right: 2px solid var(--blue);
}

.red-side {
    border-left: 2px solid var(--red);
}

.king-header {
    width: 100%;
    text-align: center;
}

.king-header h2 {
    margin: clamp(4px, 0.8vh, 10px) 0;
    font-size: clamp(0.95em, 1.2vw, 1.2em);
    color: #ddd;
    letter-spacing: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nation-display {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: clamp(4px, 0.6vh, 8px) 0 clamp(6px, 0.8vh, 10px) 0;
    position: relative;
    z-index: 20;
}

.mini-nation-wrapper {
    position: relative;
    width: var(--card-w);
    height: var(--card-h);
    cursor: help;
    border-radius: 8px;
    flex-shrink: 0;
    transition: width 0.15s ease, height 0.15s ease;
}

.mini-nation-wrapper > .full-card.nation-card {
    position: absolute;
    top: 0;
    left: 0;
    transform: scale(var(--card-scale));
    transform-origin: top left;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 8px rgba(56, 189, 248, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mini-nation-wrapper:hover > .full-card.nation-card {
    transform: scale(calc(var(--card-scale) * 1.04));
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.8), 0 0 14px rgba(56, 189, 248, 0.4);
}

.mini-nation-wrapper .zoom-popup {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 115%;
    right: auto;
    z-index: 99999;
    width: 200px;
    pointer-events: none;
    transform: scale(0.95);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 1));
}

.kingdom.red-side .mini-nation-wrapper .zoom-popup {
    left: auto;
    right: 115%;
}

.mini-nation-wrapper:hover .zoom-popup {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Statystyki: HP Żetony (Styl Gry Planszowej) */
.hp-gauge {
    width: 100%;
    height: auto;
    background: transparent;
    border-radius: 0;
    margin: 4px 0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: relative;
    cursor: help;
    padding: 0;
    box-sizing: border-box;
    flex-shrink: 0;
}

.hp-tokens-row {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 1px;
    flex-wrap: nowrap !important;
}

.hp-token-slot {
    width: clamp(16px, 2.2vw, 24px);
    height: clamp(16px, 2.2vw, 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.hp-token-slot .token-life-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    display: block;
    image-rendering: smooth;
    transition: all 0.25s ease;
}

.hp-token-slot.active-hp .token-life-img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 4px rgba(231, 76, 60, 0.7));
    opacity: 1;
    transform: scale(1);
}

.hp-token-slot.active-hp:hover .token-life-img {
    transform: scale(1.25);
    z-index: 5;
}

.hp-token-slot.spent-hp .token-life-img {
    filter: grayscale(100%) brightness(0.24) contrast(0.6);
    opacity: 0.20;
    transform: scale(0.82);
}

.hp-numeric-badge {
    display: inline-flex;
    align-items: baseline;
    padding: 1px 5px;
    background: rgba(0, 0, 0, 0.65);
    border: 1.5px solid rgba(231, 76, 60, 0.5);
    border-radius: 5px;
    margin-left: 4px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
    font-family: 'MedievalSharp', cursive, serif;
}

.hp-num-curr {
    font-size: 1.05em;
    font-weight: bold;
    color: #ff4757;
    text-shadow: 0 0 8px rgba(255, 71, 87, 0.9);
}

.hp-num-max {
    font-size: 0.78em;
    color: #999;
    margin-left: 1px;
}

.hp-gauge:hover .hp-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.desc-icon {
    height: 1.1em;
    width: auto;
    vertical-align: middle;
    margin: 0 2px;
    display: inline-block;
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.5));
}

/* Tooltip HP */
.hp-popup {
    position: absolute;
    top: 120%;
    /* Zmiana: Wyświetlaj POD paskiem */
    left: 50%;
    right: auto;
    width: 200px;
    transform: translateX(-50%) scale(0.95);
    /* Wyśrodkowanie */
    background: #000;
    border: 2px solid #e74c3c;
    color: #fff;
    padding: 10px;
    font-size: 0.9em;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    pointer-events: none;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 1);
}

.kingdom.red-side .hp-popup {
    left: 50%;
    right: auto;
    transform: translateX(-50%) scale(0.95);
}

/* Reset dla prawego */
.build-meter {
    display: none;
}

/* Ukrywamy stary pasek */

/* Segmenty Pasków */
.bar-segment {
    flex: 1;
    border-right: 1px solid #111;
    background: #252525;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bar-segment:last-child {
    border-right: none;
}

.bar-segment.filled-hp {
    background: radial-gradient(circle, #4a1515 0%, #200808 100%);
    box-shadow: inset 0 0 4px rgba(231, 76, 60, 0.4);
}

.bar-segment.filled-prog {
    background: var(--gold);
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.token-hp-img {
    width: 17px;
    height: 17px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9));
    animation: heartPulse 2.2s ease-in-out infinite alternate;
}

@keyframes heartPulse {
    0% { transform: scale(0.93); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9)); }
    100% { transform: scale(1.08); filter: drop-shadow(0 0 4px rgba(255, 50, 50, 0.7)); }
}

.mini-stats {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.05em;
    line-height: 1;
}

.mini-stat-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
}

.mini-stat-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.18);
    display: inline-block;
    flex-shrink: 0;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: help;
    line-height: 1;
}

.gold-coins-display {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2px;
    cursor: help;
    line-height: 1;
}

.coin-icon-img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.8));
    transition: transform 0.15s ease;
    clip-path: circle(47.2% at 50% 50%);
    transform: translateZ(0);
    backface-visibility: hidden;
}

.coin-icon-img:hover {
    transform: scale(1.25);
    z-index: 2;
}

.coin-icon-img.coin-icon-5g {
    width: 23px;
    height: 23px;
}

.coin-dimmed {
    opacity: 0.35;
    filter: grayscale(100%);
}

.gold-sum-val {
    font-weight: bold;
    color: var(--gold, #ffd700);
    font-size: 0.9em;
    margin-left: 2px;
    line-height: 1;
}

.token-icon-sh,
.token-icon-dc,
.token-icon-rr {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.8));
    transition: transform 0.2s ease;
}

.stat-badge.has-block .token-icon-sh {
    filter: drop-shadow(0 0 6px rgba(52, 152, 219, 0.85));
    animation: blockPulse 2.5s infinite alternate;
}

@keyframes blockPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 3px rgba(52, 152, 219, 0.6)); }
    100% { transform: scale(1.1); filter: drop-shadow(0 0 8px rgba(52, 152, 219, 1)); }
}

.stat-badge.no-block {
    opacity: 0.45;
}

.token-val-sh {
    font-size: 0.9em;
    font-weight: bold;
    color: #4ea8de;
    line-height: 1;
}

.token-val-dc {
    font-size: 0.9em;
    font-weight: bold;
    color: #eee;
    line-height: 1;
}

.token-val-rr {
    font-size: 0.9em;
    font-weight: bold;
    color: #f1c40f;
    line-height: 1;
}

.wonder-site {
    width: 100%;
    max-width: 320px;
    margin-top: clamp(6px, 1vh, 12px);
    display: flex;
    flex-direction: column-reverse;
    gap: clamp(4px, 0.8vh, 8px);
    flex-shrink: 0;
}

.segment {
    height: clamp(48px, 6vh, 68px);
    min-height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    border-radius: 4px;
    display: flex;
    align-items: stretch;
    font-weight: bold;
    font-size: clamp(0.75em, 1vmin, 0.9em);
    color: #444;
    transition: 0.3s;
    padding: 0;
    position: relative;
    box-sizing: border-box;
}

/* Nowa struktura wewnątrz segmentu (Żetony postępu budowy) */
.seg-progress {
    width: clamp(20px, 2.5vw, 28px);
    height: 100%;
    background: #18181c;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: space-evenly;
    padding: 2px 0;
    position: relative;
    cursor: help;
    box-sizing: border-box;
    flex-shrink: 0;
    overflow: hidden;
}

.prog-token-slot {
    width: clamp(8px, 1.2vh, 13px);
    height: clamp(8px, 1.2vh, 13px);
    max-height: 21%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.2s ease, opacity 0.2s ease;
    flex-shrink: 1;
}

.prog-token-slot .token-prog-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 50%;
    object-fit: contain;
    display: block;
    image-rendering: smooth;
    transition: all 0.25s ease;
}

.prog-token-slot.active-prog .token-prog-img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 5px rgba(243, 156, 18, 0.85));
    opacity: 1;
    transform: scale(1);
}

.prog-token-slot.active-prog:hover .token-prog-img {
    transform: scale(1.25);
    z-index: 5;
}

.prog-token-slot.empty-prog {
    background: radial-gradient(circle, #222 0%, #111 100%);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    box-sizing: border-box;
}

.prog-token-slot.empty-prog .token-prog-img {
    filter: grayscale(100%) brightness(0.22) contrast(0.6);
    opacity: 0.18;
    transform: scale(0.8);
}

.seg-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(6px, 1vw, 12px);
    position: relative;
    min-width: 0;
}

/* Stylizacja spanu z tokenem etapu */
.seg-content>span:first-child {
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
    cursor: help;
    flex-shrink: 0;
}

.stage-token-slot {
    width: clamp(32px, 4.2vh, 48px);
    height: clamp(32px, 4.2vh, 48px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.token-etap-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
    display: block;
    image-rendering: smooth;
    transition: all 0.3s ease;
}

.stage-token-slot.built-stage .token-etap-img {
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 12px rgba(241, 196, 15, 0.85));
    opacity: 1;
    transform: scale(1.06);
}

.stage-token-slot.unbuilt-stage .token-etap-img {
    filter: grayscale(100%) brightness(0.20) contrast(0.5);
    opacity: 0.18;
    transform: scale(0.88);
}

.segment.built {
    border-color: rgba(241, 196, 15, 0.4);
    background: linear-gradient(90deg, rgba(241, 196, 15, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
    box-shadow: inset 0 0 10px rgba(241, 196, 15, 0.12);
}

/* Tooltipy dla sekcji */
.seg-progress:hover .progress-popup,
.seg-content>span:first-child:hover .progress-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

/* Trigger tylko dla ikonki bonusu */
.bonus-icon {
    position: relative;
    cursor: help;
}

.bonus-icon:hover .bonus-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

/* Override dla tooltipa na obrazku (wewnątrz span) */
.seg-content>span:first-child .progress-popup {
    left: 10px;
    /* Dla Blue: wyświetl na obrazku/tekście z lekkim wcięciem */
    right: auto;
}

/* Styl Popupu dla Progressu */
.progress-popup {
    position: absolute;
    width: 180px;
    top: 50%;
    left: 120%;
    right: auto;
    /* Domyślnie w prawo */
    transform: translateY(-50%) scale(0.95);
    background: #000;
    border: 2px solid var(--blue);
    color: #fff;
    padding: 10px;
    font-size: 0.8em;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    pointer-events: none;
    text-align: left;
}

/* Styl Popupu dla Bonusu */
.bonus-popup {
    position: absolute;
    width: max-content;
    min-width: 60px;
    max-width: 280px;
    white-space: nowrap;
    top: 50%;
    left: 110%;
    right: auto;
    transform: translateY(-50%) scale(0.95);
    background: rgba(10, 10, 10, 0.98);
    border: 2px solid var(--gold);
    border-radius: 8px;
    color: #fff;
    padding: 6px 14px;
    font-size: 1.1em;
    font-weight: bold;
    font-family: 'MedievalSharp', cursive;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    pointer-events: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.95), 0 0 12px rgba(241, 196, 15, 0.5);
}

/* Dla prawego gracza (Czerwony) - odwrócenie kierunków popupów */
.kingdom.red-side .progress-popup {
    left: auto;
    right: 120%;
    border-color: var(--red);
}

.kingdom.red-side .seg-content>span:first-child .progress-popup {
    left: auto;
    right: 100%;
    /* Dla Red: wyświetl po lewej stronie obrazka */
    margin-right: 35px;
}

.kingdom.red-side .bonus-popup {
    left: auto;
    right: 110%;
    border-color: var(--gold);
}

/* Usunięcie starych reguł popupu segmentu, bo teraz mamy osobne */
.segment .zoom-popup {
    display: none;
}

.bonus-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: help;
}

.stage-reward-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 6px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(241, 196, 15, 0.35);
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: bold;
    color: var(--gold, #ffd700);
    line-height: 1;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.stage-reward-badge:hover {
    transform: scale(1.1);
    border-color: var(--gold, #ffd700);
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.5);
}

.stage-bonus-icon-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.8));
}

.stage-bonus-icon-card {
    width: 18px;
    height: 25px;
    border-radius: 3px;
    object-fit: cover;
    display: block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.85);
}

.segment.built {
    animation: buildImpact 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    background: linear-gradient(to top, #2c3e50, #34495e);
    border: 2px solid var(--gold);
    color: var(--gold);
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.3);
}

/* =========================================
   3. ŚRODEK (BATTLEFIELD) I UI
   ========================================= */
.battlefield {
    flex: 1;
    min-width: 0;
    height: 100vh;
    box-sizing: border-box;
    background: radial-gradient(circle, #1a1a1a 0%, #000 100%);
    padding: clamp(8px, 1.4vh, 18px) clamp(8px, 1.5vw, 24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.title-area {
    text-align: center;
    margin-bottom: clamp(4px, 0.8vh, 10px);
}

.title-area h1 {
    color: var(--gold);
    margin: 0;
    font-size: clamp(1.4em, 2.2vw, 2.4em);
    letter-spacing: clamp(2px, 0.4vw, 5px);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

#turn-msg {
    color: #fff;
    margin-top: clamp(2px, 0.4vh, 5px);
    font-size: clamp(0.95em, 1.2vw, 1.2em);
    letter-spacing: 2px;
}

/* Siatka Kości */
#dice-grid {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1vh, 12px);
    justify-content: center;
    margin: clamp(6px, 1.2vh, 16px) 0;
    min-height: auto;
    width: 100%;
}

/* Kontener dla aktywnych kości (białych) */
#active-dice-container {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(6px, 0.8vw, 12px);
    justify-content: center;
    width: 100%;
}

/* Kontener dla kupionych kości (złotych) */
#bought-dice-container {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(6px, 0.8vw, 12px);
    justify-content: center;
    width: 100%;
    border-top: 2px dashed #444;
    padding-top: clamp(6px, 0.8vh, 12px);
    margin-top: 4px;
    position: relative;
}

/* Etykieta dla złotych kości - USUNIĘTA */
#bought-dice-container::before {
    content: none;
}

/* Przyciski (Główne i Sklep) */
.gold-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: clamp(8px, 1.2vh, 12px) clamp(14px, 1.6vw, 24px);
    margin: clamp(2px, 0.4vw, 5px);
    background: var(--dark);
    border: 2px solid var(--gold);
    color: var(--gold);
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    transition: 0.2s;
    font-size: clamp(0.85em, 1.05vw, 1.05em);
    font-family: 'MedievalSharp', cursive;
    line-height: 1;
    vertical-align: middle;
}

.gold-btn span {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    line-height: 1;
}

.btn-coin-icon {
    width: 1.15em !important;
    height: 1.15em !important;
    max-width: 1.15em !important;
    vertical-align: middle !important;
    margin: 0 !important;
    display: inline-block !important;
    object-fit: contain !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}

.gold-btn:hover:not(:disabled) {
    background: var(--gold);
    color: black;
    box-shadow: 0 0 15px var(--gold);
}

.gold-btn:disabled {
    border-color: #444;
    color: #444;
    cursor: not-allowed;
}

.war-shop {
    margin-top: clamp(6px, 1.2vh, 16px);
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.8vh, 8px);
    width: 100%;
    align-items: center;
    max-width: 600px;
}

.shop-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    width: 100%;
}

.shop-btn-container {
    position: relative;
    flex: 1;
    display: flex;
}

.shop-btn-container button {
    flex: 1;
}

.shop-popup {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    background: #000;
    border: 1px solid var(--gold);
    color: #eee;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    width: 200px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
}

.shop-btn-container:hover .shop-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.war-shop button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: #1a1a1a;
    border: 1px solid #444;
    color: #ccc;
    padding: 0 8px 0 0;
    height: 45px;
    font-size: 0.9em;
    cursor: pointer;
    border-radius: 4px;
    flex: 1;
    transition: 0.2s;
    overflow: hidden;
    text-align: left;
    font-family: 'MedievalSharp', cursive;
    line-height: 1;
}

.war-shop button > img:first-child {
    height: 100%;
    width: 45px;
    min-width: 45px;
    margin-right: 8px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.war-shop button span {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    line-height: 1;
}

.war-shop button:hover:not(:disabled) {
    border-color: var(--gold);
    color: white;
    background: #222;
}

/* Specjalny kolor dla dekretu */
.decree-btn {
    border-color: #9b59b6 !important;
    /* Fioletowy/Purpurowy dla dekretu */
    color: #9b59b6 !important;
}

.decree-btn:hover:not(:disabled) {
    background: #9b59b6 !important;
    color: white !important;
    box-shadow: 0 0 10px #9b59b6;
}

.war-shop button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Obszar talii */
.deck-area {
    display: flex;
    gap: 30px;
    margin: 15px 0;
    justify-content: center;
}

.deck-stack {
    position: relative;
    width: 100px;
    height: 150px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), 0 0 0 2px #333;
    background: #1a1a1a;
    transition: transform 0.2s;
    cursor: help;
}

.deck-stack img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    border-radius: 8px;
}

.deck-stack.discard {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 0 2px #222;
}

.deck-stack .card-count {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: var(--gold);
    color: black;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 0.8em;
    font-weight: bold;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.deck-stack:hover {
    transform: scale(1.05);
}

/* Log Gry */
#game-log {
    margin-top: clamp(6px, 1.2vh, 14px);
    width: 96%;
    flex: 1;
    min-height: 80px;
    max-height: 540px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid #444;
    border-radius: 8px;
    padding: clamp(8px, 1vh, 14px) clamp(10px, 1.2vw, 16px);
    overflow-y: auto;
    color: #eee;
    font-size: clamp(0.78em, 0.88vw, 0.9em);
    text-align: left;
    font-family: 'MedievalSharp', cursive;
    line-height: 1.5;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
    scrollbar-width: thin;
    scrollbar-color: var(--gold) rgba(0, 0, 0, 0.5);
}

#game-log::-webkit-scrollbar {
    width: 8px;
}

#game-log::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

#game-log::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
    border: 1px solid #000;
}

#game-log::-webkit-scrollbar-thumb:hover {
    background: #e67e22;
}

/* Ściąga z zasadami */
.quick-rules {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid #333;
    align-items: center;
}

.rules-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.rule-item {
    font-size: 0.88em;
    color: #ccc;
    letter-spacing: 0.5px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.rule-token-icon {
    width: 17px !important;
    height: 17px !important;
    vertical-align: middle !important;
    margin: 0 3px !important;
    border-radius: 50% !important;
    object-fit: contain !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8)) !important;
}

.log-entry {
    padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.log-card-link {
    position: relative;
    color: var(--gold);
    text-decoration: underline;
    cursor: help;
}

.log-card-link:hover .zoom-popup {
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) !important;
    position: fixed !important;
    z-index: 1000000 !important;
    pointer-events: none;
    transition: none !important;
    /* Pozycjonowanie obsługiwane przez JS w script.js */
}

/* =========================================
   4. KOŚCI (WYGLĄD I ANIMACJE)
   ========================================= */
.die {
    width: clamp(48px, 4.2vw, 68px);
    height: clamp(48px, 4.2vw, 68px);
    background: #fff;
    color: #000;
    border-radius: clamp(6px, 0.8vw, 10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid #ccc;
    font-size: 0.7em;
    font-weight: bold;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
    user-select: none;
}

/* Zaznaczona kostka */
.die.selected {
    border-color: var(--gold) !important;
    background: #fffde7;
    box-shadow: 0 0 15px var(--gold);
    transform: translateY(-10px);
}

/* Kupiona kostka (inny styl) */
.die.bought {
    border-color: var(--gold);
    background: #fff8e1;
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.5);
    cursor: default;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.die.bought::after {
    content: "+";
    position: absolute;
    top: 0;
    right: 5px;
    color: var(--gold);
    font-size: 1.5em;
    opacity: 0.5;
}

.gold-btn.persia-btn {
    border-color: #e67e22;
    color: #f1c40f;
    background: rgba(30, 20, 10, 0.85);
}

.gold-btn.persia-btn:hover:not(:disabled) {
    background: #e67e22;
    color: #000;
    box-shadow: 0 0 15px #e67e22;
}

.gold-btn.persia-btn:disabled {
    border-color: #444 !important;
    color: #555 !important;
    background: rgba(20, 20, 20, 0.6) !important;
    cursor: not-allowed;
    box-shadow: none !important;
}

.gold-btn.persia-btn:disabled img {
    filter: grayscale(1) opacity(0.35);
}

/* Animacje rzutu */
@keyframes rollIn {
    from {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    80% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.die-anim {
    animation: rollIn 0.5s ease-out backwards;
}

/* =========================================
   5. KARTY (DRAFT / TUTORIAL / ZOOM)
   ========================================= */
.inline-card-icon {
    width: auto;
    height: 16px;
    max-width: 20px;
    vertical-align: -2px;
    object-fit: contain;
    margin: 0 2px;
    display: inline-block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
    image-rendering: smooth;
}

.inline-card-icon.inline-icon-sm {
    height: 13.6px;
    max-width: 17px;
    vertical-align: -1.5px;
}

.inline-card-icon.broken-heart-icon {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.55));
}

.inline-card-icon[src*="construction_blueprint"],
.inline-card-icon[src*="play_card"],
.inline-card-icon.inline-icon-card {
    height: 14px;
    max-width: 11px;
    border-radius: 1.5px;
    object-fit: contain;
    vertical-align: -2px;
    margin: 0 1.5px;
    display: inline-block;
}

.inline-card-icon.inline-empty-die,
img.inline-empty-die {
    height: 14.5px;
    width: 14.5px;
    vertical-align: -2.5px;
    margin: 0 1.5px;
    object-fit: contain;
    display: inline-block;
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.45));
}

.card-desc .inline-card-icon[src*="construction_blueprint"],
.nation-card .inline-card-icon[src*="construction_blueprint"],
.nation-card-desc .inline-card-icon[src*="construction_blueprint"],
.card-modal .inline-card-icon[src*="construction_blueprint"] {
    height: 13px;
    max-width: 10px;
    vertical-align: -2px;
    margin: 0 1px;
}

.card-desc .inline-card-icon[src*="play_card"],
.nation-card .inline-card-icon[src*="play_card"],
.nation-card-desc .inline-card-icon[src*="play_card"],
.card-modal .inline-card-icon[src*="play_card"] {
    height: 13px;
    max-width: 9.5px;
    vertical-align: -2.5px;
    margin: 0 1px;
}

.active-card .inline-card-icon {
    height: 9.5px;
    max-width: 12px;
    vertical-align: -1px;
    margin: 0 1px;
    filter: drop-shadow(0 0.5px 1px rgba(0, 0, 0, 0.6));
}

.active-card .inline-card-icon[src*="play_card"],
.active-card .inline-card-icon.inline-icon-card {
    height: 8.5px;
    max-width: 6px;
    vertical-align: -1.5px;
    margin: 0 0.5px;
}

.active-card .inline-card-icon.inline-icon-sm {
    height: 8px;
    max-width: 10.5px;
    vertical-align: -0.8px;
}

.active-card .inline-card-icon.broken-heart-icon {
    height: 9.5px;
    max-width: 12px;
    filter: drop-shadow(0 0.5px 1px rgba(0, 0, 0, 0.5));
}

.log-entry .inline-card-icon {
    height: 13.5px;
    max-width: 17px;
    vertical-align: -2px;
    margin: 0 1px;
}

.log-entry .inline-card-icon.inline-icon-sm {
    height: 11.5px;
    max-width: 14px;
    vertical-align: -1.5px;
}

.die-icon-img {
    width: clamp(26px, 2.4vw, 34px);
    height: clamp(26px, 2.4vw, 34px);
    max-width: 58%;
    max-height: 58%;
    object-fit: contain;
    vertical-align: middle;
    filter: drop-shadow(0 1.5px 3px rgba(0, 0, 0, 0.45));
    transition: transform 0.2s ease;
}

.die-icon-emoji {
    font-size: clamp(1.4em, 1.8vw, 1.9em);
    line-height: 1;
    display: inline-block;
}

/* Klasa .full-card jest używana wszędzie tam, gdzie pokazujemy "dużą" kartę */
.full-card {
    width: 200px;
    height: 279px;
    box-sizing: border-box;
    background-color: #eddcb7;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    border: 2px solid rgba(160, 160, 160, 0.2);
    will-change: transform;
    font-family: 'MedievalSharp', cursive;
    color-scheme: only light !important;
    forced-color-adjust: none !important;
}

.full-card.common .card-frame {
    background-image: url('images/frames/new_base.png?v=11');
}

.full-card.rare .card-frame {
    background-image: url('images/frames/new_rare.png?v=12');
    top: -1.5px;
    left: -2px;
}

.full-card.rare .card-art {
    top: 44.5px;
    left: 10px;
}

.full-card.rare .card-body {
    top: 187.5px;
    left: -2px;
}

.full-card.rare .card-title {
    top: 18.8px;
    left: 0;
    width: 100%;
    height: 26px;
    padding: 0 18px;
    font-size: 0.84em;
}

.full-card.nation-card .card-frame,
.nation-card .card-frame {
    background-image: url('images/frames/new_rare_nation.png?v=11') !important;
}

.card-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 279px;
    box-sizing: border-box;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 5;
    pointer-events: none;
}

.active-card>.card-frame {
    width: 100px;
    height: 140px;
    box-sizing: border-box;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.card-art {
    width: 176px;
    height: 138px;
    position: absolute;
    top: 46px;
    left: 12px;
    border-radius: 0;
    overflow: hidden;
    z-index: 1;
}

.card-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-art img[src*="rome.jpeg"] {
    object-position: center 20%;
}

.card-art img[src*="israel.jpeg"] {
    object-position: center 20%;
}

.card-art .fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    font-size: 3em;
}

.card-body {
    height: 66px;
    width: 100%;
    padding: 2px 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: absolute;
    top: 187px;
    left: 0;
    z-index: 10;
    overflow: hidden;
}

.rarity-tag {
    display: none;
}

.full-card,
.full-card * {
    color-scheme: only light !important;
    forced-color-adjust: none !important;
}

.card-title {
    position: absolute;
    top: 16.9px;
    left: 0;
    width: 100%;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0;
    font-family: 'MedievalSharp', cursive;
    font-size: 0.84em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #3d2b1f !important;
    text-shadow: none !important;
    font-weight: bold;
    z-index: 10;
    pointer-events: none;
    padding: 0 18px;
    box-sizing: border-box;
    line-height: 1;
    color-scheme: only light !important;
    forced-color-adjust: none !important;
}

.card-body {
    height: 66px;
    width: 100%;
    padding: 2px 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: absolute;
    top: 187px;
    left: 0;
    z-index: 10;
    overflow: hidden;
    color-scheme: only light !important;
    forced-color-adjust: none !important;
}

.full-card p,
.card-body p {
    font-family: 'MedievalSharp', cursive;
    font-size: 0.69em;
    color: #4e3828 !important;
    margin: 0;
    line-height: 1.29;
    font-weight: 600;
    text-align: center;
    hyphens: auto;
    word-break: normal;
    overflow-wrap: break-word;
    color-scheme: only light !important;
    forced-color-adjust: none !important;
}


/* Wersja RARE i NATION - subtelny blask, spójny z leksykonem */
.full-card.rare {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), 0 0 6px rgba(180, 50, 30, 0.2);
    border-color: rgba(180, 50, 30, 0.35);
}

.full-card.nation-card {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), 0 0 6px rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.3);
}

.full-card.rare .rarity-tag {
    color: #e67e22;
    text-shadow: 0 0 5px rgba(215, 65, 30, 0.6);
}

/* Karta w Drafcie / Wyborze (Stabilny Hover effect bez migotania) */
.card-option {
    position: relative;
    cursor: pointer;
    border-radius: 10px;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.2s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.card-option:hover {
    transform: translateY(-6px) scale(1.03);
    z-index: 50;
}

.card-option .full-card {
    pointer-events: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* =========================================
   LEKSYKON: STOS KART (x3 Common / x1 Rare)
   ========================================= */
.lexicon-header-info {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: -10px auto 25px auto;
    font-size: 0.9em;
    flex-wrap: wrap;
}

.lexicon-badge {
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid #444;
}

.lexicon-badge.common-info {
    border-color: #888;
    color: #e0e0e0;
}

.lexicon-badge.rare-info {
    border-color: rgba(215, 65, 30, 0.7);
    color: #ffaa88;
    box-shadow: 0 0 10px rgba(215, 65, 30, 0.25);
}

.gallery-card-stack {
    position: relative;
    width: 200px;
    height: 279px;
    margin: 15px 12px;
    transition: transform 0.25s ease;
}

.gallery-card-stack:hover {
    transform: translateY(-6px) scale(1.03);
    z-index: 50;
}

.gallery-card-stack .card-stack-main {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
}

.gallery-card-stack .card-stack-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 279px;
    border-radius: 15px;
    pointer-events: none;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.gallery-card-stack .card-stack-layer > .full-card {
    width: 100%;
    height: 100%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75);
    pointer-events: none;
}

/* 3 warstwy dla kart Common (wyraźniejsza kaskada w prawo i w górę) */
.gallery-card-stack.common-stack .layer-3 {
    z-index: 1;
    transform: translate(16px, -11px) rotate(4.2deg);
    filter: brightness(0.74) contrast(0.95);
}

.gallery-card-stack.common-stack .layer-2 {
    z-index: 2;
    transform: translate(8px, -5.5px) rotate(2.1deg);
    filter: brightness(0.88) contrast(0.98);
}

.gallery-card-stack.common-stack:hover .layer-3 {
    transform: translate(28px, -18px) rotate(7.2deg);
    filter: brightness(0.86);
}

.gallery-card-stack.common-stack:hover .layer-2 {
    transform: translate(14px, -9px) rotate(3.6deg);
    filter: brightness(0.95);
}
.active-cards-label {
    font-size: 0.7em;
    color: #777;
    margin-top: 20px;
    letter-spacing: 2px;
}

.cards-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    margin-top: 10px;
    width: 100%;
    flex: 1;
    min-height: 120px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 6px 16px 6px;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) rgba(0, 0, 0, 0.4);
}

.cards-list::-webkit-scrollbar {
    width: 6px;
}

.cards-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
}

.cards-list::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 3px;
    border: 1px solid #000;
}

.cards-list::-webkit-scrollbar-thumb:hover {
    background: #e67e22;
}

/* Styl małej karty w pasku bocznym (skalowany 1:1 jak mini-nation-wrapper) */
.active-card {
    position: relative;
    width: var(--card-w);
    height: var(--card-h);
    cursor: help;
    border-radius: 8px;
    flex-shrink: 0;
    transition: width 0.15s ease, height 0.15s ease;
}

.active-card > .full-card {
    position: absolute;
    top: 0;
    left: 0;
    transform: scale(var(--card-scale));
    transform-origin: top left;
    pointer-events: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.active-card:hover > .full-card {
    transform: scale(calc(var(--card-scale) * 1.04));
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.8);
}

.active-card.rare > .full-card {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45), 0 0 6px rgba(180, 50, 30, 0.2);
}

/* GLOBALNY PODGLĄD KARTY NA ŚRODKU EKRANU */
#global-card-zoom {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: 1000000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s;
    filter: drop-shadow(0 0 45px rgba(0, 0, 0, 0.98)) drop-shadow(0 0 15px rgba(0, 0, 0, 0.9));
}

#global-card-zoom.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1.15);
}

#global-card-zoom .full-card {
    transition: none !important;
    transform: none !important;
}

#global-card-zoom .rarity-tag {
    display: none;
}

#global-card-zoom p {
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    display: block !important;
    overflow: visible !important;
}

/* Ukryj stare lokalne popupy po bokach */
.zoom-popup {
    display: none !important;
}

.zoom-popup .nation-body h3 {
    font-size: 1em !important;
}

.nation-card-body {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2px 24px !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.nation-card-body p {
    font-size: 0.69em !important;
    color: #4e3828 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.33 !important;
    font-weight: 600 !important;
    text-align: center !important;
    width: 100% !important;
    hyphens: auto !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

/* =========================================
   7. MENU, TUTORIAL I MODALE
   ========================================= */
.menu-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #2c3e50 0%, #000 100%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    overflow-y: auto;
    overflow-x: hidden;
    padding: clamp(15px, 3vh, 40px) 15px;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) rgba(0, 0, 0, 0.5);
}

.menu-screen::-webkit-scrollbar {
    width: 6px;
}
.menu-screen::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
}
.menu-screen::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 3px;
}

.game-logo-wrapper {
    position: relative;
    z-index: 10;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.game-logo-img {
    height: clamp(120px, 20vh, 185px);
    width: auto;
    max-width: 90vw;
    object-fit: contain;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.8));
    margin-bottom: clamp(10px, 1.8vh, 18px);
    position: relative;
    z-index: 10;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.game-logo {
    position: relative;
    z-index: 10;
    font-size: clamp(2.2em, 5vw, 3.8em);
    color: var(--gold);
    text-shadow: 0 0 20px rgba(241, 196, 15, 0.5);
    margin-top: 0;
    margin-bottom: clamp(15px, 2.5vh, 35px);
    letter-spacing: clamp(2px, 0.5vw, 5px);
    border-bottom: 2px solid var(--gold);
    padding-bottom: clamp(8px, 1.5vh, 16px);
}

.exit-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: 1px solid #444;
    color: #444;
    cursor: pointer;
    font-family: 'MedievalSharp', cursive;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    transition: 0.2s;
}

.exit-btn:hover {
    border-color: var(--red);
    color: var(--red);
}

.menu-contact-badge {
    position: fixed;
    bottom: 18px;
    right: 22px;
    z-index: 2005;
    background: rgba(14, 18, 27, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(241, 196, 15, 0.35);
    border-radius: 8px;
    padding: 7px 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    transition: all 0.25s ease;
    font-family: 'MedievalSharp', cursive, sans-serif;
    text-align: right;
    pointer-events: auto;
}

.menu-contact-badge:hover {
    border-color: var(--gold);
    box-shadow: 0 6px 20px rgba(241, 196, 15, 0.25);
    background: rgba(18, 24, 38, 0.95);
    transform: translateY(-2px);
}

.menu-contact-badge .contact-header {
    font-size: 0.82em;
    color: #aaa;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.menu-contact-badge .contact-header strong {
    color: var(--gold);
    font-weight: normal;
}

.menu-contact-badge .contact-mail-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4ea8de;
    text-decoration: none;
    font-size: 0.88em;
    letter-spacing: 0.4px;
    transition: color 0.2s ease, text-shadow 0.2s ease;
    cursor: pointer;
}

.menu-contact-badge .contact-mail-link:hover {
    color: #70d6ff;
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(112, 214, 255, 0.6);
}

.menu-contact-badge .contact-todo-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8899a6;
    text-decoration: none;
    font-size: 0.78em;
    letter-spacing: 0.3px;
    opacity: 0.45;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-top: 2px;
}

.menu-contact-badge:hover .contact-todo-link {
    opacity: 0.85;
}

.menu-contact-badge .contact-todo-link:hover {
    color: var(--gold);
    opacity: 1;
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(241, 196, 15, 0.4);
}

.menu-contact-badge .contact-icon {
    font-size: 1.05em;
    color: var(--gold);
}

/* Ustawienia partii w menu: jeden rząd */
.menu-settings {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 22px;
}

.menu-settings label {
    margin-bottom: 0 !important;
}

/* Narzędzia testowe: zwijana sekcja, wyraźnie oddzielona od zwykłego menu */
.menu-tools {
    margin: 14px auto 0;
    width: fit-content;
    max-width: 92vw;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    padding: 6px 14px;
    background: rgba(14, 18, 27, 0.55);
    text-align: left;
}

.menu-tools summary {
    cursor: pointer;
    color: #94a3b8;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    text-align: center;
    list-style: none;
}

.menu-tools summary::-webkit-details-marker {
    display: none;
}

.menu-tools summary::before {
    content: '🛠 ';
}

.menu-tools[open] {
    border-color: rgba(241, 196, 15, 0.45);
    background: rgba(14, 18, 27, 0.85);
    padding-bottom: 10px;
}

.menu-tools[open] summary {
    color: var(--gold);
    margin-bottom: 6px;
}

.menu-tools-note {
    margin: 0 0 8px;
    color: #94a3b8;
    font-size: 0.78em;
    text-align: center;
}

/* Formularz pomysłów od graczy (lewy dolny róg menu) */
.menu-idea-box {
    position: fixed;
    bottom: 18px;
    left: 22px;
    z-index: 2005;
    width: 270px;
    max-width: calc(100vw - 44px);
    background: rgba(14, 18, 27, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(241, 196, 15, 0.35);
    border-radius: 8px;
    padding: 7px 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    font-family: 'MedievalSharp', cursive, sans-serif;
    color: #cbd5e1;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.menu-idea-box:hover,
.menu-idea-box[open] {
    border-color: var(--gold);
    background: rgba(18, 24, 38, 0.95);
}

.menu-idea-box summary {
    cursor: pointer;
    font-size: 0.88em;
    letter-spacing: 0.4px;
    color: var(--gold);
    list-style: none;
}

.menu-idea-box summary::-webkit-details-marker {
    display: none;
}

.menu-idea-box form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.menu-idea-box textarea,
.menu-idea-box input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 6px 8px;
    font: inherit;
    font-size: 0.82em;
    resize: vertical;
}

.menu-idea-box textarea:focus,
.menu-idea-box input:focus {
    outline: none;
    border-color: var(--gold);
}

.menu-idea-box .idea-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.menu-idea-box #idea-status {
    font-size: 0.76em;
    color: #94a3b8;
    line-height: 1.25;
}

.menu-idea-box .idea-send {
    flex-shrink: 0;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 4px;
    padding: 4px 10px;
    font: inherit;
    font-size: 0.82em;
    cursor: pointer;
}

.menu-idea-box .idea-send:hover:not(:disabled) {
    background: rgba(241, 196, 15, 0.15);
}

.menu-idea-box .idea-send:disabled {
    opacity: 0.5;
    cursor: default;
}

@media (max-width: 768px) {
    .menu-idea-box {
        position: static;
        margin: 10px auto;
    }
}

@media (max-width: 768px) {
    .menu-contact-badge {
        position: static;
        margin-top: 25px;
        margin-bottom: 15px;
        align-items: center;
        text-align: center;
    }
}


.menu-buttons {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(6px, 1vh, 12px);
    width: 100%;
}

.menu-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: clamp(240px, 28vw, 320px);
    padding: 0;
    height: clamp(48px, 6.2vh, 66px);
    margin: 0;
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    font-size: clamp(0.95em, 1.2vw, 1.15em);
    cursor: pointer;
    transition: 0.3s;
    border-radius: 10px;
    overflow: hidden;
    text-align: left;
    font-family: 'MedievalSharp', cursive;
}

.menu-btn img {
    height: 100%;
    width: auto;
    margin-right: 12px;
    object-fit: cover;
}

.menu-btn:hover {
    background: var(--gold);
    color: black;
    transform: scale(1.03);
}

.menu-btn.small {
    width: clamp(100px, 12vw, 140px);
    height: clamp(36px, 4.8vh, 46px);
    margin: 0;
    font-size: clamp(0.85em, 1vw, 1em);
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

/* Tutorial Grid */
.cards-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
    padding-bottom: 50px;
}

.cards-gallery .full-card:hover {
    transform: scale(1.05);
    border-color: var(--gold);
    z-index: 10;
}

.tutorial-content {
    width: 90%;
    max-width: 1200px;
    height: 90%;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--gold);
    border-radius: 20px;
    padding: 35px 40px;
    overflow-y: auto;
    text-align: left;
    position: relative;
}

.tutorial-sticky-close-btn {
    position: sticky;
    top: 0;
    float: right;
    margin-bottom: -50px;
    z-index: 500;
    background: rgba(20, 20, 20, 0.95);
    border: 2px solid var(--gold);
    color: var(--gold);
    padding: 8px 18px;
    border-radius: 8px;
    font-family: 'MedievalSharp', cursive;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8), 0 0 10px rgba(241, 196, 15, 0.3);
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.tutorial-sticky-close-btn:hover {
    background: var(--gold);
    color: black;
    box-shadow: 0 6px 20px rgba(241, 196, 15, 0.6);
    transform: scale(1.05);
}

/* Sekcja Tokenów w Leksykonie (W jednej linii - 6 kolumn) */
.tokens-glossary-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 20px;
}

@media (max-width: 1050px) {
    .tokens-glossary-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .tokens-glossary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.token-glossary-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid #444;
    border-radius: 10px;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.token-glossary-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.08);
}

.token-glossary-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

.token-glossary-info {
    font-size: 0.78em;
    color: #ccc;
    line-height: 1.25;
    text-align: center;
}

.token-glossary-name {
    font-size: 0.92em;
    font-weight: bold;
    color: var(--gold);
    margin-bottom: 3px;
    line-height: 1.2;
}

/* Modal Draftu (Naprawione okno wyboru kart, m.in. dla Grecji) */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #111;
    padding: 30px 40px;
    border-radius: 20px;
    border: 2px solid var(--gold);
    text-align: center;
    max-width: 95vw;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.95);
}

#draft-modal .modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 95vw;
    max-height: 94vh;
    padding: 35px 50px 40px 50px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
}

#draft-modal .modal-content h2 {
    margin: 0 0 20px 0;
    font-size: 1.8em;
    letter-spacing: 2px;
}

#draft-options {
    display: flex;
    gap: 25px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 10px 0;
    padding: 10px 20px;
    max-width: 100%;
    box-sizing: border-box;
}

/* Animacje Pomocnicze */
@keyframes shake {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-5px, 0);
    }

    75% {
        transform: translate(5px, 0);
    }
}

.shake-it {
    animation: shake 0.4s;
}

.damage-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(231, 76, 60, 0.3);
    pointer-events: none;
    opacity: 0;
    transition: 0.2s;
    z-index: 9999;
}

.flash-active {
    opacity: 1;
}

@keyframes buildImpact {
    0% {
        transform: translateY(-200px) scale(2);
        opacity: 0;
    }

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



/* --- STYLIZACJA ZASAD W TUTORIALU --- */
.rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Dwie kolumny */
    gap: 20px;
    margin-bottom: 30px;
}

.rule-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    border-radius: 10px;
    padding: 20px;
    text-align: left;
}

.rule-box h3 {
    color: var(--gold);
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
    margin-top: 0;
    font-size: 1.1em;
}

.rule-box ul {
    padding-left: 20px;
    margin: 10px 0;
}

.rule-box li {
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #ccc;
    line-height: 1.4;
}

.rule-box p {
    font-size: 0.9em;
    color: #bbb;
    margin-bottom: 10px;
}

/* Wyróżnienie sekcji ograniczeń */
.rule-box.warning {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.rule-box.warning h3 {
    color: #e74c3c;
}

/* =========================================
   8. PÓŁKA NA KARTY W RĘCE (HAND TRAY)
   ========================================= */
.hand-container {
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px;
    min-height: 160px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 20px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
    transition: all 0.3s ease;
}

.hand-container::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 10px;
    background: radial-gradient(circle at center, rgba(241, 196, 15, 0.02) 0%, transparent 80%);
    pointer-events: none;
}

/* Podświetlenie aktywnej ręki gracz */
.kingdom.active-side .hand-container {
    border-color: rgba(241, 196, 15, 0.35);
    background: rgba(241, 196, 15, 0.04);
    box-shadow: inset 0 0 15px rgba(241, 196, 15, 0.1), 0 0 10px rgba(241, 196, 15, 0.05);
}

/* Złoty wskaźnik aktywnego królestwa */
.kingdom {
    transition: border-color 0.3s, box-shadow 0.3s;
}

.kingdom.active-side {
    box-shadow: inset 0 0 20px rgba(241, 196, 15, 0.03);
}

/* =========================================
   9. RESPONSYWNOŚĆ I SKALOWANIE EKRANU
   ========================================= */
@media (max-height: 820px) {
    :root {
        --card-scale: 0.42;
    }
    .king-header h2 { margin: 3px 0; font-size: 1em; }
    .nation-display { margin: 3px 0; }
    .active-cards-label { margin-top: 8px; }
    .hand-container { min-height: 120px; margin-top: 6px; margin-bottom: 8px; padding: 6px; }
    #dice-grid { margin: 6px 0; gap: 6px; }
    .war-shop { margin-top: 6px; }
}

@media (max-height: 660px) {
    :root {
        --card-scale: 0.35;
    }
    .king-header h2 { font-size: 0.9em; margin: 1px 0; }
    .title-area h1 { font-size: 1.4em; }
    .title-area { margin-bottom: 2px; }
    .die { width: 44px; height: 44px; }
    .die-icon-img { width: 24px; height: 24px; }
}

@media (max-width: 1100px) {
    :root {
        --card-scale: 0.42;
    }
    .kingdom { width: 250px; padding: 8px 6px; }
}

@media (max-width: 850px) {
    :root {
        --card-scale: 0.45;
    }
    #game-container { flex-direction: column; height: 100vh; overflow-y: auto; }
    .kingdom { width: 100%; height: auto; min-height: auto; }
    .battlefield { width: 100%; height: auto; min-height: 100vh; }
}

/* =========================================
   10. SKALOWANIE NA DUŻYCH EKRANACH (Full HD, 2K / 1440p, 4K UHD)
   ========================================= */
@media (min-width: 1500px) {
    :root {
        --card-scale: 0.56;
    }
    .kingdom { width: clamp(330px, 20vw, 380px); }
    #global-card-zoom.active { transform: translate(-50%, -50%) scale(1.35); }
    .die { width: 68px; height: 68px; }
    .die .die-icon-img { width: 38px; height: 38px; }
}

@media (min-width: 1800px) {
    :root {
        --card-scale: 0.62;
    }
    .kingdom { width: 380px; padding: 20px 14px; }
    .segment { height: clamp(52px, 6.2vh, 72px); }
    .stage-token-slot { width: 48px; height: 48px; }
    #global-card-zoom.active { transform: translate(-50%, -50%) scale(1.48); }
    .die { width: 76px; height: 76px; }
    .die .die-icon-img { width: 42px; height: 42px; }
    #game-log { font-size: 0.98em; }
}

/* --- QHD / 1440p (np. 2560x1440) --- */
@media (min-width: 2200px) {
    :root {
        --card-scale: 0.78;
    }
    .kingdom { width: 460px; padding: 25px 18px; }
    .king-header h2 { font-size: 1.5em; margin: 10px 0; }
    .wonder-site { max-width: 420px; gap: 10px; }
    .segment { height: 80px; font-size: 1.1em; }
    .seg-progress { width: 32px; }
    .prog-token-slot { width: 14px; height: 14px; max-height: 21%; }
    .stage-token-slot { width: 62px; height: 62px; }
    .hp-token-slot { width: 30px; height: 30px; }
    .hp-num-curr { font-size: 1.4em; }
    .hp-num-max { font-size: 0.95em; }
    .mini-stats { font-size: 1.25em; padding: 6px 14px; gap: 12px; }
    .token-icon-sh, .token-icon-dc, .token-icon-rr, .coin-icon-img { width: 26px; height: 26px; }
    
    .title-area h1 { font-size: 3em; }
    #turn-msg { font-size: 1.4em; }
    #timer-display { font-size: 1.7em; }
    .die { width: 92px; height: 92px; border-radius: 12px; }
    .die .die-icon-img { width: 50px; height: 50px; }
    .gold-btn { font-size: 1.25em; padding: 14px 28px; }
    .war-shop { max-width: 720px; gap: 10px; }
    .war-shop button { height: 54px; font-size: 1.1em; }
    .war-shop button > img:first-child { width: 54px; min-width: 54px; }
    #game-log { font-size: 1.12em; max-height: 650px; line-height: 1.6; padding: 18px 22px; }
    #global-card-zoom.active { transform: translate(-50%, -50%) scale(1.75); }
    #draft-modal .modal-content {
        padding: 50px 70px 60px 70px;
        border-radius: 28px;
        border-width: 3.5px;
    }
    #draft-modal .modal-content h2 {
        font-size: 2.4em;
        margin: 0 0 25px 0;
        letter-spacing: 3px;
    }
    #draft-modal .card-option { transform: scale(1.22); margin: 35px 25px; }
    #draft-modal .card-option:hover { transform: scale(1.27) translateY(-8px); }
    #draft-options { gap: 35px; padding: 15px 20px; }

    /* MENU GŁÓWNE 1440p */
    .game-logo { font-size: 4.8em; letter-spacing: 7px; margin-bottom: 35px; }
    .menu-buttons { gap: 14px; }
    .menu-btn { width: 420px; height: 84px; font-size: 1.35em; border-radius: 14px; }
    .menu-btn img { margin-right: 18px; }
    .menu-btn.small { width: 160px; height: 54px; font-size: 1.15em; }
    .language-switcher button.menu-btn.small { width: 160px; height: 54px; font-size: 1.15em; }
    .language-switcher button.menu-btn.small img { height: 30px; }
    #main-menu .language-switcher + div { font-size: 1.15em; }
    #main-menu select { font-size: 0.95em; padding: 4px 8px; }
    .tutorial-content { max-width: 1600px; padding: 45px 55px; }
}

/* --- 4K Ultra HD (np. 3840x2160) --- */
@media (min-width: 3200px) {
    :root {
        --card-scale: 1.05;
    }
    .kingdom { width: 620px; padding: 35px 24px; }
    .king-header h2 { font-size: 2em; margin: 14px 0; }
    .wonder-site { max-width: 560px; gap: 14px; }
    .segment { height: 110px; font-size: 1.4em; border-radius: 8px; }
    .seg-progress { width: 44px; }
    .prog-token-slot { width: 20px; height: 20px; max-height: 21%; }
    .stage-token-slot { width: 88px; height: 88px; }
    .hp-token-slot { width: 44px; height: 44px; }
    .hp-num-curr { font-size: 2em; }
    .hp-num-max { font-size: 1.3em; }
    .mini-stats { font-size: 1.7em; padding: 10px 22px; gap: 18px; border-radius: 12px; }
    .token-icon-sh, .token-icon-dc, .token-icon-rr, .coin-icon-img { width: 38px; height: 38px; }
    .active-cards-label { font-size: 1.1em; margin-top: 25px; }

    .title-area h1 { font-size: 4.2em; letter-spacing: 8px; }
    #turn-msg { font-size: 2em; }
    #timer-display { font-size: 2.4em; }
    .die { width: 124px; height: 124px; border-radius: 18px; border-width: 5px; }
    .die .die-icon-img { width: 68px; height: 68px; }
    .gold-btn { font-size: 1.6em; padding: 20px 42px; border-radius: 12px; border-width: 3px; }
    .war-shop { max-width: 950px; gap: 14px; margin-top: 25px; }
    .war-shop button { height: 75px; font-size: 1.4em; border-radius: 8px; }
    .war-shop button > img:first-child { width: 75px; min-width: 75px; }
    #game-log { font-size: 1.4em; max-height: 850px; line-height: 1.7; padding: 25px 30px; border-radius: 14px; }
    #global-card-zoom.active { transform: translate(-50%, -50%) scale(2.25); }
    #draft-modal .modal-content {
        padding: 70px 100px 85px 100px;
        border-radius: 36px;
        border-width: 5px;
    }
    #draft-modal .modal-content h2 {
        font-size: 3.4em;
        margin: 0 0 35px 0;
        letter-spacing: 4px;
    }
    #draft-modal .card-option { transform: scale(1.65); margin: 70px 50px; }
    #draft-modal .card-option:hover { transform: scale(1.72) translateY(-14px); }
    #draft-options { gap: 55px; padding: 25px 35px; }

    /* MENU GŁÓWNE 4K */
    .game-logo { font-size: 6.2em; letter-spacing: 10px; margin-bottom: 50px; }
    .menu-buttons { gap: 20px; }
    .menu-btn { width: 580px; height: 116px; font-size: 1.85em; border-radius: 18px; border-width: 3.5px; }
    .menu-btn img { margin-right: 24px; }
    .menu-btn.small { width: 220px; height: 74px; font-size: 1.55em; border-radius: 12px; }
    .language-switcher button.menu-btn.small { width: 220px; height: 74px; font-size: 1.55em; }
    .language-switcher button.menu-btn.small img { height: 40px; }
    #main-menu .language-switcher + div { font-size: 1.55em; margin-top: 25px; }
    #main-menu select { font-size: 1.2em; padding: 6px 14px; border-radius: 6px; }
    #main-menu input[type="checkbox"] { transform: scale(1.6); margin-right: 8px; }
    .tutorial-content { max-width: 2400px; padding: 60px 80px; font-size: 1.35em; }
}