:root {
  color-scheme: dark;
  --bg: #080a0f;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.095);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f7fb;
  --muted: rgba(245, 247, 251, 0.62);
  --faint: rgba(245, 247, 251, 0.38);
  --accent: #8cffc1;
  --accent-2: #6aa7ff;
  --danger: #ff6d8b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 16% 10%, rgba(106, 167, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 0%, rgba(140, 255, 193, 0.11), transparent 24rem),
    linear-gradient(140deg, #080a0f 0%, #10131d 45%, #080a0f 100%);
}

.shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(30px, 4vw, 56px);
  letter-spacing: -0.06em;
  line-height: 0.95;
}

h2 {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.hint,
.panel-head p,
.password-panel p {
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.6;
}

.status-panel {
  min-width: 260px;
  display: grid;
  gap: 8px;
  justify-items: end;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 999px;
  background: var(--faint);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.04);
}

.dot.ok {
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(140, 255, 193, 0.1);
}

.dot.error {
  background: var(--danger);
  box-shadow: 0 0 0 6px rgba(255, 109, 139, 0.12);
}

.password-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 24px;
}

.password-panel.hidden {
  display: none;
}

.password-panel form {
  display: flex;
  gap: 10px;
}

input,
button {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
}

input {
  min-width: 220px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  outline: 1px solid var(--line);
}

button {
  cursor: pointer;
  color: #08100d;
  background: var(--accent);
  font-weight: 700;
}

.hero-grid,
.split {
  display: grid;
  gap: 16px;
}

.hero-grid {
  grid-template-columns: 1.45fr repeat(3, 1fr);
  margin-bottom: 16px;
}

.metric,
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(20px);
  border-radius: 28px;
}

.metric {
  min-height: 162px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric.primary {
  background: linear-gradient(135deg, rgba(140, 255, 193, 0.22), rgba(106, 167, 255, 0.08));
}

.metric span,
.metric small {
  color: var(--muted);
}

.metric strong {
  font-size: clamp(34px, 5vw, 70px);
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.split {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.58fr);
  margin-top: 16px;
}

.split .wide {
  min-height: 420px;
}

.split .compact {
  min-height: 420px;
}

.panel {
  padding: 24px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.panel-head p {
  max-width: 360px;
  text-align: right;
}

.chart {
  height: 320px;
  display: flex;
  align-items: end;
  gap: 7px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.bar {
  flex: 1;
  min-width: 5px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, var(--accent), rgba(106, 167, 255, 0.22));
  transform-origin: bottom;
  animation: grow 520ms ease both;
}

.period-list,
.rank-list,
.recent-list {
  display: grid;
  gap: 10px;
}

.period,
.rank-row,
.recent-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.rank-row strong,
.period strong {
  font-size: 18px;
}

.label,
.meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.value {
  text-align: right;
}

.empty {
  color: var(--faint);
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

@keyframes grow {
  from { transform: scaleY(0.15); opacity: 0.3; }
  to { transform: scaleY(1); opacity: 1; }
}

@media (max-width: 980px) {
  .shell {
    width: min(100% - 24px, 760px);
    padding-top: 22px;
  }

  .topbar,
  .password-panel,
  .panel-head {
    display: grid;
    justify-items: start;
  }

  .status-panel,
  .panel-head p {
    justify-items: start;
    text-align: left;
  }

  .hero-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .password-panel form {
    width: 100%;
    display: grid;
  }

  input,
  button {
    width: 100%;
  }
}
