* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --bg: #0a0a0f;
  --panel: #15151f;
  --line: #23232f;
  --accent: #ff4d6d;
  --accent2: #ffd166;
  --good: #6ee7a0;
  --text: #f2f2f5;
  --dim: #9a9aad;
}
html, body { background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, sans-serif; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 14px 40px; }

.layout { display: block; }
@media (min-width: 1024px) {
  .wrap { max-width: 1240px; padding: 0 24px 40px; }
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
  .col-side { position: sticky; top: 16px; }
  .col-side .panel:first-child { margin-top: 0; }
}

.site-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 16px 2px 12px;
}
.brand-mark { font-size: 24px; font-weight: 900; letter-spacing: -.5px; }
.brand-mark span { color: var(--accent); }
.brand-mark em {
  font-style: normal; font-size: 11px; font-weight: 800; color: #000;
  background: var(--accent); border-radius: 4px; padding: 2px 6px;
  vertical-align: middle; margin-left: 6px; letter-spacing: 1px;
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: .6; } }
.status-line { font-size: 12px; color: var(--dim); }

.stage16 {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: #000; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
}
.stage16 video, .stage16 iframe { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; }

.caption {
  position: absolute; left: 12px; bottom: 12px; max-width: 70%;
  font-size: 14px; font-weight: 600; color: #fff; font-style: italic;
  text-shadow: 0 1px 4px #000, 0 0 12px rgba(0,0,0,.8);
  z-index: 5; pointer-events: none;
}

.ad-overlay {
  position: absolute; right: 12px; bottom: 12px;
  display: none; flex-direction: column; align-items: flex-end; gap: 4px;
  z-index: 6; cursor: pointer;
  transition: transform .15s;
}
.ad-overlay.show { display: flex; }
.ad-overlay:hover { transform: scale(1.05); }
.ad-overlay img {
  width: 84px; height: 84px; object-fit: contain;
  background: rgba(255,255,255,.95); border-radius: 14px; padding: 8px;
  box-shadow: 0 4px 18px rgba(0,0,0,.6);
}
.ad-label {
  font-size: 10px; font-weight: 800; color: #000; text-transform: uppercase;
  background: var(--accent2); border-radius: 4px; padding: 2px 7px; letter-spacing: .5px;
}
.ad-name { font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px #000; }

.chat-block { padding: 12px 2px 4px; }
.chat-row { display: flex; gap: 8px; }
.chat-row input {
  flex: 1; border: 1px solid var(--line); border-radius: 24px; padding: 13px 18px;
  font-size: 15px; background: var(--panel); color: var(--text); outline: none;
}
.chat-row input:focus { border-color: var(--accent); }
.chat-row input::placeholder { color: var(--dim); }
.chat-row button, .btn {
  border: none; border-radius: 24px; padding: 13px 22px;
  font-size: 15px; font-weight: 800; background: var(--accent); color: #fff; cursor: pointer;
}
.chat-row button:disabled { opacity: .5; }
.chat-error { color: var(--accent2); font-size: 12px; margin-top: 6px; min-height: 14px; }
.chat-hint { color: var(--dim); font-size: 12px; margin-top: 2px; }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px; margin-top: 18px;
}
.panel h2 { font-size: 17px; margin-bottom: 10px; }
.fine { color: var(--dim); font-size: 12px; margin-top: 10px; }

.top-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.top-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #0f0f18; border: 1px solid var(--line); border-radius: 20px;
  padding: 6px 12px; font-size: 13px;
}
.top-chip img { width: 20px; height: 20px; border-radius: 5px; background: #fff; }
.top-chip b { color: var(--good); }

.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tabs button {
  flex: 0 0 auto; border: 1px solid var(--line); background: transparent; color: var(--dim);
  border-radius: 10px; padding: 8px 18px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.tabs button.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.rank-row {
  display: flex; align-items: center; gap: 12px;
  background: #0f0f18; border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 8px;
}
.rank-row .rank { font-size: 17px; font-weight: 900; color: var(--accent2); width: 26px; }
.rank-row img { width: 38px; height: 38px; border-radius: 8px; background: #fff; object-fit: contain; }
.rank-row .who { flex: 1; min-width: 0; }
.rank-row .who .name { font-weight: 700; font-size: 14px; }
.rank-row .who .domain { font-size: 12px; color: var(--dim); }
.rank-row .amount { font-weight: 800; color: var(--good); }
.empty { color: var(--dim); font-size: 13px; text-align: center; padding: 24px 0; }

label { display: block; font-size: 13px; color: var(--dim); margin: 12px 0 4px; }
input[type=text], input[type=url], input[type=number] {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; font-size: 15px; background: #0f0f18; color: var(--text);
}
input[type=file] { color: var(--dim); font-size: 13px; }
.btn { display: inline-block; margin-top: 16px; width: 100%; text-align: center; border-radius: 12px; }
.msg { margin-top: 12px; font-size: 13px; min-height: 16px; }
.msg.err { color: var(--accent); }
.msg.ok { color: var(--good); }

.site-foot { text-align: center; padding: 26px 0 10px; font-size: 13px; color: var(--dim); }

.page { max-width: 560px; margin: 0 auto; padding: 20px 16px 60px; }
.page h1 { font-size: 22px; margin-bottom: 4px; }
.page .sub { color: var(--dim); font-size: 13px; margin-bottom: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
table.admin { width: 100%; border-collapse: collapse; font-size: 13px; }
table.admin td, table.admin th { padding: 7px 6px; text-align: left; border-bottom: 1px solid var(--line); }
.nav { display: flex; gap: 14px; font-size: 13px; margin-bottom: 18px; }
