/* Live poker deck: home page section and the scripted round of js/live-cards-demo.js */

.live-deck {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background:
    radial-gradient(ellipse 60% 55% at 72% 45%, rgba(255, 110, 40, 0.16) 0%, transparent 70%),
    radial-gradient(ellipse 70% 60% at 20% 20%, rgba(0, 146, 164, 0.18) 0%, transparent 70%),
    linear-gradient(160deg, #06201c 0%, #031512 55%, #0b0a12 100%);
  scroll-margin-top: var(--header-h);
}

.live-deck-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2.5rem;
  align-items: center;
}

.live-deck h2 {
  margin: 1rem 0 1rem;
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.live-deck-copy > p {
  margin: 0 0 1.25rem;
  color: rgba(233, 238, 247, 0.84);
  font-size: 1.05rem;
  line-height: 1.7;
}

.live-deck-list {
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.live-deck-list li {
  position: relative;
  padding-left: 1.6rem;
  color: rgba(233, 238, 247, 0.9);
  line-height: 1.55;
}

.live-deck-list li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.55em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe08a 0%, #ff7a2a 70%);
  box-shadow: 0 0 10px rgba(255, 122, 42, 0.8);
}

.live-deck-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---- The scripted round ---- */

.ldd {
  position: relative;
  margin: 0;
}

.ldd-table {
  --ldd-card: clamp(40px, 12.5vw, 72px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 0.75rem 0.6rem;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(ellipse 70% 45% at 50% 40%, rgba(0, 146, 164, 0.18) 0%, transparent 70%),
    linear-gradient(145deg, #0a3d36 0%, #004d40 40%, #00695c 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 0 0 6px rgba(80, 45, 20, 0.55);
}

.ldd-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ldd-seat {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.7rem 0.3rem 0.3rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  font-weight: 600;
}

.ldd-avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f5c842, #e0a325);
  color: #1a2e2a;
  font-weight: 800;
  font-size: 0.85rem;
}

.ldd-trump {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 140, 60, 0.5);
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ldd-trump.is-shown {
  opacity: 1;
  transform: none;
}

.ldd-trump-suit {
  color: #ff5a4f;
  font-size: 1.1rem;
  line-height: 1;
}

.ldd-slot {
  display: block;
  flex: 0 0 auto;
  width: var(--ldd-card);
  height: calc(var(--ldd-card) * 1.402);
  border-radius: 6px;
}

.ldd-trick {
  display: flex;
  justify-content: center;
  gap: clamp(0.4rem, 2vw, 0.9rem);
  padding: 0.5rem 1rem;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.14);
  border: 1px dashed rgba(255, 255, 255, 0.14);
}

.ldd-trick-slot {
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.ldd-hand {
  display: flex;
  justify-content: center;
  margin-top: calc(var(--ldd-card) * 0.42);
  padding-top: 8px;
}

.ldd-hand-slot {
  transition: transform 0.15s;
}

.ldd-hand-slot + .ldd-hand-slot {
  margin-left: calc(var(--ldd-card) * -0.42);
}

.ldd-hand-slot.is-hover {
  transform: translateY(-8px);
}

.ldd-caption {
  min-height: 1.5em;
  margin: 0;
  color: #ffe08a;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
}

.ldd-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Poster until the round runs, and the whole time without WebGL or with reduced motion;
   without JavaScript there is no table and it stands on its own */
.ldd-poster {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
}

.ldd-table ~ .ldd-poster {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.ldd.is-live .ldd-poster {
  display: none;
}

@media (max-width: 900px) {
  .live-deck-inner {
    grid-template-columns: minmax(0, 1fr);
    padding: 3.5rem 1.25rem 4rem;
  }
}

@media (max-width: 600px) {
  .live-deck-inner {
    padding: 3rem 1rem 3.5rem;
    gap: 2rem;
  }

  .ldd-table {
    padding: 0.75rem 0.5rem 0.5rem;
    border-radius: 18px;
  }

  .ldd-seat {
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .ldd-table {
    --ldd-card: clamp(36px, 13vw, 56px);
  }

  .ldd-trick {
    padding: 0.4rem 0.6rem;
  }

  .live-deck-actions .btn {
    flex: 1 1 100%;
    text-align: center;
  }
}

/* ---- Shop deck card: four burning hearts over the image fan ---- */

.deck-grid .deck-card-live {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  text-align: left;
}

.deck-card-live .deck-foot {
  justify-content: flex-start;
}

.deck-card-live .live-pill {
  margin-bottom: 0.6rem;
}

.ldd-fan-host {
  position: relative;
}

.ldd-fan-host .fan {
  margin-bottom: 0;
}

.ldd-fan-host .ldd-table {
  --ldd-card: clamp(64px, 24vw, 96px);
  position: absolute;
  inset: 0;
  justify-content: flex-end;
  gap: 0;
  padding: 0 0 6px;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.ldd-fan-host .ldd-hand {
  margin-top: 0;
}

.ldd-fan-host .ldd-hand-slot + .ldd-hand-slot {
  margin-left: calc(var(--ldd-card) * -0.3);
}

.ldd-fan-host.is-live .fan {
  visibility: hidden;
}

@media (max-width: 900px) {
  .deck-grid .deck-card-live {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .deck-card-live .deck-foot {
    justify-content: center;
  }
}
