:root {
  --bg: #10161d;
  --bg-2: #18222c;
  --panel: #141c25;
  --ink: #e8eef5;
  --muted: #93a3b5;
  --line: #2c3b4b;
  --cyan: #3ec2ea;
  --gold: #e2b657;
  --gold-2: #8c6a2a;
  --gold-ink: #1a1408;
  --bad: #ffb4a8;
  --ok: #9ddeb2;
  --serif: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif;
  --sans: "Segoe UI", "Avenir Next", "Trebuchet MS", sans-serif;
  --mono: Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html, button, input, select, textarea,
.pure-g [class *= "pure-u"], .pure-g-r [class *= "pure-u"] {
  font-family: var(--sans);
}

html {
  background: var(--bg);
  overflow-y: scroll;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: none;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(62, 194, 234, .08), transparent 50%),
    var(--bg);
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--cyan); }
a:hover { color: white; }

header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(16, 22, 29, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

header > .home-menu {
  background: transparent !important;
  width: min(1120px, 100%);
  margin: 0 auto;
  min-height: 72px;
  height: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 8px 24px;
  box-sizing: border-box;
  white-space: normal !important;
}

header > .home-menu > a.pure-menu-heading,
header > .home-menu > ul,
header > .home-menu > ul > li {
  display: flex !important;
  align-items: center;
  line-height: normal !important;
}

header > .home-menu > a.pure-menu-heading {
  gap: 12px;
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  text-transform: none !important;
  letter-spacing: 0;
  padding: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: block;
}

.brand-lockup { display: flex; flex-direction: column; line-height: 1.15; text-transform: none; }
.brand-lockup strong {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .01em;
  text-transform: none !important;
}
.brand-lockup small {
  color: var(--gold);
  letter-spacing: .16em;
  font-size: 11px;
  text-transform: uppercase;
}

header > .home-menu > ul {
  position: static !important;
  left: auto !important;
  top: auto !important;
  width: auto !important;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 0 auto;
  flex: 1 1 auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding: 0;
  white-space: normal !important;
  visibility: visible !important;
}

header > .home-menu > ul > li > a {
  color: var(--muted);
  text-decoration: none;
  background: transparent !important;
  padding: 8px 2px;
  font-size: 15px;
}

header > .home-menu > ul > li > a:hover,
header > .home-menu > ul > li > a:focus,
header > .home-menu > ul > li.pure-menu-selected > a {
  background: transparent !important;
  color: var(--ink);
}

header > .home-menu > ul > li.pure-menu-selected > a {
  color: var(--gold);
  box-shadow: inset 0 -2px 0 var(--gold);
}

main {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  background: transparent;
  position: relative;
  padding: 32px 0 40px;
}

footer {
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 22px 16px 28px;
  line-height: 1.7;
}

footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }

h1, h2, h3, .boxLowerHeader, .chartLabel, .menuHeader {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0;
}

.kicker {
  color: var(--gold);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 12px;
  margin: 0 0 8px;
}

.lede { color: var(--muted); font-size: 18px; max-width: 62ch; margin: 0; }

.pool-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 16px;
}

#logoImg { width: 120px; height: 120px; margin: 0; }

.page-intro { margin: 0 0 18px; }
.page-intro h1,
#welcomeText, .pool-hero h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.05;
  margin: 0 0 8px;
}

#welcomeItems {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  color: var(--muted);
}

#welcomeItems > li { margin: 6px 0; }

.pool-stats, #boxesLower {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0;
}

.pool-stats > div, #boxesLower > div { display: flex; min-width: 0; }

.boxStats {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  padding: 16px 18px 18px;
}

.boxLowerHeader {
  font-size: 22px;
  margin: 0 0 12px;
}

.boxStatsList {
  display: flex;
  flex-flow: row wrap;
  gap: 12px;
  margin: 0;
}

.metric {
  min-width: 160px;
  background: #0e141b;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.metric-label {
  color: var(--gold);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.metric-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  color: white;
}
.metric-value small { color: var(--muted); font-size: 13px; }
.metric-rate { color: var(--muted); margin-top: 2px; }

.chartWrapper {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px 8px;
  margin-bottom: 16px;
}

.chartLabel {
  font-size: 22px;
  text-align: center;
  padding: 8px 8px 4px;
}

#topCharts { padding: 0; }
#topCharts > div > div > svg,
.chartHolder > svg { display: block; height: 280px; }

.nv-axis text, .nv-legend text { fill: var(--muted) !important; }
.nv-axis path, .nv-axis line, .nv-x .tick line, .nv-y .tick line { stroke: var(--line) !important; }
.nvtooltip {
  background: var(--panel) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
}
.nvtooltip h3, .nvtooltip td { color: var(--ink) !important; }

.table-scroll { overflow-x: auto; }

table, .pure-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  border: 0;
}

.pure-table thead, .pure-table td, .pure-table th { background: transparent; border-color: var(--line); }
.pure-table-odd td, .pure-table-striped tr:nth-child(2n-1) td { background: transparent; }

th, td, .pure-table th, .pure-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: top;
}

th, .pure-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

tbody tr:hover td { background: rgba(62, 194, 234, .05); }

#holder {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

#menu {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  min-width: 0;
  padding-bottom: 12px;
  position: sticky;
  top: 88px;
}

.menuHint {
  margin: 8px 16px 0;
  color: var(--muted);
  font-size: 13px;
}

#menu > .menuHeader, .menuHeader {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  padding: 16px 16px 8px;
}

.menuList > a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  margin: 6px 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-transform: capitalize;
  border: 1px solid transparent;
}

.menuList > a:hover,
.menuList > a.is-on {
  color: var(--gold);
  background: #0e141b;
  border-color: var(--line);
}
.menuList.glow { box-shadow: inset 0 0 0 1px var(--gold); border-radius: 12px; }

#main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  min-width: 0;
}

.start-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.need-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.need-grid > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.need-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.need-grid strong { display: block; margin-top: 4px; font-size: 18px; font-weight: 600; }

.miningOption {
  color: var(--ink);
  display: block;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  min-height: 0;
}

a.miningOption:hover { color: white; border-color: var(--gold-2); }

.miningOptionInstructions > div:nth-child(2) {
  font-family: var(--serif);
  font-size: 26px;
  margin-top: 4px;
}

.miningOptionInstructions > div:last-child {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

#orHolder { height: 28px; text-align: center; }
#orLine { border-bottom: 1px solid var(--line); height: 14px; margin-bottom: -14px; }
#orText {
  background: var(--bg);
  color: var(--muted);
  display: inline-block;
  padding: 0 10px;
  font-style: normal;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
}

.hidden { display: none !important; }

#coinInfoBackground {
  position: absolute;
  inset: 0;
  background: #070b10;
  opacity: 0;
}

#coinInfo {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  width: min(720px, calc(100% - 24px));
  min-height: 280px;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  position: absolute;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px 32px;
  z-index: 2;
}

#coinInfo .coinInfoName { text-transform: capitalize; }

#coinInfo > div:first-of-type {
  font-family: var(--serif);
  font-size: 28px;
  text-align: center;
  margin: 8px 0 22px;
}

#coinInfoRows { display: flex; justify-content: center; gap: 28px; }
#coinInfoRows > div { display: flex; flex-direction: column; justify-content: center; }
#coinInfoRows > div > div { padding: 4px 0; }
#coinInfoRowKeys { color: var(--muted); }
#coinInfoRowValues { font-family: var(--mono); font-size: 14px; word-break: break-all; }
#coinInfoRowValues > div {
  background: #0e141b;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 4px 0;
}

#coinInfoClose {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  text-align: center;
  font-size: 28px;
  line-height: 44px;
  color: var(--muted);
  text-decoration: none;
}

#coinInfoClose:hover { color: var(--gold); }

.docs {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
}

.docs h1 { margin: 0 0 8px; font-size: 32px; }
.docs ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); }
.docs code, .mono { font-family: var(--mono); color: var(--ink); }

#miningKeyPage p { color: var(--muted); }
#keyFrame {
  width: 100%;
  height: 750px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

#passwordForm, #adminCenter { color: var(--ink); }

#passwordForm {
  max-width: 420px;
  margin: 24px auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}

#passwordForm legend, #leftMenu .pure-menu-heading {
  font-family: var(--serif);
  color: var(--ink);
  font-size: 22px;
  border: 0;
}

.pure-form input, .pure-form textarea, .pure-form select,
input, textarea, select {
  background: #0e141b;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  box-shadow: none;
}

.pure-button, button, .pure-button-primary {
  background: var(--gold);
  color: var(--gold-ink);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
}

.pure-button:hover, button:hover { filter: brightness(1.05); }

#adminCenter { display: flex; gap: 16px; }
#leftMenu {
  flex: 0 0 220px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 0 12px;
}
#leftMenu a { color: var(--muted); text-decoration: none; }
#leftMenu a:hover, #leftMenu .pure-menu-selected a { color: var(--gold); background: transparent; }
#editForm {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

@media (max-width: 800px) {
  .pool-hero, .pool-stats, #boxesLower, #holder, #adminCenter, .start-actions, .need-grid { grid-template-columns: 1fr; flex-direction: column; }
  #menu { position: static; }
  #menu, #leftMenu { min-width: 0; flex-basis: auto; }
  #coinInfoRows { flex-direction: column; gap: 4px; }
  header > .home-menu > ul { margin-left: 0; }
}
