/* ═══════════════════════════════════════════════════
   ДУРАК ОНЛАЙН — Game Table Stylesheet
   ═══════════════════════════════════════════════════ */

/* ══════════════════════════════════════
   GAME LAYOUT (screen-game)
══════════════════════════════════════ */
#screen-game {
  background: radial-gradient(ellipse at 50% 40%, #1b5e20, #0f3a14 60%, #0a2a0d);
  flex-direction: column;
  /* position: relative убран — наследуем position: absolute; inset: 0 из .screen */
  /* overflow: visible — чтобы hover-подъём карт не обрезался */
  overflow: visible;
  /* визуальный overflow запрещаем через clip на html/body */

  /* ── Масштабируемые размеры карт ── */
  --card-w:      clamp(62px, 5vw, 140px);
  --card-h:      clamp(88px, 7.1vw, 196px);
  --card-r:      clamp(7px,  0.6vw, 14px);
  --c-rank:      clamp(13px, 1.1vw, 26px);
  --c-suit:      clamp(10px, 0.85vw, 19px);
  --c-center:    clamp(22px, 2.2vw, 54px);
  --card-pad:    clamp(3px,  0.28vw, 7px);
  --deck-w:      clamp(65px, 5.2vw, 145px);
  --deck-h:      clamp(90px, 7.3vw, 200px);
  --pair-w:      clamp(68px, 5.6vw, 154px);
  --pair-h:      clamp(100px, 8.2vw, 220px);
  --opp-card-w:  clamp(26px, 2.1vw, 54px);
  --opp-card-h:  clamp(38px, 3vw,   76px);
}
.game-wrap {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  /* нижняя строка — auto: берёт ровно столько, сколько нужно карте + hover-зазор */
  grid-template-rows: 15% 1fr auto;
  gap: 0;
  padding: 6px;
  box-sizing: border-box;
  /* overflow НЕ hidden — иначе hover карт обрезается */
  overflow: visible;
}

/* ── Felt texture overlay ── */
#screen-game::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='4' height='4' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='4' height='4' fill='none'/%3E%3Ccircle cx='1' cy='1' r='0.5' fill='rgba(0,80,0,0.25)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}
.game-wrap { position: relative; z-index: 1; }

/* ══════════════════════════════════════
   OPPONENTS ROW (top)
══════════════════════════════════════ */
.opponents-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 4px;
  flex-shrink: 0;
  flex-wrap: wrap;
  overflow: visible;
  height: 100%;
  min-height: 0;
}
.opponent-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 80px;
  max-width: 140px;
}
.opp-name-bar {
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #e0e0e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.opp-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.3);
}
.opp-name-bar.is-turn { border-color: #ffd700; color: #ffd700; box-shadow: 0 0 8px rgba(255,215,0,0.4); }
.opp-name-bar.is-defender { border-color: #ef5350; color: #ef5350; }
.opp-hand-row {
  display: flex;
  justify-content: center;
}
.opp-card {
  width: var(--opp-card-w);
  height: var(--opp-card-h);
  background: linear-gradient(135deg, #283593, #1a237e);
  border: 1px solid #3949ab;
  border-radius: clamp(3px, 0.3vw, 7px);
  margin-left: clamp(-14px, -1.1vw, -6px);
  box-shadow: 1px 2px 4px rgba(0,0,0,0.5);
  flex-shrink: 0;
}
.opp-card:first-child { margin-left: 0; }
.opp-count-badge {
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

/* ══════════════════════════════════════
   CENTER ROW
══════════════════════════════════════ */
.center-row {
  display: grid;
  grid-template-columns: clamp(100px, 8.5vw, 200px) 1fr clamp(110px, 9.5vw, 210px);
  gap: 8px;
  align-items: stretch;
  height: 100%;
  min-height: 0;
  overflow: visible;
  padding: 4px 2px;
}
@media (max-width: 480px) {
  .game-wrap { grid-template-rows: 12% 1fr auto; }
  .center-row { grid-template-columns: clamp(70px, 18vw, 90px) 1fr clamp(80px, 20vw, 100px); gap: 4px; }
}

/* ── Deck zone ── */
.deck-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.deck-pile {
  position: relative;
  width: var(--deck-w);
  height: var(--deck-h);
}
/* Deck disappears when empty */
.deck-pile.deck-gone {
  display: none;
}
.deck-pile::before,
.deck-pile::after {
  content: '';
  position: absolute;
  width: calc(var(--deck-w) - 2px);
  height: calc(var(--deck-h) - 2px);
  background: linear-gradient(135deg, #283593, #1a237e);
  border: 1px solid #3949ab;
  border-radius: var(--card-r);
  box-shadow: 1px 2px 4px rgba(0,0,0,0.5);
}
.deck-pile::before { top: 4px; left: 2px; }
.deck-pile::after  { top: 2px; left: 1px; }
/* Trump card lays sideways */
#trump-bottom {
  position: absolute;
  bottom: calc(var(--deck-w) * -0.28);
  left: 50%;
  transform: translateX(-50%) rotate(90deg);
  transform-origin: center;
  z-index: 3;
  width: var(--card-w);
  height: var(--card-h);
}
.deck-num {
  position: absolute;
  bottom: -22px;
  right: -8px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 700;
  z-index: 10;
}

.discard-zone {
  width: var(--card-w);
  height: var(--card-h);
  position: relative;
  overflow: visible;
  flex-shrink: 0;
}
/* Empty state — dashed outline placeholder */
.discard-zone.empty {
  background: rgba(0,0,0,0.18);
  border: 2px dashed rgba(255,255,255,0.12);
  border-radius: var(--card-r);
}
.discard-top {
  position: absolute;
  inset: 0;
  overflow: visible;
}
/* Stack shadow behind top card */
.discard-zone:not(.empty)::before,
.discard-zone:not(.empty)::after {
  display: none; /* cards are rendered individually now */
}
/* Individual discard cards */
.discard-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  pointer-events: none;
}
.discard-label {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.trump-label {
  font-size: clamp(22px, 2vw, 44px);
  text-align: center;
  text-shadow: 0 0 10px currentColor;
  margin-top: clamp(16px, 1.5vw, 32px);
}

/* ── Field zone (playing area) ── */
.field-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px;
  height: 100%;
  min-height: 0;
  overflow: visible;
}
.field-msg {
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  font-style: italic;
  text-align: center;
}
.table-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
/* Attack-defense pair */
.table-pair {
  position: relative;
  width: var(--pair-w);
  height: var(--pair-h);
  flex-shrink: 0;
}
.table-pair .att-card {
  position: absolute;
  top: 0; left: 0;
}
.table-pair .def-card {
  position: absolute;
  top: clamp(12px, 1vw, 24px);
  left: clamp(10px, 0.9vw, 22px);
  z-index: 2;
}

/* ── Status zone ── */
.status-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding-top: 4px;
}
.turn-badge {
  position: absolute;
  top: clamp(8px, 1vw, 16px);
  right: clamp(10px, 1.2vw, 20px);
  z-index: 20;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 8px;
  padding: clamp(5px, 0.5vw, 12px) clamp(7px, 0.7vw, 16px);
  font-size: clamp(11px, 0.9vw, 18px);
  font-weight: 700;
  text-align: center;
  color: #ffd700;
  line-height: 1.4;
  white-space: pre-line;
  max-width: clamp(130px, 12vw, 220px);
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.action-btns-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1vw, 20px);
  padding: 2px 0;
}
.turn-status {
  font-size: clamp(12px, 1.1vw, 17px);
  font-weight: 700;
  padding: clamp(5px, 0.5vw, 10px) clamp(10px, 1vw, 18px);
  border-radius: 8px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.turn-status.my-turn {
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.5);
  color: #ffd700;
}
.turn-status.opp-turn {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.55);
}
.game-btn {
  min-width: clamp(100px, 10vw, 200px);
  padding: clamp(7px, 0.7vw, 14px) clamp(14px, 1.4vw, 28px);
  border-radius: 8px;
  font-size: clamp(12px, 1vw, 16px);
  font-weight: 700;
  transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.take-btn {
  background: linear-gradient(135deg, #c62828, #e53935);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
.take-btn:hover { filter: brightness(1.15); transform: scale(1.04); }
.pass-btn {
  background: linear-gradient(135deg, #1565c0, #1976d2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
.pass-btn:hover { filter: brightness(1.15); transform: scale(1.04); }

/* ══════════════════════════════════════
   MY HAND (bottom)
══════════════════════════════════════ */
.my-row {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px 4px;
  /* min-height гарантирует что вся карта + hover-зазор видны */
  min-height: calc(var(--card-h) + clamp(50px, 5vw, 80px));
  overflow: visible;
}
.my-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.my-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  background: rgba(0,0,0,0.4);
  padding: 3px 10px;
  border-radius: 12px;
}
.my-role {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.3);
  padding: 2px 8px;
  border-radius: 10px;
}
.my-role.attacker { color: #ffd700; }
.my-role.defender { color: #ef5350; }

.hand-scroll {
  overflow-x: auto;
  /* overflow-y: visible чтобы hover-подъём карты не обрезался */
  overflow-y: visible;
  /* верхний padding = запас для hover: карта поднимается на ~20px */
  padding: clamp(20px, 2.5vw, 48px) 4px 6px;
  -webkit-overflow-scrolling: touch;
}
.hand-scroll::-webkit-scrollbar { height: 3px; }
.hand-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.hand-cards {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 0 10px;
  min-width: max-content;
}

/* ══════════════════════════════════════
   CARDS
══════════════════════════════════════ */
.card {
  width: var(--card-w);
  height: var(--card-h);
  background: #fffdf8;
  border: 1.5px solid #d4c8b0;
  border-radius: var(--card-r);
  box-shadow: 1px 3px 8px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.9);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--card-pad);
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
/* In hand: overlap */
.hand-cards .card { margin-left: clamp(-20px, -1.5vw, -10px); }
.hand-cards .card:first-child { margin-left: 0; }

@media (max-width: 380px) {
  #screen-game {
    --card-w: 52px; --card-h: 74px;
    --deck-w: 54px; --deck-h: 76px;
    --pair-w: 56px; --pair-h: 82px;
  }
  .hand-cards .card { margin-left: -18px; }
}

/* Suits color */
.card[data-s="♥"], .card[data-s="♦"] { color: #c62828; }
.card[data-s="♠"], .card[data-s="♣"] { color: #1a1a1a; }

.card-corner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  pointer-events: none;
}
.card-corner.br {
  align-items: flex-end;
  align-self: flex-end;
  transform: rotate(180deg);
}
.c-rank { font-size: var(--c-rank); font-weight: 900; }
.c-suit { font-size: var(--c-suit); line-height: 1; }
.card-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--c-center);
  line-height: 1;
  pointer-events: none;
}

/* Card back */
.card-back {
  background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #1a237e 100%);
  border-color: #3949ab;
  cursor: default;
}
.card-back-face {
  position: absolute;
  inset: 5px;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 6px,
    rgba(255,255,255,0.04) 6px,
    rgba(255,255,255,0.04) 12px
  );
}

/* Trump highlight */
.card.is-trump {
  border-color: #d4a017;
  box-shadow: 0 0 0 1px #d4a017, 1px 3px 8px rgba(0,0,0,0.45);
}

/* Selectable/interactive card in hand */
.card.in-hand {
  cursor: pointer;
  z-index: 1;
  /* transform-origin снизу — карта «вырастает» вверх, не уходя за нижний край */
  transform-origin: bottom center;
}
.card.in-hand:hover {
  transform: translateY(clamp(-20px, -1.8vw, -10px)) scale(1.08);
  box-shadow: 0 16px 28px rgba(0,0,0,0.6);
  z-index: 10;
}
.card.selected {
  transform: translateY(clamp(-26px, -2.2vw, -14px)) scale(1.08);
  box-shadow: 0 0 0 2px #2196f3, 0 16px 28px rgba(33,150,243,0.45);
  z-index: 10;
}
/* Valid attack/defend target highlighting */
.card.valid-target {
  animation: validPulse 1.2s ease-in-out infinite;
}
@keyframes validPulse {
  0%,100% { box-shadow: 0 0 0 2px rgba(102,187,106,0.4), 1px 3px 8px rgba(0,0,0,0.45); }
  50%      { box-shadow: 0 0 0 3px rgba(102,187,106,0.8), 1px 3px 8px rgba(0,0,0,0.45); }
}
/* Greyed out - not playable */
.card.grayed { filter: brightness(0.6) saturate(0.4); cursor: not-allowed; }
.card.grayed:hover { transform: none; }

/* Beat target - атакующая карта на столе, которую можно побить выбранной картой с руки */
.card.beat-target {
  box-shadow: 0 0 0 2px #ff9800, 0 8px 20px rgba(255,152,0,0.5);
  animation: beatPulse 0.9s ease-in-out infinite;
  cursor: pointer;
}
@keyframes beatPulse {
  0%,100% { box-shadow: 0 0 0 2px rgba(255,152,0,0.5), 0 8px 20px rgba(255,152,0,0.3); }
  50%      { box-shadow: 0 0 0 3px rgba(255,152,0,1),   0 8px 20px rgba(255,152,0,0.6); }
}

/* ══════════════════════════════════════
   CARD DEAL ANIMATION
══════════════════════════════════════ */
@keyframes dealCard {
  from { transform: translate(-50%, -80%) scale(0.5) rotate(-5deg); opacity: 0; }
  to   { transform: translate(0,0) scale(1) rotate(0deg); opacity: 1; }
}
.card.dealing { animation: dealCard 0.3s ease forwards; }

@keyframes flyToField {
  from { opacity: 0; transform: scale(0.7) translateY(-20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.table-pair.appear { animation: flyToField 0.25s ease; }

/* ══════════════════════════════════════
   GAME FLOATING CHAT
══════════════════════════════════════ */
.game-chat-float {
  position: absolute;
  bottom: 70px;
  right: 10px;
  z-index: 20;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 6px;
}
.chat-float-btn {
  width: 46px; height: 46px;
  background: rgba(10,20,40,0.85);
  border: 1.5px solid rgba(212,160,23,0.4);
  border-radius: 23px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  position: relative;
  transition: border-color 0.2s;
}
.chat-float-btn:hover { border-color: var(--gold-light); }
.unread-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 10px; height: 10px;
  background: #e53935;
  border-radius: 50%;
  border: 2px solid rgba(10,20,40,0.85);
}
.game-chat-box {
  width: min(280px, 80vw);
  max-height: 280px;
  background: rgba(10,15,30,0.92);
  border: 1px solid rgba(212,160,23,0.25);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
}
.chat-messages.compact { flex: 1; max-height: 140px; }

/* ══════════════════════════════════════
   GAME MENU BUTTON
══════════════════════════════════════ */
.game-menu-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 40px; height: 40px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  font-size: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.game-menu-btn:hover { background: rgba(0,0,0,0.75); }

/* ══════════════════════════════════════
   TURN / STATUS ANIMATIONS
══════════════════════════════════════ */
.turn-indicator-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(20px, 6vw, 32px);
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255,215,0,0.6);
  background: rgba(0,0,0,0.7);
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid rgba(255,215,0,0.4);
  animation: bigBadge 1.5s ease forwards;
  pointer-events: none;
  z-index: 50;
  text-align: center;
}
@keyframes bigBadge {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(0.7); }
  20%  { opacity: 1; transform: translate(-50%,-50%) scale(1.05); }
  70%  { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(0.9); }
}

/* ══════════════════════════════════════
   RESPONSIVE TWEAKS
══════════════════════════════════════ */
@media (max-width: 400px) {
  .center-row { grid-template-columns: 70px 1fr 80px; gap: 3px; }
  .game-btn { font-size: 11px; padding: 7px 10px; min-width: 80px; }
  .turn-badge { font-size: 10px; }
}
/* Card sizes are now fully driven by clamp() CSS vars — no static breakpoints needed */

/* ══════════════════════════════════════
   ✨ GAME POLISH — АНИМАЦИИ И ДЕКОР
══════════════════════════════════════ */

/* Дыхающий свет стола — поверх текстуры */
#screen-game::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 55% at 50% 50%, rgba(20,100,35,0.22) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: feltBreath 7s ease-in-out infinite alternate;
}
@keyframes feltBreath {
  from { opacity: 0.45; }
  to   { opacity: 1; }
}

/* Блик масти козыря */
.trump-label {
  animation: trumpLabelPulse 2.8s ease-in-out infinite alternate;
}
@keyframes trumpLabelPulse {
  from { text-shadow: 0 0 8px currentColor; opacity: 0.85; }
  to   { text-shadow: 0 0 22px currentColor, 0 0 44px currentColor; opacity: 1; }
}

/* Ход противника — пульсирующее имя */
.opp-name-bar.is-turn {
  animation: oppTurnPulse 1.6s ease-in-out infinite;
}
@keyframes oppTurnPulse {
  0%,100% { box-shadow: 0 0 6px rgba(255,215,0,0.3); }
  50%     { box-shadow: 0 0 16px rgba(255,215,0,0.75); }
}

/* Пара на столе — пружинный сброс карты (переопределяет flyToField) */
.table-pair.appear {
  animation: pairSpring 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes pairSpring {
  from { opacity: 0; transform: scale(0.72) translateY(-18px) rotate(-3deg); }
  60%  { transform: scale(1.05) translateY(2px) rotate(0.5deg); opacity: 1; }
  to   { opacity: 1; transform: scale(1) translateY(0) rotate(0deg); }
}

/* Раздача карты — более живо (переопределяет dealCard) */
@keyframes dealCard {
  0%   { opacity: 0; transform: translate(-25%, -55%) scale(0.6) rotate(-8deg); }
  65%  { transform: translate(0,0) scale(1.06) rotate(1deg); opacity: 1; }
  100% { transform: translate(0,0) scale(1) rotate(0deg); opacity: 1; }
}

/* Ваш ход — статус-бейдж светится */
.turn-status.my-turn {
  animation: myTurnGlow 1.8s ease-in-out infinite;
}
@keyframes myTurnGlow {
  0%,100% { box-shadow: 0 0 5px rgba(255,215,0,0.2); }
  50%     { box-shadow: 0 0 18px rgba(255,215,0,0.6); }
}

/* Кнопки «Взять» / «Пас» — блик при наведении */
.take-btn, .pass-btn { position: relative; overflow: hidden; }
.take-btn::after, .pass-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.12) 50%, transparent 65%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.take-btn:hover::after, .pass-btn:hover::after { opacity: 1; }

/* Победа — заголовок сияет */
.gameover-title.win {
  animation: winGlow 2.2s ease-in-out infinite alternate;
}
@keyframes winGlow {
  from { text-shadow: 0 0 10px rgba(240,192,64,0.5); }
  to   { text-shadow: 0 0 30px rgba(240,192,64,1), 0 0 60px rgba(240,192,64,0.4); }
}

/* Козырная карта в руке — мягкое свечение */
.card.in-hand.is-trump {
  animation: trumpCardGlow 3s ease-in-out infinite;
}
@keyframes trumpCardGlow {
  0%,100% { box-shadow: 0 0 0 1px #d4a017, 1px 3px 8px rgba(0,0,0,0.45); }
  50%     { box-shadow: 0 0 0 2px #f0c040, 0 4px 20px rgba(212,160,23,0.45); }
}
/* Hover козырной карты сохраняет gold-цвет */
.card.in-hand.is-trump:hover {
  box-shadow: 0 0 0 2px #f0c040, 0 16px 28px rgba(212,160,23,0.5);
}
/* Selected козырная */
.card.in-hand.is-trump.selected {
  animation: none;
  box-shadow: 0 0 0 2px #2196f3, 0 16px 28px rgba(33,150,243,0.45);
}

/* Deck — мерцание */
.deck-pile::before {
  animation: deckPulse 5s ease-in-out infinite;
}
@keyframes deckPulse {
  0%,100% { filter: brightness(1); }
  50%     { filter: brightness(1.12) saturate(1.1); }
}
