/* UNO — стили веб-интерфейса */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --felt-1: #1b5e3a;
  --felt-2: #0d3b24;
  --panel: rgba(0, 0, 0, 0.38);
  --panel-light: rgba(255, 255, 255, 0.08);
  --gold: #ffcc4d;
  --text: #f4f1e8;
  --muted: #b8c4b6;
  --card-w: 92px;
  --card-h: 138px;
  --red: #ed1c24;
  --yellow: #ffdd00;
  --green: #00a651;
  --blue: #0072bc;
  --black: #141414;
}

html, body { height: 100%; }

/* овал игрового поля: рисуется клиентом по реальным позициям игроков */
.table-oval {
  position: fixed;
  border-style: solid;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1; /* внутри stacking context .game: под картами, над фоном страницы */
  transition: left 0.25s ease, top 0.25s ease, width 0.25s ease, height 0.25s ease;
  opacity: 0;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 700px at 50% 20%, var(--felt-1), var(--felt-2) 75%);
  min-height: 100vh;
}

#root { min-height: 100vh; display: flex; flex-direction: column; }

button {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  color: #1c1c1c;
  background: var(--gold);
  font-weight: 600;
  transition: transform 0.12s ease, filter 0.12s ease;
}
button:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.ghost {
  background: var(--panel-light);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

input[type="text"],
input[type="password"] {
  font: inherit;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  outline: none;
  width: 100%;
}
input[type="text"]:focus,
input[type="password"]:focus { border-color: var(--gold); }

/* --------------------------- Вход / аккаунт ------------------------- */

.auth-bar {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.auth-title { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.auth-row { display: flex; gap: 8px; margin-bottom: 8px; }
.auth-row input { flex: 1; }
.auth-row .small { flex: 1; padding: 8px 0; font-size: 14px; }
.auth-error { color: #ff9d9d; font-size: 13px; margin-bottom: 6px; }
.auth-bar.logged { display: flex; align-items: center; gap: 10px; }
.auth-bar.logged .who { font-size: 14px; }
.auth-bar.logged .spacer { flex: 1; }
.auth-bar.logged .small { flex: none; padding: 7px 14px; font-size: 13px; }

button.small { padding: 7px 14px; font-size: 13px; }

/* --------------------------- Модалка статистики --------------------- */

.stats-modal {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 26px 30px;
  width: min(560px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
  backdrop-filter: blur(6px);
}
.stats-modal h2 { margin-bottom: 14px; }
.stats-modal h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 18px 0 8px;
}
.stats-grid { display: flex; gap: 10px; }
.stats-grid > div {
  flex: 1;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 12px 6px;
}
.stats-grid b { display: block; font-size: 26px; color: var(--gold); }
.stats-grid span { font-size: 12px; color: var(--muted); }

.stats-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stats-table th, .stats-table td { padding: 6px 8px; text-align: left; }
.stats-table th { color: var(--muted); font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.18); }
.stats-table tr.me-row td { color: var(--gold); font-weight: 600; }
.modal-actions { margin-top: 20px; text-align: right; }

/* ------------------------- Выбор фона стола ------------------------- */

.bg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.bg-card {
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 6px;
  cursor: pointer;
  text-align: center;
  background: rgba(0, 0, 0, 0.25);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.bg-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.3); }
.bg-card.selected { border-color: var(--gold); box-shadow: 0 0 12px rgba(255, 204, 77, 0.5); }
.bg-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.bg-thumb.felt { background: radial-gradient(120% 90% at 50% 20%, #1b5e3a, #0d3b24 75%); }
.bg-name { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ------------------------------ Лобби ------------------------------ */

.lobby {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lobby-card {
  width: min(560px, 100%);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 32px;
  backdrop-filter: blur(6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.lobby-logo {
  text-align: center;
  margin-bottom: 6px;
  font-size: 56px;
  font-weight: 900;
  letter-spacing: 6px;
  font-style: italic;
  text-shadow: 0 4px 0 #b3001b, 0 8px 24px rgba(0, 0, 0, 0.6);
}
.lobby-logo span { color: var(--gold); }
.lobby-sub { text-align: center; color: var(--muted); margin-bottom: 26px; }

.lobby label { display: block; margin: 14px 0 6px; color: var(--muted); font-size: 14px; }

.bot-row { display: flex; gap: 8px; margin-top: 6px; }
.bot-row button { flex: 1; padding: 8px 0; background: var(--panel-light); color: var(--text); border: 1px solid rgba(255,255,255,0.25); }
.bot-row button.active { background: var(--gold); color: #1c1c1c; }

.lobby-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.lobby-actions button { padding: 13px; font-size: 16px; }

.lobby .error { color: #ff9d9d; margin-top: 12px; min-height: 20px; text-align: center; }

.room-info {
  margin-top: 20px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  font-size: 14px;
}
.room-info .link { color: var(--gold); word-break: break-all; user-select: all; }
.room-info ul { margin: 8px 0 0 18px; }

.hint { color: var(--muted); font-size: 13px; margin-top: 8px; }

/* ------------------------------ Игра ------------------------------- */
/* Стол: соперники по периметру (absolute на desktop), центр с колодой и
   сбросом, рука веером снизу. Лог — выдвижная шторка справа. */

.game {
  flex: 1;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas:
    "top"
    "rivals"
    "center"
    "hand";
  gap: 10px;
  padding: 14px 18px 18px;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
}

.game-header {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 14px;
}
.game-header .title { font-weight: 800; font-size: 22px; letter-spacing: 3px; font-style: italic; }
.game-header .title span { color: var(--gold); }
.game-header .title .gid { color: var(--muted); font-size: 12px; letter-spacing: 0; font-style: normal; }
.game-header .status { color: var(--muted); font-size: 14px; }
.header-actions { display: flex; gap: 8px; margin-left: auto; }

/* --------------------------- Шторка лога ---------------------------- */

.log-panel {
  position: fixed;
  top: 74px;
  right: 14px;
  bottom: 96px;
  width: min(320px, 86vw);
  background: rgba(8, 12, 10, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 12px;
  overflow-y: auto;
  font-size: 13px;
  z-index: 45;
  transform: translateX(calc(100% + 24px));
  transition: transform 0.25s ease;
}
.log-panel.open { transform: none; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); }
.log-panel h3 { font-size: 14px; margin-bottom: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.log-panel ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.log-panel li { color: #dfe6da; line-height: 1.35; }

/* --------------------------- Соперники ------------------------------ */
/* Базово (и на мобильных) — ряд сверху; на desktop (>=901px) — места
   по периметру стола с поворотом вееров, см. media ниже. */

.opponents {
  grid-area: rivals;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.opponent {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 16px 12px;
  border-radius: 14px;
  background: var(--panel);
  border: 3px solid transparent;
  transition: border-color 0.2s ease;
}

.opponent .avatar {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}
.av-purple { background: #7d44b8; }
.av-orange { background: #d97a1e; }
.av-yellow { background: #cfae14; }
.av-green  { background: #2e9e4f; }
.av-blue   { background: #2f7fd1; }
.av-red    { background: #d33b3b; }

.opponent .name {
  font-weight: 600;
  display: flex; gap: 6px; align-items: center;
  background: rgba(255, 255, 255, 0.14);
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 14px;
}
.opponent .badge {
  font-size: 10px; padding: 2px 6px; border-radius: 6px;
  background: rgba(0, 150, 255, 0.4);
}

.opponent .fan-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.opponent .fan { display: flex; }
.opponent .fan img {
  width: 34px; height: 51px; border-radius: 4px;
  border: 1.5px solid #222;
  margin-left: -18px;
  box-shadow: 0 2px 5px rgba(0,0,0,.5);
}
.opponent .fan img:first-child { margin-left: 0; }

/* счётчик карт — бейдж на веере */
.opponent .fan-badge {
  position: absolute; right: -14px; bottom: -6px;
  min-width: 24px; height: 24px; border-radius: 999px;
  background: var(--gold); color: #1c1c1c;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* активный игрок: свечение аватара и имя-плашка */
.opponent.current { border-color: rgba(255, 204, 77, 0.7); }
.opponent.current .avatar { border-color: var(--gold); animation: avatarPulse 1.2s ease-in-out infinite; }
.opponent.current .name { background: var(--gold); color: #1c1c1c; }
@keyframes avatarPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 204, 77, 0.4); }
  50%      { box-shadow: 0 0 22px rgba(255, 204, 77, 0.95); }
}

.turn-indicator {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #1c1c1c;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Desktop: соперники сидят по периметру стола — позиции и поворот вееров
   рассчитывает клиент по углу места (см. useSeatRing / seatAngles в app.jsx) */
@media (min-width: 901px) {
  .opponents { display: contents; }

  .opponent {
    position: absolute;
    background: transparent;
    border: none;
    padding: 6px;
    z-index: 3;
  }
  .opponent.current { border: none; }

  /* квадратный бокс под веер — одинаков для любого угла места */
  .opponent .fan-box { width: 140px; height: 140px; }
  .opponent .fan { transform: rotate(var(--fanrot, 0deg)); }
}

/* ---------------------------- Центр стола -------------------------- */

.table-center {
  grid-area: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 54px;
  position: relative;
  min-height: 0;
}

/* свечение-ореол под центром, тонируется активным цветом */
.table-center::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: min(760px, 92vw);
  height: min(400px, 60vh);
  transform: translate(-50%, -50%);
  background: radial-gradient(50% 50% at 50% 50%, var(--glow, rgba(150, 195, 255, 0.18)), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.table-center.glow-red    { --glow: rgba(237, 28, 36, 0.15); }
.table-center.glow-yellow { --glow: rgba(255, 221, 0, 0.12); }
.table-center.glow-green  { --glow: rgba(0, 166, 81, 0.15); }
.table-center.glow-blue   { --glow: rgba(0, 114, 188, 0.20); }

.pile { position: relative; text-align: center; }
.pile.draw { z-index: 2; }
.pile img {
  width: var(--card-w); height: var(--card-h);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0,0,0,.55);
  border: 2px solid #222;
}

/* стопка колоды: две «рубашки» позади верхней карты */
.pile.draw::before, .pile.draw::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: var(--card-w); height: var(--card-h);
  border-radius: 10px;
  border: 2px solid #222;
  background: #191919 url("/assets/cards/back.jpg") center / cover no-repeat;
  box-shadow: 0 8px 22px rgba(0,0,0,.55);
  z-index: -1;
}
.pile.draw::before { transform: translate(5px, -6px) rotate(2deg); }
.pile.draw::after  { transform: translate(10px, -12px) rotate(4deg); }

.pile.draw img { cursor: default; }
.pile.draw.can-take img { cursor: pointer; outline: 3px solid var(--gold); }
.pile.draw.can-take img:hover { outline-color: #fff; transform: translateY(-3px); }
.pile .label { margin-top: 6px; color: var(--muted); font-size: 13px; }

/* подсказка у колоды: появляется, когда можно взять карту */
.deck-hint {
  margin-top: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  animation: hintPulse 1.1s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* кнопка паса рядом с колодой, видна только когда пас возможен */
.pass-btn { margin-top: 10px; padding: 9px 22px; font-size: 14px; animation: hintPulse 1.6s ease-in-out infinite; }

/* --------- зона сброса: кучка карт + кольцо направления --------- */

.discard-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}
.pile.discard {
  width: calc(var(--card-w) * 1.15);
  height: calc(var(--card-h) * 1.15);
}
.pile.discard .stack-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  border: 2px solid #222;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}
.discard-zone .label { margin-top: 10px; color: var(--muted); font-size: 13px; position: relative; z-index: 25; }

.color-ring { position: absolute; inset: -8px; border-radius: 14px; pointer-events: none; z-index: 20; }
.color-ring.red { box-shadow: 0 0 0 4px var(--red), 0 0 26px rgba(237,28,36,.8); }
.color-ring.yellow { box-shadow: 0 0 0 4px var(--yellow), 0 0 26px rgba(255,221,0,.8); }
.color-ring.green { box-shadow: 0 0 0 4px var(--green), 0 0 26px rgba(0,166,81,.8); }
.color-ring.blue { box-shadow: 0 0 0 4px var(--blue), 0 0 26px rgba(0,114,188,.8); }

/* вращающееся кольцо направления вокруг сброса */
.turn-ring {
  position: absolute;
  left: 50%;
  top: calc(var(--card-h) * 0.575); /* центр верхней карты зоны */
  width: 264px; height: 264px;
  margin: -132px 0 0 -132px;
  pointer-events: none;
  z-index: 1;
}
.turn-ring svg { width: 100%; height: 100%; display: block; animation: ringSpin 9s linear infinite; }
.turn-ring.ccw svg { animation-direction: reverse; }
.turn-ring .arc {
  fill: none;
  stroke: #9fd8ff;
  stroke-width: 5;
  stroke-linecap: round;
  opacity: 0.85;
  filter: drop-shadow(0 0 6px rgba(130, 200, 255, 0.9));
}
.turn-ring .head { fill: #9fd8ff; opacity: 0.85; filter: drop-shadow(0 0 6px rgba(130, 200, 255, 0.9)); }
@keyframes ringSpin { to { transform: rotate(360deg); } }

/* Летящая карта: стартует с лёгким наклоном, transform задаёт полёт до сброса */
.fly-card {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  transform: translate(0, 0) rotate(-8deg);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.3, 1);
  will-change: transform;
}
.fly-card img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 10px;
  border: 2px solid #1d1d1d;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}

/* взятая из колоды карта скрыта в руке, пока летит с колоды на своё место */
.hand .card.drawn-hide img { visibility: hidden; }
@keyframes dropIn { from { transform: translateY(-18px) rotate(-4deg); opacity: .4; } to { transform: none; opacity: 1; } }

/* ------------------------------ Рука -------------------------------- */

.hand-area { grid-area: hand; text-align: center; min-width: 0; }

.turn-banner {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
  min-height: 24px;
}
.turn-banner .me { color: var(--gold); }

.hand {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: calc(var(--card-h) + 56px);
  padding: 44px 10px 16px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: visible;
}

/* веер: поворот и подъём задаются CSS-переменными из JSX;
   центр руки выше, крайние карты наклонены к столу */
.hand .card {
  flex: 0 0 auto;
  margin-left: -34px;
  border-radius: 10px;
  transform: rotate(var(--rot, 0deg)) translateY(var(--lift, 0px));
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.hand .card:first-child { margin-left: 0; }
.hand .card img {
  width: var(--card-w);
  height: var(--card-h);
  display: block;
  border-radius: 10px;
  border: 2px solid #1d1d1d;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.hand .card.playable { cursor: pointer; }
.hand .card.playable img { border-color: var(--gold); box-shadow: 0 4px 16px rgba(255, 204, 77, 0.45); }
.hand .card.playable:hover { transform: translateY(-34px) rotate(0deg) scale(1.06); z-index: 5; }
.hand .card.dimmed img { filter: brightness(0.55) saturate(0.7); }

.hand-actions { margin-top: 4px; display: flex; gap: 10px; justify-content: center; align-items: center; min-height: 46px; flex-wrap: wrap; }

/* кнопки сортировки руки */
.sort-controls { display: flex; gap: 8px; }
.sort-controls .ghost.small { padding: 7px 12px; font-size: 13px; }
.sort-controls .ghost.on {
  background: var(--gold);
  border-color: var(--gold);
  color: #1c1c1c;
  font-weight: 700;
}

/* --------------------------- UNO-кнопка ----------------------------- */

.uno-btn {
  position: fixed;
  left: 16px; bottom: 16px;
  z-index: 30;
  width: 64px; height: 96px;
  padding: 0;
  border-radius: 10px;
  background:
    radial-gradient(75% 55% at 50% 50%, var(--red) 0%, #a50f16 68%, rgba(0, 0, 0, 0) 69%)
    #161616;
  border: 2px solid #000;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
  color: #fff;
  font-weight: 900;
  font-style: italic;
  font-size: 19px;
  letter-spacing: 0.5px;
  text-shadow: 1px 2px 0 #6d0810;
  transform: rotate(-8deg);
}
.uno-btn.hot { animation: unoPulse 1s ease-in-out infinite; }
@keyframes unoPulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55); transform: rotate(-8deg) scale(1); }
  50%      { box-shadow: 0 0 26px rgba(255, 204, 77, 0.9); transform: rotate(-8deg) scale(1.06); }
}

.uno-flash {
  position: fixed;
  left: 50%; top: 38%;
  z-index: 70;
  transform: translate(-50%, -50%);
  font-size: clamp(64px, 14vw, 120px);
  font-weight: 900;
  font-style: italic;
  color: var(--gold);
  text-shadow: 0 6px 0 #b3001b, 0 12px 34px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  animation: unoPop 0.95s ease forwards;
}
@keyframes unoPop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(-6deg); }
  22%  { opacity: 1; transform: translate(-50%, -50%) scale(1.12) rotate(2deg); }
  70%  { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25) rotate(0deg); }
}

/* --------------------------- Выбор цвета ---------------------------- */

.overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
}
.color-picker {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 18px;
  padding: 28px 34px;
  text-align: center;
  backdrop-filter: blur(6px);
}
.color-picker h3 { margin-bottom: 18px; }
.color-grid { display: flex; gap: 16px; }
.color-swatch {
  width: 64px; height: 64px; border-radius: 14px;
  border: 3px solid rgba(255,255,255,0.4);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.color-swatch:hover { transform: scale(1.12); border-color: #fff; }
.color-swatch.red { background: var(--red); }
.color-swatch.yellow { background: var(--yellow); }
.color-swatch.green { background: var(--green); }
.color-swatch.blue { background: var(--blue); }

/* ------------------------------ Победа ------------------------------ */

.winner-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.75);
  display: flex; align-items: center; justify-content: center;
}
.winner-card {
  background: var(--panel);
  border: 1px solid rgba(255, 204, 77, 0.5);
  border-radius: 20px;
  padding: 40px 56px;
  text-align: center;
  backdrop-filter: blur(8px);
  animation: dropIn 0.4s ease;
}
.winner-card .emoji { font-size: 64px; }
.winner-card h2 { margin: 12px 0 4px; font-size: 30px; }
.winner-card p { color: var(--muted); margin-bottom: 22px; }

/* ---------------------------- Адаптивность -------------------------- */

@media (max-width: 900px) {
  .game { grid-template-columns: 1fr; }
  .log-panel { top: 64px; }
  :root { --card-w: 72px; --card-h: 108px; }
  .table-center { gap: 30px; }
  .hand { padding-top: 30px; }
  /* на узких экранах веер выключаем — остаётся прокручиваемый ряд */
  .hand .card { margin-left: -30px; transform: none; }
  .hand .card.playable:hover { transform: translateY(-14px) scale(1.04); }
  .turn-ring { width: 200px; height: 200px; margin: -100px 0 0 -100px; }
  .uno-btn { width: 52px; height: 78px; font-size: 15px; left: 10px; bottom: 10px; }
}
