:root {
  --bg: #0f1115;
  --panel: #1a1d24;
  --border: #2a2e37;
  --text: #eaecef;
  --muted: #9aa1ac;
  --accent: #7c5cff;
  --accent2: #ff5c93;
  --ok: #2ecc71;
  --danger: #ff5c5c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}
.wrap.wide { max-width: 900px; }
h1 { font-size: 20px; margin: 0 0 4px; }
p.sub { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
input, select, button, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #10131a;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 10px;
}
button {
  background: var(--accent);
  border: none;
  font-weight: 600;
  cursor: pointer;
}
button.secondary { background: #2a2e37; }
button.ghost { background: transparent; border: 1px solid var(--border); }
button:active { opacity: 0.85; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #2a2e37;
  color: var(--muted);
}
.tag.live { background: var(--danger); color: #fff; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }
.video-box { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; }
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 720px) {
  .grid.split { grid-template-columns: 2fr 1fr; }
}
.chat-box {
  height: 360px;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.chat-messages { flex: 1; overflow-y: auto; padding: 10px; font-size: 14px; }
.chat-messages .msg { margin-bottom: 8px; }
.chat-messages .msg .user { color: var(--accent); font-weight: 600; margin-right: 6px; }
.chat-messages .msg.system { color: var(--muted); font-style: italic; }
.chat-messages .msg.donation { background: rgba(255, 92, 147, 0.15); border: 1px solid var(--accent2); border-radius: 8px; padding: 6px 10px; }
.chat-input { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--border); }
.chat-input input { margin: 0; flex: 1; }
.chat-input button { width: auto; padding: 10px 14px; margin: 0; }
.donation-buttons { display: flex; gap: 8px; margin-top: 8px; }
.donation-buttons button { background: var(--accent2); }
code.key { display: block; background: #10131a; padding: 10px; border-radius: 8px; font-size: 13px; word-break: break-all; margin-bottom: 10px; }
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent2);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: toast-in 0.25s ease-out, toast-out 0.4s ease-in 2.6s forwards;
  z-index: 999;
}
@keyframes toast-in { from { opacity:0; transform: translateX(-50%) translateY(20px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }
@keyframes toast-out { to { opacity:0; } }
a.link { color: var(--accent); text-decoration: none; font-size: 13px; }
.topbar { display:flex; justify-content: space-between; align-items:center; margin-bottom: 16px; }
.topbar button { width:auto; padding: 8px 14px; }
