:root {
  color-scheme: dark;
  --bg: #06111f;
  --bg-2: #0d1829;
  --panel: rgba(10, 19, 34, 0.82);
  --panel-strong: rgba(13, 25, 43, 0.96);
  --line: rgba(110, 214, 255, 0.18);
  --line-strong: rgba(110, 214, 255, 0.34);
  --text: #eef7ff;
  --muted: #8ca5bf;
  --accent: #67d6ff;
  --accent-2: #8a5bff;
  --success: #52e0a1;
  --warning: #ffc95a;
  --danger: #ff758c;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }
html, body {
  min-height: 100%;
  touch-action: manipulation;
}
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(103, 214, 255, 0.15), transparent 24%),
    radial-gradient(circle at top right, rgba(138, 91, 255, 0.15), transparent 24%),
    linear-gradient(180deg, #050a13 0%, #091322 45%, #0c1829 100%);
  -webkit-text-size-adjust: 100%;
  -webkit-touch-callout: none;
}

body *:not(input):not(textarea):not([contenteditable="true"]) {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

img,
a,
button {
  -webkit-user-drag: none;
}

.bg-orb {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  pointer-events: none;
}
.bg-orb-a { top: -120px; left: -100px; background: #3ecfff; }
.bg-orb-b { right: -120px; top: 140px; background: #7a4dff; }

.shell {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 42px;
}

.public-status {
  position: sticky;
  top: 14px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: rgba(7, 16, 30, 0.76);
  backdrop-filter: blur(14px);
  border-radius: 999px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.separator { color: rgba(255,255,255,.22); }
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 12px rgba(255, 201, 90, 0.8);
}
.status-dot.pending {
  background: var(--warning);
  box-shadow: 0 0 12px rgba(255, 201, 90, 0.8);
}
.status-dot.online {
  background: var(--success);
  animation: statusPulseSmooth 2.2s ease-in-out infinite;
  will-change: transform, opacity, box-shadow;
}
.status-dot.offline {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(255, 117, 140, 0.9);
}

@keyframes statusPulseSmooth {
  0% { transform: scale(0.92); opacity: 0.42; box-shadow: 0 0 0 rgba(82, 224, 161, 0.0), 0 0 6px rgba(82, 224, 161, 0.28); }
  50% { transform: scale(1.08); opacity: 1; box-shadow: 0 0 0 rgba(82, 224, 161, 0.0), 0 0 18px rgba(82, 224, 161, 0.95), 0 0 34px rgba(82, 224, 161, 0.45); }
  100% { transform: scale(0.92); opacity: 0.42; box-shadow: 0 0 0 rgba(82, 224, 161, 0.0), 0 0 6px rgba(82, 224, 161, 0.28); }
}

.card,
.glass-panel {
  background: linear-gradient(180deg, rgba(11, 21, 37, 0.88), rgba(10, 18, 31, 0.92));
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.card { padding: 24px; }
.glass-panel { padding: 22px; }
.card-inline {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(14, 27, 45, 0.86);
  border: 1px solid var(--line);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.85fr);
  gap: 22px;
  align-items: stretch;
  padding: 30px;
}

.hero-strip,
.dashboard-grid,
.three-col-grid {
  margin-bottom: 18px;
}

.hero-copy {
  padding: 10px 6px 10px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(26px, 3.4vw, 48px);
  max-width: 18ch;
}

h2 { font-size: clamp(24px, 2.4vw, 34px); }
h3 { font-size: 26px; }

.hero-text,
.muted,
.big-muted,
.panel-subtitle {
  color: var(--muted);
  line-height: 1.65;
}

.hero-text {
  max-width: 65ch;
  margin: 18px 0 0;
}

.hero-pills,
.action-row,
.topbar-actions,
.admin-actions,
.row,
.mode-line,
.hero-strip,
.section-head.between {
  display: flex;
  align-items: center;
}

.hero-pills,
.action-row,
.topbar-actions,
.admin-actions,
.row {
  gap: 12px;
}

.pill,
.mode-pill,
.compact-chip,
small.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
}

.pill {
  padding: 10px 14px;
  background: rgba(103, 214, 255, 0.09);
  border: 1px solid rgba(103, 214, 255, 0.16);
  color: #d9f5ff;
}

.mode-pill {
  min-width: 88px;
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: 0.14em;
}
.mode-pill.mode-on {
  background: rgba(255, 201, 90, 0.18);
  color: #ffe7a6;
  border: 1px solid rgba(255, 201, 90, 0.28);
}
.mode-pill.mode-off {
  background: rgba(82, 224, 161, 0.16);
  color: #c9ffe9;
  border: 1px solid rgba(82, 224, 161, 0.28);
}

.auth-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel-title {
  font-size: 24px;
  font-weight: 800;
}
.auth-grid {
  display: grid;
  gap: 12px;
}

input {
  width: 100%;
  border: 1px solid rgba(110, 214, 255, 0.18);
  background: rgba(6, 15, 28, 0.82);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
input:focus {
  border-color: rgba(110, 214, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(103, 214, 255, 0.08);
}

button {
  border: 0;
  border-radius: 16px;
  padding: 13px 18px;
  font-weight: 800;
  color: #021018;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #97ecff);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
  box-shadow: 0 12px 28px rgba(103, 214, 255, 0.28);
}
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(1px) scale(.985); }
button.secondary {
  background: linear-gradient(135deg, #202e43, #2f3d53);
  color: var(--text);
  box-shadow: none;
}
button.huge {
  font-size: 18px;
  padding: 16px 24px;
}
button:disabled { opacity: .55; cursor: not-allowed; }

.error {
  min-height: 22px;
  color: #ffb2c0;
  font-size: 14px;
}

.mini-mode-box,
.split-boxes,
.mining-stats-grid,
.economy-grid,
.dashboard-grid,
.three-col-grid {
  display: grid;
  gap: 16px;
}

.mini-mode-box {
  grid-template-columns: 1fr 1fr;
  padding: 16px;
  border-radius: 18px;
  background: rgba(12, 22, 38, 0.76);
  border: 1px solid rgba(110, 214, 255, 0.12);
}
.mini-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: 8px;
}
.mini-value { font-size: 20px; font-weight: 800; }
.mini-muted { color: #d6e1ee; font-size: 14px; }

.hidden { display: none !important; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 10px 0 18px;
}

.hero-strip {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) auto;
  align-items: start;
  gap: 24px;
}
.hero-strip > :first-child {
  min-width: 320px;
  max-width: 760px;
}
.big-muted { max-width: 70ch; margin-top: 10px; }
.split-boxes {
  min-width: 0;
  grid-template-columns: repeat(3, 1fr);
}
.mode-line {
  flex-wrap: nowrap;
  gap: 14px;
}
.mode-line h3 {
  white-space: nowrap;
}

.mini-stat-card,
.stat-tile,
.economy-card,
.shop-item,
.lb-row,
.feed-item,
.reward-item {
  background: rgba(14, 26, 44, 0.82);
  border: 1px solid rgba(110, 214, 255, 0.12);
  border-radius: 18px;
}

.mini-stat-card,
.economy-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mini-stat-card span,
.economy-card span,
.stat-tile span,
.hash-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.hash-subtitle {
  margin-top: 8px;
  color: rgba(215, 232, 255, 0.72);
  font-size: 14px;
}
.hash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.hash-hits-panel {
  flex: 0 0 auto;
  width: min(100%, 470px);
  padding: 7px 8px;
  border-radius: 14px;
  border: 1px solid rgba(110, 214, 255, 0.09);
  background: linear-gradient(180deg, rgba(7, 16, 29, 0.86), rgba(5, 12, 22, 0.74));
  box-shadow: inset 0 0 0 1px rgba(103, 214, 255, 0.025);
}
.hash-hits-title {
  margin-bottom: 5px;
  color: rgba(131, 240, 186, 0.88);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.hash-hits {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.hash-hit-card {
  display: inline-flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  min-width: 50px;
  padding: 5px 7px;
  border-radius: 10px;
  border: 1px solid rgba(110, 214, 255, 0.07);
  background: rgba(9, 18, 30, 0.70);
  color: #a9bfd8;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.hash-hit-card.is-active {
  border-color: rgba(131, 240, 186, 0.32);
  box-shadow: 0 0 0 1px rgba(131, 240, 186, 0.07), 0 6px 16px rgba(51, 168, 113, 0.10);
}
.hash-hit-level {
  color: rgba(214, 245, 255, 0.72);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hash-hit-value {
  color: #f5fbff;
  font-size: 15px;
  line-height: 1;
  font-weight: 800;
}
.hash-hit-card.is-active .hash-hit-value {
  color: #83f0ba;
  text-shadow: 0 0 14px rgba(131, 240, 186, 0.16);
}
.hash-hit-note {
  display: none;
}
.mini-stat-card strong,
.economy-card strong,
.stat-tile strong {
  font-size: 24px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .8fr);
}
.three-col-grid { grid-template-columns: repeat(3, 1fr); }

.main-mining-card { position: relative; overflow: hidden; }
.main-mining-card::after {
  content: '';
  position: absolute;
  inset: auto -60px -80px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103, 214, 255, 0.16), transparent 70%);
  pointer-events: none;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.compact-chip {
  padding: 8px 12px;
  background: rgba(103, 214, 255, 0.12);
  border: 1px solid rgba(103, 214, 255, 0.18);
  color: #d6f5ff;
}

.mining-stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}
.stat-tile {
  padding: 16px 18px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stat-tile.glow {
  border-color: rgba(103, 214, 255, 0.3);
  box-shadow: 0 0 0 1px rgba(103, 214, 255, 0.06), 0 0 22px rgba(103, 214, 255, 0.12) inset;
}
.stat-tile.accent {
  background: linear-gradient(180deg, rgba(138, 91, 255, 0.12), rgba(19, 25, 46, 0.88));
}
.stat-tile.success {
  background: linear-gradient(180deg, rgba(82, 224, 161, 0.10), rgba(19, 27, 39, 0.88));
}

.hash-wrap {
  padding: 16px;
  border-radius: 22px;
  background: rgba(4, 12, 22, 0.74);
  border: 1px solid rgba(110, 214, 255, 0.1);
  margin-bottom: 18px;
}
.hash-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: linear-gradient(180deg, rgba(1, 9, 17, 0.9), rgba(4, 12, 22, 0.92));
  border: 1px solid rgba(110, 214, 255, 0.14);
  padding: 16px;
  border-radius: 18px;
  min-height: 110px;
  word-break: break-all;
  line-height: 1.75;
  color: #dcecff;
}
.hash-box .zero-run {
  color: #83f0ba;
  font-weight: 800;
  text-shadow: 0 0 18px rgba(131, 240, 186, 0.35);
}
.action-row { margin-bottom: 18px; }
@media (max-width: 900px) {
  .hash-head {
    flex-direction: column;
  }

  .hash-hits-panel {
    width: 100%;
    min-width: 0;
  }

  .hash-hits {
    justify-content: flex-start;
  }

  .hash-hit-card {
    min-width: 48px;
    padding: 5px 6px;
  }
}


.economy-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.shop-list,
.leaderboard-list,
.feed-list,
.reward-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shop-item,
.lb-row,
.feed-item,
.reward-item {
  padding: 14px 16px;
}

.shop-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.shop-item-title {
  font-weight: 700;
  margin-bottom: 8px;
}
.shop-item button { white-space: nowrap; }
.shop-buy-btn {
  min-width: 98px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #eaf6ff;
  background: linear-gradient(180deg, rgba(32, 68, 108, 0.92), rgba(22, 49, 80, 0.96));
  border: 1px solid rgba(103, 214, 255, 0.16);
  box-shadow: 0 6px 14px rgba(9, 15, 26, 0.22);
}
.shop-buy-btn.is-insufficient,
.shop-buy-btn:disabled {
  color: rgba(238, 247, 255, 0.72);
  background: linear-gradient(180deg, rgba(48, 56, 70, 0.92), rgba(35, 42, 54, 0.96));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  cursor: default;
  opacity: 0.95;
}

.leaderboard-head {
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.leaderboard-filters {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.leaderboard-filter {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(110, 214, 255, 0.14);
  background: rgba(14, 27, 45, 0.72);
  color: var(--text);
  font-weight: 700;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.leaderboard-filter:hover {
  transform: translateY(-1px);
}

.leaderboard-filter.active {
  background: rgba(103, 214, 255, 0.16);
  border-color: rgba(103, 214, 255, 0.34);
  box-shadow: 0 0 18px rgba(103, 214, 255, 0.12);
}

small.badge {
  padding: 6px 10px;
  background: rgba(33, 49, 70, 0.88);
  color: #d2dceb;
  font-size: 12px;
}

.lb-row,
.feed-item,
.reward-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.lb-main,
.feed-main,
.reward-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lb-title,
.feed-title,
.reward-title { font-weight: 700; }
.lb-meta,
.feed-meta,
.reward-meta { color: var(--muted); font-size: 13px; }
.feed-value,
.reward-value { font-weight: 800; }
.feed-value { color: #ffd883; }
.reward-value.winner { color: #ffd883; }
.reward-value.participant { color: #95ffd4; }

.admin-card code {
  background: rgba(255,255,255,.06);
  border-radius: 8px;
  padding: 2px 7px;
}
.small-space { margin-top: 12px; }
.reward-log-box { margin-top: 18px; }

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  background: rgba(4, 12, 22, 0.52);
  border: 1px solid rgba(110, 214, 255, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(110, 214, 255, 0.08);
}
th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
}
tr:hover td { background: rgba(255,255,255,.02); }

@media (max-width: 1200px) {
  .hero,
  .dashboard-grid,
  .three-col-grid,
  .hero-strip {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .split-boxes { min-width: 0; }
  .economy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 18px, 100%); }
  .leaderboard-head { align-items: stretch; }
  .leaderboard-filters { width: 100%; }
  .leaderboard-filter { flex: 1 1 0; justify-content: center; }
  .hero,
  .card,
  .glass-panel { padding: 18px; }
  .public-status { width: 100%; justify-content: center; flex-wrap: wrap; }
  .topbar,
  .topbar-actions,
  .action-row,
  .row,
  .admin-actions { flex-direction: column; align-items: stretch; }
  .mining-stats-grid,
  .split-boxes,
  .economy-grid,
  .mini-mode-box { grid-template-columns: 1fr; }
  .stat-tile { min-height: auto; }
  .shop-item,
  .lb-row,
  .feed-item,
  .reward-item { flex-direction: column; align-items: flex-start; }
  h1 { max-width: none; }
}


.settings-strip {
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  justify-content: end;
  justify-items: stretch;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(168px, 168px);
}

.glow-card {
  border-color: rgba(103, 214, 255, 0.28);
  box-shadow: 0 0 0 1px rgba(103, 214, 255, 0.05), inset 0 0 22px rgba(103, 214, 255, 0.08);
}

.pulse-button {
  position: relative;
  overflow: hidden;
}

.pulse-button::after {
  content: '';
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 42%);
  opacity: 0;
  transform: scale(0.4);
  animation: pulseRing 2.8s ease-out infinite;
}

@keyframes pulseRing {
  0% { opacity: 0; transform: scale(0.45); }
  25% { opacity: 0.28; }
  100% { opacity: 0; transform: scale(1.4); }
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 18px;
}

.field-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-block.full-row {
  grid-column: 1 / -1;
}

.field-block label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

select {
  width: 100%;
  border: 1px solid rgba(110, 214, 255, 0.18);
  background: rgba(6, 15, 28, 0.82);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

select:focus {
  border-color: rgba(110, 214, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(103, 214, 255, 0.08);
}

@media (max-width: 1200px) {
  .settings-strip {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: auto;
  }
}

@media (max-width: 760px) {
  .settings-strip,
  .admin-form-grid {
    width: 100%;
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-auto-columns: auto;
  }
}

select {
  width: 100%;
  border: 1px solid rgba(110, 214, 255, 0.18);
  background: rgba(6, 15, 28, 0.82);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
select:focus {
  border-color: rgba(110, 214, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(103, 214, 255, 0.08);
}

.price-summary {
  min-width: 140px;
}

.rewards-card .reward-log-box.standalone {
  margin-top: 18px;
}

.admin-shell {
  padding-bottom: 56px;
}

.admin-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-hero h1 {
  max-width: 16ch;
}

.admin-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.admin-side-grid {
  display: grid;
  gap: 18px;
  align-content: start;
}

.admin-main-panel {
  min-width: 0;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compact-wrap {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.wrap-actions {
  flex-wrap: wrap;
}

.admin-guard {
  max-width: 760px;
  margin: 0 auto 18px;
}

#admin-link-btn {
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .admin-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .admin-stat-grid {
    grid-template-columns: 1fr;
  }

  .price-summary,
  #admin-link-btn {
    width: 100%;
  }
}


.auth-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 4px;
  border-radius: 18px;
  background: rgba(6, 15, 28, 0.82);
  border: 1px solid rgba(110, 214, 255, 0.18);
  overflow: hidden;
}

.auth-tab {
  position: relative;
  z-index: 1;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.auth-tab.active {
  color: #021018;
}

.auth-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #97ecff);
  transition: transform .22s ease;
}

.auth-slider.register {
  transform: translateX(100%);
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(103, 214, 255, 0.2), rgba(138, 91, 255, 0.22));
  border: 1px solid rgba(110, 214, 255, 0.2);
  overflow: hidden;
  flex: 0 0 auto;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-form {
  max-width: 520px;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.checkbox-row input {
  width: auto;
}


.exchange-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.exchange-chart-card,
.exchange-trade-card {
  min-width: 0;
}

.exchange-price-row,
.exchange-balance-row,
.exchange-fee-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.exchange-mini-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(14, 26, 44, 0.82);
  border: 1px solid rgba(110, 214, 255, 0.12);
}

.exchange-mini-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.exchange-mini-card strong {
  font-size: 22px;
  font-weight: 800;
}

.exchange-graph-wrap {
  position: relative;
  margin-top: 18px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(110, 214, 255, 0.14);
  background: linear-gradient(180deg, rgba(7, 18, 31, 0.94), rgba(10, 22, 38, 0.88));
}

.exchange-graph {
  display: block;
  width: 100%;
  height: 360px;
}

.exchange-graph-grid line {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

.exchange-graph-axis-line {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

.exchange-graph-axis text {
  fill: rgba(214, 225, 238, 0.72);
  font-size: 11px;
  font-weight: 600;
}

.exchange-graph-area {
  fill: rgba(103, 214, 255, 0.12);
}

.exchange-graph-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(103, 214, 255, 0.28));
}

.exchange-graph-dot {
  fill: #baf1ff;
  stroke: rgba(6, 17, 31, 0.9);
  stroke-width: 2;
}

.exchange-graph-hitbox {
  fill: transparent;
  pointer-events: all;
}

.exchange-graph-crosshair line {
  stroke: rgba(186, 241, 255, 0.55);
  stroke-width: 1;
  stroke-dasharray: 5 5;
}

.exchange-graph-crosshair circle {
  fill: #d9f7ff;
  stroke: rgba(6, 17, 31, 0.9);
  stroke-width: 2;
}

#exchange-chart-tooltip-bg {
  fill: rgba(5, 16, 29, 0.96);
  stroke: rgba(110, 214, 255, 0.24);
  stroke-width: 1;
}

#exchange-chart-tooltip text {
  fill: #dff7ff;
  font-size: 12px;
  font-weight: 700;
}

#exchange-chart-tooltip-time {
  fill: rgba(214, 225, 238, 0.78);
  font-weight: 600;
}

.exchange-trade-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.exchange-trade-meta {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.exchange-status {
  min-height: 24px;
  margin-top: 14px;
  color: #d6e1ee;
}

.exchange-status.error {
  color: #ffb2c0;
}

.exchange-last-trade {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(14, 26, 44, 0.82);
  border: 1px solid rgba(110, 214, 255, 0.12);
}

.exchange-last-trade-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.exchange-last-trade-head span {
  color: var(--muted);
  font-size: 12px;
}

.exchange-last-trade-head strong {
  font-size: 16px;
  font-weight: 800;
}

.exchange-last-trade-head strong.exchange-side-buy {
  color: #22c55e;
}

.exchange-last-trade-head strong.exchange-side-sell {
  color: #ef4444;
}

.exchange-last-trade-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.exchange-last-trade-grid div {
  min-width: 0;
}

.exchange-last-trade-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.exchange-last-trade-grid strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

@media (max-width: 1040px) {
  .exchange-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .exchange-price-row,
  .exchange-balance-row,
  .exchange-fee-row,
  .exchange-trade-actions,
  .exchange-last-trade-grid {
    grid-template-columns: 1fr;
  }

  .exchange-graph {
    height: 280px;
  }
}


/* main ui refactor */
.app-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.topbar {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(7, 16, 30, 0.78);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-actions button.secondary {
  border: 1px solid rgba(110, 214, 255, 0.14);
}

.topbar-actions button,
#auth-submit-btn {
  min-height: 48px;
}

.hero-strip,
.arena-card,
.shop-card,
.leaderboard-card,
.utility-card,
.wallet-card {
  min-width: 0;
}

.dashboard-grid,
.three-col-grid {
  align-items: stretch;
}

.mining-surface {
  display: grid;
  gap: 18px;
  align-content: start;
}

.mining-surface > * {
  position: relative;
  z-index: 1;
}

.mining-surface .section-head,
.mining-panel-grid,
.mining-panel,
.mining-action-row,
.mining-economy-grid {
  margin-bottom: 0;
}

.mining-panel-grid {
  gap: 14px;
}

.mining-panel {
  background: linear-gradient(180deg, rgba(4, 12, 22, 0.82), rgba(6, 14, 25, 0.9));
  box-shadow: inset 0 0 0 1px rgba(103, 214, 255, 0.03);
}

.action-row.mining-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid rgba(110, 214, 255, 0.12);
  background: linear-gradient(135deg, rgba(12, 25, 41, 0.88), rgba(7, 15, 27, 0.96));
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

#mine-btn {
  width: 100%;
  min-height: 70px;
  border-radius: 22px;
  font-size: 20px;
  letter-spacing: 0.01em;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 16px 34px rgba(103, 214, 255, 0.26);
}

#mine-btn:active {
  transform: translateY(1px);
}

.action-row.mining-action-row button.secondary {
  min-width: 148px;
  min-height: 70px;
  border-radius: 20px;
}

.mining-economy-grid {
  gap: 14px;
}

.economy-card strong,
.stat-tile strong,
.mini-stat-card strong {
  overflow-wrap: anywhere;
}

.arena-card .feed-list,
.leaderboard-card .leaderboard-list,
.utility-card .reward-list {
  max-height: 540px;
  overflow: auto;
  padding-right: 4px;
}

.shop-item,
.lb-row,
.feed-item,
.reward-item {
  background: linear-gradient(180deg, rgba(14, 26, 44, 0.88), rgba(11, 20, 35, 0.92));
}

.shop-item {
  padding: 16px 18px;
}

.shop-item > div:first-child {
  min-width: 0;
}

.shop-item button {
  min-height: 40px;
  border-radius: 12px;
}

.wallet-card .table-wrap {
  border-radius: 22px;
}

.wallet-card table {
  min-width: 860px;
}

.table-wrap::-webkit-scrollbar,
.feed-list::-webkit-scrollbar,
.leaderboard-list::-webkit-scrollbar,
.reward-list::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-wrap::-webkit-scrollbar-thumb,
.feed-list::-webkit-scrollbar-thumb,
.leaderboard-list::-webkit-scrollbar-thumb,
.reward-list::-webkit-scrollbar-thumb {
  background: rgba(103, 214, 255, 0.18);
  border-radius: 999px;
}

@media (max-width: 1200px) {
  .three-col-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-card {
    grid-column: 1 / -1;
  }
}

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

  .arena-card .feed-list {
    max-height: none;
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: 32px;
  }

  .shell {
    padding-top: 14px;
  }

  .public-status {
    top: 10px;
    padding: 12px 14px;
    border-radius: 24px;
    justify-content: flex-start;
  }

  .topbar {
    position: static;
    top: auto;
    z-index: auto;
    padding: 14px;
    gap: 14px;
    border-radius: 22px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  .topbar-actions button {
    width: 100%;
  }

  .hero-strip {
    padding: 18px;
  }

  .settings-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mining-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-row.mining-action-row {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
    border-radius: 24px;
    background: rgba(5, 13, 24, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
  }

  #mine-btn,
  .action-row.mining-action-row button.secondary {
    min-height: 64px;
    font-size: 18px;
  }

  .main-mining-card {
    padding-bottom: 28px;
  }

  .hash-box {
    min-height: 96px;
    font-size: 13px;
  }

  .shop-item {
    align-items: stretch;
  }

  .shop-item button {
    width: 100%;
  }

  .shop-buy-btn {
    min-width: 0;
  }

  .wallet-card table {
    min-width: 760px;
  }
}

@media (max-width: 560px) {
  .topbar-profile {
    align-items: flex-start;
  }

  .topbar-actions {
    grid-template-columns: 1fr 1fr;
  }

  .hero,
  .card,
  .glass-panel {
    border-radius: 22px;
  }
}

/* admin categorized sections */
.admin-categories {
  display: grid;
  gap: 14px;
}

.admin-category {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  overflow: hidden;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.admin-category[open] {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
}

.admin-category-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  user-select: none;
}

.admin-category-summary::-webkit-details-marker {
  display: none;
}

.admin-category-summary h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.admin-category-summary p {
  margin: 4px 0 0;
  opacity: .72;
  font-size: 13px;
  line-height: 1.35;
}

.admin-category-arrow {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  font-size: 14px;
  transition: transform .2s ease, background .2s ease;
}

.admin-category[open] .admin-category-arrow {
  transform: rotate(180deg);
  background: rgba(255,255,255,0.1);
}

.admin-category-body {
  padding: 0 18px 18px;
}

.admin-category-note {
  margin: 0 0 14px;
  opacity: .7;
  font-size: 13px;
  line-height: 1.45;
}

.admin-category .admin-form-grid {
  margin: 0;
}

.admin-category .admin-actions {
  margin-top: 0;
}

@media (max-width: 720px) {
  .admin-category-summary {
    padding: 14px;
  }

  .admin-category-body {
    padding: 0 14px 14px;
  }

  .admin-category-summary h3 {
    font-size: 15px;
  }

  .admin-category-summary p,
  .admin-category-note {
    font-size: 12px;
  }
}
