:root {
  --bg: #0a0e1a; --bg2: #101527; --card: #151b30; --card2: #1a2138;
  --gold: #f5c542; --gold2: #e8a92e; --text: #e8ecf5; --dim: #8b93a8;
  --accent: #4f7cff; --green: #3ddc97; --red: #ff5d6c; --border: #232c4a;
  --mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; min-height: 100vh; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold2); }

/* ---------- nav ---------- */
nav { display: flex; align-items: center; gap: 28px; padding: 16px 40px;
  background: rgba(16,21,39,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 800;
  font-size: 20px; color: var(--text); }
nav .brand img { width: 34px; height: 34px; }
nav a { color: var(--dim); font-size: 15px; font-weight: 500; }
nav a:hover, nav a.active { color: var(--gold); }
nav .spacer { flex: 1; }
.chip { background: var(--card2); border: 1px solid var(--border); color: var(--green);
  padding: 5px 14px; border-radius: 20px; font-size: 12.5px; font-family: var(--mono); }

/* ---------- hero / 3d coin ---------- */
.hero { display: flex; align-items: center; justify-content: center; gap: 70px;
  padding: 80px 40px 60px; flex-wrap: wrap;
  background: radial-gradient(ellipse 60% 55% at 60% 30%, #1b2547 0%, transparent 70%); }
.hero h1 { font-size: 56px; line-height: 1.05; letter-spacing: -1px; }
.hero h1 .g { background: linear-gradient(135deg, #ffe89a, #f5c542 45%, #b87b18);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--dim); font-size: 18px; margin: 22px 0 30px; max-width: 480px; line-height: 1.6; }
.btn { display: inline-block; padding: 13px 28px; border-radius: 10px; font-weight: 700;
  font-size: 15px; border: none; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: linear-gradient(135deg, #ffd968, #e8a92e); color: #241a03;
  box-shadow: 0 8px 24px rgba(232,169,46,.3); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border); margin-left: 12px; }
.btn-ghost:hover { border-color: var(--gold); }

.coin-scene { perspective: 1100px; width: 260px; height: 260px; position: relative; }
.coin { width: 100%; height: 100%; position: relative; transform-style: preserve-3d;
  animation: spin 7s cubic-bezier(.5,.1,.4,.9) infinite; }
.coin .face, .coin .edge-face { position: absolute; inset: 0; border-radius: 50%;
  backface-visibility: hidden; }
.coin .face.front { transform: translateZ(14px);
  background: url('coin.svg') center/cover; }
.coin .face.back { transform: rotateY(180deg) translateZ(14px);
  background: url('coin.svg') center/cover; }
.coin .rim { position: absolute; inset: -2px; border-radius: 50%;
  transform: translateZ(0); box-shadow: 0 0 0 13px #a3741f, 0 0 60px rgba(245,197,66,.35);
  border: 2px solid #5f3f0d; }
.coin-glow { position: absolute; inset: -30px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,197,66,.22), transparent 65%);
  animation: pulse 4s ease-in-out infinite; }
@keyframes spin { 0% { transform: rotateY(0) } 55% { transform: rotateY(360deg) }
  70% { transform: rotateY(330deg) } 85% { transform: rotateY(355deg) }
  100% { transform: rotateY(360deg) } }
@keyframes pulse { 0%,100% { opacity:.6 } 50% { opacity:1 } }
.coin-shadow { width: 60%; height: 22px; margin: 26px auto 0; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.6), transparent 70%);
  animation: shrink 7s ease-in-out infinite; }
@keyframes shrink { 0%,100% { transform: scaleX(1); opacity:.7 } 50% { transform: scaleX(.55); opacity:.35 } }

/* ---------- sections ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 30px; }
section { padding: 56px 0; }
h2.title { font-size: 32px; letter-spacing: -.5px; margin-bottom: 8px; }
p.sub { color: var(--dim); margin-bottom: 34px; }
.grid { display: grid; gap: 18px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.stat { background: linear-gradient(160deg, var(--card), var(--bg2));
  border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; }
.stat .k { color: var(--dim); font-size: 12.5px; text-transform: uppercase;
  letter-spacing: 1.2px; font-weight: 600; }
.stat .v { font-size: 26px; font-weight: 800; margin-top: 8px; font-family: var(--mono); }
.stat .v.gold { color: var(--gold); } .stat .v.green { color: var(--green); }
.stat .v.blue { color: var(--accent); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 26px; transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-4px); border-color: var(--gold); }
.card .icon { width: 46px; height: 46px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; font-size: 22px;
  background: linear-gradient(135deg, #2a3558, #1a2138); margin-bottom: 16px;
  border: 1px solid var(--border); }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--dim); font-size: 14.5px; line-height: 1.6; }

/* ---------- tables ---------- */
.tbl-wrap { background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 14px 18px; color: var(--dim); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--border);
  background: var(--bg2); }
td { padding: 13px 18px; border-bottom: 1px solid #1a2138; font-family: var(--mono); font-size: 13px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(79,124,255,.05); }
td.num { text-align: right; } th.num { text-align: right; }
.hash { color: var(--accent); font-size: 12.5px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px;
  font-weight: 700; }
.badge.gold { background: rgba(245,197,66,.15); color: var(--gold); }
.badge.green { background: rgba(61,220,151,.12); color: var(--green); }
.badge.blue { background: rgba(79,124,255,.12); color: var(--accent); }

/* ---------- search / detail ---------- */
.search { display: flex; gap: 12px; margin-bottom: 30px; }
.search input { flex: 1; padding: 14px 18px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-family: var(--mono); font-size: 14px; outline: none; }
.search input:focus { border-color: var(--gold); }
.search button { padding: 14px 26px; border-radius: 10px; border: none;
  background: linear-gradient(135deg, #ffd968, #e8a92e); color: #241a03;
  font-weight: 700; cursor: pointer; }
.detail { background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 26px; margin-bottom: 24px; }
.detail h3 { margin-bottom: 16px; font-size: 18px; }
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 10px 20px; font-size: 14px; }
.kv .k { color: var(--dim); } .kv .v { font-family: var(--mono); font-size: 13px; word-break: break-all; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; gap: 36px;
    padding: 50px 16px 30px; }
  .hero h1 { font-size: 38px; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-links { justify-content: center; }
  nav { padding: 12px 16px; gap: 12px; flex-wrap: wrap; font-size: 14px; }
  .wrap { padding: 0 14px; }
  .eco h2 { font-size: 26px; }
  .grid.cards { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; gap: 8px 12px; }
  .tbl-wrap { overflow-x: auto; }
  table { font-size: 13px; }
  .wp .toc { columns: 1; }
  .wp .cover h1 { font-size: 30px; }
  .wp h2 { font-size: 22px; }
  pre, .formula { font-size: 11px; }
}
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; } }
@media (max-width: 420px) {
  .hero h1 { font-size: 30px; }
  .eco h2 { font-size: 22px; }
  .btn { padding: 10px 16px; font-size: 13px; }
}

/* ---------- misc ---------- */
footer { border-top: 1px solid var(--border); padding: 40px; color: var(--dim);
  font-size: 14px; text-align: center; margin-top: 40px; }
code { background: var(--card2); padding: 2px 8px; border-radius: 6px;
  font-family: var(--mono); font-size: 12.5px; color: var(--gold); }
pre { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  padding: 18px; font-family: var(--mono); font-size: 13px; overflow-x: auto; color: #c8d0e8; }
.tag { color: var(--gold); font-family: var(--mono); font-size: 12px;
  border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; }
.flash { animation: flash 1s ease; }
@keyframes flash { from { background: rgba(245,197,66,.18) } to { background: transparent } }
.loading { color: var(--dim); padding: 30px; text-align: center; font-family: var(--mono); }
