/* ============================================================================
   RockGame — dark theme (teal + gold), following the reference design system
   ========================================================================== */
:root {
  --bg-body: #0d0d10;
  --bg-card: #1a1a1f;
  --bg-card-hover: #202027;
  --bg-header: #121216;
  --bg-sidebar: #0f0f14;
  --bg-input: #141418;
  --bg-overlay: rgba(0, 0, 0, 0.75);

  --border-card: #2a2a30;
  --border-input: #2e2e36;
  --border-divider: #1f1f24;

  --text-heading: #ffffff;
  --text-body: #b5b5be;
  --text-muted: #8a8a95;
  --text-invert: #0d0d10;

  --accent-primary: #2dd4bf;
  --accent-primary-hover: #2cbba9;
  --accent-gold: #eab308;
  --accent-gold-hover: #ca9c0a;
  --accent-danger: #ef4444;
  --accent-success: #10b981;
  --accent-info: #3b82f6;

  --grad-header-top: linear-gradient(90deg, #8b5a5c 0%, #6b7a99 100%);
  --grad-gold: linear-gradient(135deg, #fcd34d 0%, #eab308 50%, #a16207 100%);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.35);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.45);

  --header-height: 64px;
  --container-max: 1240px;
}

/* Theme presets — selectable from the WordPress plugin / lobby_style setting */
body.theme-gold  { --accent-primary: #eab308; --accent-primary-hover: #ca9c0a; }
body.theme-blue  { --accent-primary: #3b82f6; --accent-primary-hover: #2f6fd6; }
body.theme-pink  { --accent-primary: #ec4899; --accent-primary-hover: #d13a85; }
body.theme-green { --accent-primary: #22c55e; --accent-primary-hover: #1da851; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-font-smoothing: antialiased; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 50% -200px, #16201f 0%, var(--bg-body) 55%);
  color: var(--text-body);
  min-height: 100%;
  line-height: 1.55;
  font-size: 14px;
  overflow-x: hidden;
}
a { color: var(--accent-primary); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--accent-primary-hover); }
img { max-width: 100%; display: block; border: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
h1,h2,h3,h4,h5,h6 { color: var(--text-heading); font-weight: 700; line-height: 1.25; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 17px; } h4 { font-size: 15px; }
p { margin-bottom: .75em; }
ul, ol { list-style: none; }
hr { border: 0; border-top: 1px solid var(--border-divider); margin: 20px 0; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a2a34; border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* --------------------------------------------------------------- topbar --- */
.topbar {
  height: var(--header-height);
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-divider);
  position: sticky; top: 0; z-index: 40;
}
.topbar::before { content:""; position:absolute; left:0; right:0; top:0; height:3px; background: var(--grad-header-top); }
.topbar-inner {
  max-width: var(--container-max); margin: 0 auto; height: 100%;
  padding: 0 20px; display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-heading); font-weight: 800; font-size: 17px; }
.brand .mark {
  width: 34px; height: 34px; border-radius: var(--radius-md); background: var(--grad-gold);
  display: inline-flex; align-items: center; justify-content: center; color: #1a1300; font-weight: 900; font-size: 17px;
  box-shadow: var(--shadow-md);
}
.brand .mark span { font-size: 16px; }
.brand .txt span { color: var(--accent-gold); }

.topbar-stats { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.stat-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg-card); border: 1px solid var(--border-card);
  padding: 6px 12px; border-radius: var(--radius-full); font-size: 13px; color: var(--text-body);
  white-space: nowrap;
}
.stat-pill b { color: var(--text-heading); font-weight: 700; }
.stat-pill .coin { color: var(--accent-gold); }
.stat-pill .up { color: var(--accent-success); }

.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.avatar-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--bg-card); border: 1px solid var(--border-card);
  border-radius: var(--radius-full); padding: 4px 12px 4px 4px; cursor: pointer;
  position: relative; color: var(--text-body);
}
.avatar-btn:hover { background: var(--bg-card-hover); }
.avatar-btn img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.avatar-btn .nm { font-weight: 600; color: var(--text-heading); font-size: 13px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-btn .caret { font-size: 10px; color: var(--text-muted); }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
  background: #16161b; border: 1px solid var(--border-card); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 60;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: var(--radius-sm); background: none; border: 0;
  color: var(--text-body); cursor: pointer; font-size: 13px;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--bg-card); color: var(--text-heading); }
.dropdown-menu .sep { height: 1px; background: var(--border-divider); margin: 5px 4px; }
.dropdown-menu .ico { width: 16px; text-align: center; }

/* ------------------------------------------------------------ container --- */
.container { max-width: var(--container-max); margin: 0 auto; padding: 26px 20px 60px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-heading h1 { margin: 0; }
.page-heading p { margin: 5px 0 0; color: var(--text-muted); font-size: 13px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 14px; }
.section-head h2 { margin: 0; }
.section-head .more { font-size: 13px; }

/* -------------------------------------------------------------- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-input);
  background: var(--bg-card); color: var(--text-heading); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: .15s ease; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--bg-card-hover); border-color: var(--border-card); color: var(--text-heading); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent-primary); border-color: transparent; color: #06201c; }
.btn-primary:hover { background: var(--accent-primary-hover); color: #06201c; }
.btn-gold { background: var(--grad-gold); border-color: transparent; color: #1a1300; }
.btn-gold:hover { opacity: .92; color: #1a1300; }
.btn-ghost { background: transparent; }
.btn-danger { background: rgba(239,68,68,.12); color: #ff9b9b; border-color: rgba(239,68,68,.28); }
.btn-danger:hover { background: rgba(239,68,68,.2); color: #ffb4b4; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- cards --- */
.card {
  background: var(--bg-card); border: 1px solid var(--border-card);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.card-head .sub { color: var(--text-muted); font-size: 12px; margin-top: 3px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--radius-md);
  padding: 16px 18px; position: relative; overflow: hidden;
}
.stat-card::before { content:""; position:absolute; left:0; right:0; top:0; height:2px; background: var(--grad-gold); opacity:.7; }
.stat-card .num { font-size: 24px; font-weight: 800; color: var(--text-heading); letter-spacing: -.5px; }
.stat-card .lbl { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.stat-card .ico { font-size: 20px; margin-bottom: 6px; }

/* --------------------------------------------------------------- forms ---- */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; color: var(--text-body); margin-bottom: 7px; font-weight: 600; }
.form-row .hint { color: var(--text-muted); font-weight: 400; font-size: 12px; }
.input, .select, .textarea {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border-input);
  border-radius: var(--radius-sm); padding: 10px 13px; color: var(--text-heading); outline: none; transition: border-color .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent-primary); }
.textarea { resize: vertical; min-height: 90px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.checkbox { display: flex; align-items: center; gap: 9px; font-size: 13px; cursor: pointer; color: var(--text-body); }
.checkbox input { width: 16px; height: 16px; accent-color: var(--accent-primary); }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.field-error { color: #ff9b9b; font-size: 12px; margin-top: 5px; }

/* --------------------------------------------------------------- flash ---- */
.flash {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm);
  margin-bottom: 18px; font-size: 13px;
}
.flash-success { background: rgba(16,185,129,.12); color: #6ee7b7; border: 1px solid rgba(16,185,129,.25); }
.flash-error { background: rgba(239,68,68,.12); color: #ff9b9b; border: 1px solid rgba(239,68,68,.25); }

/* --------------------------------------------------------------- lobby ---- */
.lobby-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.lobby-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.room-card {
  background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--radius-lg);
  padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: .15s ease;
}
.room-card:hover { border-color: var(--accent-primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.room-card .rc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.room-card .rc-player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.room-card .rc-player img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.room-card .rc-name { font-weight: 700; color: var(--text-heading); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-card .rc-sub { font-size: 11px; color: var(--text-muted); }
.room-card .rc-bet { text-align: right; }
.room-card .rc-bet .amt { font-size: 19px; font-weight: 800; color: var(--accent-gold); }
.room-card .rc-bet .cur { font-size: 11px; color: var(--text-muted); }
.room-card .rc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.room-card .rc-foot { display: flex; gap: 8px; align-items: center; }

.badge { display: inline-block; padding: 3px 9px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; }
.badge-open { background: rgba(45,212,191,.13); color: #5fe0d0; }
.badge-matched { background: rgba(234,179,8,.14); color: #fcd34d; }
.badge-settled { background: rgba(107,114,128,.18); color: #c7c7cf; }
.badge-cancelled { background: rgba(239,68,68,.13); color: #fca5a5; }
.badge-win { background: rgba(16,185,129,.14); color: #6ee7b7; }
.badge-lose { background: rgba(239,68,68,.13); color: #fca5a5; }
.badge-draw { background: rgba(107,114,128,.18); color: #c7c7cf; }
.badge-ready { background: rgba(45,212,191,.13); color: #5fe0d0; }

/* ------------------------------------------------------------ battle ------ */
.battle { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: stretch; }
.battle-vs { display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-weight: 900; font-size: 22px; }
.player-panel {
  background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--radius-lg);
  padding: 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.player-panel.me { border-color: var(--accent-primary); }
.player-panel .pp-avatar { width: 74px; height: 74px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-card); }
.player-panel .pp-name { font-weight: 700; color: var(--text-heading); font-size: 15px; }
.player-panel .pp-meta { font-size: 12px; color: var(--text-muted); }
.player-panel .pp-move { font-size: 46px; line-height: 1; min-height: 54px; display: flex; align-items: center; justify-content: center; }
.player-panel .pp-move.hidden { color: var(--text-muted); font-size: 34px; }
.player-panel.winner { border-color: var(--accent-success); box-shadow: 0 0 0 1px rgba(16,185,129,.4), 0 8px 30px rgba(16,185,129,.15); }
.player-panel.loser { opacity: .6; }

.move-picker { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.move-btn {
  width: 92px; height: 92px; border-radius: var(--radius-lg); background: var(--bg-card);
  border: 2px solid var(--border-card); cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; transition: .15s ease; color: var(--text-body);
}
.move-btn .emoji { font-size: 34px; line-height: 1; }
.move-btn .lb { font-size: 11px; font-weight: 600; }
.move-btn:hover { border-color: var(--accent-primary); transform: translateY(-3px); }
.move-btn.selected { border-color: var(--accent-gold); background: rgba(234,179,8,.08); }
.move-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.bet-summary { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; padding: 14px; background: var(--bg-sidebar); border-radius: var(--radius-md); border: 1px solid var(--border-divider); }
.bet-summary .bs-item { text-align: center; }
.bet-summary .bs-item .v { font-size: 18px; font-weight: 800; color: var(--text-heading); }
.bet-summary .bs-item .l { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px; }
.bet-summary .bs-item .v.gold { color: var(--accent-gold); }
.bet-summary .bs-item .v.red { color: #ff9b9b; }

.result-banner { text-align: center; padding: 18px; border-radius: var(--radius-md); margin-bottom: 16px; font-size: 16px; font-weight: 700; }
.result-banner.win { background: rgba(16,185,129,.12); color: #6ee7b7; border: 1px solid rgba(16,185,129,.3); }
.result-banner.lose { background: rgba(239,68,68,.12); color: #ff9b9b; border: 1px solid rgba(239,68,68,.3); }
.result-banner.draw { background: rgba(107,114,128,.15); color: #d4d4dc; border: 1px solid var(--border-card); }

/* ---------------------------------------------------------------- modal --- */
.modal-backdrop {
  position: fixed; inset: 0; background: var(--bg-overlay); backdrop-filter: blur(2px);
  display: none; align-items: flex-start; justify-content: center; z-index: 80; padding: 40px 16px; overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  background: #16161b; border: 1px solid var(--border-card); border-radius: var(--radius-lg);
  width: 100%; max-width: 460px; box-shadow: var(--shadow-lg); animation: modalIn .16s ease;
}
.modal-card.wide { max-width: 720px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-divider); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-head .x { background: none; border: 0; color: var(--text-muted); font-size: 22px; cursor: pointer; line-height: 1; }
.modal-head .x:hover { color: var(--text-heading); }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border-divider); display: flex; gap: 10px; justify-content: flex-end; }

/* --------------------------------------------------------------- tables --- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-card); border-radius: var(--radius-md); }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.data-table thead th { background: #1c1c24; padding: 11px 14px; text-align: left; font-weight: 600; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.data-table tbody td { padding: 11px 14px; border-top: 1px solid var(--border-divider); color: var(--text-body); vertical-align: middle; }
.data-table tbody tr:hover td { background: rgba(255,255,255,.015); }
.data-table .thumb { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.data-table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.data-table .pos { color: #6ee7b7; }
.data-table .neg { color: #ff9b9b; }
.data-table .strong { color: var(--text-heading); font-weight: 600; }

/* ------------------------------------------------------------ pagination -- */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: space-between; margin-top: 16px; flex-wrap: wrap; }
.pagination .page-info { font-size: 12px; color: var(--text-muted); }
.pagination .pages { display: flex; gap: 4px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; border-radius: var(--radius-sm); font-size: 13px; border: 1px solid var(--border-input); background: var(--bg-card); color: var(--text-body); }
.pagination a:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.pagination span.active { background: var(--accent-primary); color: #06201c; border-color: transparent; font-weight: 700; }
.pagination span.dim { opacity: .4; }

/* ----------------------------------------------------------- empty state -- */
.empty-state { padding: 54px 20px; text-align: center; color: var(--text-muted); }
.empty-state .ico { font-size: 44px; margin-bottom: 10px; opacity: .5; }
.empty-state h3 { margin: 0 0 6px; color: var(--text-body); font-size: 16px; }
.empty-state p { margin: 0; font-size: 13px; }

/* -------------------------------------------------------------- helpers -- */
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-center { display: flex; align-items: center; }
.gap-1 { gap: 6px; } .gap-2 { gap: 12px; } .gap-3 { gap: 18px; }
.wrap { flex-wrap: wrap; } .grow { flex: 1; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 28px; }
.mb-1 { margin-top: 0; margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; }
.text-muted { color: var(--text-muted); }
.text-heading { color: var(--text-heading); }
.text-gold { color: var(--accent-gold); }
.text-green { color: #6ee7b7; }
.text-red { color: #ff9b9b; }
.text-sm { font-size: 12px; }
.text-lg { font-size: 17px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.nowrap { white-space: nowrap; }
.divider { height: 1px; background: var(--border-divider); margin: 18px 0; }
.hidden { display: none !important; }
.copy-field { display: flex; gap: 8px; align-items: center; }
.copy-field code { flex: 1; background: var(--bg-input); border: 1px solid var(--border-input); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12px; overflow-x: auto; white-space: nowrap; color: var(--text-heading); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(160deg, #101a19 0%, #0d0d10 60%); padding: 48px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--border-divider); }
.auth-side .logo { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.auth-side h1 { font-size: 30px; margin-bottom: 14px; }
.auth-side h1 span { color: var(--accent-gold); }
.auth-side p.desc { color: var(--text-muted); max-width: 440px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-form .box { width: 100%; max-width: 400px; }

.mark-select { display: flex; gap: 8px; }
.lang-menu { max-height: 320px; overflow-y: auto; }
.lang-menu button.active { color: var(--accent-primary); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-divider); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a, .tabs button { padding: 9px 14px; border: 0; background: none; color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; }
.tabs a:hover, .tabs button:hover { color: var(--text-heading); }
.tabs a.active, .tabs button.active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }

.alert { padding: 12px 15px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; }
.alert-info { background: rgba(59,130,246,.1); color: #9cc4ff; border: 1px solid rgba(59,130,246,.25); }
.alert-warn { background: rgba(234,179,8,.1); color: #fcd34d; border: 1px solid rgba(234,179,8,.25); }
.alert-danger { background: rgba(239,68,68,.1); color: #ff9b9b; border: 1px solid rgba(239,68,68,.25); }

code, pre.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
pre.code { background: #101014; border: 1px solid var(--border-card); border-radius: var(--radius-sm); padding: 14px; overflow-x: auto; font-size: 12px; color: #b9e6df; }
.doc h2 { margin-top: 28px; } .doc h3 { margin-top: 20px; color: var(--accent-primary); }
.doc p, .doc li { color: var(--text-body); } .doc ul { list-style: disc; padding-left: 22px; margin-bottom: 12px; }
.doc table { margin: 12px 0; }
.doc .endpoint { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.doc .method { font-weight: 700; font-size: 11px; padding: 3px 8px; border-radius: 6px; letter-spacing: .5px; }
.doc .method.get { background: rgba(59,130,246,.16); color: #9cc4ff; }
.doc .method.post { background: rgba(16,185,129,.16); color: #6ee7b7; }
.doc .path { font-family: ui-monospace, monospace; color: var(--text-heading); font-size: 13px; }

.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); display: inline-block; }
.live-dot.on { background: var(--accent-success); box-shadow: 0 0 0 3px rgba(16,185,129,.18); }

/* ---------------------------------------------------------------- admin --- */
.admin-topbar { height: var(--header-height); background: var(--bg-header); border-bottom: 1px solid var(--border-divider); position: sticky; top: 0; z-index: 40; }
.admin-topbar::before { content:""; position:absolute; left:0; right:0; top:0; height:3px; background: var(--grad-header-top); }
.admin-topbar-inner { max-width: 100%; padding: 0 20px; height: 100%; display: flex; align-items: center; gap: 14px; }
.admin-badge { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #06201c; background: var(--accent-primary); padding: 3px 9px; border-radius: var(--radius-full); }
.admin-shell { display: grid; grid-template-columns: 234px minmax(0, 1fr); align-items: start; }
.admin-side { position: sticky; top: var(--header-height); background: var(--bg-sidebar); border-right: 1px solid var(--border-divider); min-height: calc(100vh - var(--header-height)); padding: 14px 12px 40px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text-body); font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.admin-nav a:hover { background: var(--bg-card); color: var(--text-heading); }
.admin-nav a.active { background: rgba(45,212,191,.1); color: var(--accent-primary); }
.admin-nav .ico { width: 18px; text-align: center; }
.admin-nav .group { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); padding: 15px 12px 6px; }
.admin-main { padding: 24px 26px 70px; min-width: 0; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-head h1 { margin: 0; font-size: 22px; }
.admin-head p { margin: 4px 0 0; color: var(--text-muted); font-size: 13px; }
.filter-bar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar .field { min-width: 150px; }
.filter-bar label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 5px; }
.rec-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.rec-card .t { font-weight: 700; color: var(--text-heading); font-size: 14px; }
.rec-card .s { font-size: 12px; color: var(--text-muted); }

/* ------------------------------------------------------------ responsive -- */
@media (max-width: 980px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .battle { grid-template-columns: 1fr; }
  .battle-vs { padding: 6px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; min-height: 0; border-right: 0; border-bottom: 1px solid var(--border-divider); padding: 10px; }
  .admin-nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .admin-nav .group { display: none; }
  .admin-nav a { margin-bottom: 0; }
  .admin-main { padding: 16px 14px 60px; }
}
@media (max-width: 760px) {
  .container { padding: 18px 14px 50px; }
  .topbar-inner { padding: 0 12px; gap: 8px; }
  .topbar-stats .stat-pill.hide-sm { display: none; }
  .brand .txt { display: none; }
  .avatar-btn .nm { display: none; }
  .lobby-grid { grid-template-columns: 1fr; }
  .move-btn { width: 78px; height: 78px; }
}
