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 */

/* ========================================
   CARD DESIGN WITH 3D EFFECTS
   ======================================== */

.durak-card {
  position: relative;
  width: 70px;
  height: 100px;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff 0%, #f0f0f0 100%);
  border: 2px solid rgba(0, 0, 0, 0.15);
  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.8);
  cursor: pointer;
  user-select: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center bottom;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Card hover effect */
.durak-card:hover:not(.disabled) {
  transform: translateY(-12px) scale(1.05);
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.4),
    0 6px 12px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(100, 200, 100, 0.3);
  border-color: rgba(100, 200, 100, 0.6);
}

/* Selected card */
.durak-card.selected {
  transform: translateY(-20px) scale(1.08);
  background: linear-gradient(145deg, #fffbe8 0%, #ffe590 100%);
  border-color: #f5c000;
  box-shadow: 
    0 16px 32px rgba(245, 192, 0, 0.5),
    0 8px 16px rgba(245, 192, 0, 0.3),
    0 0 30px rgba(245, 192, 0, 0.4);
  z-index: 100;
}

/* Highlighted card (for defense) */
.durak-card.highlighted {
  background: linear-gradient(145deg, #e8fff0 0%, #90ffb8 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 25px rgba(0, 204, 85, 0.3);
  animation: pulse-green 1.5s ease-in-out infinite;
}

/* Faded card (defended) */
.durak-card.faded {
  opacity: 0.5;
  filter: grayscale(30%);
  pointer-events: none;
}

/* Disabled card */
.durak-card.disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* Card corner ranks */
.durak-card-corner {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  text-align: left;
}

.durak-card-corner-bottom {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  text-align: right;
  transform: rotate(180deg);
}

/* Center suit symbol */
.durak-card-center {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ========================================
   CARD BACK DESIGN
   ======================================== */

.durak-card-back {
  width: 70px;
  height: 100px;
  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.15);
  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: 28px;
  opacity: 0.6;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* ========================================
   FAN LAYOUT FOR HAND
   ======================================== */

.durak-hand-fan {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 140px;
  padding: 20px 10px 10px;
  position: relative;
}

.durak-hand-fan .durak-card {
  position: absolute;
  bottom: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   CARD ANIMATIONS
   ======================================== */

/* Card deal animation */
@keyframes card-deal {
  0% {
    transform: translateX(100px) rotate(20deg) scale(0.5);
    opacity: 0;
  }
  100% {
    transform: translateX(0) rotate(0) scale(1);
    opacity: 1;
  }
}

.durak-card.deal {
  animation: card-deal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Card play animation */
@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;
  }
}

.durak-card.play {
  animation: card-play 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Pulse animation for highlighted cards */
@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 25px 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.4),
      0 0 35px rgba(0, 204, 85, 0.5);
  }
}

/* Card shake for invalid move */
@keyframes card-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.durak-card.shake {
  animation: card-shake 0.3s ease-in-out;
}

/* Card flip animation */
@keyframes card-flip {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(180deg);
  }
}

.durak-card.flip {
  animation: card-flip 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   TABLE CARD PAIR
   ======================================== */

.durak-table-pair {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  animation: card-deal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.durak-table-pair .durak-card.defend {
  transform: rotate(5deg) translateX(10px);
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.35),
    0 3px 8px rgba(0, 0, 0, 0.25);
}

/* ========================================
   SUIT COLORS
   ======================================== */

.suit-spades {
  color: #1a1a1a;
}

.suit-clubs {
  color: #2d5a27;
}

.suit-hearts {
  color: #e63946;
  text-shadow: 0 1px 2px rgba(230, 57, 70, 0.3);
}

.suit-diamonds {
  color: #e63946;
  text-shadow: 0 1px 2px rgba(230, 57, 70, 0.3);
}

/* ========================================
   RESPONSIVE SIZING
   ======================================== */

@media (max-width: 480px) {
  .durak-card {
    width: 60px;
    height: 85px;
    border-radius: 10px;
  }

  .durak-card-corner,
  .durak-card-corner-bottom {
    font-size: 11px;
  }

  .durak-card-center {
    font-size: 26px;
  }

  .durak-card-back {
    width: 60px;
    height: 85px;
  }

  .durak-hand-fan {
    height: 120px;
  }
}

/* ========================================
   TRUMP INDICATOR
   ======================================== */

.durak-trump-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 14px;
  font-weight: 600;
}

.durak-trump-indicator .trump-symbol {
  font-size: 20px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ========================================
   GAME 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);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.durak-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 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, 0.3);
}

.durak-btn-danger {
  background: rgba(255, 80, 80, 0.2);
  color: #ff8888;
  border: 1px solid rgba(255, 80, 80, 0.3);
}

.durak-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
