[hidden] { display: none !important; }
:root {
  --bg: #0b0a08;
  --bg2: #12100c;
  --card: #15130f;
  --line: #2a251b;
  --ink: #f2ecdf;
  --mute: #9a917f;
  --gold: #d4af5a;
  --gold2: #f1d58c;
  --up: #6fd49a;
  --down: #f07a6a;
  --serif: 'Bodoni Moda', 'Didot', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Manrope', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    repeating-linear-gradient(90deg, rgba(212,175,90,.035) 0 1px, transparent 1px 22px),
    radial-gradient(1200px 600px at 50% -10%, #221c10 0%, var(--bg) 60%);
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.sym, .sym-inline { color: var(--gold2); }

/* ticker */
.ticker { border-bottom: 1px solid var(--line); background: #0e0c09; overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; gap: 38px; padding: 9px 0; animation: tick 60s linear infinite; font-family: var(--mono); font-size: 12px; }
.ticker-track span b { color: var(--gold2); font-weight: 600; margin-right: 8px; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* masthead */
.masthead { max-width: 1180px; margin: 0 auto; padding: 28px 16px 40px; text-align: center; }
.mast-top { display: flex; justify-content: space-between; border-top: 3px double var(--gold); border-bottom: 1px solid var(--line); padding: 8px 2px; }
.mast-label { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.brand { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 34px 0 10px; }
.ceo-logo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); box-shadow: 0 0 0 6px rgba(212,175,90,.12); }
h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(48px, 10vw, 128px); line-height: .9; margin: 0; letter-spacing: -.02em; }
h1 em { font-style: italic; font-weight: 500; color: var(--gold); }
.tagline { font-family: var(--serif); font-style: italic; font-size: clamp(17px, 2.4vw, 22px); color: var(--mute); margin: 14px auto 0; max-width: 720px; }
.ca-row { margin-top: 26px; display: flex; justify-content: center; }
.ca-pill { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; border: 1px solid var(--line); background: var(--bg2); border-radius: 999px; padding: 8px 10px 8px 8px; transition: border-color .2s; }
.ca-pill:hover { border-color: var(--gold); }
.ca-tag { background: var(--gold); color: #1a1408; font-weight: 700; font-size: 11px; border-radius: 999px; padding: 4px 9px; letter-spacing: .08em; }
.ca-val { font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-copy { font-family: var(--mono); font-size: 11px; color: var(--gold2); text-transform: uppercase; letter-spacing: .1em; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 11px 20px; border-radius: 3px; border: 1px solid var(--gold); font-weight: 700; font-size: 14px; letter-spacing: .02em; transition: transform .15s, background .2s; }
.btn.primary { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #1a1408; border-color: var(--gold2); }
.btn:hover { transform: translateY(-1px); }
.btn.ghost:hover { background: rgba(212,175,90,.1); }

/* sections */
section { max-width: 1180px; margin: 0 auto; padding: 0 16px 56px; }
.section-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.section-head h2 { font-family: var(--serif); font-weight: 500; font-style: italic; font-size: clamp(26px, 4vw, 40px); margin: 0; white-space: nowrap; }
.rule { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* videos */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.video-grid.n1 { grid-template-columns: minmax(0, 720px); justify-content: center; }
.video-grid.n2 { grid-template-columns: repeat(2, 1fr); }
.vcard { background: var(--card); border: 1px solid var(--line); padding: 8px; position: relative; }
.vcard::before { content: ''; position: absolute; inset: 3px; border: 1px solid rgba(212,175,90,.18); pointer-events: none; }
.vframe { position: relative; background: #000; aspect-ratio: 16 / 9; overflow: hidden; }
.vframe video, .vframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; }
.vtitle { font-family: var(--serif); font-style: italic; font-size: 17px; padding: 10px 6px 4px; }

/* pairs */
.pairs-sub { text-align: center; color: var(--mute); margin: -8px 0 26px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--bg2); margin-bottom: 22px; }
.stat { padding: 18px 20px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat:last-child { border-right: 0; }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--mute); }
.stat .v { font-family: var(--mono); font-size: 22px; font-weight: 600; }
.stat .sub { font-family: var(--mono); font-size: 12px; color: var(--mute); }

.controls { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { background: transparent; border: 1px solid var(--line); padding: 8px 14px; font-size: 13px; border-radius: 2px; color: var(--mute); }
.tabs button.on { border-color: var(--gold); color: var(--ink); background: rgba(212,175,90,.08); }
#search { background: var(--bg2); border: 1px solid var(--line); color: var(--ink); padding: 10px 14px; border-radius: 2px; min-width: 260px; font: 14px var(--sans); }
#search:focus { outline: none; border-color: var(--gold); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.coin { background: var(--card); border: 1px solid var(--line); padding: 16px; cursor: pointer; transition: border-color .2s, transform .15s; position: relative; min-width: 0; }
.coin:hover { border-color: rgba(212,175,90,.6); transform: translateY(-2px); }
.coin.flash { animation: flash 2.4s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 2px var(--gold2), 0 0 40px rgba(241,213,140,.35); } 100% { box-shadow: none; } }
.coin-top { display: flex; gap: 12px; align-items: center; }
.coin-img { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; background: #1f1b14; flex: none; border: 1px solid var(--line); }
.coin-img.ph { display: grid; place-items: center; font-family: var(--serif); font-size: 22px; color: var(--gold); }
.coin-names { min-width: 0; flex: 1; }
.coin-name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin-sym { font-family: var(--mono); font-size: 12px; color: var(--gold2); }
.badge { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; padding: 4px 7px; border: 1px solid var(--line); color: var(--mute); white-space: nowrap; }
.badge.grad { border-color: var(--gold); color: var(--gold2); }
.coin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 12px; }
.coin-grid div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.coin-grid .k { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--mute); }
.coin-grid .v { font-family: var(--mono); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up { color: var(--up); } .down { color: var(--down); }
.bar { height: 5px; background: #221e16; position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--gold), var(--gold2)); }
.coin-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 12px; color: var(--mute); gap: 8px; }
.links { display: flex; gap: 6px; }
.links a { text-decoration: none; font-family: var(--mono); font-size: 11px; border: 1px solid var(--line); padding: 3px 7px; color: var(--ink); }
.links a:hover { border-color: var(--gold); }
.empty { text-align: center; color: var(--mute); padding: 60px 16px; border: 1px dashed var(--line); font-family: var(--serif); font-style: italic; font-size: 20px; }
.empty a { color: var(--gold2); }

.foot { max-width: 1180px; margin: 0 auto; padding: 22px 16px 40px; border-top: 3px double var(--gold); display: flex; justify-content: space-between; color: var(--mute); font-size: 13px; }
.live { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--mute); }
.live.on i { background: var(--up); box-shadow: 0 0 10px var(--up); }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(5,4,3,.78); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--bg2); border: 1px solid var(--gold); width: min(680px, 100%); max-height: 88vh; overflow: auto; padding: 22px; position: relative; }
.modal-x { position: absolute; top: 8px; right: 12px; background: none; border: 0; font-size: 28px; color: var(--mute); }
.m-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.m-head .coin-img { width: 68px; height: 68px; }
.m-head h3 { font-family: var(--serif); font-size: 30px; margin: 0; }
.m-desc { color: var(--mute); font-size: 14px; line-height: 1.5; margin: 0 0 14px; word-break: break-word; }
.m-ca { font-family: var(--mono); font-size: 12px; word-break: break-all; background: var(--bg); border: 1px solid var(--line); padding: 8px 10px; margin-bottom: 14px; cursor: pointer; }
.trades { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; margin-top: 8px; }
.trades td, .trades th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.trades th { color: var(--mute); font-weight: 400; text-transform: uppercase; font-size: 10px; letter-spacing: .1em; }

@media (max-width: 860px) {
  .video-grid, .video-grid.n2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .ceo-logo { width: 96px; height: 96px; }
  .grid { grid-template-columns: 1fr; }
  #search { min-width: 0; width: 100%; }
  .brand { flex-direction: column; gap: 14px; }
  .stat .v { font-size: 18px; }
  .coin-grid { grid-template-columns: repeat(2, 1fr); }
}
