.games-page { padding-bottom: 60px; }
.games-sub { color: var(--text-dim, #999); margin: -8px 0 24px; font-size: 14px; }

.game-mode-tabs {
  display: flex; gap: 8px; margin-bottom: 18px;
}
.mode-tab {
  background: rgba(124,92,255,0.1);
  border: 1px solid rgba(124,92,255,0.25);
  color: var(--text-dim,#aaa); border-radius: 999px;
  padding: 8px 18px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.mode-tab.active {
  background: rgba(124,92,255,0.3); border-color: #7c5cff; color: #fff;
}

/* Felt table */
.felt-table {
  background: radial-gradient(ellipse at center, #1a5c3a 0%, #0d2818 65%);
  border-radius: 24px;
  padding: 24px 16px 20px;
  border: 3px solid #2d6a4f;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.35), 0 12px 40px rgba(0,0,0,0.4);
  max-width: 820px; margin: 0 auto;
  position: relative;
}
.durak-felt {
  background: radial-gradient(ellipse at center, #1e3a5f 0%, #0f172a 65%);
  border-color: #334155;
}
.felt-opp, .felt-you { text-align: center; }
.hand-label {
  color: rgba(255,255,255,0.7); font-size: 13px; font-weight: 600;
  margin-bottom: 8px;
}
.felt-center {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; margin: 16px 0;
  min-height: 100px;
}
.durak-center { min-height: 140px; }
.felt-msg {
  text-align: center; color: #e9d5ff; margin: 12px 0 8px;
  min-height: 22px; font-size: 15px; font-weight: 500;
}
.felt-controls {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; align-items: center; margin-top: 8px;
}
.felt-controls input {
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; border-radius: 10px; padding: 10px 12px;
}

/* Deck stack center */
.deck-stack {
  position: relative; width: 70px; height: 98px;
}
.deck-card {
  position: absolute; inset: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #4c1d95, #7c5cff);
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.deck-card:nth-child(1) { transform: translate(0,0); }
.deck-card:nth-child(2) { transform: translate(2px,2px); }
.deck-card:nth-child(3) { transform: translate(4px,4px); }
.deck-count {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  color: #fff; font-weight: 800; font-size: 14px; z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.trump-face {
  background: #f8f5ff !important;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 3; transform: translate(28px, 8px) rotate(90deg) !important;
  width: 64px; height: 90px;
}
.trump-face .pc-rank { font-size: 16px; }
.trump-face .pc-suit { font-size: 18px; }

/* Cards */
.playing-card {
  width: 64px; height: 90px;
  border-radius: 8px;
  background: #f8f5ff;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700; user-select: none; position: relative;
}
.playing-card .pc-rank { font-size: 20px; line-height: 1; }
.playing-card .pc-suit { font-size: 22px; line-height: 1; margin-top: 2px; }
.card-red { color: #dc2626; }
.card-black { color: #111; }
.card-back {
  background: linear-gradient(135deg, #4c1d95, #7c5cff);
  color: #fff; font-size: 22px;
}
.card-slot {
  background: transparent; border: 2px dashed rgba(255,255,255,0.25);
  box-shadow: none; color: rgba(255,255,255,0.35);
}
.card-pick { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.card-pick:hover { transform: translateY(-10px); box-shadow: 0 12px 24px rgba(124,92,255,0.4); }
.card-selected {
  outline: 2px solid #fbbf24;
  transform: translateY(-12px);
  box-shadow: 0 14px 28px rgba(251,191,36,0.35);
}
.cards-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; min-height: 96px;
}
.table-cards { min-height: 100px; }
.table-pair {
  display: flex; gap: 4px; align-items: center;
  background: rgba(0,0,0,0.2); border-radius: 10px; padding: 6px;
}
.hand-more { color: #fff; align-self: center; font-weight: 700; }

/* Deal animation */
@keyframes dealIn {
  from { opacity: 0; transform: translateY(-40px) scale(0.6) rotate(-12deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
.deal-in {
  animation: dealIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Lobby */
.lobby-box {
  max-width: 420px; margin: 0 auto 20px;
  background: var(--card, #1a1228);
  border: 1px solid rgba(124,92,255,0.25);
  border-radius: 16px; padding: 20px;
}
.lobby-row {
  display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}
.lobby-row input {
  background: #12081f; border: 1px solid rgba(124,92,255,0.3);
  color: #fff; border-radius: 10px; padding: 10px 12px;
}
.lobby-status { color: var(--text-dim,#aaa); font-size: 13px; text-align: center; }
.room-code-badge {
  background: rgba(0,0,0,0.4); color: #fbbf24;
  font-weight: 800; letter-spacing: 2px; font-size: 14px;
  padding: 4px 12px; border-radius: 8px;
}

/* Roulette leftovers */
.roulette-layout {
  display: grid; grid-template-columns: 1fr 320px; gap: 28px;
  align-items: center; max-width: 900px; margin: 0 auto;
}
@media (max-width: 800px) { .roulette-layout { grid-template-columns: 1fr; } }
.roulette-wheel-wrap { position: relative; width: 280px; height: 280px; margin: 0 auto; }
.roulette-wheel {
  width: 280px; height: 280px; border-radius: 50%;
  background: conic-gradient(#166534 0deg 10deg, #111 10deg 20deg, #b91c1c 20deg 30deg, #111 30deg 40deg, #b91c1c 40deg 50deg, #111 50deg 60deg, #b91c1c 60deg 70deg, #111 70deg 80deg, #b91c1c 80deg 90deg, #111 90deg 100deg, #b91c1c 100deg 110deg, #111 110deg 120deg, #b91c1c 120deg 130deg, #111 130deg 140deg, #b91c1c 140deg 150deg, #111 150deg 160deg, #b91c1c 160deg 170deg, #111 170deg 180deg, #b91c1c 180deg 190deg, #111 190deg 200deg, #b91c1c 200deg 210deg, #111 210deg 220deg, #b91c1c 220deg 230deg, #111 230deg 240deg, #b91c1c 240deg 250deg, #111 250deg 260deg, #b91c1c 260deg 270deg, #111 270deg 280deg, #b91c1c 280deg 290deg, #111 290deg 300deg, #b91c1c 300deg 310deg, #111 310deg 320deg, #b91c1c 320deg 330deg, #111 330deg 340deg, #b91c1c 340deg 350deg, #111 350deg 360deg);
  border: 6px solid #c4b5fd;
  box-shadow: 0 0 0 4px #1a1228, 0 12px 40px rgba(0,0,0,0.5);
  position: relative;
}
.roulette-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 70px; height: 70px; border-radius: 50%;
  background: #1a1228; border: 3px solid #7c5cff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #c4b5fd; z-index: 2;
}
.roulette-pointer {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 10px solid transparent; border-right: 10px solid transparent;
  border-top: 18px solid #fbbf24; z-index: 3;
}
.roulette-result { text-align: center; margin-top: 16px; font-size: 28px; font-weight: 800; min-height: 36px; }
.res-red { color: #f87171; } .res-black { color: #e5e7eb; } .res-green { color: #4ade80; }
.roulette-panel {
  background: var(--card,#1a1228); border-radius: 16px; padding: 20px;
  border: 1px solid rgba(124,92,255,0.2);
}
.roulette-panel input {
  width: 100%; background: #12081f; border: 1px solid rgba(124,92,255,0.3);
  color: #fff; border-radius: 10px; padding: 10px 12px; margin-top: 4px;
}
.roulette-bets { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.bet-btn {
  border: none; border-radius: 12px; padding: 14px 16px;
  font-weight: 700; font-size: 15px; cursor: pointer;
  display: flex; justify-content: space-between; color: #fff;
}
.bet-red { background: linear-gradient(135deg,#991b1b,#dc2626); }
.bet-black { background: linear-gradient(135deg,#1f2937,#374151); }
.bet-green { background: linear-gradient(135deg,#14532d,#16a34a); }
.roulette-msg { margin-top: 16px; text-align: center; color: var(--text-dim,#aaa); font-size: 14px; min-height: 40px; }

/* Аватарки игроков за столом */
.player-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 6px;
  border: 2px solid rgba(255,255,255,0.25);
  display: inline-block;
}
.hand-label .player-avatar {
  width: 26px;
  height: 26px;
}
.room-code-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.room-code-badge .player-avatar {
  width: 32px;
  height: 32px;
  margin-right: 0;
}
.room-bet-label {
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  margin-left: 4px;
}
