/* ══════════════════════════════════════════════════════════════════════════
   SMRŠÍ v3 — Herní CSS
   Téma: temný pokerový stůl, zlaté akcenty, serif typografie
   ══════════════════════════════════════════════════════════════════════════ */

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

:root {
  /* Barvy stolu */
  --felt:        #1a4a2e;
  --felt-dark:   #0e2d1c;
  --felt-mid:    #1e5436;
  --felt-edge:   #163d25;

  /* Zlatá paleta */
  --gold:        #c9a84c;
  --gold-light:  #e8c97a;
  --gold-dark:   #8a6a1e;
  --gold-glow:   rgba(201,168,76,0.35);

  /* Texty */
  --text-main:   #f0e8d0;
  --text-muted:  #8a7a60;
  --text-dim:    #5a4e38;

  /* Karty */
  --card-bg:     #fdfaf4;
  --card-border: #c8b89a;
  --red-suit:    #cc2222;

  /* Efekty */
  --shadow-card: 0 4px 14px rgba(0,0,0,0.6);
  --shadow-ui:   0 8px 32px rgba(0,0,0,0.7);
  --glow-turn:   0 0 16px rgba(201,168,76,0.7), 0 0 32px rgba(201,168,76,0.3);

  /* Layout */
  --radius-card: 8px;
  --radius-ui:   10px;

  /* Fonty */
  --font-display: 'Cinzel', serif;
  --font-body:    'Crimson Text', serif;
}

/* ── Základ ────────────────────────────────────────────────────────────── */
html, body {
  height: 100%;
  overflow: hidden;
  background: var(--felt-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

/* ── Screeny ────────────────────────────────────────────────────────────── */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.screen.hidden  { display: none !important; }
.screen.active  { display: flex; }

/* ══════════════════════════════════════════════════════════════════════════
   HLAVNÍ MENU
   ══════════════════════════════════════════════════════════════════════════ */
#screen-menu {
  align-items: center;
  justify-content: center;
  /* Radiální gradient napodobuje pokerové osvětlení shora */
  background: radial-gradient(ellipse at 40% 35%, #1e5c38 0%, #0e2d1c 65%);
}

/* Jemný kosočtvercový vzor jako pokrytí stolu */
.menu-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient( 45deg, transparent, transparent 38px, rgba(201,168,76,0.035) 38px, rgba(201,168,76,0.035) 39px),
    repeating-linear-gradient(-45deg, transparent, transparent 38px, rgba(201,168,76,0.035) 38px, rgba(201,168,76,0.035) 39px);
  pointer-events: none;
}

.menu-center {
  text-align: center;
  z-index: 1;
  animation: fadeInUp 0.5s ease both;
  padding: 20px;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.menu-logo {
  font-family: var(--font-display);
  font-size: clamp(52px, 12vw, 100px);
  color: var(--gold);
  text-shadow: 0 0 50px rgba(201,168,76,0.35), 0 4px 10px rgba(0,0,0,0.9);
  letter-spacing: 0.06em;
  line-height: 1;
  margin-bottom: 6px;
}
.logo-s { color: var(--gold-light); font-size: 1.12em; }

.menu-subtitle {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  letter-spacing: 0.12em;
}

.menu-form  { margin-bottom: 24px; }

.menu-input {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius-ui);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1.15rem;
  padding: 10px 20px;
  text-align: center;
  width: min(240px, 80vw);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.menu-input:focus { border-color: var(--gold); background: rgba(255,255,255,0.11); }
.menu-input::placeholder { color: var(--text-muted); }

.menu-buttons { display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* ── Quickplay řádek ────────────────────────────────────────────────────── */
.menu-row-play {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  width: min(240px, 80vw);
}
.menu-row-play .btn-primary { flex: 1; }

/* ── Tlačítka ────────────────────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
  border: none;
  border-radius: var(--radius-ui);
  color: var(--felt-dark);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 12px 24px;
  transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
  min-width: 160px;
  /* touch-friendly */
  min-height: 44px;
}
.btn-primary:hover  { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(201,168,76,0.4); }
.btn-primary:active { transform: translateY(0); filter: brightness(0.95); }

.btn-quickplay {
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: var(--radius-ui);
  color: var(--gold-light);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 0 14px;
  height: 44px;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-quickplay:hover { background: rgba(201,168,76,0.25); }

.btn-secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(201,168,76,0.28);
  border-radius: var(--radius-ui);
  color: var(--gold-light);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.87rem;
  letter-spacing: 0.05em;
  padding: 10px 24px;
  transition: background 0.15s, border-color 0.15s;
  min-width: 160px;
  min-height: 44px;
}
.btn-secondary:hover { background: rgba(201,168,76,0.1); border-color: var(--gold); }

.btn-back {
  background: transparent;
  border: 1px solid rgba(201,168,76,0.28);
  border-radius: var(--radius-ui);
  color: var(--gold-light);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.82rem;
  padding: 7px 16px;
  min-height: 36px;
  transition: background 0.15s;
}
.btn-back:hover { background: rgba(201,168,76,0.1); }

.btn-icon {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(201,168,76,0.22);
  border-radius: 50%;
  color: var(--gold-light);
  cursor: pointer;
  font-size: 1.1rem;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.btn-icon:hover { background: rgba(201,168,76,0.14); }

.btn-icon-sm {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 7px;
  color: var(--gold-light);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 5px 12px;
  min-height: 36px;
  transition: background 0.15s;
}
.btn-icon-sm:hover { background: rgba(201,168,76,0.12); }

.btn-danger {
  background: rgba(160,30,30,0.65);
  border: 1px solid #bb3333;
  border-radius: var(--radius-ui);
  color: #ffc8c8;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.88rem;
  padding: 10px 22px;
  min-height: 40px;
  transition: background 0.15s;
}
.btn-danger:hover { background: rgba(180,40,40,0.85); }

/* ══════════════════════════════════════════════════════════════════════════
   LOBBY
   ══════════════════════════════════════════════════════════════════════════ */
#screen-lobby {
  background: radial-gradient(ellipse at center, #1e5c38 0%, var(--felt-dark) 80%);
}

.lobby-header {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(201,168,76,0.18);
  flex-shrink: 0;
}
.lobby-header h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold);
  flex: 1;
  letter-spacing: 0.05em;
}

.lobby-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  gap: 12px;
  overflow: hidden;
  min-height: 0;
}

.server-table-wrap {
  flex: 1;
  overflow-y: auto;
  border: 1px solid rgba(201,168,76,0.18);
  border-radius: var(--radius-ui);
  min-height: 0;
}

#servers {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.98rem;
}
#servers thead tr { background: rgba(201,168,76,0.12); border-bottom: 1px solid rgba(201,168,76,0.25); }
#servers th { font-family: var(--font-display); font-size: 0.76rem; letter-spacing: 0.08em; padding: 9px 12px; text-align: left; color: var(--gold-light); }
#servers td { padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
#servers tbody tr { cursor: pointer; transition: background 0.1s; }
#servers tbody tr:hover { background: rgba(201,168,76,0.07); }
#servers tbody tr.rowselected { background: rgba(201,168,76,0.16); }

.lobby-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }

.lobby-input {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(201,168,76,0.28);
  border-radius: var(--radius-ui);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.97rem;
  padding: 8px 14px;
  outline: none;
  width: 150px;
  min-height: 40px;
  transition: border-color 0.15s;
}
.lobby-input:focus { border-color: var(--gold); }
.lobby-input::placeholder { color: var(--text-muted); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-box {
  background: linear-gradient(160deg, #1e3828, #0f2018);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 14px;
  box-shadow: var(--shadow-ui);
  padding: 26px 30px;
  min-width: 280px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-box.wide { width: min(520px, 96vw); }
.modal-box h3 { font-family: var(--font-display); font-size: 1.15rem; color: var(--gold); margin-bottom: 18px; letter-spacing: 0.05em; }

.form-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.form-row label { font-family: var(--font-display); font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.06em; min-width: 68px; }
.form-row input, .form-row select {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(201,168,76,0.28);
  border-radius: 6px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 6px 10px;
  flex: 1; outline: none;
  min-height: 36px;
}
.form-row select option { background: #1a3025; }
.modal-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ══════════════════════════════════════════════════════════════════════════
   HERNÍ PLOCHA  –  pokerový stůl
   ══════════════════════════════════════════════════════════════════════════ */
#screen-game {
  /* Vrstvené pozadí: eliptické osvětlení nad plstěným stolem */
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, var(--felt-mid) 0%, var(--felt-dark) 75%);
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}

/* ── Stůl – relativní kontejner pro absolutní pozicování oponentů ───────── */
#table-area {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Elipsa stolu – dekorativní okraj jako okraj pokerového stolu */
#table-area::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50% / 45%;
  border: 2px solid rgba(201,168,76,0.12);
  box-shadow:
    inset 0 0 60px rgba(0,0,0,0.3),
    0 0 30px rgba(0,0,0,0.4);
  pointer-events: none;
}

/* ── Střed stolu: balíčky + indikátor ───────────────────────────────────── */
#table-center {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 50px);
  z-index: 2;
  position: relative;
}

/* ── Balíček (Smolíž nebo Odhodiště) ─────────────────────────────────────── */
.pile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: transform 0.15s;
  position: relative;
}
.pile:hover { transform: translateY(-3px); }

/* Výška pile-area je pevná kvůli vrstvení karet */
.pile-area {
  position: relative;
  width: 80px;
  height: 125px;
}

.pile-card {
  position: absolute;
  width: 80px;
  height: 125px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

/* Rub karty – tmavě modrá s jemným vzorem */
.pile-back {
  background-color: #1e3f66;
  background-image:
    linear-gradient(145deg, rgba(42,90,138,0.9), rgba(24,58,94,0.9)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.06) 0px, rgba(255,255,255,0.06) 2px, transparent 2px, transparent 10px);
  border: 1px solid #5a8ab8;
}

.pile-label {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: center;
}

/* Vrchní karta na odhodišti – bez pozadí, vyplní ji sprite */
#deck-top-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

/* ── Indikátor tahu ───────────────────────────────────────────────────────── */
#game-info-center {
  text-align: center;
  min-width: 110px;
}

.turn-indicator {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--gold-light);
  margin-bottom: 5px;
  min-height: 1.2em;
}
.my-turn-text { color: var(--gold); animation: pulseTurn 1.2s ease-in-out infinite; }

@keyframes pulseTurn {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

#round-counter { font-size: 0.76rem; color: var(--text-muted); }

/* ── Oponenti – absolutně pozicovaní kolem stolu ──────────────────────────── */
.opponent {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  /* transform je nastaven z JS pro každého hráče zvlášť */
}

.opponent-name {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  /* rotace zpět nastavena z JS */
}
.opponent.on-turn .opponent-name { color: var(--gold); }
.opponent.suspended .opponent-name { color: #555; }
.susp-label { color: #555; }

/* Vějíř karet oponenta – stack karet rubem */
/* Vějíř karet oponenta – absolutně pozicované karty uvnitř */
.opp-fan {
  position: relative;
  width: 48px;
  height: 54px;
}

.opp-card {
  width: 32px;
  height: 48px;
  background-color: #1e3f66;
  background-image:
    linear-gradient(145deg, rgba(42,90,138,0.95), rgba(24,58,94,0.95)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.06) 0px, rgba(255,255,255,0.06) 1px, transparent 1px, transparent 8px);
  border: 1px solid #5a8ab8;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  position: absolute;
  transform-origin: bottom center;
}

.opponent.on-turn .opp-card {
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(201,168,76,0.5);
}

.opponent-count {
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--gold-light);
  /* rotace zpět nastavena z JS */
}

/* ══════════════════════════════════════════════════════════════════════════
   SPODNÍ LIŠTA – moje karty
   ══════════════════════════════════════════════════════════════════════════ */
#my-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 10px;
  background: rgba(0,0,0,0.28);
  border-top: 1px solid rgba(201,168,76,0.1);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

#my-hand {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 130px;
}

.hand-empty {
  font-style: italic;
  color: var(--text-muted);
  align-self: center;
  font-size: 0.9rem;
}

/**
 * .my-card-wrap – obal karty hráče
 *
 * KLÍČOVÉ pro opravu blikání hover efektu:
 *  - Padding dole vytváří "zónu" pod kartou
 *  - Kurzor nepřestane detekovat hover i když se karta posune nahoru
 *  - Samotný sprite uvnitř se nepohybuje – pohybuje se wrapper
 */
.my-card-wrap {
  position: relative;
  cursor: pointer;
  /* Padding-bottom = výška translateY → hover zone sahá dolů až tam */
  padding-bottom: 18px;
  transition: transform 0.14s ease;
  /* GPU vrstva zabrání glitch při transformaci */
  will-change: transform;
}
.my-card-wrap:hover { transform: translateY(-18px); }

/* Hratelná karta – zlatý zásvit */
.my-card-wrap.valid .card-sprite {
  box-shadow: var(--shadow-card), 0 0 10px rgba(201,168,76,0.6);
  border: 1px solid rgba(201,168,76,0.7);
  border-radius: var(--radius-card);
}
.my-card-wrap.valid:hover .card-sprite {
  box-shadow: var(--shadow-card), 0 0 20px rgba(201,168,76,1);
}

/* Nehratelná karta – ztlumená */
.my-card-wrap.invalid {
  cursor: not-allowed;
  opacity: 0.42;
}
.my-card-wrap.invalid:hover { transform: none; }

/* Sprite karty – čistý obrázek bez vlastního hover efektu */
.card-sprite {
  display: block;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  pointer-events: none; /* klik zachytí wrapper, ne sprite */
}

/* ── Ovládání pod kartami ───────────────────────────────────────────────── */
#my-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

#my-name-badge {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  min-width: 80px;
}

.ready-label {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  transition: color 0.15s;
  min-height: 36px;
}
.ready-label:hover { color: var(--gold-light); }
.ready-label input[type="checkbox"] { accent-color: var(--gold); width: 16px; height: 16px; }

/* ── Výsledkový banner ──────────────────────────────────────────────────── */
#result-banner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(160deg, rgba(18,46,28,0.97), rgba(9,22,14,0.97));
  border: 1px solid var(--gold-dark);
  border-radius: 14px;
  box-shadow: var(--shadow-ui);
  padding: 28px 44px;
  text-align: center;
  z-index: 50;
  animation: popIn 0.28s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes popIn {
  from { opacity: 0; transform: translate(-50%,-50%) scale(0.84); }
  to   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}
#result-text {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.5vw, 1.9rem);
  color: var(--gold);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
#result-sub { font-style: italic; color: var(--text-muted); font-size: 0.88rem; }

/* ── Flash animace odhodiště ──────────────────────────────────────────────── */
@keyframes cardFlash {
  0%   { box-shadow: var(--shadow-card); }
  40%  { box-shadow: var(--shadow-card), 0 0 22px rgba(201,168,76,0.9), 0 0 44px rgba(201,168,76,0.4); }
  100% { box-shadow: var(--shadow-card); }
}
.card-flash { animation: cardFlash 0.32s ease-out; }

/* ══════════════════════════════════════════════════════════════════════════
   PAUZA / STATISTIKY
   ══════════════════════════════════════════════════════════════════════════ */
.pause-header { display: flex; align-items: center; margin-bottom: 18px; }
.pause-header h3 { flex: 1; font-family: var(--font-display); font-size: 1.1rem; color: var(--gold); letter-spacing: 0.05em; }

.stats-summary { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.stat-chip {
  background: rgba(201,168,76,0.09);
  border: 1px solid rgba(201,168,76,0.22);
  border-radius: 8px;
  padding: 7px 12px;
  text-align: center;
  flex: 1; min-width: 54px;
}
.stat-chip span  { display: block; font-family: var(--font-display); font-size: 1.25rem; color: var(--gold-light); }
.stat-chip small { font-size: 0.68rem; color: var(--text-muted); letter-spacing: 0.06em; }

.stats-table { width: 100%; border-collapse: collapse; font-family: var(--font-body); font-size: 0.93rem; }
.stats-table th { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--gold-light); padding: 7px 8px; border-bottom: 1px solid rgba(201,168,76,0.18); text-align: left; }
.stats-table td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.stats-table tbody tr:nth-child(1) td { color: #ffd700; }
.stats-table tbody tr:nth-child(2) td { color: #c0c0c0; }
.stats-table tbody tr:nth-child(3) td { color: #cd7f32; }

.pause-actions { margin-top: 18px; text-align: center; }

/* ══════════════════════════════════════════════════════════════════════════
   OVERLAY SCREENY (Nastavení, Tutorial, Skóre)
   ══════════════════════════════════════════════════════════════════════════ */
.overlay-header { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid rgba(201,168,76,0.16); flex-shrink: 0; }
.overlay-header h2 { font-family: var(--font-display); font-size: 1.25rem; color: var(--gold); letter-spacing: 0.04em; }

.overlay-body { flex: 1; padding: 22px 20px; overflow-y: auto; max-width: 680px; margin: 0 auto; width: 100%; }

.tutorial-text h3 { font-family: var(--font-display); color: var(--gold-light); font-size: 0.98rem; margin: 18px 0 7px; letter-spacing: 0.05em; }
.tutorial-text p  { margin-bottom: 10px; line-height: 1.65; color: var(--text-main); }
.tutorial-text strong { color: var(--gold-light); }
.tutorial-text ul { margin: 0 0 10px 20px; line-height: 1.7; color: var(--text-main); }

.card-order { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 10px 0; }
.co-card { background: var(--card-bg); color: #1a1a1a; border: 1px solid var(--card-border); border-radius: 5px; font-family: var(--font-display); font-size: 0.88rem; padding: 3px 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.4); }
.co-arrow { color: var(--gold-dark); font-size: 0.8rem; }

#screen-score, #screen-settings, #screen-tutorial {
  background: radial-gradient(ellipse at center, #1a3a28 0%, var(--felt-dark) 80%);
}

/* ══════════════════════════════════════════════════════════════════════════
   MOBIL  –  úpravy pro dotykové obrazovky
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  /* Menu */
  .menu-logo { font-size: clamp(44px, 14vw, 72px); }
  .menu-subtitle { font-size: 0.9rem; margin-bottom: 24px; }
  .menu-buttons { gap: 8px; }
  .btn-primary, .btn-secondary { min-width: 200px; font-size: 1rem; padding: 13px 20px; }

  /* Lobby */
  #servers th, #servers td { padding: 8px 8px; font-size: 0.85rem; }

  /* Herní plocha – menší poloměr kruhu aby se vešli hráči */
  #table-area { min-height: 200px; }

  /* Balíčky trochu menší */
  .pile-area { width: 62px; height: 96px; }
  .pile-card  { width: 62px; height: 96px; }

  /* Karty hráče na mobilu – trochu menší pro vejití více karet */
  .my-card-wrap:hover { transform: translateY(-14px); }
  .my-card-wrap { padding-bottom: 14px; }

  /* Spodní lišta */
  #my-area { padding: 6px 8px 8px; }
  #my-hand  { min-height: 110px; gap: 4px; }
  #my-controls { gap: 10px; }
}

@media (max-width: 380px) {
  .menu-logo { font-size: 40px; }
  #my-hand { gap: 3px; }
}

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(201,168,76,0.28); border-radius: 3px; }

/* ══════════════════════════════════════════════════════════════════════════
   v4 – Nové styly
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Animace letící karty ───────────────────────────────────────────────── */
.card-fly {
  border-radius: var(--radius-card);
  box-shadow: 0 8px 24px rgba(0,0,0,0.7);
}

/* Rub letící karty */
.card-fly-back {
  width: 74px;
  height: 116px;
  background-color: #1e3f66;
  background-image:
    linear-gradient(145deg, rgba(42,90,138,0.95), rgba(24,58,94,0.95)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.06) 0px, rgba(255,255,255,0.06) 2px, transparent 2px, transparent 10px);
  border: 1px solid #5a8ab8;
  border-radius: var(--radius-card);
}

/* ── Nastavení ──────────────────────────────────────────────────────────── */
.settings-section {
  margin-bottom: 24px;
}
.settings-section h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--gold-light);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(201,168,76,0.15);
}

.setting-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: var(--radius-ui);
  transition: background 0.15s;
}
.setting-row:hover { background: rgba(201,168,76,0.06); }
.setting-row input[type="checkbox"] {
  accent-color: var(--gold);
  width: 18px; height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.setting-label {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--text-main);
  letter-spacing: 0.04em;
}
.setting-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
  line-height: 1.4;
}
/* Flex column pro label + desc */
.setting-row > span { display: flex; flex-direction: column; }

/* ── Karta: "clickable" bez zvýraznění (highlight vypnut) ───────────────── */
.my-card-wrap.clickable {
  cursor: pointer;
}
.my-card-wrap.clickable:hover { transform: translateY(-18px); }

/* ── Rozšířená stats tabulka – nové sloupce ─────────────────────────────── */
.stats-table th:nth-child(5),
.stats-table td:nth-child(5) {
  text-align: center;
  color: var(--gold-light);
}
.stats-table th:nth-child(6),
.stats-table td:nth-child(6) {
  text-align: center;
  color: var(--text-muted);
}

/* ── stat-chip přizpůsobení pro více chipu ────────────────────────────────  */
.stats-summary { flex-wrap: wrap; }
.stat-chip     { min-width: 48px; }

/* ══════════════════════════════════════════════════════════════════════════
   v5 – Nové styly
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Karta mimo tah hráče – ztlumená ───────────────────────────────────── */
.my-card-wrap.not-my-turn {
  opacity: 0.55;
  cursor: default;
  filter: brightness(0.7);
}
.my-card-wrap.not-my-turn:hover { transform: none; }

/* ── Nastavení: radio skupina pro rychlost animace ─────────────────────── */
.setting-radio-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.setting-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 7px 14px;
  border: 1px solid rgba(201,168,76,0.22);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.setting-radio:hover { background: rgba(201,168,76,0.07); color: var(--gold-light); }
.setting-radio input[type="radio"] { accent-color: var(--gold); }
.setting-radio:has(input:checked) {
  background: rgba(201,168,76,0.12);
  border-color: var(--gold-dark);
  color: var(--gold-light);
}

/* ── Nastavení: select pro sadu karet ──────────────────────────────────── */
.setting-select {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(201,168,76,0.28);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.97rem;
  padding: 7px 12px;
  outline: none;
  width: 100%;
  max-width: 280px;
  margin-top: 4px;
}
.setting-select option { background: #1a3025; }
.setting-select option:disabled { color: var(--text-dim); }

/* ── Konfety ────────────────────────────────────────────────────────────── */
.confetti-piece {
  /* pozicování a animace se nastavuje přes JS */
  border-radius: 2px;
}

/* ══════════════════════════════════════════════════════════════════════════
   v6 – Nové styly
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Fullscreen layout ───────────────────────────────────────────────────── */

/* Herní plocha se roztáhne na celý viewport na širších obrazovkách */
#screen-game {
  /* grid je definován výše, jen doplníme lepší proporce */
  height: 100dvh; /* dynamic viewport height – funguje i na mobilu s adresním řádkem */
}

/* Stůl dostane maximum z dostupné výšky */
#table-area {
  flex: 1 1 0;
  min-height: 0;
}

/* Na desktopu (≥1024px) – větší karty a větší poloměr kruhu */
@media (min-width: 1024px) {
  #my-hand {
    min-height: 150px;
    gap: 8px;
  }

  /* Větší balíčky uprostřed stolu */
  .pile-area { width: 90px; height: 140px; }
  .pile-card  { width: 90px; height: 140px; }

  #game-info-center { min-width: 140px; }
  .turn-indicator   { font-size: 0.95rem; }
}

/* Na velkých obrazovkách (≥1440px) – ještě větší */
@media (min-width: 1440px) {
  .pile-area { width: 100px; height: 156px; }
  .pile-card  { width: 100px; height: 156px; }
}

/* Menu logo – easter egg kurzor */
.menu-logo { cursor: default; }
.menu-logo:active { opacity: 0.85; }

/* ── Lobby metadata v pause menu ────────────────────────────────────────── */
.pause-lobby-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 12px;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.18);
  border-radius: 8px;
  flex-wrap: wrap;
}

.plm-name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold-light);
  letter-spacing: 0.04em;
}
.plm-mode {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.plm-players {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.plm-sep { color: var(--gold-dark); font-size: 0.8rem; }

/* ── Admin panel ─────────────────────────────────────────────────────────── */
.admin-box {
  max-height: 85vh;
  overflow-y: auto;
}

.admin-server-info {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.admin-server-info strong { color: var(--gold-light); }

.admin-section-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.admin-lobby-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.admin-lobby-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  flex-wrap: wrap;
}

.admin-lobby-name {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--text-main);
  flex: 1;
  min-width: 100px;
}

.admin-lobby-info {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.admin-lobby-actions {
  display: flex;
  gap: 6px;
}

.btn-admin-sm {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.78rem;
  padding: 4px 10px;
  transition: background 0.15s;
}
.btn-admin-sm:hover      { background: rgba(255,255,255,0.13); }
.btn-admin-sm.danger     { border-color: rgba(180,40,40,0.5); color: #ffc0c0; }
.btn-admin-sm.danger:hover { background: rgba(180,40,40,0.25); }

.admin-npc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
  flex-wrap: wrap;
}

.admin-input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(201,168,76,0.28);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.9rem;
  padding: 4px 8px;
  width: 60px;
  outline: none;
  text-align: center;
}

.admin-empty {
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 8px 0;
}

.admin-feedback {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: #7ecf7e;
  letter-spacing: 0.05em;
}
