/* ================================================================
   DXED Games Hub — hub + game chrome styles
   Follows the main site's charcoal design tokens.
   ================================================================ */

:root {
  --bg-primary: #050506;
  --bg-card: #15161c;
  --bg-card-hover: #1d1f26;
  --bg-elevated: #1d1f26;
  --border: rgba(255, 255, 255, 0.07);
  --text-primary: #edeef1;
  --text-secondary: #969aa6;
  --text-muted: #5c606b;
  --accent: #9aa4c0;
  --green: #4f9e6a;
  --red: #cf5a5e;
  --gold: #b3993f;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body.arcade-body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
}

.arc-wrap { max-width: 1080px; margin: 0 auto; padding: 24px 20px 80px; }

/* ── Top bar ── */
.arc-topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 26px;
}
.arc-topbar a.arc-back {
  color: var(--text-secondary); text-decoration: none; font-size: 13px;
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 10px;
  transition: all .15s;
}
.arc-topbar a.arc-back:hover { color: var(--text-primary); background: var(--bg-card); }
.arc-title { font-size: 22px; font-weight: 800; letter-spacing: .3px; }
.arc-title small { display: block; font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 2px; }
.arc-spacer { flex: 1; }
.arc-user { font-size: 13px; color: var(--text-secondary); }

/* ── Badges ── */
.arc-badge {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; padding: 3px 8px; border-radius: 6px;
}
.arc-badge.beta { background: rgba(179, 153, 63, .15); color: var(--gold); }
.arc-badge.live { background: rgba(79, 158, 106, .15); color: var(--green); }
.arc-badge.disabled { background: rgba(207, 90, 94, .15); color: var(--red); }
.arc-badge.devnet { background: rgba(154, 164, 192, .15); color: var(--accent); }

/* ── Hub grid ── */
.arc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.arc-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: transform .15s, border-color .15s;
}
.arc-card:hover { transform: translateY(-3px); border-color: rgba(154, 164, 192, .4); }
.arc-card-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #0b0c10; }
.arc-card-body { padding: 14px 16px 16px; }
.arc-card-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.arc-card-desc { font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; margin-top: 6px; }
.arc-card-meta { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.arc-chip {
  font-size: 11px; color: var(--text-secondary); background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px;
}

.arc-empty { color: var(--text-muted); font-size: 14px; padding: 60px 0; text-align: center; }

/* ── Detail / panel ── */
.arc-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 18px;
}
.arc-panel h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text-primary); }
.arc-row { display: flex; justify-content: space-between; font-size: 13px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.arc-row:last-child { border-bottom: none; }
.arc-row span:first-child { color: var(--text-secondary); }

/* ── Buttons ── */
.arc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13.5px; font-weight: 700; padding: 11px 20px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-primary);
  cursor: pointer; transition: all .15s; text-decoration: none; font-family: inherit;
}
.arc-btn:hover { background: #262933; }
.arc-btn.primary { background: #e8e9ee; color: #0b0c10; border-color: transparent; }
.arc-btn.primary:hover { background: #fff; }
.arc-btn.danger { color: var(--red); border-color: rgba(207, 90, 94, .3); }
.arc-btn.danger:hover { background: rgba(207, 90, 94, .12); }
.arc-btn:disabled { opacity: .45; cursor: not-allowed; }
.arc-btn.small { padding: 7px 13px; font-size: 12px; border-radius: 9px; }

/* ── History table ── */
.arc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.arc-table th {
  text-align: left; color: var(--text-muted); font-size: 11px; text-transform: uppercase;
  letter-spacing: .6px; padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.arc-table td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,.04); }
.arc-win { color: var(--green); font-weight: 700; }
.arc-loss { color: var(--red); font-weight: 700; }
.arc-draw { color: var(--text-muted); font-weight: 700; }

/* ── Toast ── */
.arc-toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: #1d1f26; border: 1px solid var(--border); color: var(--text-primary);
  padding: 12px 20px; border-radius: 12px; font-size: 13px; z-index: 3000;
  box-shadow: 0 8px 30px rgba(0,0,0,.5); max-width: 90vw;
}
.arc-toast.err { border-color: rgba(207, 90, 94, .5); }

@media (max-width: 640px) {
  .arc-wrap { padding: 16px 12px 60px; }
  .arc-grid { grid-template-columns: 1fr; }
}
