.menu-body {
  background:
    radial-gradient(ellipse at top, #1a3a24 0%, #0a0604 60%),
    #0a0604;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.menu-shell {
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(20px, 6vw, 60px) clamp(12px, 4vw, 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 4vw, 40px);
}

.menu-header {
  text-align: center;
  max-width: 100%;
}
.menu-header h1 {
  /* Fluid sizing — title scales smoothly with viewport, can't overflow */
  font-size: clamp(28px, 9vw, 64px);
  letter-spacing: clamp(1px, 1.2vw, 12px);
  margin: 0;
  color: var(--gold);
  word-break: break-word;
  text-shadow:
    0 2px 0 #6b4f0e,
    0 4px 12px rgba(0,0,0,0.6);
}
.menu-header .tagline {
  color: var(--muted);
  letter-spacing: clamp(2px, 0.5vw, 4px);
  text-transform: uppercase;
  font-size: clamp(11px, 1.2vw, 14px);
  margin: 8px 0 0;
}

.mode-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  width: 100%;
}

.mode-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 18px;
  padding: 32px 28px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.mode-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(212, 175, 55, 0.08) 0%, transparent 60%);
  pointer-events: none;
}
.mode-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--gold);
}
.mode-card h2 {
  margin: 16px 0 8px;
  font-size: 28px;
  letter-spacing: 1px;
}
.mode-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 24px;
}
.play-btn {
  margin-top: auto;
  background: var(--gold);
  color: #1a1410;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  transition: background 0.15s;
}
.mode-card:hover .play-btn {
  background: #f4c842;
}

.mode-poker h2 { color: #d4af37; }
.mode-capsa h2 { color: #ef4444; }
.mode-susun h2 { color: #60a5fa; }
.mode-rummy h2 { color: #a78bfa; }

.art-joker {
  background: linear-gradient(135deg, #6b1ad4 0%, #3a0c6e 100%);
  color: #ffd700;
  font-size: 28px;
}

.mode-art {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  min-height: 100px;
  perspective: 600px;
}
.art-card {
  width: 64px; height: 92px;
  background: #fdfdfd;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: Georgia, serif;
  font-size: 22px;
  color: #1a1a1a;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  border: 1px solid #ddd;
  transition: transform 0.3s;
}
.art-card .suit { font-size: 18px; margin-top: 2px; }
.art-card .suit.red { color: #c0202c; }
.art-card .suit.black { color: #1a1a1a; }
.art-card-1 { transform: rotate(-8deg) translateY(4px); }
.art-card-2 { transform: rotate(-2deg); }
.art-card-3 { transform: rotate(4deg); }
.art-card-4 { transform: rotate(10deg) translateY(4px); }
.mode-card:hover .art-card-1 { transform: rotate(-10deg) translateY(0); }
.mode-card:hover .art-card-2 { transform: rotate(-3deg) translateY(-4px); }
.mode-card:hover .art-card-3 { transform: rotate(3deg) translateY(-4px); }
.mode-card:hover .art-card-4 { transform: rotate(12deg) translateY(0); }

.menu-footer {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
}

/* in-game back link (for poker.html / capsa.html) */
.back-link, .menu-link {
  color: var(--gold);
  text-decoration: none;
}
.back-link:hover, .menu-link:hover {
  text-decoration: underline;
}
.menu-link {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== Mobile responsive (h1 + paddings handled by clamp() above) ===== */
@media (max-width: 900px) {
  .mode-cards {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
  }
  .mode-card { padding: 24px 20px; }
  .mode-card h2 { font-size: 22px; }
  .mode-desc { font-size: 13px; }
  .art-card { width: 50px; height: 72px; font-size: 18px; }
  .mode-art { min-height: 80px; }
}
@media (max-width: 640px) {
  .mode-cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .mode-card { padding: 20px 18px; }
  .mode-card h2 { font-size: 20px; margin: 12px 0 6px; }
  .mode-desc { font-size: 12px; margin-bottom: 18px; }
  .play-btn { padding: 8px 18px; font-size: 13px; }
  .art-card { width: 42px; height: 60px; font-size: 16px; }
  .art-card .suit { font-size: 14px; }
  .mode-art { min-height: 70px; }
}
