:root {
  --bg: #0a0d0b;
  --panel: #101512;
  --panel2: #151c17;
  --line: #223027;
  --text: #e8f2ea;
  --dim: #8ba394;
  --acc: #4ade80;
  --acc-dim: #14532d;
  --live: #f43f5e;
  --mono: ui-monospace, 'JetBrains Mono', 'Fira Code', monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
}
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }

header {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(10,13,11,.92); backdrop-filter: blur(8px); z-index: 10;
}
.logo { font-weight: 800; font-size: 19px; letter-spacing: -.5px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo .tv { color: var(--acc); }
.logo .dot { color: var(--live); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
header .spacer { flex: 1; }
.tag { color: var(--dim); font-size: 12.5px; }

.btn {
  display: inline-block; border: 1px solid var(--acc); color: var(--acc);
  background: transparent; padding: 8px 18px; border-radius: 8px;
  font: 600 14px system-ui; cursor: pointer; transition: .15s;
}
.btn:hover { background: var(--acc); color: #04170b; text-decoration: none; }
.btn.solid { background: var(--acc); color: #04170b; }
.btn.solid:hover { filter: brightness(1.12); }
.btn.danger { border-color: var(--live); color: var(--live); }
.btn.danger:hover { background: var(--live); color: #fff; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.big { padding: 12px 28px; font-size: 16px; border-radius: 10px; }

main { max-width: 1180px; margin: 0 auto; padding: 26px 22px 80px; }

.hero { text-align: center; padding: 44px 0 34px; }
.hero h1 { font-size: 40px; letter-spacing: -1.5px; line-height: 1.15; }
.hero h1 em { color: var(--acc); font-style: normal; }
.hero p { color: var(--dim); margin: 12px auto 22px; max-width: 620px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; transition: .15s; display: block; color: var(--text);
}
.card:hover { border-color: var(--acc); transform: translateY(-2px); text-decoration: none; }
.card .thumb {
  aspect-ratio: 16/9; background: var(--panel2); display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.card .thumb img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); }
.card .thumb .ph { font-size: 40px; }
.badge-live {
  position: absolute; top: 10px; left: 10px; background: var(--live); color: #fff;
  font: 700 11px var(--mono); padding: 3px 9px; border-radius: 5px; letter-spacing: 1px;
}
.badge-viewers {
  position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.65); color: #fff;
  font: 600 12px var(--mono); padding: 3px 8px; border-radius: 5px;
}
.card .info { padding: 12px 14px; }
.card .title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .sub { color: var(--dim); font-size: 13px; margin-top: 2px; font-family: var(--mono); }

.empty { text-align: center; color: var(--dim); padding: 60px 0; border: 1px dashed var(--line); border-radius: 14px; }
.empty .big-emoji { font-size: 44px; display: block; margin-bottom: 10px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.panel h2 { font-size: 17px; margin-bottom: 14px; }
.step { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.step .n {
  width: 26px; height: 26px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--dim); font: 700 13px var(--mono);
}
.step.done .n { background: var(--acc-dim); border-color: var(--acc); color: var(--acc); }
.step.active .n { border-color: var(--acc); color: var(--acc); }

input[type=text] {
  width: 100%; background: #0d120f; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 13px; font: 14px var(--mono); outline: none;
}
input[type=text]:focus { border-color: var(--acc); }
label { font-size: 13px; color: var(--dim); display: block; margin: 12px 0 5px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.err { color: var(--live); font-size: 13.5px; margin-top: 8px; }
.ok { color: var(--acc); font-size: 13.5px; margin-top: 8px; }
.muted { color: var(--dim); font-size: 13px; }
.mono { font-family: var(--mono); }

.tokencard {
  display: flex; gap: 14px; align-items: center; background: var(--panel2);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 14px;
}
.tokencard img, .tokencard .ph {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 26px; flex: none;
}
.tokencard .nm { font-weight: 700; font-size: 16px; }
.tokencard .sym { color: var(--acc); font-family: var(--mono); }
.tokencard .dv { color: var(--dim); font-size: 12.5px; font-family: var(--mono); margin-top: 3px; }

/* watch layout */
.watch { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .watch { grid-template-columns: 1fr; } }
.player-wrap { position: relative; background: #000; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.player-wrap video { width: 100%; aspect-ratio: 16/9; display: block; background: #000; }
.overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px;
  align-items: center; justify-content: center; background: rgba(5,8,6,.88); text-align: center; padding: 20px;
}
.overlay .big-emoji { font-size: 52px; }
.overlay h3 { font-size: 20px; }
.player-bar { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--panel); border-top: 1px solid var(--line); }
.live-pill { background: var(--live); color: #fff; font: 700 11px var(--mono); padding: 3px 9px; border-radius: 5px; letter-spacing: 1px; }
.off-pill { background: var(--line); color: var(--dim); font: 700 11px var(--mono); padding: 3px 9px; border-radius: 5px; letter-spacing: 1px; }

.chat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; height: 560px; }
.chat .head { padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 650; font-size: 14px; display: flex; justify-content: space-between; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.chat .msgs .m { word-break: break-word; }
.chat .msgs .nick { color: var(--acc); font-weight: 650; font-family: var(--mono); font-size: 12.5px; }
.chat .msgs .nick.dev { color: var(--live); }
.chat .msgs .m.old { opacity: .55; }
.chat .msgs .div { text-align: center; color: var(--dim); font-size: 11px; margin: 4px 0; border-bottom: 1px dashed var(--line); line-height: 0.1; }
.chat .msgs .div { padding-bottom: 6px; }
.chat .foot { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat .foot input { flex: 1; }
.chat .foot .btn { padding: 8px 14px; }

video.preview { width: 100%; border-radius: 12px; background: #000; aspect-ratio: 16/9; border: 1px solid var(--line); }
.statline { font: 13px var(--mono); color: var(--dim); }
.statline b { color: var(--acc); }
footer { text-align: center; color: var(--dim); font-size: 12.5px; padding: 30px 0; border-top: 1px solid var(--line); margin-top: 40px; }
