body {
  margin: 0;
  background: #000;
  color: white;
  font-family: sans-serif;
}

/* HUB */
.hub {
  height: 100vh;
  overflow-y: auto;
  padding: 20px;
  position: relative;
  z-index: 2;
}

/* TOP BAR */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: gold;
}

.stats {
  display: flex;
  gap: 20px;
  font-size: 14px;
  opacity: 0.8;
}

/* GRID */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

/* CARD */
.card {
  background: rgba(20,20,20,0.9);
  padding: 20px;
  border-radius: 14px;
  cursor: pointer;

  border: 1px solid rgba(255,215,0,0.2);

  box-shadow:
    0 0 10px rgba(255,215,0,0.2),
    inset 0 0 20px rgba(255,215,0,0.05);

  transition: 0.3s;
}

.card:hover {
  transform: translateY(-6px);

  box-shadow:
    0 0 25px rgba(255,215,0,0.7),
    0 0 60px rgba(255,215,0,0.3);
}

.card.active {
  animation: redPulse 0.4s ease;
}

@keyframes redPulse {
  0% { box-shadow: 0 0 0 rgba(255,0,0,0); }
  50% { box-shadow: 0 0 30px rgba(255,0,0,1); }
  100% { box-shadow: 0 0 0 rgba(255,0,0,0); }
}

.card h3 {
  color: gold;
  margin-bottom: 10px;
}

.card p {
  font-size: 13px;
  opacity: 0.7;
}/* Durak Game — Card Styles & Animations */

/* ============================================================
   BASE CARD
   ============================================================ */

.durak-card {
  position: relative;
  width: 68px;
  height: 98px;
  border-radius: 12px;
  background: linear-gradient(155deg, #ffffff 0%, #f2f0eb 100%);
  border: 2px solid rgba(0, 0, 0, 0.12);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  cursor: pointer;
  user-select: none;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s ease,
              border-color 0.25s ease;
  transform-origin: center bottom;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Hover — simple lift only, NO "which card beats which" hint */
.durak-card:hover:not(.disabled) {
  transform: translateY(-10px);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.38),
    0 6px 12px rgba(0, 0, 0, 0.22);
}

/* Selected card (defender chose a card from hand) */
.durak-card.selected {
  transform: translateY(-22px) scale(1.07) !important;
  background: linear-gradient(145deg, #fffbe8 0%, #ffe080 100%);
  border-color: #f5c000;
  box-shadow:
    0 18px 36px rgba(245, 192, 0, 0.55),
    0 8px 16px rgba(245, 192, 0, 0.35),
    0 0 32px rgba(245, 192, 0, 0.4);
  z-index: 100 !important;
}

/* Highlighted (attack card ready to receive defense) */
.durak-card.highlighted {
  background: linear-gradient(145deg, #e8fff0 0%, #8effc0 100%);
  border-color: #00cc55;
  box-shadow:
    0 8px 20px rgba(0, 204, 85, 0.4),
    0 4px 10px rgba(0, 204, 85, 0.3),
    0 0 28px rgba(0, 204, 85, 0.3);
  animation: pulse-green 1.6s ease-in-out infinite;
}

/* Faded (card already defended) */
.durak-card.faded {
  opacity: 0.45;
  filter: grayscale(25%);
  pointer-events: none;
}

/* Disabled */
.durak-card.disabled {
  cursor: default;
  opacity: 0.72;
}

/* ============================================================
   TRUMP CARD — distinct gold frame + glow
   ============================================================ */

.durak-card.trump {
  background: linear-gradient(155deg, #fff9ed 0%, #ffedb3 60%, #ffd966 100%);
  border: 2px solid #d4960a;
  box-shadow:
    0 4px 14px rgba(200, 130, 10, 0.45),
    0 2px 6px rgba(200, 130, 10, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 0 0 1px rgba(212, 150, 10, 0.25);
}

.durak-card.trump:hover:not(.disabled) {
  transform: translateY(-10px);
  box-shadow:
    0 16px 32px rgba(200, 130, 10, 0.5),
    0 6px 12px rgba(200, 130, 10, 0.3),
    0 0 24px rgba(220, 160, 20, 0.35);
}

.durak-card.trump.selected {
  background: linear-gradient(145deg, #fff4c2 0%, #ffd020 100%);
  border-color: #c8820a;
  box-shadow:
    0 20px 40px rgba(200, 130, 10, 0.6),
    0 8px 18px rgba(200, 130, 10, 0.4),
    0 0 40px rgba(220, 160, 20, 0.5);
}

/* Small crown badge in top-right corner of trump cards */
.durak-trump-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 10px;
  color: #c8820a;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(200, 130, 10, 0.5));
  z-index: 2;
}

/* Trump suit symbol — golden tint */
.trump-center {
  color: #b8720a !important;
  text-shadow:
    0 1px 3px rgba(180, 110, 10, 0.4),
    0 0 8px rgba(220, 160, 20, 0.25);
}

/* ============================================================
   CARD CORNERS
   ============================================================ */

.durak-card-corner {
  position: absolute;
  top: 5px;
  left: 7px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  text-align: left;
}

.durak-card-corner-bottom {
  position: absolute;
  bottom: 5px;
  right: 7px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  text-align: right;
  transform: rotate(180deg);
}

/* Center suit symbol */
.durak-card-center {
  font-size: 30px;
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.18));
}

/* ============================================================
   CARD BACK
   ============================================================ */

.durak-card-back {
  width: 68px;
  height: 98px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1a4a8c 0%, #0d2555 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.durak-card-back::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 5px,
    rgba(255, 255, 255, 0.03) 5px,
    rgba(255, 255, 255, 0.03) 10px
  );
}

.durak-card-back-symbol {
  font-size: 26px;
  opacity: 0.55;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* ============================================================
   HAND FAN — cards spread out, readable at a glance
   ============================================================ */

.durak-hand-fan {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  /* height set dynamically via inline style */
  padding: 24px 10px 8px;
  position: relative;
}

.durak-hand-fan .durak-card {
  position: absolute;
  bottom: 8px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}

/* ============================================================
   SUIT COLORS
   ============================================================ */

.suit-spades  { color: #1a1a1a; }
.suit-clubs   { color: #2d5a27; }
.suit-hearts  { color: #e63946; text-shadow: 0 1px 2px rgba(230, 57, 70, 0.25); }
.suit-diamonds{ color: #e63946; text-shadow: 0 1px 2px rgba(230, 57, 70, 0.25); }

/* ============================================================
   TABLE CARD PAIR
   ============================================================ */

.durak-table-pair {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  animation: card-deal 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes card-deal {
  0%   { transform: translateX(60px) rotate(15deg) scale(0.6); opacity: 0; }
  100% { transform: translateX(0) rotate(0) scale(1); opacity: 1; }
}

@keyframes card-play {
  0%   { transform: translateY(0) scale(1); }
  50%  { transform: translateY(-40px) scale(1.1); }
  100% { transform: translateY(-80px) scale(0.9); opacity: 0; }
}

@keyframes pulse-green {
  0%, 100% {
    box-shadow:
      0 8px 20px rgba(0, 204, 85, 0.4),
      0 4px 10px rgba(0, 204, 85, 0.3),
      0 0 28px rgba(0, 204, 85, 0.3);
  }
  50% {
    box-shadow:
      0 12px 28px rgba(0, 204, 85, 0.6),
      0 6px 14px rgba(0, 204, 85, 0.45),
      0 0 40px rgba(0, 204, 85, 0.5);
  }
}

@keyframes card-shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-8px); }
  75%       { transform: translateX(8px); }
}

.durak-card.deal  { animation: card-deal 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.durak-card.play  { animation: card-play 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.durak-card.shake { animation: card-shake 0.3s ease-in-out; }

/* ============================================================
   TRUMP INDICATOR (info strip at bottom of screen)
   ============================================================ */

.durak-trump-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 10px;
  background: rgba(212, 150, 10, 0.15);
  border: 1px solid rgba(212, 150, 10, 0.45);
  font-size: 14px;
  font-weight: 700;
  color: #f0c040;
}

.durak-trump-indicator .trump-symbol {
  font-size: 20px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ============================================================
   STATUS BAR
   ============================================================ */

.durak-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  margin-bottom: 12px;
}

.durak-status-text { font-size: 14px; font-weight: 600; }
.durak-status-info  { display: flex; gap: 12px; font-size: 13px; opacity: 0.7; }

/* ============================================================
   ACTION BUTTONS
   ============================================================ */

.durak-btn {
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.3px;
}

.durak-btn:hover  { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.durak-btn:active { transform: translateY(0); }

.durak-btn-primary  { background: linear-gradient(135deg,#3db825 0%,#256614 100%); color:#fff; box-shadow:0 4px 14px rgba(61,184,37,.3); }
.durak-btn-danger   { background: rgba(255,80,80,.2); color:#ff8888; border:1px solid rgba(255,80,80,.3); }
.durak-btn-secondary{ background: rgba(255,255,255,.1); color:#fff; border:1px solid rgba(255,255,255,.2); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 480px) {
  .durak-card { width: 58px; height: 82px; border-radius: 10px; }
  .durak-card-corner, .durak-card-corner-bottom { font-size: 11px; }
  .durak-card-center { font-size: 24px; }
  .durak-card-back  { width: 58px; height: 82px; }
  .durak-trump-badge { font-size: 9px; }
}
