/* Hearts — 4-player layout with a trick area in the middle and a
   fanned hand at the bottom. */

.hearts-status {
  font-size: 13px;
  opacity: 0.92;
}

.hearts-board {
  max-width: 720px;
  margin: 16px auto;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hearts-scores {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.hs {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  font-size: 12px;
}
.hs-name  { opacity: 0.85; letter-spacing: 0.4px; }
.hs-score { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hs.active { border-color: #ffd54f; box-shadow: 0 0 10px rgba(255, 213, 79, 0.45); }
.hs.taking-trick { background: rgba(255, 213, 79, 0.18); }

.trick-area {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 280px;
  margin: 0 auto;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
  border-radius: 12px;
}
.trick-slot {
  position: absolute;
  width: var(--card-w);
  height: var(--card-h);
}
.trick-slot.pos-0 { bottom: 8px; left: 50%; transform: translateX(-50%); }
.trick-slot.pos-2 { top:    8px; left: 50%; transform: translateX(-50%); }
.trick-slot.pos-1 { top: 50%; left:  8px; transform: translateY(-50%); }
.trick-slot.pos-3 { top: 50%; right: 8px; transform: translateY(-50%); }
.trick-slot .card {
  position: absolute;
  inset: 0;
  width: var(--card-w);
  height: var(--card-h);
  cursor: default;
}

.my-hand {
  position: relative;
  height: calc(var(--card-h) + 16px);
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  /* Cards positioned via inline `left` by JS so the fan stays centered. */
}
.my-hand .card {
  position: absolute;
  top: auto;
  bottom: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.my-hand .card.dim {
  opacity: 0.45;
  filter: grayscale(0.4);
  cursor: not-allowed;
}
.my-hand .card.passing-selected {
  transform: translateY(-18px);
  outline: 3px solid #ffd54f;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.my-hand .card:not(.dim):hover { transform: translateY(-6px); }
.my-hand .card.passing-selected:hover { transform: translateY(-22px); }

.hearts-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  min-height: 36px;
}

.hearts-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.hearts-overlay.hidden { display: none; }
.hearts-modal {
  background: white;
  color: #222;
  border-radius: 10px;
  padding: 28px 36px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  text-align: center;
}
.hearts-modal h1 { margin: 0 0 14px; font-size: 28px; }
.hearts-modal #ho-body { font-size: 14px; line-height: 1.5; margin-bottom: 18px; text-align: left; }
.hearts-modal table { width: 100%; border-collapse: collapse; }
.hearts-modal td { padding: 4px 6px; border-bottom: 1px solid #eee; }
.hearts-modal td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

@media (max-width: 600px) {
  .trick-area { height: 240px; max-width: 400px; }
  .hs-score { font-size: 18px; }
}
