/* ==========================================================================
   CHOSEN GAMING SUBPAGE & "CHOSEN WORLD" ARCADE CABINET STYLES
   ========================================================================== */

.stamps-wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: rgba(245, 196, 81, 0.14);
  border: 1px solid rgba(254, 240, 184, 0.48);
  font-family: var(--font-scifi);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
  box-shadow: 0 0 18px rgba(245, 196, 81, 0.2);
}

.stamps-wallet-pill img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

/* Streaming Hub Cards */
.stream-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--fib-4);
}

@media (max-width: 980px) {
  .stream-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .stream-grid { grid-template-columns: 1fr; }
}

.stream-card {
  padding: var(--fib-4);
  border-radius: var(--radius-md);
  background: rgba(9, 12, 24, 0.76);
  border: 1px solid rgba(254, 240, 184, 0.2);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all var(--dur-base) var(--ease-royal);
}

.stream-card:hover {
  transform: translateY(-4px);
  border-color: #FFFDF7;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.85), 0 0 28px rgba(16, 185, 129, 0.22);
}

.stream-card--twitch {
  border-color: rgba(168, 85, 247, 0.55);
  background: linear-gradient(140deg, rgba(145, 70, 255, 0.2), rgba(8, 11, 22, 0.88));
}

/* ==========================================================================
   GLOBAL LIVE LEADERBOARD PANEL (CHOSEN GAMING ARCADE)
   ========================================================================== */

.leaderboard-panel {
  margin-top: var(--fib-5);
  padding: var(--fib-5);
  border-radius: var(--radius-lg);
  background: rgba(8, 11, 22, 0.82);
  border: 1px solid rgba(254, 240, 184, 0.34);
  backdrop-filter: blur(22px);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.85), 0 0 36px rgba(245, 196, 81, 0.1);
}

.champion-spotlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px 20px;
  margin: 14px 0 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.22), rgba(16, 185, 129, 0.1), rgba(6, 9, 18, 0.92));
  border: 1.5px solid rgba(254, 240, 184, 0.65);
  box-shadow: 0 0 32px rgba(245, 196, 81, 0.18);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 44px 1fr auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: rgba(3, 4, 10, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
}

.leaderboard-row--top {
  border-color: rgba(254, 240, 184, 0.52);
  background: rgba(245, 196, 81, 0.1);
}

@media (max-width: 640px) {
  .leaderboard-row {
    grid-template-columns: 34px 1fr auto auto;
    gap: 8px;
    padding: 9px 11px;
    font-size: 0.78rem;
  }
  .leaderboard-row__planet {
    display: none;
  }
}

/* Arcade Registry Cards */
.arcade-registry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--fib-4);
  margin-top: var(--fib-5);
}

@media (max-width: 960px) {
  .arcade-registry-grid { grid-template-columns: 1fr; }
}

.arcade-game-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(9, 12, 24, 0.78);
  border: 1px solid rgba(254, 240, 184, 0.24);
  display: flex;
  flex-direction: column;
  transition: all var(--dur-base) var(--ease-royal);
}

.arcade-game-card--live {
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 0 32px rgba(16, 185, 129, 0.14);
}

.arcade-game-card:hover {
  transform: translateY(-4px);
  border-color: #FFFDF7;
}

.arcade-game-card__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background: radial-gradient(circle at 50% 42%, #172554, #04060E 85%);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.arcade-game-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.arcade-game-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: rgba(5, 7, 15, 0.86);
  border: 1px solid rgba(254, 240, 184, 0.45);
  color: var(--gold-bright);
}

.arcade-game-card--live .arcade-game-card__badge {
  background: rgba(6, 78, 59, 0.92);
  border-color: #34D399;
  color: #A7F3D0;
}

.arcade-game-card__body {
  padding: var(--fib-4);
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ==========================================================================
   CHOSEN WORLD — 16:9 INTERACTIVE ARCADE CABINET & IN-GAME OVERLAYS
   ========================================================================== */

.cw-cabinet {
  --cw-ctrl-scale: 1.25; /* Default +25% larger buttons; adjustable by player! */
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 8px;
  background: linear-gradient(145deg, rgba(254, 240, 184, 0.24), rgba(16, 185, 129, 0.16), rgba(8, 11, 22, 0.94));
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.92), 0 0 48px rgba(245, 196, 81, 0.14);
}

.cw-stage-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #03040A;
  border-radius: calc(var(--radius-lg) - 4px);
  overflow: hidden;
  user-select: none;
}

.cw-stage-wrap:fullscreen {
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cw-canvas {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}

/* Top Frosted Space HUD Bar (+25% Larger Controls & Timer) */
.cw-hud {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 15px;
  border-radius: 14px;
  background: rgba(10, 15, 32, 0.76);
  border: 1px solid rgba(186, 230, 253, 0.36);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  flex-wrap: wrap;
}

.cw-hud__left,
.cw-hud__center,
.cw-hud__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cw-hud__world {
  font-family: var(--font-scifi);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #FEF08A;
}

.cw-hud__env {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 10px;
  color: #BAE6FD;
}

.cw-hud__timer {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(245, 196, 81, 0.14);
  border: 1px solid rgba(254, 240, 184, 0.4);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #FFFDF7;
}

.cw-hud__portrait {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 1.5px solid #FDE047;
  background: #FFFDF7;
}

.cw-hud__hearts {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.cw-heart {
  font-size: 1.32rem;
  line-height: 1;
  display: inline-block;
  transition: transform 200ms;
}

.cw-heart.is-full {
  color: #EF4444;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.75);
}

.cw-heart.is-half {
  background: linear-gradient(90deg, #EF4444 50%, rgba(255, 255, 255, 0.24) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.55));
}

.cw-heart.is-empty {
  color: rgba(255, 255, 255, 0.18);
}

.cw-hud__buffs {
  display: inline-flex;
  gap: 6px;
}

.cw-buff {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.cw-buff--gold { background: rgba(245, 158, 11, 0.3); border: 1px solid #FDE047; color: #FEF08A; }
.cw-buff--cyan { background: rgba(14, 165, 233, 0.3); border: 1px solid #7DD3FC; color: #E0F2FE; }
.cw-buff--shield { background: rgba(234, 179, 8, 0.3); border: 1px solid #FEF08A; color: #FFFFFF; }

.cw-hud__stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-scifi);
  font-size: 0.78rem;
  font-weight: 700;
  color: #FEF08A;
}

.cw-hud__stat--stamps {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #A7F3D0;
  font-size: 0.68rem;
}

.cw-hud__coin-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #FDE047;
}

/* +25% Larger HUD Icon Buttons (35x35px) */
.cw-hud__icon-btn {
  width: 35px;
  height: 35px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(254, 240, 184, 0.28);
  color: #FFFDF7;
  font-size: 14px;
  display: grid;
  place-items: center;
  transition: all 180ms;
}

.cw-hud__icon-btn:hover {
  border-color: #FEF08A;
  color: #FEF08A;
  background: rgba(245, 196, 81, 0.2);
}

/* Title & Summary Overlays (+25% Larger Action Buttons) */
.cw-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: radial-gradient(circle at 50% 42%, rgba(8, 12, 28, 0.72), rgba(3, 4, 10, 0.92));
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
}

.cw-title-card,
.cw-summary-card {
  width: min(620px, 96%);
  text-align: center;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  background: rgba(7, 10, 22, 0.9);
  border: 1px solid rgba(254, 240, 184, 0.42);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(56, 189, 248, 0.16);
}

.cw-logo-pulse {
  width: min(170px, 34vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto 8px;
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid rgba(125, 211, 252, 0.5);
  box-shadow: 0 0 34px rgba(56, 189, 248, 0.35), 0 0 60px rgba(245, 196, 81, 0.2);
  animation: cwLogoFloat 4s ease-in-out infinite;
}

.cw-logo-pulse img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes cwLogoFloat {
  0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(56, 189, 248, 0.32); }
  50% { transform: scale(1.04); box-shadow: 0 0 46px rgba(245, 196, 81, 0.48); }
}

.cw-champion-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, rgba(245, 196, 81, 0.22), rgba(16, 185, 129, 0.18));
  border: 1px solid rgba(254, 240, 184, 0.55);
  font-family: var(--font-mono);
  font-size: 11px;
  color: #FFFDF7;
  margin-bottom: 10px;
}

.cw-title-sub {
  font-size: 0.84rem;
  color: var(--ink-secondary);
  margin-bottom: 10px;
}

.cw-wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(245, 196, 81, 0.12);
  border: 1px solid rgba(254, 240, 184, 0.36);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold-bright);
  margin-bottom: 12px;
}

.cw-wallet-pill img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

/* +25% Larger Game Menu Buttons */
.cw-title-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.cw-title-actions .btn-royal,
.cw-title-actions .btn-ghost-gold {
  padding: 15px 30px;
  font-size: 0.88rem;
}

.cw-name-entry-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px auto 0;
  max-width: 420px;
}

.cw-name-entry-box input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  background: rgba(3, 4, 10, 0.85);
  border: 1px solid rgba(254, 240, 184, 0.45);
  color: #FFFDF7;
  font-family: var(--font-scifi);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  outline: none;
}

.cw-name-entry-box input:focus {
  border-color: #FFFDF7;
  box-shadow: 0 0 18px rgba(245, 196, 81, 0.35);
}

.cw-controls-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-secondary);
}

.cw-summary-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 580px) {
  .cw-summary-stats { grid-template-columns: repeat(2, 1fr); }
}

.cw-summary-stats span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.cw-summary-stats strong {
  font-family: var(--font-scifi);
  font-size: 0.95rem;
  color: #FFFDF7;
}

/* Chosen Closet & Controls Comfort Settings Drawers */
.cw-closet-drawer {
  position: absolute;
  inset: 0;
  z-index: 32;
  background: rgba(4, 6, 14, 0.95);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  overflow-y: auto;
}

.cw-closet-inner {
  width: 100%;
  max-width: 860px;
  margin: auto;
}

.cw-closet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(254, 240, 184, 0.2);
  flex-wrap: wrap;
}

.cw-closet-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 720px) {
  .cw-closet-body { grid-template-columns: 1fr; }
}

.cw-closet-preview {
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(12, 16, 32, 0.85);
  border: 1px solid rgba(254, 240, 184, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cw-closet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (max-width: 580px) {
  .cw-closet-grid { grid-template-columns: 1fr; }
}

.cw-closet-card {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(11, 15, 28, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.cw-closet-card.is-equipped {
  border-color: #FFFDF7;
  background: linear-gradient(135deg, rgba(245, 196, 81, 0.14), rgba(11, 15, 28, 0.92));
}

/* ==========================================================================
   ADJUSTABLE ON-SCREEN CONTROLS (+25% DEFAULT, SCALABLE 100% TO 175%)
   ========================================================================== */

.cw-touch-controls {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 22;
  display: none;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}

.cw-touch-controls.mode-auto.is-touch,
.cw-touch-controls.mode-show {
  display: flex;
}

.cw-touch-controls.mode-hide {
  display: none !important;
}

@media (pointer: coarse) {
  .cw-touch-controls.mode-auto {
    display: flex;
  }
}

.cw-touch-dpad,
.cw-touch-actions {
  display: flex;
  gap: calc(10px * var(--cw-ctrl-scale, 1.25));
  align-items: center;
  pointer-events: auto;
}

.cw-touch-btn {
  width: calc(54px * var(--cw-ctrl-scale, 1.25));
  height: calc(54px * var(--cw-ctrl-scale, 1.25));
  border-radius: 50%;
  background: rgba(10, 14, 28, 0.62);
  border: 2px solid rgba(254, 240, 184, 0.55);
  color: #FFFDF7;
  font-family: var(--font-scifi);
  font-size: calc(0.78rem * var(--cw-ctrl-scale, 1.25));
  font-weight: 700;
  backdrop-filter: blur(6px);
  touch-action: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.65);
  transition: transform 100ms, background 120ms;
}

.cw-touch-btn--jump {
  width: calc(64px * var(--cw-ctrl-scale, 1.25));
  height: calc(64px * var(--cw-ctrl-scale, 1.25));
  background: rgba(245, 196, 81, 0.3);
  border-color: #FEF08A;
}

.cw-touch-btn--sm {
  width: calc(50px * var(--cw-ctrl-scale, 1.25));
  height: calc(50px * var(--cw-ctrl-scale, 1.25));
  font-size: calc(0.62rem * var(--cw-ctrl-scale, 1.25));
}

.cw-touch-btn.pressed {
  background: rgba(245, 196, 81, 0.62);
  color: #05060B;
  transform: scale(0.94);
}

@media (max-width: 680px) {
  .cw-stage-wrap {
    aspect-ratio: 4 / 3;
  }
  .cw-logo-pulse {
    width: 92px;
  }
  .cw-title-card,
  .cw-summary-card {
    padding: 14px;
  }
  .cw-title-actions .btn-royal,
  .cw-title-actions .btn-ghost-gold {
    padding: 12px 20px;
    font-size: 0.76rem;
  }
  .cw-controls-bar,
  .cw-hud__env {
    display: none;
  }
}
