/* ==========================================================================
   SQUEEK ROYALE — ARENA HUB (play.html) PAGE STYLES
   Extends portal.css + dapp.css (for NFT card frames)
   ========================================================================== */

/* ---- Wallet Connection Bar ---- */
.play-wallet-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
}

/* ---- Brand King Face Logo (Shared across / and /play) ---- */
.brand-king-logo {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 45%, rgba(248, 200, 77, 0.28) 0%, rgba(26, 15, 39, 0.92) 78%);
  border: 1.5px solid rgba(248, 200, 77, 0.65);
  box-shadow: 0 0 18px rgba(248, 200, 77, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}
.brand:hover .brand-king-logo {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 0 24px rgba(248, 200, 77, 0.52);
}
.brand-king-logo .king-face {
  width: 38px;
  height: 38px;
  object-fit: cover;
  object-position: 62% 38%;
  border-radius: 10px;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.65));
}
.brand-king-logo .king-crown {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-44%) rotate(-4deg);
  width: 30px;
  height: 30px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(248, 200, 77, 0.7));
}
.play-wallet-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.play-wallet-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.play-net-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-family: inherit;
}
.play-no-deploy {
  padding: 14px 18px;
  background: rgba(224, 62, 82, 0.1);
  border: 1px solid rgba(224, 62, 82, 0.4);
  border-radius: var(--radius-md);
  color: #ffb4bd;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

/* ---- Section Containers ---- */
.play-section {
  margin-bottom: 36px;
}
.play-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.play-section-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

/* ---- Arena Tabs ---- */
.play-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.play-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 0.84rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.play-tab:hover {
  color: #fff;
  background: var(--bg-card);
  border-color: var(--border-glow);
}
.play-tab.on {
  color: #1a0f1d;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(248, 200, 77, 0.3);
}
.play-tab-icon {
  font-size: 1rem;
}
.play-tab-count {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-muted);
  min-width: 18px;
  text-align: center;
}
.play-tab.on .play-tab-count {
  background: rgba(0, 0, 0, 0.25);
  color: #1a0f1d;
}

/* ---- Arena Cards Grid ---- */
.play-arena-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

/* ---- Individual Arena Card ---- */
.arena-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}
.arena-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card), var(--shadow-glow-purple);
}

/* Status glow accents */
.arena-card.status-open {
  border-left: 3px solid var(--green);
}
.arena-card.status-open::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(76, 217, 123, 0.5);
}

.arena-card.status-locked {
  border-left: 3px solid var(--amber);
}
.arena-card.status-seeded {
  border-left: 3px solid var(--neon-cyan);
}
.arena-card.status-settled {
  border-left: 3px solid var(--gold);
}
.arena-card.status-cancelled {
  border-left: 3px solid rgba(224, 62, 82, 0.5);
  opacity: 0.75;
}

/* Card Top Row */
.arena-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.arena-card-id {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}
.arena-card-id small {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 4px;
}
.arena-card-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-pill-open { background: rgba(76, 217, 123, 0.16); border: 1px solid rgba(76, 217, 123, 0.5); color: var(--green); }
.status-pill-locked { background: rgba(239, 160, 75, 0.16); border: 1px solid rgba(239, 160, 75, 0.5); color: var(--amber); }
.status-pill-seeded { background: rgba(0, 242, 254, 0.16); border: 1px solid rgba(0, 242, 254, 0.5); color: var(--neon-cyan); }
.status-pill-settled { background: rgba(248, 200, 77, 0.16); border: 1px solid rgba(248, 200, 77, 0.5); color: var(--gold); }
.status-pill-cancelled { background: rgba(224, 62, 82, 0.16); border: 1px solid rgba(224, 62, 82, 0.5); color: #ffb4bd; }

/* Card Info Grid */
.arena-card-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.arena-info-item {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 7px 9px;
  text-align: center;
}
.arena-info-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}
.arena-info-value {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-mono);
}
.arena-info-value.highlight {
  color: var(--gold);
}

/* Slot Counter */
.slot-bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0;
}
.slot-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--neon-cyan));
  transition: width 0.3s ease;
}
.slot-bar-fill.full {
  background: linear-gradient(90deg, var(--amber), var(--crimson));
}

/* My Entry Highlight */
.arena-my-entry {
  background: rgba(248, 200, 77, 0.08);
  border: 1px solid rgba(248, 200, 77, 0.25);
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.arena-my-entry .my-badge {
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: #1a0f1d;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}

/* Card Actions */
.arena-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Result Mini-Stats */
.arena-result-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.arena-result-chip {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
}
.arena-result-chip.winner {
  background: rgba(248, 200, 77, 0.15);
  border-color: rgba(248, 200, 77, 0.4);
  color: var(--gold);
}

/* Countdown Timer */
.arena-countdown {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--neon-cyan);
}
.arena-countdown.urgent {
  color: var(--crimson);
  animation: urgentPulse 1.2s infinite;
}
@keyframes urgentPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ---- Empty States ---- */
.play-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.play-empty-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
  opacity: 0.6;
}

/* ---- Mint Info ---- */
.play-mint-info {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.play-mint-info:empty {
  display: none;
}

/* ---- Replay Button Glow ---- */
.btn-replay {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  color: #081326 !important;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
  font-weight: 800;
}
.btn-replay:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.5);
  transform: translateY(-2px);
}

/* ---- Join Button ---- */
.btn-join {
  background: linear-gradient(135deg, var(--green), #2bba5e);
  color: #0a1f14 !important;
  border-color: var(--green);
  box-shadow: 0 0 10px rgba(76, 217, 123, 0.25);
}
.btn-join:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 18px rgba(76, 217, 123, 0.45);
}

/* ---- Mobile Responsive ---- */
@media (max-width: 640px) {
  .play-arena-grid {
    grid-template-columns: 1fr;
  }
  .arena-card-info {
    grid-template-columns: repeat(2, 1fr);
  }
  .play-wallet-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .play-wallet-left, .play-wallet-right {
    justify-content: center;
  }
  .play-section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ==========================================================================
   /PLAY — GAMEPLAY & PLAYER HUB (5 MODULES + ON-CHAIN VERIFIED RECORDS)
   ========================================================================== */

/* Hub Module Switcher Bar */
.hub-module-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 24px;
  background: rgba(18, 11, 31, 0.9);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: var(--shadow-card);
}

@media (max-width: 960px) {
  .hub-module-nav {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .hub-module-nav {
    grid-template-columns: 1fr;
  }
}

.hub-mod-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.hub-mod-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--neon-cyan);
  color: #fff;
  transform: translateY(-2px);
}

.hub-mod-btn.active {
  background: linear-gradient(135deg, rgba(248, 200, 77, 0.2), rgba(239, 160, 75, 0.08));
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 0 22px rgba(248, 200, 77, 0.25);
}

.hub-mod-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.hub-mod-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
}

.hub-mod-btn.active .hub-mod-text strong {
  color: var(--gold);
}

.hub-mod-text span {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
}

/* Module Panels */
.hub-module-panel {
  display: none;
  animation: fadeModuleIn 0.25s ease-out;
}

.hub-module-panel.active {
  display: block;
}

@keyframes fadeModuleIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Embedded Spectator / Replay Stage inside /play */
.spectator-stage-card {
  background: var(--bg-panel);
  border: 2px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card), var(--shadow-glow-purple);
}

.spectator-iframe-wrap {
  position: relative;
  width: 100%;
  height: 620px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0d0818;
}

.spectator-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* KPI Stat Cards Row */
.hub-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 860px) {
  .hub-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

.hub-kpi-card {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-panel) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.hub-kpi-card .kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.hub-kpi-card .kpi-val {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--gold);
  font-family: var(--font-mono);
}

/* On-chain Records Table & Badges */
.onchain-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(248, 200, 77, 0.14) 0%, rgba(0, 242, 254, 0.08) 100%);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: 0 0 28px rgba(248, 200, 77, 0.18);
}

.btn-claim-all {
  background: linear-gradient(135deg, #ffe26a 0%, #f8c84d 50%, #ff991f 100%);
  color: #16091e !important;
  font-weight: 900;
  font-size: 0.96rem;
  padding: 13px 26px;
  border-radius: 12px;
  border: 2px solid #fff2b2;
  box-shadow: 0 6px 24px rgba(248, 200, 77, 0.45);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-claim-all:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(248, 200, 77, 0.65);
  filter: brightness(1.06);
}

.btn-claim-all:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.hub-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-panel);
}

.hub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.hub-table th,
.hub-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(139, 79, 212, 0.22);
}

.hub-table th {
  background: rgba(0, 0, 0, 0.4);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.hub-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.hub-table tr.me-row td {
  background: rgba(248, 200, 77, 0.08);
}

.res-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 900;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.res-win {
  background: rgba(248, 200, 77, 0.2);
  border: 1px solid var(--gold);
  color: var(--gold);
  box-shadow: 0 0 10px rgba(248, 200, 77, 0.25);
}

.res-loss {
  background: rgba(181, 155, 212, 0.12);
  border: 1px solid rgba(181, 155, 212, 0.3);
  color: var(--text-muted);
}

.status-confirmed-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(76, 217, 123, 0.16);
  border: 1px solid rgba(76, 217, 123, 0.55);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(76, 217, 123, 0.2);
}

.status-pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(239, 160, 75, 0.16);
  border: 1px solid rgba(239, 160, 75, 0.45);
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 700;
}

/* the viewer card, moved right under the arena whose "Watch" was pressed */
.play-arena-grid > .spectator-stage-card.inline { grid-column: 1 / -1; margin-bottom: 0; }

/* My Hamsters: deposit state + action under each card */
.ham-deposit { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); font-size: .74rem; color: var(--text-muted); }
.ham-deposit.on { color: var(--green, #5ce0a0); }


/* ==========================================================================
   AGY NATIVE DESIGN SYSTEM — /PLAY SINGLE-LINE NAVBAR & HIGH-CONTRAST BUTTONS
   ========================================================================== */
/* (the nav layout itself lives in portal.css, shared with the landing page) */

/* not connected: one line above the hub (watching needs no wallet) */
.play-connect-banner { margin: 0 0 16px; padding: 10px 14px; border: 1.5px solid #6b479e; border-radius: 12px;
  background: linear-gradient(90deg, rgba(248, 200, 77, .10), rgba(44, 29, 71, .6)); }
.play-connect-banner .pcb-body { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.play-connect-banner .pcb-icon { font-size: 1.3rem; }
.play-connect-banner #walletGateText { flex: 1 1 320px; margin: 0; font-size: .86rem; color: #e2d1f0; }
.play-connect-banner #walletGateText .invite { color: var(--gold); }
.play-connect-banner #walletGateNoMM { flex-basis: 100%; margin: 0; font-size: .8rem; }

/* account pill: click it for the Disconnect menu */
.acct-wrap { position: relative; display: inline-flex; }
.acct-pill { cursor: pointer; font-family: inherit; font-size: .8rem; line-height: 1.3; border-radius: 999px; }
.acct-pill::after { content: ' ▾'; opacity: .75; }
.acct-pill[aria-expanded="true"]::after { content: ' ▴'; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 1100;
  min-width: 240px; display: flex; flex-direction: column; gap: 8px; padding: 10px;
  background: #1d1230; border: 1.5px solid #6b479e; border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .6);
}
.acct-menu[hidden] { display: none; }
.acct-full { font-family: ui-monospace, Consolas, monospace; font-size: .7rem; color: var(--text-muted); word-break: break-all; }
.acct-menu #btnDisconnect { width: 100%; justify-content: center; border-color: #ff5876 !important; color: #ffc2ce !important; background: rgba(255, 51, 102, .1) !important; }
.acct-menu #btnDisconnect:hover { background: rgba(255, 51, 102, .24) !important; }

.play-tab {
  background: linear-gradient(180deg, #32204f 0%, #24163a 100%);
  border: 1.5px solid #634194;
  color: #f3e6ff;
  font-weight: 800;
}

.play-tab:hover {
  background: linear-gradient(180deg, #432b68 0%, #311f4e 100%);
  border-color: #9f6ee6;
  color: #ffffff;
}

.play-tab.on {
  color: #16091e !important;
  background: linear-gradient(135deg, #ffe26a 0%, #f8c84d 50%, #f29a2e 100%) !important;
  border-color: #fff2b2 !important;
  box-shadow: 0 4px 16px rgba(248, 200, 77, 0.4);
}

.play-net-select {
  background: #2c1d47 !important;
  border: 1.5px solid #6b479e !important;
  color: #ffffff !important;
  font-weight: 700;
}

.pill {
  background: #2a1b42 !important;
  border: 1.5px solid #6b479e !important;
  color: #f3e6ff !important;
  font-weight: 800;
  padding: 5px 12px;
}

.pill.ok {
  background: rgba(46, 213, 115, 0.22) !important;
  border-color: #4cd97b !important;
  color: #8affbe !important;
}

.pill.bad {
  background: rgba(255, 51, 102, 0.24) !important;
  border-color: #ff5876 !important;
  color: #ffc2ce !important;
}

.btn-claim-all:disabled,
.btn:disabled,
button.btn:disabled {
  background: #2b1d42 !important;
  border: 1.5px solid #53397a !important;
  color: #b59bd4 !important;
  opacity: 0.85 !important;
  cursor: not-allowed;
  box-shadow: none !important;
}

/* Create a room */
.room-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.room-form label { display: flex; flex-direction: column; gap: 4px; font-size: .74rem; color: var(--text-muted); }
.room-form input, .room-form select { background: #160f21; border: 1px solid var(--border); border-radius: 10px; color: var(--text); padding: 7px 10px; font: inherit; font-size: .85rem; }
.room-form input[type=number] { width: 110px; }

/* My Hamsters: pick several, act on them at once */
.ham-bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.ham-pick { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .74rem; color: var(--text-muted); cursor: pointer; }

/* Arena card: pick the hamster that enters by its NFT picture */
.join-pick { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; width: 100%; }
.join-ham { flex: 0 0 auto; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; border: 2px solid var(--border); background: #160f21; cursor: pointer; color: var(--text); }
.join-ham canvas { width: 56px; height: 56px; }
.join-ham .jh-id { font-size: .7rem; font-weight: 800; }
.join-ham .jh-st { font-size: .6rem; color: var(--text-muted); }
.join-ham .jh-st.dep { color: var(--green, #5ce0a0); }
.join-ham.on { border-color: var(--gold, #f8c84d); box-shadow: 0 0 0 2px rgba(248,200,77,.25); }
/* Shared / typed match id */
.match-find { display: inline-flex; gap: 6px; align-items: center; margin-left: 6px; }
.match-find input { width: 96px; background: #160f21; border: 1px solid var(--border); border-radius: 10px; color: var(--text); padding: 5px 8px; font: inherit; font-size: .8rem; }
.arena-card.focus { outline: 3px solid var(--gold, #f8c84d); outline-offset: 3px; animation: focusPulse 1s ease-in-out 3; }
@keyframes focusPulse { 50% { outline-color: transparent; } }
#walletGateText .invite { display: block; color: var(--gold, #f8c84d); margin-bottom: 6px; }

/* The match page (/play?match=<id>) */
.match-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.match-head h2 { margin: 0; font-size: 1.3rem; }
.match-body { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(300px, 1.2fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .match-body { grid-template-columns: 1fr; } }
.match-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: .86rem; }
.match-kv dt { color: var(--text-muted); } .match-kv dd { margin: 0; }
#matchCard .arena-card { cursor: default; }
.play-arena-grid .arena-card { cursor: pointer; }
.match-note { margin: 14px 0; font-size: .9rem; }
.live-dot { color: #ff3b5c; animation: livePulse 1s ease-in-out infinite; }
/* Live wall: one large tile per match that is playing or about to start */
.live-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 600px), 1fr)); gap: 16px; }
.live-wall > .live-empty { grid-column: 1 / -1; }
.live-tile { background: var(--bg-panel); border: 2px solid rgba(255, 59, 92, 0.45); border-radius: 16px; padding: 10px;
  box-shadow: 0 0 22px rgba(255, 59, 92, 0.12); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lt-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 2px 4px; }
.lt-title { font-weight: 800; font-size: 1.02rem; }
.lt-title small { color: var(--text-muted); font-weight: 600; margin-left: 4px; }
.lt-status { font-size: .78rem; font-weight: 900; padding: 3px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.lt-status.live { background: rgba(255, 59, 92, 0.16); border: 1px solid rgba(255, 59, 92, 0.6); color: #ff8da1; }
.lt-status.soon { background: rgba(248, 200, 77, 0.14); border: 1px solid rgba(248, 200, 77, 0.5); color: var(--gold); }
.lt-status.over { background: rgba(159, 134, 184, 0.14); border: 1px solid rgba(159, 134, 184, 0.45); color: var(--text-muted); }
.lt-meta { font-size: .78rem; color: var(--text-muted); }
.lt-actions { margin-left: auto; display: flex; gap: 6px; }
.lt-frame { position: relative; height: clamp(380px, 44vw, 560px); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #0d0818; }
.live-wall.single { grid-template-columns: 1fr; }
.live-wall.single .lt-frame { height: clamp(420px, 52vw, 700px); }
.lt-frame::before { content: '⏳'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: var(--text-muted); }
.lt-frame iframe { position: relative; width: 100%; height: 100%; border: 0; display: block; }

/* Match page: wallets, entries in join order, stats of every NFT */
.match-players { margin-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.mp-title { font-size: 1rem; margin: 12px 0 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mp-sub { font-size: .74rem; font-weight: 500; }
.mp-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.mp-scroll { max-height: 420px; overflow-y: auto; }
.mp-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.mp-table th, .mp-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid rgba(74, 53, 96, 0.5); white-space: nowrap; }
.mp-table th { position: sticky; top: 0; background: var(--bg-panel); color: var(--text-muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.mp-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.mp-table td.mp-nfts { white-space: normal; }
.mp-table tr.me td { background: rgba(255, 77, 106, 0.1); }
.mp-table tr.win td { color: var(--gold); }
.mp-you { color: #ff4d6a; font-size: .72rem; text-transform: uppercase; }
.addr-copy { background: none; border: 1px dashed transparent; color: var(--neon-cyan, #5ce0e6); cursor: copy; padding: 1px 4px; border-radius: 6px; font-size: .84rem; }
.addr-copy:hover { border-color: currentColor; }
.addr-copy.copied { color: var(--green); border-color: var(--green); }
.addr-copy.copied::after { content: ' ✓'; }
.addr-ex { color: var(--text-muted); text-decoration: none; font-size: .78rem; }

/* Live: matches playing right now */
.status-pill-live { background: rgba(255, 59, 92, 0.16); border: 1px solid rgba(255, 59, 92, 0.6); color: #ff8da1; font-weight: 900; }
.btn-live { background: linear-gradient(135deg, #e0213f, #ff4d6a); color: #fff; border: 1px solid #ff4d6a; font-weight: 800; }
.btn-live .live-dot { color: #fff; }
.btn-live:hover { filter: brightness(1.1); }
.play-tab-live .live-dot { color: var(--text-muted); animation: none; }
.play-tab-live.has-live .live-dot { color: #ff3b5c; animation: livePulse 1s ease-in-out infinite; }
.play-tab-live.has-live .play-tab-count { background: #ff3b5c; color: #fff; }
.play-tab-live.on .live-dot { color: #b3001b; }
/* until the viewer page paints, the frame shows a loading line (the viewer then takes over with its own bar) */
.spectator-iframe-wrap::before { content: '⏳'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--text-muted); z-index: 0; }
.spectator-iframe-wrap iframe { position: relative; z-index: 1; }
@keyframes livePulse { 50% { opacity: .25; } }

/* 30 matches a page */
.arena-pager { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; font-size: .86rem; }

/* Battle Arenas: one match per row (the match page keeps the card) */
#arenaGrid.play-arena-grid { grid-template-columns: 1fr; gap: 10px; }
#arenaGrid .arena-card { display: grid; grid-template-columns: minmax(170px, 220px) minmax(300px, 1fr) auto; column-gap: 18px; row-gap: 8px; align-items: center; padding: 12px 16px; }
#arenaGrid .arena-card:hover { transform: none; }
#arenaGrid .arena-card > * { grid-column: 1 / -1; }
#arenaGrid .arena-card-top { grid-column: 1; grid-row: 1; margin: 0; flex-direction: column; align-items: flex-start; gap: 4px; }
#arenaGrid .arena-card-info { grid-column: 2; grid-row: 1; margin: 0; }
#arenaGrid .arena-card-actions { grid-column: 3; grid-row: 1; padding: 0; border: 0; justify-content: flex-end; flex-wrap: nowrap; }
#arenaGrid .slot-bar { grid-column: 2; grid-row: 2; margin: 0; }
@media (max-width: 860px) {
  #arenaGrid .arena-card { grid-template-columns: 1fr; }
  #arenaGrid .arena-card-top, #arenaGrid .arena-card-info, #arenaGrid .arena-card-actions, #arenaGrid .slot-bar { grid-column: 1; grid-row: auto; }
  #arenaGrid .arena-card-actions { justify-content: flex-start; flex-wrap: wrap; }
}
/* the hamster picker, shown under the row once "Join" is pressed */
.join-panel { grid-column: 1 / -1; border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 4px; }
.join-panel-head { font-size: .8rem; color: var(--text-muted); margin-bottom: 6px; }
.join-panel-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
