/* YAL Play — arcade hub of RLCard-inspired games vs Monica Ai.
   Self-contained overlay; matches the site's cosmic/futuristic theme. */

/* ── Nav rail icon (dynamic mini Monica sparkle) ── */
.yal-play-navlogo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: #d8c7ff;
}
.yal-play-navlogo svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 6px rgba(240, 36, 155, 0.85)) drop-shadow(0 0 12px rgba(138, 99, 255, 0.6));
  animation: yp-nav-twinkle 3.2s ease-in-out infinite, yp-nav-hue 6s linear infinite;
}
@keyframes yp-nav-twinkle {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(138, 99, 255, 0.7)); }
  50% { transform: scale(1.12); filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.95)); }
}
@keyframes yp-nav-hue {
  0% { color: #fbcfe8; }
  33% { color: #c4b5fd; }
  66% { color: #7dd3fc; }
  100% { color: #fbcfe8; }
}

/* ── Play tab mount (inline in x-center) ── */
.yal-play-mount {
  min-height: 100%;
  background: #04010d;
}
.yal-play-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 56px);
  color: #eef1ff;
  font-family: inherit;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 14% 16%, rgba(120, 86, 255, 0.32), transparent 46%),
    radial-gradient(circle at 86% 14%, rgba(29, 155, 240, 0.28), transparent 44%),
    radial-gradient(circle at 52% 96%, rgba(240, 36, 155, 0.24), transparent 52%),
    radial-gradient(circle at 74% 70%, rgba(56, 189, 248, 0.16), transparent 56%),
    #04010d;
  background-size: 220% 220%, 240% 240%, 200% 200%, 260% 260%, auto;
  animation: yp-overlay-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both, yp-nebula 18s ease-in-out infinite;
}
.yal-play-shell::before {
  content: "";
  position: absolute;
  inset: -55% -15% -5%;
  background-image:
    linear-gradient(rgba(100, 160, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 160, 255, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(520px) rotateX(64deg);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 0%, transparent 80%);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 80%);
  animation: yp-grid 6s linear infinite;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}

@keyframes yp-overlay-in {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes yp-nebula {
  0%, 100% { background-position: 0% 0%, 100% 0%, 50% 100%, 78% 72%, 0 0; }
  50% { background-position: 100% 100%, 0% 100%, 50% 0%, 22% 28%, 0 0; }
}
@keyframes yp-grid {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 0 46px, 46px 0; }
}

/* ── Header ── */
.yal-play-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid rgba(140, 130, 220, 0.18);
  backdrop-filter: blur(8px);
}
.yal-play-title {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(100deg, #38bdf8, #8a63ff, #f0249b, #38bdf8);
  background-size: 280% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(138, 99, 255, 0.5));
  animation: yp-text-flow 5s linear infinite;
}
.yal-play-title small {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  -webkit-text-fill-color: rgba(186, 210, 255, 0.7);
  color: rgba(186, 210, 255, 0.7);
  margin-top: 2px;
}
@keyframes yp-text-flow {
  to { background-position: 280% center; }
}
.yal-play-header-spacer { flex: 1; }
.yal-play-close,
.yal-play-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(140, 130, 220, 0.35);
  background: rgba(10, 7, 26, 0.6);
  color: #cdd6ff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.yal-play-close:hover,
.yal-play-back:hover {
  transform: translateY(-1px);
  border-color: rgba(138, 99, 255, 0.7);
  box-shadow: 0 8px 26px rgba(120, 86, 255, 0.35);
}
.yal-play-close svg, .yal-play-back svg { width: 16px; height: 16px; }

/* ── Scroll body ── */
.yal-play-body {
  position: relative;
  z-index: 2;
  flex: 1;
  overflow-y: auto;
  padding: 1.6rem 1.4rem 3rem;
}
.yal-play-body.yal-play-arena {
  perspective: 1500px;
  perspective-origin: 50% 38%;
}

/* ── Hub intro ── */
.yal-play-intro {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  max-width: 1100px;
  margin: 0 auto 1.6rem;
  padding: 1rem 1.2rem;
  border-radius: 20px;
  background: rgba(8, 6, 22, 0.5);
  border: 1px solid rgba(140, 130, 220, 0.22);
  backdrop-filter: blur(14px);
}
.yal-play-intro-text h2 {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
  font-weight: 800;
}
.yal-play-intro-text p {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(200, 210, 245, 0.75);
  line-height: 1.4;
}

/* ── Game grid ── */
.yal-play-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.1rem;
  max-width: 1100px;
  margin: 0 auto;
}
.yal-play-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.2rem;
  border-radius: 20px;
  border: 1px solid rgba(140, 130, 220, 0.28);
  background: linear-gradient(160deg, rgba(20, 14, 44, 0.85), rgba(8, 5, 20, 0.75));
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease-out, box-shadow 0.25s ease, border-color 0.2s ease;
  animation: yp-card-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  transform-style: preserve-3d;
}
.yp-hub-card-3d {
  transform: rotateX(var(--card-tilt-x, 0deg)) rotateY(var(--card-tilt-y, 0deg)) translateZ(0);
}
.yp-hub-card-glow {
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at 50% 30%, var(--yp-accent, #8a63ff), transparent 55%);
  opacity: 0.12;
  pointer-events: none;
  transform: translateZ(-20px);
}
.yal-play-card-stats {
  font-size: 0.68rem;
  font-weight: 800;
  color: rgba(200, 210, 245, 0.55);
  letter-spacing: 0.04em;
}
.yal-play-card-streak {
  font-size: 0.72rem;
  font-weight: 900;
  color: #ffd23f;
  text-shadow: 0 0 10px rgba(255, 210, 63, 0.6);
}
.yal-play-card:nth-child(2) { animation-delay: 0.05s; }
.yal-play-card:nth-child(3) { animation-delay: 0.1s; }
.yal-play-card:nth-child(4) { animation-delay: 0.15s; }
.yal-play-card:nth-child(5) { animation-delay: 0.2s; }
.yal-play-card:nth-child(6) { animation-delay: 0.25s; }
.yal-play-card:nth-child(7) { animation-delay: 0.3s; }
@keyframes yp-card-rise {
  from { opacity: 0; transform: translateY(22px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.yal-play-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, var(--yp-accent, rgba(138, 99, 255, 0.4)), transparent 70%);
  opacity: 0.18;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.yal-play-card:hover {
  transform: translateY(-6px);
  border-color: var(--yp-accent, rgba(138, 99, 255, 0.7));
  box-shadow: 0 22px 60px rgba(10, 5, 30, 0.7), 0 0 40px var(--yp-accent, rgba(138, 99, 255, 0.35));
}
.yal-play-card:hover::after { opacity: 0.4; }
.yal-play-card-icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}
.yal-play-card-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.yal-play-card-tag {
  font-size: 0.82rem;
  color: rgba(200, 210, 245, 0.7);
  line-height: 1.35;
  flex: 1;
}
.yal-play-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.2rem;
}
.yal-play-card-play {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--yp-accent-solid, #b39bff);
}
.yal-play-card.locked { cursor: default; opacity: 0.78; }
.yal-play-card.locked:hover { transform: none; box-shadow: none; border-color: rgba(140, 130, 220, 0.28); }
.yal-play-badge {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #8fd6ff;
}
.yal-play-badge.soon {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.4);
  color: #fdba74;
}

/* ── Dynamic Monica Ai logo (the opponent) ── */
.yp-monica {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--s, 84px);
  height: var(--s, 84px);
  flex: 0 0 auto;
}
.yp-monica-core {
  position: absolute;
  width: 62%;
  height: 62%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 90, 170, 0.85), rgba(138, 99, 255, 0.5) 45%, rgba(249, 115, 22, 0.22) 62%, transparent 74%);
  filter: blur(10px);
  animation: yp-core-pulse 0.9s ease-in-out infinite;
}
.yp-monica-ring {
  position: absolute;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  border: 2px solid rgba(255, 110, 199, 0.5);
  opacity: 0;
  animation: yp-ring 1.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.yp-monica-ring--b { animation-delay: 0.9s; border-color: rgba(56, 189, 248, 0.5); }
.yp-monica-icon {
  position: relative;
  display: inline-flex;
  color: #ecd8ff;
  animation: yp-mon-beat 1s ease-in-out infinite, yp-mon-hue 5s linear infinite;
}
.yp-monica-icon svg {
  width: 56%;
  width: calc(var(--s, 84px) * 0.62);
  height: calc(var(--s, 84px) * 0.62);
  filter: drop-shadow(0 0 12px rgba(240, 36, 155, 0.9)) drop-shadow(0 0 22px rgba(138, 99, 255, 0.6));
}
@keyframes yp-core-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.55; }
  50% { transform: scale(1.15); opacity: 1; }
}
@keyframes yp-ring {
  0% { transform: scale(0.6); opacity: 0; }
  15% { opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}
@keyframes yp-mon-beat {
  0%, 30%, 100% { transform: scale(1); }
  12% { transform: scale(1.16); }
  22% { transform: scale(1.05); }
}
@keyframes yp-mon-hue {
  0% { color: #fbcfe8; }
  33% { color: #e9d5ff; }
  66% { color: #fed7aa; }
  100% { color: #fbcfe8; }
}

/* ── In-game tabs (poker Lobby / Play) ── */
.yp-game-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(8, 6, 22, 0.55);
  border: 1px solid rgba(140, 130, 220, 0.22);
  width: fit-content;
  position: sticky;
  top: 0;
  z-index: 4;
  backdrop-filter: blur(10px);
}
.yp-game-tab {
  padding: 0.5rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(210, 220, 255, 0.75);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.yp-game-tab:hover {
  color: #eef1ff;
}
.yp-game-tab.active {
  background: linear-gradient(100deg, #1d9bf0, #8a63ff);
  color: #fff;
  box-shadow: 0 6px 20px rgba(120, 86, 255, 0.35);
}

/* ── Game view ── */
.yal-play-game {
  max-width: 940px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.yal-play-opponent {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 18px;
  background: rgba(8, 6, 22, 0.55);
  border: 1px solid rgba(140, 130, 220, 0.22);
  backdrop-filter: blur(12px);
}
.yal-play-opponent-meta { display: flex; flex-direction: column; gap: 2px; }
.yal-play-opponent-name {
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.yal-play-opponent-name .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #3ad16b; box-shadow: 0 0 8px #3ad16b;
}
.yal-play-speech {
  position: relative;
  flex: 1;
  min-height: 2.4rem;
  display: flex;
  align-items: center;
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  background: rgba(20, 14, 44, 0.7);
  border: 1px solid rgba(138, 99, 255, 0.3);
  font-size: 0.9rem;
  color: #e6e9ff;
  line-height: 1.35;
}
.yal-play-speech::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: rgba(20, 14, 44, 0.7);
  border-left: 1px solid rgba(138, 99, 255, 0.3);
  border-bottom: 1px solid rgba(138, 99, 255, 0.3);
}
.yal-play-speech.pop { animation: yp-speech-pop 0.3s ease; }
@keyframes yp-speech-pop {
  0% { transform: scale(0.96); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Table / stage ── */
.yal-play-stage {
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(140, 130, 220, 0.22);
  background:
    radial-gradient(circle at 50% 0%, rgba(58, 209, 107, 0.06), transparent 60%),
    linear-gradient(180deg, rgba(10, 30, 22, 0.55), rgba(6, 5, 20, 0.7));
  padding: 1.4rem 1.2rem;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  overflow: hidden;
}

/* ── Arcade play shell (active during games) ── */
.yp-3d-stage {
  transform: rotateX(var(--yp-tilt-x, 0deg)) rotateY(var(--yp-tilt-y, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.14s ease-out;
  will-change: transform;
}
.yp-arcade-floor {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -35%;
  height: 55%;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, color-mix(in srgb, var(--yp-game-accent, #8a63ff) 18%, transparent), transparent 70%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 48px);
  transform: rotateX(72deg) translateZ(-80px);
  transform-origin: 50% 0%;
  opacity: 0.45;
}
.yp-table-3d {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 22%;
  bottom: 14%;
  pointer-events: none;
  transform-style: preserve-3d;
  transform: translateZ(-30px) rotateX(14deg);
  z-index: 1;
}
.yp-table-rail {
  position: absolute;
  inset: 0;
  border-radius: 50% / 38%;
  border: 10px solid rgba(30, 18, 8, 0.85);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.55),
    inset 0 4px 12px rgba(255, 255, 255, 0.08),
    inset 0 -8px 20px rgba(0, 0, 0, 0.45);
  transform: translateZ(8px);
}
.yp-table-felt {
  position: absolute;
  inset: 12px 18px;
  border-radius: 50% / 36%;
  background:
    radial-gradient(ellipse 80% 70% at 50% 40%, rgba(255, 255, 255, 0.06), transparent 55%),
    linear-gradient(165deg, color-mix(in srgb, var(--yp-game-accent, #3ad16b) 35%, #0a2818), #061410);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
  transform: translateZ(12px);
}
.yp-table-poker .yp-table-felt {
  background:
    radial-gradient(ellipse 80% 70% at 50% 40%, rgba(255, 255, 255, 0.05), transparent 55%),
    linear-gradient(165deg, color-mix(in srgb, var(--yp-game-accent, #8a63ff) 28%, #1a0e30), #08041a);
}
.yp-table-uno .yp-table-felt {
  background:
    conic-gradient(from 0deg, rgba(240, 36, 155, 0.15), rgba(255, 210, 63, 0.12), rgba(58, 209, 107, 0.12), rgba(29, 155, 240, 0.12), rgba(240, 36, 155, 0.15)),
    linear-gradient(165deg, #1a0820, #0a0410);
}
.yp-table-chess .yp-table-felt {
  background: linear-gradient(165deg, #2a1f08, #120c04);
  border-radius: 12px;
  inset: 18% 22%;
}
.yp-deck-pile {
  position: absolute;
  top: 8%;
  right: 10%;
  width: 48px;
  height: 64px;
  border-radius: 8px;
  background: linear-gradient(160deg, #2a1a50, #12082a);
  border: 2px solid rgba(180, 200, 255, 0.35);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.35),
    0 8px 0 rgba(0, 0, 0, 0.25),
    0 12px 0 rgba(0, 0, 0, 0.15),
    0 16px 24px rgba(0, 0, 0, 0.45);
  transform: translateZ(28px) rotate(-8deg);
}
.yp-deck-pile::after {
  content: "✦";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
}
.yp-confetti-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 12;
  overflow: hidden;
}
.yp-confetti {
  position: absolute;
  left: var(--x, 50%);
  top: -8px;
  width: 8px;
  height: 14px;
  background: var(--c, #ffd23f);
  border-radius: 2px;
  animation: yp-confetti-fall var(--d, 1s) ease-in forwards;
  animation-delay: var(--delay, 0s);
  transform: rotate(var(--r, 0deg));
  opacity: 0.95;
}
@keyframes yp-confetti-fall {
  0% { transform: translateY(0) rotate(var(--r, 0deg)) scale(1); opacity: 1; }
  100% { transform: translateY(320px) rotate(calc(var(--r, 0deg) + 540deg)) scale(0.6); opacity: 0; }
}
.yp-arcade-stage {
  border-color: color-mix(in srgb, var(--yp-game-accent, #8a63ff) 45%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--yp-game-accent, #8a63ff) 18%, transparent),
    0 16px 48px rgba(0, 0, 0, 0.45),
    inset 0 0 60px color-mix(in srgb, var(--yp-game-accent, #8a63ff) 8%, transparent);
  animation: yp-arcade-breathe 4s ease-in-out infinite;
}
.yp-arcade-stage.yp-live-turn {
  border-color: color-mix(in srgb, var(--yp-game-accent, #8a63ff) 70%, #5fe39a);
  box-shadow:
    0 0 0 1px rgba(95, 227, 154, 0.35),
    0 0 40px color-mix(in srgb, var(--yp-game-accent, #8a63ff) 30%, transparent),
    inset 0 0 80px rgba(95, 227, 154, 0.06);
}
@keyframes yp-arcade-breathe {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.04); }
}
.yp-arcade-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.yp-arcade-grid {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(color-mix(in srgb, var(--yp-game-accent, #8a63ff) 12%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--yp-game-accent, #8a63ff) 12%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
  animation: yp-arcade-grid-drift 12s linear infinite;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 20%, transparent 75%);
}
@keyframes yp-arcade-grid-drift {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(28px, 28px) rotate(0deg); }
}
.yp-arcade-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--yp-game-accent, #8a63ff) 22%, transparent), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(240, 36, 155, 0.12), transparent 50%);
  animation: yp-arcade-glow-shift 8s ease-in-out infinite alternate;
}
@keyframes yp-arcade-glow-shift {
  from { opacity: 0.7; transform: scale(1); }
  to { opacity: 1; transform: scale(1.05); }
}
.yp-arcade-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 40%;
  top: -40%;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--yp-game-accent, #8a63ff) 14%, transparent), transparent);
  animation: yp-arcade-scan 5s ease-in-out infinite;
  opacity: 0.5;
}
@keyframes yp-arcade-scan {
  0% { top: -40%; }
  100% { top: 100%; }
}
.yp-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: hsl(var(--a, 260) 80% 65%);
  left: calc(8% + var(--i) * 6%);
  top: calc(12% + (var(--i) * 17) % 70%);
  animation: yp-particle-float calc(3s + var(--i) * 0.3s) ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.4s);
  opacity: 0.55;
  box-shadow: 0 0 8px currentColor;
}
@keyframes yp-particle-float {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.35; }
  50% { transform: translate(12px, -18px) scale(1.4); opacity: 0.85; }
}
.yp-arcade-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.yp-hype-wrap {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: -0.4rem 0 0.2rem;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  background: rgba(6, 4, 18, 0.65);
  border: 1px solid rgba(140, 130, 220, 0.25);
}
.yp-hype-label {
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(190, 200, 240, 0.6);
  white-space: nowrap;
}
.yp-hype-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(8, 6, 22, 0.9);
  border: 1px solid rgba(140, 130, 220, 0.2);
  overflow: hidden;
}
.yp-hype-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yp-game-accent, #8a63ff), #ffd23f, #f0249b);
  background-size: 200% 100%;
  animation: yp-hype-flow 2.5s linear infinite;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 14px color-mix(in srgb, var(--yp-game-accent, #8a63ff) 60%, transparent);
}
.yp-hype-fill.hot {
  animation: yp-hype-flow 0.8s linear infinite, yp-hype-fire 0.5s ease-in-out infinite;
}
@keyframes yp-hype-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes yp-hype-fire {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}
.yp-hype-tag {
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #ffd23f;
  text-shadow: 0 0 10px rgba(255, 210, 63, 0.7);
  animation: yp-hype-tag-pulse 0.6s ease-in-out infinite;
}
@keyframes yp-hype-tag-pulse {
  50% { transform: scale(1.08); }
}
.yp-hype-pct {
  font-size: 0.68rem;
  font-weight: 800;
  color: rgba(200, 210, 245, 0.7);
  min-width: 2.2rem;
  text-align: right;
}
.yp-float-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}
.yp-float-pop {
  position: absolute;
  bottom: 38%;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: yp-float-rise 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}
.yp-float-pop.win { color: #5fe39a; text-shadow: 0 0 20px rgba(58, 209, 107, 0.8); }
.yp-float-pop.lose { color: #ff7b94; }
.yp-float-pop.gold { color: #ffd23f; text-shadow: 0 0 18px rgba(255, 210, 63, 0.8); }
.yp-float-pop.danger { color: #ff5a7a; font-size: 1.35rem; animation-duration: 1.6s; }
.yp-float-pop.combo { color: #c4b5fd; text-shadow: 0 0 16px rgba(138, 99, 255, 0.8); }
.yp-float-pop.neutral { color: #e6e9ff; }
@keyframes yp-float-rise {
  0% { opacity: 0; transform: translateY(24px) scale(0.7); }
  15% { opacity: 1; transform: translateY(0) scale(1.1); }
  100% { opacity: 0; transform: translateY(-80px) scale(0.95); }
}

.yp-game-poker { --yp-game-accent: #8a63ff; }
.yp-game-blackjack { --yp-game-accent: #3ad16b; }
.yp-game-uno { --yp-game-accent: #f0249b; }
.yp-game-chess { --yp-game-accent: #f5b942; }

.yp-your-turn {
  position: relative;
  padding: 0.35rem 0.5rem;
  margin: -0.35rem -0.5rem;
  border-radius: 14px;
  animation: yp-your-turn-glow 1.4s ease-in-out infinite;
}
@keyframes yp-your-turn-glow {
  0%, 100% { box-shadow: inset 0 0 0 0 transparent; }
  50% { box-shadow: inset 0 0 24px rgba(95, 227, 154, 0.12); }
}
.yp-msg-live {
  animation: yp-msg-pop 0.35s ease;
}
@keyframes yp-msg-pop {
  from { transform: scale(0.96); opacity: 0.7; }
  to { transform: scale(1); opacity: 1; }
}
.yp-msg-check {
  color: #ff7b94 !important;
  animation: yp-msg-check 0.8s ease-in-out infinite;
}
@keyframes yp-msg-check {
  50% { text-shadow: 0 0 20px rgba(240, 36, 155, 0.7); }
}
.yp-hand-live .yp-card,
.yp-hand-live .yp-uno {
  transition: transform 0.2s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.yp-hand-live .yp-card:hover,
.yp-hand-live .yp-uno.playable:hover {
  transform: translateY(-16px) translateZ(24px) scale(1.08) rotateX(-8deg) rotateZ(-3deg);
  z-index: 2;
}
.yp-hand-live .yp-card {
  margin-right: -8px;
}
.yp-board-live .yp-card {
  margin-right: -4px;
}
.yp-pot-orb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.yp-pot-orb::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--yp-game-accent, #8a63ff) 25%, transparent), transparent 70%);
  animation: yp-pot-orb-pulse 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes yp-pot-orb-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0.9; }
}
.yp-pot-street {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--yp-game-accent, #8a63ff) 80%, #fff);
}
.yp-board-live .yp-card {
  animation: yp-board-flip 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes yp-board-flip {
  from { opacity: 0; transform: rotateY(-90deg) scale(0.8); }
  to { opacity: 1; transform: none; }
}
.yp-discard-glow {
  padding: 0.5rem;
  border-radius: 16px;
  transition: box-shadow 0.3s ease;
}
.yp-discard-r { box-shadow: 0 0 28px rgba(216, 35, 60, 0.45); }
.yp-discard-y { box-shadow: 0 0 28px rgba(224, 168, 0, 0.45); }
.yp-discard-g { box-shadow: 0 0 28px rgba(31, 157, 82, 0.45); }
.yp-discard-b { box-shadow: 0 0 28px rgba(28, 111, 216, 0.45); }
.yp-discard-w { box-shadow: 0 0 32px rgba(138, 99, 255, 0.5); }
.yp-combo-live {
  font-size: 1.05rem;
  animation: yp-combo-fire 0.5s ease-in-out infinite;
}
@keyframes yp-combo-fire {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.06); filter: brightness(1.2); }
}

/* Pulse themes per action */
.yp-pulse-allin { animation: yp-pulse-allin 0.7s ease !important; }
.yp-pulse-raise { animation: yp-pulse-raise 0.5s ease !important; }
.yp-pulse-deal { animation: yp-pulse-deal 0.45s ease !important; }
.yp-pulse-jackpot { animation: yp-pulse-jackpot 0.8s ease !important; }
.yp-pulse-bust { animation: yp-pulse-bust 0.5s ease !important; }
.yp-pulse-check { animation: yp-pulse-check 0.6s ease !important; }
.yp-pulse-capture { animation: yp-pulse-capture 0.45s ease !important; }
.yp-pulse-draw2 { animation: yp-pulse-draw2 0.5s ease !important; }
.yp-pulse-wild4 { animation: yp-pulse-wild4 0.6s ease !important; }
.yp-pulse-uno { animation: yp-pulse-uno 0.5s ease !important; }
@keyframes yp-pulse-allin {
  0%, 100% { box-shadow: inset 0 0 0 transparent; }
  40% { box-shadow: inset 0 0 80px rgba(240, 36, 155, 0.35); transform: scale(1.02); }
}
@keyframes yp-pulse-raise {
  40% { box-shadow: inset 0 0 50px rgba(255, 210, 63, 0.25); }
}
@keyframes yp-pulse-deal {
  40% { box-shadow: inset 0 0 40px rgba(29, 155, 240, 0.2); }
}
@keyframes yp-pulse-jackpot {
  0%, 100% { filter: brightness(1); }
  30% { filter: brightness(1.25); box-shadow: inset 0 0 90px rgba(255, 210, 63, 0.35); }
  60% { filter: brightness(1.1); }
}
@keyframes yp-pulse-bust {
  40% { box-shadow: inset 0 0 60px rgba(240, 36, 155, 0.3); }
}
@keyframes yp-pulse-check {
  50% { box-shadow: inset 0 0 50px rgba(240, 36, 155, 0.25); }
}
@keyframes yp-pulse-capture {
  40% { box-shadow: inset 0 0 45px rgba(255, 210, 63, 0.3); }
}
@keyframes yp-pulse-draw2 {
  40% { box-shadow: inset 0 0 50px rgba(216, 35, 60, 0.25); }
}
@keyframes yp-pulse-wild4 {
  40% { box-shadow: inset 0 0 60px rgba(138, 99, 255, 0.35); }
}
@keyframes yp-pulse-uno {
  50% { box-shadow: inset 0 0 55px rgba(240, 36, 155, 0.3); }
}
.yp-row { display: flex; flex-direction: column; gap: 0.5rem; }
.yp-row-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(190, 200, 240, 0.65);
  font-weight: 700;
}
.yp-hand { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; min-height: 92px; }
.yp-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0;
}
.yp-msg {
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
  min-height: 1.4em;
}
.yp-msg.win { color: #5fe39a; text-shadow: 0 0 16px rgba(58, 209, 107, 0.5); }
.yp-msg.lose { color: #ff7b94; text-shadow: 0 0 16px rgba(240, 36, 155, 0.4); }
.yp-msg.push { color: #ffd23f; }

/* ── Playing cards (3D) ── */
.yp-card {
  position: relative;
  width: 62px;
  height: 88px;
  border-radius: 9px;
  background: linear-gradient(160deg, #fff, #e7ecf6);
  color: #15161c;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 22px rgba(0, 0, 0, 0.5),
    0 2px 0 rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5px 7px;
  font-weight: 800;
  user-select: none;
  animation: yp-deal-3d 0.42s cubic-bezier(0.16, 1, 0.4, 1) both;
  transform-style: preserve-3d;
  transition: transform 0.2s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.yp-card-3d .yp-card-edge {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}
.yp-card-3d::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: -4px;
  height: 4px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #d8dce8, #b8bcc8);
  transform: translateZ(-2px);
  opacity: 0.7;
}
@keyframes yp-deal-3d {
  from { opacity: 0; transform: translateY(-40px) translateZ(60px) rotateX(25deg) rotateZ(-12deg) scale(0.8); }
  to { opacity: 1; transform: translateZ(0); }
}
@keyframes yp-deal {
  from { opacity: 0; transform: translateY(-26px) rotate(-8deg) scale(0.85); }
  to { opacity: 1; transform: none; }
}
.yp-card .rank { font-size: 1.05rem; line-height: 1; }
.yp-card .suit { font-size: 1.5rem; line-height: 1; align-self: center; }
.yp-card .rank.bottom { align-self: flex-end; transform: rotate(180deg); }
.yp-card.red { color: #e3173e; }
.yp-card.back {
  background:
    repeating-linear-gradient(45deg, rgba(138, 99, 255, 0.55) 0 6px, rgba(29, 155, 240, 0.55) 6px 12px),
    #1a1140;
  border: 2px solid rgba(180, 200, 255, 0.4);
}
.yp-card.back::after {
  content: "✦";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.4rem;
  text-shadow: 0 0 12px rgba(138, 99, 255, 0.9);
}

/* ── UNO cards ── */
.yp-uno {
  position: relative;
  width: 58px;
  height: 86px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  cursor: default;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
  border: 3px solid rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  animation: yp-deal 0.32s cubic-bezier(0.16, 1, 0.4, 1) both;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.yp-uno::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50% / 38%;
  background: rgba(255, 255, 255, 0.16);
}
.yp-uno > span { position: relative; z-index: 1; }
.yp-uno.r { background: linear-gradient(160deg, #ff6b7d, #d8233c); }
.yp-uno.y { background: linear-gradient(160deg, #ffe066, #e0a800); color: #5a4500; text-shadow: none; }
.yp-uno.g { background: linear-gradient(160deg, #5fe39a, #1f9d52); }
.yp-uno.b { background: linear-gradient(160deg, #6bb6ff, #1c6fd8); }
.yp-uno.w { background: conic-gradient(from 0deg, #ff5a6e, #ffd23f, #3ad16b, #3aa0ff, #ff5a6e); }
.yp-uno.playable { cursor: pointer; }
.yp-uno.playable:hover { transform: translateY(-10px) scale(1.04); box-shadow: 0 16px 30px rgba(0, 0, 0, 0.5); }
.yp-uno.dim { opacity: 0.45; filter: grayscale(0.4); }
.yp-uno-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #cdd6ff;
}
.yp-uno-mini {
  width: 26px; height: 38px; border-radius: 5px;
  background: repeating-linear-gradient(45deg, rgba(138, 99, 255, 0.7) 0 4px, rgba(29, 155, 240, 0.7) 4px 8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ── Color picker (wild) ── */
.yp-colors { display: flex; gap: 0.6rem; justify-content: center; }
.yp-color-dot {
  width: 42px; height: 42px; border-radius: 12px; cursor: pointer; border: 2px solid rgba(255, 255, 255, 0.7);
  transition: transform 0.15s ease;
}
.yp-color-dot:hover { transform: scale(1.12); }
.yp-color-dot.r { background: #d8233c; }
.yp-color-dot.y { background: #e0a800; }
.yp-color-dot.g { background: #1f9d52; }
.yp-color-dot.b { background: #1c6fd8; }

/* ── Chips / pot (poker) ── */
.yp-chips { display: flex; gap: 1.4rem; justify-content: center; flex-wrap: wrap; }
.yp-chip-stack { text-align: center; }
.yp-chip-stack .lbl { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(190, 200, 240, 0.7); }
.yp-chip-stack .amt { font-size: 1.5rem; font-weight: 900; color: #ffd23f; text-shadow: 0 0 14px rgba(255, 210, 63, 0.4); }
.yp-pot {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: #8fd6ff;
}
.yp-pot strong { color: #fff; font-size: 1.4rem; }

/* ── Opponent picker ── */
.yp-opponent-section {
  max-width: 940px;
  margin: 0 auto 1.2rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(8, 6, 22, 0.5);
  border: 1px solid rgba(140, 130, 220, 0.22);
}
.yp-opponent-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}
.yp-opponent-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.yp-opponent-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 108px;
  padding: 0.75rem 0.65rem;
  border-radius: 14px;
  border: 1px solid rgba(140, 130, 220, 0.3);
  background: rgba(12, 8, 30, 0.65);
  color: #e6e9ff;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.yp-opponent-option:hover {
  transform: translateY(-2px);
  border-color: rgba(138, 99, 255, 0.65);
}
.yp-opponent-option.active {
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35), 0 10px 28px rgba(29, 155, 240, 0.25);
  background: rgba(20, 14, 44, 0.8);
}
.yp-opponent-option-icon { transform: scale(0.85); }
.yp-opponent-option-name {
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yp-opponent-option-sub {
  font-size: 0.68rem;
  color: rgba(190, 200, 240, 0.65);
}
.yp-opponent-option-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(138, 99, 255, 0.45);
}
.yp-opponent-option-av.fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #8a63ff, #1d9bf0);
  font-weight: 900;
  font-size: 1rem;
}
.yp-opponent-hint {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: rgba(190, 200, 240, 0.65);
  text-align: center;
}
.yp-member-avatar {
  width: var(--s, 56px);
  height: var(--s, 56px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(138, 99, 255, 0.5);
  box-shadow: 0 0 16px rgba(120, 86, 255, 0.35);
  flex: 0 0 auto;
}
.yp-member-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #8a63ff, #1d9bf0);
  color: #fff;
  font-weight: 900;
  font-size: calc(var(--s, 56px) * 0.38);
}

/* ── Buttons / controls ── */
.yp-controls { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.yp-btn.sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
}

/* ── Dynamic arcade FX ── */
.yp-stats-bar {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 940px;
  margin: 0 auto 1rem;
  padding: 0.65rem 1rem;
  border-radius: 14px;
  background: rgba(8, 6, 22, 0.55);
  border: 1px solid rgba(140, 130, 220, 0.2);
}
.yp-stat { font-size: 0.82rem; color: rgba(200, 210, 245, 0.75); }
.yp-stat strong { color: #ffd23f; font-size: 1.05rem; margin-right: 0.25rem; }
.yp-stat.hot strong { color: #ff7b94; }

.yp-turn-badge {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 auto 0.6rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  width: fit-content;
  animation: yp-turn-pulse 1.2s ease-in-out infinite;
}
.yp-turn-badge.yours {
  background: linear-gradient(100deg, rgba(58, 209, 107, 0.25), rgba(29, 155, 240, 0.25));
  border: 1px solid rgba(58, 209, 107, 0.55);
  color: #5fe39a;
  box-shadow: 0 0 20px rgba(58, 209, 107, 0.3);
}
.yp-turn-badge.thinking {
  background: rgba(138, 99, 255, 0.2);
  border: 1px solid rgba(138, 99, 255, 0.45);
  color: #c4b5fd;
}
.yp-turn-badge.opp { color: rgba(190, 200, 240, 0.7); border: 1px solid rgba(140, 130, 220, 0.3); }
@keyframes yp-turn-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.03); }
}
.yp-dots::after {
  content: "";
  animation: yp-dots 1.2s steps(4) infinite;
}
@keyframes yp-dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

.yal-play-opponent.thinking .yp-monica-core,
.yal-play-opponent.thinking .yp-member-avatar {
  animation: yp-opp-think 0.8s ease-in-out infinite;
}
@keyframes yp-opp-think {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.yp-phase-pills {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.yp-phase {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(140, 130, 220, 0.25);
  color: rgba(190, 200, 240, 0.5);
}
.yp-phase.active {
  background: linear-gradient(100deg, #1d9bf0, #8a63ff);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(120, 86, 255, 0.4);
}
.yp-phase.done { color: rgba(95, 227, 154, 0.8); border-color: rgba(58, 209, 107, 0.35); }

.yp-strength {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 420px;
  margin: 0 auto;
  padding: 0.4rem 0;
}
.yp-strength-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(190, 200, 240, 0.65); white-space: nowrap; }
.yp-strength-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(8, 6, 22, 0.8);
  border: 1px solid rgba(140, 130, 220, 0.25);
  overflow: hidden;
}
.yp-strength-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3ad16b, #ffd23f, #f0249b);
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px rgba(255, 210, 63, 0.5);
}
.yp-strength-pct { font-size: 0.75rem; font-weight: 800; color: #ffd23f; min-width: 2.5rem; }

.yp-pot-live strong { animation: yp-pot-glow 1.5s ease-in-out infinite; }
@keyframes yp-pot-glow {
  0%, 100% { text-shadow: 0 0 8px rgba(255, 255, 255, 0.4); }
  50% { text-shadow: 0 0 18px rgba(255, 210, 63, 0.9); }
}

.yp-card-deal { animation: yp-deal 0.42s cubic-bezier(0.16, 1, 0.4, 1) both; }
.yp-bj-hand { padding: 0.35rem 0; border-radius: 12px; transition: background 0.2s ease; }
.yp-bj-hand.active { background: rgba(138, 99, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(138, 99, 255, 0.35); }

.yp-combo {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #ffd23f;
  text-shadow: 0 0 16px rgba(255, 210, 63, 0.6);
  animation: yp-combo-pop 0.4s ease;
}
@keyframes yp-combo-pop {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.yp-uno-btn {
  animation: yp-uno-flash 0.7s ease-in-out infinite !important;
  box-shadow: 0 0 24px rgba(240, 36, 155, 0.6) !important;
}
@keyframes yp-uno-flash {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.yp-uno-3d {
  transform-style: preserve-3d;
  transform: rotate(calc((var(--uno-i, 0) - 3) * 5deg)) translateY(calc(var(--uno-i, 0) * -3px)) translateZ(calc(var(--uno-i, 0) * 2px));
}
.yp-uno-3d .yp-uno-shine {
  position: absolute;
  inset: 8px 6px auto;
  height: 40%;
  border-radius: 50% / 40%;
  background: rgba(255, 255, 255, 0.22);
  pointer-events: none;
}
.yp-uno-hand {
  perspective: 800px;
  padding: 0.5rem 0 1rem;
  min-height: 110px;
  align-items: flex-end;
}
.yp-uno-hand .yp-uno.playable:hover {
  transform: translateY(-18px) translateZ(30px) scale(1.1) rotateX(-10deg) rotate(calc((var(--uno-i, 0) - 3) * 4deg));
  z-index: 5;
}

.yal-play-stage.yp-fx-win { animation: yp-stage-win 0.6s ease; }
.yal-play-stage.yp-fx-lose { animation: yp-stage-lose 0.5s ease; }
.yal-play-stage.yp-fx-shake { animation: none; }
.yp-arcade-stage.yp-fx-shake .yp-arcade-content { animation: yp-shake 0.45s ease; }
.yal-play-stage.yp-fx-pot { animation: yp-pot-bump 0.35s ease; }
.yal-play-stage.yp-fx-burst { animation: yp-fx-burst 0.5s ease; }
.yal-play-stage.yp-fx-allin { animation: yp-fx-allin 0.7s ease; }
.yal-play-stage.yp-fx-deal { animation: yp-fx-deal 0.4s ease; }
.yal-play-stage.yp-fx-flash { animation: yp-fx-flash 0.35s ease; }
.yal-play-stage.yp-fx-combo { animation: yp-fx-combo 0.45s ease; }
.yal-play-stage.yp-fx-jackpot { animation: yp-fx-jackpot 0.85s ease; }
@keyframes yp-stage-win {
  0% { box-shadow: inset 0 0 0 0 transparent; }
  40% { box-shadow: inset 0 0 60px rgba(58, 209, 107, 0.25); }
  100% { box-shadow: inset 0 0 0 transparent; }
}
@keyframes yp-stage-lose {
  40% { box-shadow: inset 0 0 50px rgba(240, 36, 155, 0.2); }
}
@keyframes yp-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
@keyframes yp-pot-bump {
  50% { transform: scale(1.02); }
}
@keyframes yp-fx-burst {
  50% { transform: scale(1.015); box-shadow: inset 0 0 50px rgba(138, 99, 255, 0.25); }
}
@keyframes yp-fx-allin {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.03); box-shadow: inset 0 0 70px rgba(240, 36, 155, 0.35); }
  50% { transform: scale(0.99); }
}
@keyframes yp-fx-deal {
  40% { box-shadow: inset 0 0 35px rgba(29, 155, 240, 0.22); }
}
@keyframes yp-fx-flash {
  50% { filter: brightness(1.3); }
}
@keyframes yp-fx-combo {
  50% { box-shadow: inset 0 0 45px rgba(196, 181, 253, 0.3); transform: scale(1.01); }
}
@keyframes yp-fx-jackpot {
  0% { transform: scale(1); }
  20% { transform: scale(1.04); box-shadow: inset 0 0 80px rgba(255, 210, 63, 0.4); }
  40% { transform: scale(0.98); }
  60% { transform: scale(1.02); box-shadow: inset 0 0 60px rgba(58, 209, 107, 0.3); }
  100% { transform: scale(1); }
}
.yp-btn {
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(140, 130, 220, 0.4);
  background: rgba(12, 8, 30, 0.7);
  color: #e6e9ff;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.yp-btn:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(138, 99, 255, 0.8); box-shadow: 0 10px 26px rgba(120, 86, 255, 0.35); }
.yp-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.yp-btn.primary {
  background: linear-gradient(100deg, #1d9bf0, #8a63ff);
  border-color: transparent;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 30px rgba(120, 86, 255, 0.45);
}
.yp-btn.danger { border-color: rgba(240, 36, 155, 0.5); color: #ff9bc2; }
.yp-btn.win { background: linear-gradient(100deg, #1f9d52, #3ad16b); border-color: transparent; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .yal-play-body { padding: 1.1rem 0.9rem 3rem; }
  .yal-play-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; }
  .yal-play-card { padding: 1rem; border-radius: 16px; }
  .yp-card { width: 52px; height: 74px; }
  .yp-uno { width: 50px; height: 74px; font-size: 1.25rem; }
  .yal-play-intro { flex-direction: column; text-align: center; }
}

/* ── Mobile fullscreen game (below Play header, above bottom nav) ── */
@media (max-width: 1100px) and (pointer: coarse), (max-width: 760px) {
  body.yal-play-mobile-active #yal-play-root {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--yal-play-top, 53px);
    bottom: calc(var(--yal-mnav-h, 54px) + env(safe-area-inset-bottom, 0px));
    z-index: 12500;
    min-height: 0 !important;
    padding: 0;
    margin: 0;
    overflow: hidden;
    background: #04010d;
  }
  body.yal-play-mobile-active .yal-play-shell--mobile-game {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    animation: none;
  }
  body.yal-play-mobile-active .yal-play-shell--mobile-game::before {
    opacity: 0.28;
  }
  .yal-play-header--mobile-game {
    flex-shrink: 0;
    gap: 0.55rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(140, 130, 220, 0.22);
  }
  .yal-play-header--mobile-game .yal-play-title {
    flex: 1;
    min-width: 0;
    font-size: clamp(0.95rem, 4.2vw, 1.15rem);
    letter-spacing: 0.04em;
  }
  .yal-play-header--mobile-game .yal-play-title small {
    font-size: 0.52rem;
    letter-spacing: 0.14em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .yal-play-exit {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(240, 36, 155, 0.55);
    background: rgba(36, 10, 24, 0.88);
    color: #ff9bc2;
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  }
  .yal-play-exit:hover,
  .yal-play-exit:active {
    transform: translateY(-1px);
    border-color: rgba(240, 36, 155, 0.85);
    box-shadow: 0 6px 20px rgba(240, 36, 155, 0.28);
  }
  body.yal-play-mobile-active .yal-play-shell--mobile-game .yal-play-body {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.65rem 0.6rem 0.85rem;
  }
}

/* ── Chess (pnpduy/ChessGame piece sprites) ── */
.yal-play-chess { width: 100%; }
.yp-ch-hero {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 0 18px rgba(245, 185, 66, 0.65));
  animation: yp-ch-float 3s ease-in-out infinite;
}
@keyframes yp-ch-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-6px) rotate(4deg); }
}
.yp-ch-credit { color: #f5b942; text-decoration: none; }
.yp-ch-credit:hover { text-decoration: underline; }
.yp-ch-lobby { display: flex; flex-direction: column; gap: 1.2rem; }
.yp-ch-modes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}
.yp-ch-mode {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(245, 185, 66, 0.28);
  background: linear-gradient(145deg, rgba(30, 22, 8, 0.85), rgba(12, 8, 30, 0.75));
  color: #f8f4e8;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}
.yp-ch-mode:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(245, 185, 66, 0.7);
  box-shadow: 0 14px 36px rgba(245, 185, 66, 0.22), 0 0 40px rgba(138, 99, 255, 0.15);
}
.yp-ch-mode-icon { font-size: 1.6rem; }
.yp-ch-mode-name { font-weight: 800; font-size: 1rem; }
.yp-ch-mode-sub { font-size: 0.78rem; color: rgba(230, 220, 200, 0.65); }
.yp-ch-invite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(58, 209, 107, 0.45);
  background: rgba(20, 60, 35, 0.35);
  animation: yp-ch-invite-pulse 1.8s ease-in-out infinite;
}
@keyframes yp-ch-invite-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(58, 209, 107, 0.3); }
  50% { box-shadow: 0 0 24px 4px rgba(58, 209, 107, 0.25); }
}
.yp-ch-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.yp-ch-wait-pulse {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(245, 185, 66, 0.35);
  border-top-color: #f5b942;
  animation: yp-ch-spin 1s linear infinite;
}
@keyframes yp-ch-spin { to { transform: rotate(360deg); } }

.yp-ch-stage { perspective: 1200px; }
.yp-ch-layout {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 1rem;
  align-items: start;
}
.yp-ch-side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.82rem;
}
.yp-ch-caps .yp-ch-cap-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  min-height: 22px;
  margin-bottom: 4px;
}
.yp-ch-caps img { width: 18px; height: 18px; opacity: 0.85; }
.yp-ch-history {
  max-height: 220px;
  overflow-y: auto;
  padding: 0.5rem;
  border-radius: 10px;
  background: rgba(8, 6, 20, 0.55);
  border: 1px solid rgba(120, 100, 200, 0.2);
}
.yp-ch-moves { line-height: 1.6; color: rgba(220, 215, 255, 0.8); }
.yp-ch-moves span { margin-right: 0.35rem; }

.yp-ch-board-wrap {
  display: flex;
  justify-content: center;
  padding: 0.5rem;
}
.yp-ch-board-3d {
  position: relative;
  perspective: 900px;
  transform-style: preserve-3d;
}
.yp-ch-board-pedestal {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -12px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(ellipse 100% 100% at 50% 0%, rgba(245, 185, 66, 0.35), rgba(0, 0, 0, 0.5));
  filter: blur(2px);
  transform: rotateX(75deg) translateZ(-20px);
}
.yp-ch-board {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(92vw, 420px);
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(245, 185, 66, 0.15),
    inset 0 0 0 3px rgba(245, 185, 66, 0.35),
    inset 0 -8px 20px rgba(0, 0, 0, 0.25);
  transform: rotateX(8deg) translateZ(20px);
  transform-style: preserve-3d;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.yp-ch-board-3d:hover .yp-ch-board {
  transform: rotateX(2deg) translateZ(28px) scale(1.02);
  box-shadow:
    0 32px 70px rgba(0, 0, 0, 0.65),
    0 0 100px rgba(138, 99, 255, 0.25),
    inset 0 0 0 3px rgba(245, 185, 66, 0.5);
}
.yp-ch-files,
.yp-ch-ranks {
  display: flex;
  justify-content: space-around;
  font-size: 0.62rem;
  font-weight: 800;
  color: rgba(255, 240, 200, 0.45);
  padding: 2px 4px;
  letter-spacing: 0.12em;
}
.yp-ch-ranks {
  flex-direction: column;
  position: absolute;
  left: -16px;
  top: 0;
  bottom: 0;
  justify-content: space-around;
  padding: 8px 0;
}
.yp-ch-files {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
}
.yp-ch-row { display: flex; flex: 1; }
.yp-ch-sq {
  flex: 1;
  position: relative;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, box-shadow 0.2s ease;
}
.yp-ch-sq.light { background: #e8d4b0; }
.yp-ch-sq.dark { background: #8b5a2b; }
.yp-ch-sq:hover { filter: brightness(1.08); }
.yp-ch-sq.sel {
  background: rgba(138, 99, 255, 0.55) !important;
  box-shadow: inset 0 0 0 3px rgba(200, 180, 255, 0.9);
}
.yp-ch-sq.legal { background: rgba(58, 209, 107, 0.35) !important; }
.yp-ch-sq.last {
  background: rgba(245, 185, 66, 0.45) !important;
  box-shadow: inset 0 0 0 2px rgba(245, 185, 66, 0.8);
}
.yp-ch-sq.check {
  animation: yp-ch-check 0.9s ease-in-out infinite;
}
@keyframes yp-ch-check {
  0%, 100% { box-shadow: inset 0 0 0 3px rgba(240, 36, 155, 0.5); }
  50% { box-shadow: inset 0 0 16px 4px rgba(240, 36, 155, 0.85); }
}
.yp-ch-dot {
  width: 28%;
  height: 28%;
  border-radius: 50%;
  background: rgba(58, 209, 107, 0.75);
  box-shadow: 0 0 8px rgba(58, 209, 107, 0.6);
  pointer-events: none;
}
.yp-ch-piece {
  width: 82%;
  height: 82%;
  object-fit: contain;
  pointer-events: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.55));
  transition: transform 0.2s cubic-bezier(0.34, 1.4, 0.64, 1);
  user-select: none;
  transform: translateZ(8px);
}
.yp-ch-sq:hover .yp-ch-piece { transform: translateZ(16px) scale(1.08); }
.yp-ch-piece.move { animation: yp-ch-piece-move 0.28s ease-out; }
.yp-ch-piece.drag { opacity: 0.45; transform: scale(1.12); }
@keyframes yp-ch-piece-move {
  0% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.yp-ch-promo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 14px;
  background: rgba(20, 14, 40, 0.85);
  border: 1px solid rgba(138, 99, 255, 0.45);
  animation: yp-overlay-in 0.3s ease both;
}
.yp-ch-promo-picks { display: flex; gap: 0.5rem; }
.yp-ch-promo-btn {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 2px solid rgba(245, 185, 66, 0.4);
  background: rgba(30, 22, 50, 0.8);
  cursor: pointer;
  padding: 4px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.yp-ch-promo-btn:hover {
  transform: scale(1.1);
  border-color: #f5b942;
}
.yp-ch-promo-btn img { width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 720px) {
  .yp-ch-layout { grid-template-columns: 1fr; }
  .yp-ch-side { order: 2; flex-direction: row; flex-wrap: wrap; }
  .yp-ch-history { max-height: 100px; flex: 1; min-width: 140px; }
  .yp-ch-board { width: min(96vw, 360px); }
}

@media (prefers-reduced-motion: reduce) {
  .yal-play-shell,
  .yal-play-shell::before,
  .yal-play-card,
  .yp-card,
  .yp-uno,
  .yp-monica-core,
  .yp-monica-ring,
  .yp-monica-icon,
  .yal-play-navlogo svg,
  .yal-play-title,
  .yp-ch-board,
  .yp-ch-piece,
  .yp-ch-hero,
  .yp-ch-invite,
  .yp-arcade-stage,
  .yp-arcade-grid,
  .yp-arcade-glow,
  .yp-arcade-scan,
  .yp-particle,
  .yp-hype-fill,
  .yp-float-pop,
  .yp-combo-live,
  .yp-3d-stage,
  .yp-hub-card-3d,
  .yp-confetti { animation: none !important; }
  .yp-3d-stage,
  .yp-hub-card-3d { transform: none !important; }
}
