:root {
  --bg: #050811;
  --panel: #0b1121;
  --card: #10192e;
  --code: #04070f;
  --border: rgba(148, 163, 184, 0.16);
  --cyan: #38bdf8;
  --emerald: #34d399;
  --amber: #fbbf24;
  --violet: #a78bfa;
  --rose: #fb7185;
  --text: #f1f5f9;
  --soft: #cbd5e1;
  --muted: #8b9bb4;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: radial-gradient(ellipse 70% 45% at 20% 0%, rgba(56, 189, 248, 0.12), transparent 60%),
              radial-gradient(ellipse 60% 40% at 85% 0%, rgba(52, 211, 153, 0.10), transparent 60%),
              var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Inter", sans-serif;
  line-height: 1.65;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 8, 17, 0.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-in {
  max-width: 1360px; margin: 0 auto; padding: 11px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--text); }
.logo-ico {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 19px;
  background: linear-gradient(135deg, #38bdf8, #34d399); box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}
.brand strong { display: block; font-size: 16px; font-weight: 900; line-height: 1.15; }
.brand span { display: block; font-size: 11px; color: var(--muted); }
.nav { display: flex; gap: 7px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 750; border: 1px solid var(--border); background: var(--card);
  color: var(--soft) !important; text-decoration: none !important; cursor: pointer; transition: all 0.14s;
}
.pill:hover { border-color: var(--cyan); color: var(--text) !important; transform: translateY(-1px); }
.pill.active { border-color: var(--cyan); background: rgba(56, 189, 248, 0.18); color: #e0f2fe !important; }
.pill.emerald { border-color: rgba(52, 211, 153, 0.48); background: rgba(52, 211, 153, 0.14); color: #a7f3d0 !important; }
.pill.violet { border-color: rgba(167, 139, 250, 0.48); background: rgba(167, 139, 250, 0.14); color: #ddd6fe !important; }
.pill.amber { border-color: rgba(251, 191, 36, 0.48); background: rgba(251, 191, 36, 0.14); color: #fde68a !important; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 24px 20px 60px; display: flex; flex-direction: column; gap: 18px; }
.hero-card, .card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 22px 24px;
}
.kicker {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: rgba(52, 211, 153, 0.14); border: 1px solid rgba(52, 211, 153, 0.42); color: var(--emerald);
  margin-bottom: 12px;
}
.rand-display {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(16px, 2.2vw, 25px); font-weight: 900; letter-spacing: 0.04em;
  color: #7dd3fc; background: var(--code); border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: 14px; padding: 18px 20px; word-break: break-all;
  box-shadow: inset 0 0 30px rgba(56, 189, 248, 0.08);
}
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.meta-box { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.meta-box span { display: block; font-size: 11.5px; color: var(--muted); }
.meta-box strong { display: block; font-size: 15px; color: var(--text); font-family: ui-monospace, Menlo, monospace; margin-top: 3px; }
.meta-box small { display: block; font-size: 11.5px; color: var(--emerald); margin-top: 2px; font-family: ui-monospace, Menlo, monospace; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 11px;
  font-size: 13.5px; font-weight: 800; border: 1px solid var(--border); background: var(--card);
  color: var(--text) !important; text-decoration: none !important; cursor: pointer; transition: all 0.15s;
}
.btn:hover { border-color: var(--cyan); transform: translateY(-1px); }
.btn.primary { border: none; background: linear-gradient(135deg, var(--cyan), var(--emerald)); color: #031018 !important; }
.btn.emerald { border-color: rgba(52, 211, 153, 0.5); background: rgba(52, 211, 153, 0.15); color: #a7f3d0 !important; }
.btn.violet { border-color: rgba(167, 139, 250, 0.5); background: rgba(167, 139, 250, 0.15); color: #ddd6fe !important; }

h1 { font-size: clamp(22px, 3vw, 32px); font-weight: 950; margin-bottom: 8px; }
h2 { font-size: 18px; font-weight: 900; margin-bottom: 10px; color: var(--text); }
h3 { font-size: 15.5px; font-weight: 850; color: var(--cyan); margin: 14px 0 6px; }
p { color: var(--soft); font-size: 14.5px; margin-bottom: 10px; }
ul { margin: 6px 0 12px 20px; color: var(--soft); font-size: 14.2px; }
li { margin-bottom: 6px; }
code { background: rgba(56, 189, 248, 0.12); color: #7dd3fc; padding: 1px 6px; border-radius: 6px; font-family: ui-monospace, Menlo, monospace; font-size: 0.9em; }

.code-wrap { position: relative; margin: 10px 0; }
.code-pre {
  background: var(--code); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12.4px;
  line-height: 1.55; color: #bae6fd; overflow-x: auto; white-space: pre;
}
.copy-btn {
  position: absolute; top: 8px; right: 8px; padding: 4px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--soft); font-size: 11.5px; cursor: pointer;
}
.copy-btn:hover { border-color: var(--cyan); color: var(--text); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.search-box {
  flex: 1; min-width: 240px; max-width: 440px; padding: 9px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--code); color: var(--text); font-size: 13.5px; outline: none;
}
.search-box:focus { border-color: var(--cyan); }
.sel { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--code); color: var(--text); font-size: 13px; }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--code); }
table { width: 100%; border-collapse: collapse; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid rgba(148, 163, 184, 0.11); vertical-align: middle; }
th { background: rgba(56, 189, 248, 0.09); color: var(--cyan); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; font-weight: 850; font-size: 13px; white-space: nowrap; }
tr:hover td { background: rgba(56, 189, 248, 0.05); }
.col-ts { color: #fde68a; white-space: nowrap; font-weight: 700; }
.col-ts small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
.col-rand { color: #6ee7b7; word-break: break-all; font-weight: 750; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--muted); }

footer { text-align: center; padding: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; background: var(--panel); }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
