/* ——— LUDO ARENA (mockup match) ——— */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;700;800;900&display=swap');

.game-shell.ludo-mode {
  background: #12081c;
  max-width: 480px;
  margin: 0 auto;
}
.game-shell.ludo-mode .game-top {
  display: none;
}
.game-shell.ludo-mode .game-stage {
  padding: 0;
  max-width: 100%;
  margin: 0;
  width: 100%;
  min-height: 100dvh;
}

.la-screen {
  position: relative;
  min-height: 100dvh;
  color: #fff;
  overflow: hidden;
  font-family: Outfit, system-ui, sans-serif;
  display: flex;
  flex-direction: column;
}
.la-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.55) saturate(1.15);
}
.la-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(120, 40, 180, 0.2), transparent 55%),
    linear-gradient(180deg, rgba(10, 4, 20, 0.55), rgba(8, 4, 18, 0.75) 90%);
}
.la-fx {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 200, 80, 0.35) 0 1px, transparent 2px);
  background-size: 48px 48px;
  opacity: 0.25;
  animation: laTwinkle 4s linear infinite;
}
@keyframes laTwinkle {
  to {
    background-position: 48px 24px;
  }
}

.la-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100dvh;
  padding: 8px 10px 10px;
  gap: 6px;
}

/* Top account bar */
.la-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}
.la-me {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(60, 30, 90, 0.85), rgba(20, 10, 40, 0.9));
  border: 1px solid rgba(232, 185, 35, 0.45);
  border-radius: 999px;
  padding: 4px 8px 4px 4px;
  box-shadow: 0 0 16px rgba(180, 80, 255, 0.25);
}
.la-me img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e8b923;
}
.la-me .la-me-meta {
  line-height: 1.15;
}
.la-me .la-me-meta b {
  display: block;
  font-size: 0.72rem;
}
.la-me .la-me-meta span {
  font-size: 0.62rem;
  color: #cbb8ff;
}
.la-coins {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  padding: 2px 6px 2px 4px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #ffe08a;
  margin-top: 2px;
}
.la-coins i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffe9a0, #c47820);
  display: inline-block;
}
.la-plus {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(180deg, #6dff9a, #1a9a4a);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
}
.la-logo {
  height: 42px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(200, 100, 255, 0.55));
}
.la-menu {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.la-menu button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.la-menu button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255, 180, 60, 0.35);
}
.la-menu button .dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  background: #ff3b5c;
  border-radius: 50%;
  border: 1px solid #fff;
}

/* Arena stage with corner cards */
.la-stage {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 4px 0 0;
}
.la-board-wrap {
  position: relative;
  width: min(78vw, 340px);
  aspect-ratio: 1;
  transform: perspective(900px) rotateX(12deg);
  transform-style: preserve-3d;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55));
}
.la-board-glow {
  position: absolute;
  inset: -8%;
  border-radius: 18px;
  background: radial-gradient(circle, rgba(255, 200, 80, 0.35), transparent 65%);
  z-index: 0;
  animation: laGlow 2.4s ease-in-out infinite alternate;
}
@keyframes laGlow {
  from {
    opacity: 0.45;
  }
  to {
    opacity: 0.9;
  }
}
.la-board {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  grid-template-rows: repeat(15, 1fr);
  gap: 1px;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #2a1840, #12081c);
  border: 3px solid #e8b923;
  border-radius: 14px;
  padding: 4px;
  box-shadow:
    inset 0 0 0 2px rgba(255, 220, 140, 0.25),
    0 0 24px rgba(180, 80, 255, 0.35);
}

.ld-cell {
  position: relative;
  border-radius: 3px;
  min-height: 0;
  background: #1a1028;
}
.ld-cell.empty {
  background: transparent;
}
.ld-cell.path,
.ld-cell.track {
  background: linear-gradient(180deg, #fff, #ebe4d4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.ld-cell.yard.red {
  background: linear-gradient(160deg, #ff6b6b, #c62828);
}
.ld-cell.yard.blue {
  background: linear-gradient(160deg, #6eb6ff, #1565c0);
}
.ld-cell.yard.green {
  background: linear-gradient(160deg, #7dffa0, #2e7d32);
}
.ld-cell.yard.yellow {
  background: linear-gradient(160deg, #ffe082, #f9a825);
}
.ld-cell.wing-red {
  background: #f8c0c0;
}
.ld-cell.wing-blue {
  background: #c0d8f8;
}
.ld-cell.wing-green {
  background: #c0f0d0;
}
.ld-cell.wing-yellow {
  background: #f8e8a8;
}
.ld-cell.home.red {
  background: linear-gradient(180deg, #ff5252, #b71c1c);
}
.ld-cell.home.blue {
  background: linear-gradient(180deg, #448aff, #0d47a1);
}
.ld-cell.home.green {
  background: linear-gradient(180deg, #69f0ae, #1b5e20);
}
.ld-cell.home.yellow {
  background: linear-gradient(180deg, #ffd740, #ff6f00);
}
.ld-cell.center,
.ld-cell.finish {
  background: radial-gradient(circle, #fff6c8, #e8b923 55%, #8a5010);
}
.ld-cell.safe {
  box-shadow: inset 0 0 0 1px #e8b923;
}
.ld-cell.chance {
  background: linear-gradient(180deg, #e0b0ff, #7b1fa2);
}
.ld-cell.start-red {
  background: #ff1744;
}
.ld-cell.start-blue {
  background: #2979ff;
}
.ld-cell.start-green {
  background: #00e676;
}
.ld-cell.start-yellow {
  background: #ffea00;
}
.ld-cell.hl {
  outline: 2px solid #fff;
  z-index: 2;
  box-shadow: 0 0 12px #ffe08a;
}
.ld-star {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.5rem;
  color: #e8b923;
  pointer-events: none;
  text-shadow: 0 0 4px #fff;
}
.ld-chance-ico,
.ld-bag {
  position: absolute;
  width: 65%;
  height: 65%;
  left: 17%;
  top: 17%;
  object-fit: cover;
  border-radius: 3px;
  opacity: 0.75;
  pointer-events: none;
  z-index: 1;
}
.ld-bag {
  width: 55%;
  height: 55%;
  left: auto;
  right: 0;
  top: auto;
  bottom: 0;
  opacity: 1;
}
.ld-pawns {
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.ld-pawn {
  position: relative;
  width: 90%;
  max-width: 24px;
  aspect-ratio: 1;
  padding: 0;
  border: none;
  background: transparent;
  cursor: default;
  border-radius: 50%;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}
.ld-pawn.can {
  cursor: pointer;
  animation: laPawn 0.7s ease infinite alternate;
  box-shadow: 0 0 0 2px #fff, 0 0 12px #ffe08a;
}
.ld-pawn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.ld-pawn i {
  position: absolute;
  right: -2px;
  top: -2px;
  font-style: normal;
  font-size: 0.48rem;
  background: #e8b923;
  color: #2a1608;
  border-radius: 50%;
  width: 10px;
  height: 10px;
  display: grid;
  place-items: center;
  font-weight: 900;
}
@keyframes laPawn {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-3px) scale(1.08);
  }
}

/* Corner player cards */
.la-corner {
  position: absolute;
  z-index: 5;
  width: 108px;
  background: linear-gradient(180deg, rgba(50, 25, 80, 0.92), rgba(18, 8, 36, 0.95));
  border: 1.5px solid rgba(232, 185, 35, 0.55);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), 0 0 14px rgba(160, 80, 255, 0.25);
}
.la-corner.tl {
  top: 0;
  left: 0;
}
.la-corner.tr {
  top: 0;
  right: 0;
}
.la-corner.bl {
  bottom: 8px;
  left: 0;
}
.la-corner.br {
  bottom: 8px;
  right: 0;
}
.la-corner.active {
  box-shadow: 0 0 0 2px #ffe08a, 0 0 22px rgba(255, 200, 80, 0.55);
}
.la-corner-top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.la-av {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.la-av img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid #fff;
}
.la-corner.red .la-av img {
  border-color: #ff5252;
  box-shadow: 0 0 10px #ff5252;
}
.la-corner.green .la-av img {
  border-color: #69f0ae;
  box-shadow: 0 0 10px #69f0ae;
}
.la-corner.blue .la-av img {
  border-color: #448aff;
  box-shadow: 0 0 10px #448aff;
}
.la-corner.yellow .la-av img {
  border-color: #ffd740;
  box-shadow: 0 0 10px #ffd740;
}
.la-crown {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  filter: drop-shadow(0 0 4px #ffe08a);
}
.la-mic {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  margin-left: auto;
  opacity: 0.9;
}
.la-corner-name {
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.1;
}
.la-corner-coins {
  font-size: 0.62rem;
  color: #ffe08a;
  font-weight: 700;
}

/* Dice + ROLL */
.la-dice-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.la-dice {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
}
.la-dice::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 80, 0.55), transparent 70%);
  animation: laGlow 1.2s ease-in-out infinite alternate;
  z-index: 0;
}
.la-dice img {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 0 20px rgba(255, 220, 120, 0.65);
}
.la-dice .la-face {
  position: absolute;
  z-index: 2;
  font-size: 1.6rem;
  font-weight: 900;
  color: #1a1030;
  text-shadow: 0 0 8px #fff;
  pointer-events: none;
}
.la-dice.rolling img {
  animation: laSpin 0.45s linear infinite;
}
@keyframes laSpin {
  to {
    transform: rotate(360deg) scale(1.05);
  }
}
.la-roll {
  min-width: 140px;
  padding: 12px 28px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(180deg, #6dff8a, #12a84a 55%, #0a6e30);
  color: #fff;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow:
    0 6px 0 #065c28,
    0 10px 24px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(80, 255, 140, 0.35);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
.la-roll:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: 0 4px 0 #065c28;
}
.la-banner {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffe9a8;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  min-height: 1.1em;
}

/* Footer */
.la-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, rgba(40, 20, 70, 0.75), rgba(12, 6, 28, 0.95));
  border: 1px solid rgba(232, 185, 35, 0.3);
  border-radius: 16px;
  padding: 8px 10px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
}
.la-foot-left,
.la-foot-right {
  display: flex;
  gap: 8px;
  align-items: center;
}
.la-foot-right {
  justify-content: flex-end;
}
.la-foot-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.la-foot-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.la-foot-btn .dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #ff3b5c;
  border-radius: 50%;
}
.la-foot-mid {
  display: flex;
  align-items: center;
  gap: 10px;
}
.la-undo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(232, 185, 35, 0.45);
  background: rgba(30, 15, 55, 0.9);
  color: #ffe08a;
  font-size: 1.1rem;
  cursor: pointer;
}
.la-auto {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.62rem;
  font-weight: 800;
  color: #d8c8ff;
}
.la-switch {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #e8b923;
  background: #2a1840;
  position: relative;
  cursor: pointer;
  padding: 0;
}
.la-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #aaa;
  transition: 0.15s ease;
}
.la-switch.on {
  background: linear-gradient(180deg, #6dff8a, #1a9a4a);
}
.la-switch.on::after {
  left: 20px;
  background: #fff;
}
.la-turn {
  text-align: right;
  line-height: 1.15;
}
.la-turn span {
  display: block;
  font-size: 0.58rem;
  color: #cbb8ff;
  font-weight: 700;
}
.la-turn b {
  font-size: 0.95rem;
  color: #5cff8a;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 8px rgba(80, 255, 140, 0.55);
}

/* Lobby / modals */
.la-lobby {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 4, 18, 0.72);
  backdrop-filter: blur(4px);
}
.la-lobby-card {
  width: min(360px, 100%);
  text-align: center;
  background: linear-gradient(180deg, rgba(60, 30, 100, 0.95), rgba(18, 8, 40, 0.98));
  border: 2px solid #e8b923;
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: 0 0 40px rgba(180, 80, 255, 0.35);
}
.la-lobby-card img.logo {
  height: 56px;
  margin-bottom: 8px;
}
.la-lobby-card h2 {
  margin: 0 0 6px;
  color: #ffe08a;
  font-size: 1.1rem;
}
.la-lobby-card p {
  margin: 0 0 14px;
  color: #cbb8ff;
  font-size: 0.8rem;
}
.la-bet {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  padding: 8px 12px;
}
.la-bet b {
  font-size: 1.2rem;
  color: #ffe08a;
}
.la-pm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e8b923;
  background: #2a1840;
  color: #ffe08a;
  font-size: 1.2rem;
  cursor: pointer;
}
.la-modal {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.7);
  display: grid;
  place-items: center;
  padding: 16px;
}
.la-card {
  width: min(360px, 100%);
  background: linear-gradient(180deg, #3a2060, #140828);
  border: 2px solid #e8b923;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}
.la-card h3 {
  margin: 0 0 10px;
  color: #ffe08a;
}
.la-choose {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.la-choose button {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e8b923;
  background: #1a1030;
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
  cursor: pointer;
}
.la-card.settle p {
  margin: 6px 0;
  color: #cbb8ff;
  font-size: 0.85rem;
}

@media (max-width: 380px) {
  .la-corner {
    width: 92px;
    padding: 4px;
  }
  .la-av {
    width: 32px;
    height: 32px;
  }
  .la-board-wrap {
    width: min(72vw, 300px);
  }
  .la-logo {
    height: 34px;
  }
}

