:root {
  --bg: #0a0a0f;
  --bg2: #12121a;
  --bg3: #1a1a27;
  --bg4: #22223a;
  --accent: #22c55e;
  --accent2: #16a34a;
  --accent-glow: rgba(34,197,94,0.15);
  --blue: #3b82f6;
  --red: #ef4444;
  --live: #ef4444;
  --text: #f0f0f5;
  --text2: #9999bb;
  --text3: #555570;
  --border: #2a2a40;
  --radius: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }

/* ── NAV ── */
nav {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-logo span { color: var(--text); }

.nav-search {
  flex: 1;
  max-width: 300px;
  margin: 0 auto;
}
.nav-search input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 16px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.nav-search input:focus { border-color: var(--accent); }

.nav-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.nav-user-chip {
  display: flex; align-items: center; gap: 8px;
  color: var(--text); text-decoration: none;
  padding: 4px 8px; border-radius: 20px;
  transition: background .15s;
}
.nav-user-chip:hover { background: var(--bg3); }
.nav-avatar-img {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; border: 1px solid var(--border);
}
.nav-avatar-placeholder {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.nav-user-name { font-size: 13px; font-weight: 600; }

.btn {
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-accent { background: var(--accent); color: #000; }
.btn-accent:hover { background: var(--accent2); color: #000; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg3); border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ── LIVE BADGE ── */
.badge-live {
  background: var(--live);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.badge-vod {
  background: #7c3aed;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* ── HOMEPAGE ── */
.home-hero {
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border-bottom: 1px solid var(--border);
  padding: 40px 20px;
  text-align: center;
}
.home-hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 8px; }
.home-hero h1 em { color: var(--accent); font-style: normal; }
.home-hero p { color: var(--text2); font-size: 16px; }

.container { max-width: 1280px; margin: 0 auto; padding: 24px 20px; }

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.stream-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.stream-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}
.stream-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }

.stream-card-thumb {
  aspect-ratio: 16/9;
  background: var(--bg3);
  position: relative;
  overflow: hidden;
}
.stream-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.stream-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg3) 0%, var(--bg4) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--text3);
}
.stream-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
}
.stream-card-viewers {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
}

.stream-card-info { padding: 12px; }
.stream-card-user { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #000;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 80px; height: 80px; font-size: 28px; }
.stream-card-username { font-weight: 600; font-size: 13px; }
.stream-card-title { color: var(--text2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── CHANNEL PAGE ── */
.channel-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-template-rows: auto;
  height: calc(100vh - 56px);
  overflow: hidden;
}

.channel-main { overflow-y: auto; }

.video-wrapper {
  background: #000;
  aspect-ratio: 16/9;
  width: 100%;
  position: relative;
}
#video-player { width: 100%; height: 100%; }

.video-controls-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 20px 16px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.2s;
}
.video-wrapper:hover .video-controls-overlay { opacity: 1; }

.quality-select {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  margin-left: auto;
}

/* Ad overlay */
.ad-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.ad-overlay img { max-width: 80%; max-height: 60%; object-fit: contain; }
.ad-overlay .ad-link { margin-top: 12px; }
.ad-overlay .ad-skip { margin-top: 12px; color: var(--text2); font-size: 12px; }
.ad-banner {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 8px 16px;
}
.ad-banner img { width: 100%; height: auto; }
.ad-banner a { display: block; }

.channel-info {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.channel-info-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.channel-meta { flex: 1; }
.channel-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.channel-stats { color: var(--text2); font-size: 13px; display: flex; gap: 16px; }

.channel-actions { display: flex; gap: 8px; }

.channel-bio { padding: 16px; color: var(--text2); font-size: 13px; }

/* ── CHAT ── */
.chat-panel {
  background: var(--bg2);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
}

.chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-viewers { margin-left: auto; color: var(--text2); font-size: 12px; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 2px; }

.chat-msg {
  padding: 4px 0;
  line-height: 1.4;
  word-break: break-word;
}
.chat-msg .msg-user {
  font-weight: 600;
  color: var(--accent);
  margin-right: 4px;
  font-size: 13px;
}
.chat-msg .msg-text { color: var(--text); font-size: 13px; }
.chat-msg.donation {
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 8px;
  margin: 4px 0;
}
.chat-msg.donation .donation-amount {
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
}
.chat-msg.system { color: var(--text3); font-style: italic; font-size: 12px; }
.chat-msg.action { color: var(--text2); font-style: italic; font-size: 13px; }
.chat-msg.action .action-text { color: var(--text2); }
.chat-msg.bot { opacity: 0.85; font-size: 13px; }
.chat-msg.bot .msg-bot-name { color: var(--text3); font-weight: 600; font-style: italic; margin-right: 4px; font-size: 13px; }
.chat-msg.bot .msg-text { color: var(--text2); }

.chat-form {
  padding: 12px;
  border-top: 1px solid var(--border);
}
.chat-input-row {
  display: flex;
  gap: 8px;
}
.chat-input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--accent); }
.chat-send { padding: 8px 14px; }

.chat-not-logged {
  padding: 12px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text2);
  font-size: 13px;
}

/* ── DONATION ALERT ── */
.donation-alert {
  position: fixed;
  top: 70px;
  right: 20px;
  background: var(--bg3);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  max-width: 320px;
  box-shadow: var(--shadow), 0 0 20px var(--accent-glow);
  z-index: 200;
  animation: slideIn 0.3s ease;
  display: none;
}
.donation-alert.show { display: block; }
.donation-alert-amount { font-size: 22px; font-weight: 800; color: var(--accent); }
.donation-alert-from { font-size: 13px; color: var(--text2); margin-bottom: 4px; }
.donation-alert-msg { font-size: 14px; color: var(--text); }

@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── AUTH PAGES ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.auth-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.auth-box h2 { font-size: 22px; font-weight: 700; margin-bottom: 24px; text-align: center; }
.auth-box h2 span { color: var(--accent); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 80px; }

.form-error { color: var(--red); font-size: 13px; margin-top: 8px; }
.form-success { color: var(--accent); font-size: 13px; margin-top: 8px; }

.auth-box .btn { width: 100%; justify-content: center; padding: 12px; font-size: 15px; margin-top: 8px; }
.auth-box .auth-link { text-align: center; margin-top: 16px; color: var(--text2); font-size: 13px; }

/* ── DASHBOARD ── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 56px);
}

.dashboard-sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 20px 0;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
}
.sidebar-link:hover, .sidebar-link.active {
  background: var(--accent-glow);
  color: var(--accent);
}

.dashboard-content { padding: 24px; }

.dash-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.dash-card h3 { font-size: 14px; font-weight: 600; color: var(--text2); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.5px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.stat-card .stat-value { font-size: 28px; font-weight: 800; color: var(--accent); }
.stat-card .stat-label { font-size: 12px; color: var(--text2); margin-top: 4px; }

.key-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 10px;
  word-break: break-all;
}

/* ── OFFLINE ── */
.offline-screen {
  aspect-ratio: 16/9;
  background: var(--bg3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  gap: 12px;
}
.offline-screen .offline-icon { font-size: 48px; }
.offline-screen p { font-size: 16px; }

/* ── DONATE MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
}
.modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.modal-close { float: right; cursor: pointer; color: var(--text3); font-size: 20px; line-height: 1; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .channel-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .chat-panel { height: 400px; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { display: flex; overflow-x: auto; padding: 0; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar-link { padding: 12px 16px; white-space: nowrap; }
}

@media (max-width: 768px) {
  .topbar-search-wrap { display: none; }
  nav { overflow: hidden; }
}

@media (max-width: 600px) {
  .stream-grid { grid-template-columns: 1fr 1fr; }
  .home-hero h1 { font-size: 24px; }
  .nav-search { display: none; }
}

/* ── FOOTER ── */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
}

.footer-logo {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}
.footer-logo:hover { color: var(--accent); }

.footer-tagline {
  color: var(--text3);
  font-size: 12px;
  margin-top: 6px;
}

.footer-links {
  display: flex;
  gap: 48px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 120px;
}

.footer-col-title {
  font-weight: 700;
  font-size: 12px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.footer-col a {
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent); }

.footer-rtmp {
  font-size: 11px;
  color: var(--text3);
  font-family: monospace;
  margin-top: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text3);
}

.footer-version { opacity: 0.5; }

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-links { flex-wrap: wrap; gap: 28px; }
}

/* ── Chat Badges ── */
.chat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 800;
  margin-right: 4px;
  vertical-align: middle;
  flex-shrink: 0;
}
.badge-admin    { background: #f59e0b; color: #000; }
.badge-owner    { background: transparent; font-size: 12px; width: auto; padding: 0 1px; }
.badge-partner  { background: var(--accent); color: #000; }
.badge-mod      { background: #3b82f6; color: #fff; }
.badge-sub      { background: #8b5cf6; color: #fff; font-size: 10px; }
.badge-donor    { background: transparent; font-size: 12px; width: auto; padding: 0 1px; }
.badge-follower { background: #ec4899; color: #fff; font-size: 10px; }

/* ── Chat Emotes ── */
.chat-emote {
  display: inline-block;
  height: 24px;
  width: auto;
  vertical-align: middle;
  margin: 0 2px;
  object-fit: contain;
}

/* ── Upload Widgets ── */
.upload-widget {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.upload-preview {
  position: relative;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px dashed var(--border);
  overflow: hidden;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3);
  font-size: 28px;
  font-weight: 800;
  transition: border-color 0.2s;
}
.upload-preview:hover { border-color: var(--accent); }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 12px; color: #fff; font-weight: 600;
}
.upload-preview:hover .upload-preview-overlay { opacity: 1; }

.banner-preview {
  position: relative;
  width: 100%; aspect-ratio: 16/5;
  background: var(--bg3);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); font-size: 14px;
  transition: border-color 0.2s;
  background-size: cover;
  background-position: center center;
}
.banner-preview:hover { border-color: var(--accent); }

.pos-grid {
  display: grid;
  grid-template-columns: repeat(3, 28px);
  grid-template-rows: repeat(3, 28px);
  gap: 3px;
}
.pos-cell {
  width: 28px; height: 28px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.pos-cell:hover { border-color: var(--accent); }
.pos-cell.active { background: var(--accent); border-color: var(--accent); }

/* ── Emote Grid ── */
.emote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.emote-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  text-align: center;
  position: relative;
}
.emote-card img {
  width: 48px; height: 48px;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px;
}
.emote-card .emote-code {
  font-size: 10px;
  color: var(--text2);
  word-break: break-all;
}
.emote-card .emote-del {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 3px;
  width: 18px; height: 18px;
  font-size: 10px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.emote-card:hover .emote-del { opacity: 1; }

/* ── Chat Info Button & Help Panel ───────────────────────────── */
.chat-info-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 22px; height: 22px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  margin-left: auto;
  flex-shrink: 0;
}
.chat-info-btn:hover,
.chat-info-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(34,197,94,0.08);
}
.chat-help-panel {
  display: none;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 12px;
  max-height: 260px;
  overflow-y: auto;
}
.chat-help-group { margin-bottom: 10px; }
.chat-help-group:last-child { margin-bottom: 0; }
.chat-help-group-label {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text3);
  margin-bottom: 5px;
}
.chat-help-cmd {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.chat-help-cmd:last-child { border-bottom: none; }
.chat-help-cmd code {
  color: var(--accent);
  font-size: 11.5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.chat-help-cmd span {
  color: var(--text3);
  font-size: 11px;
  text-align: right;
}
.chat-help-empty {
  color: var(--text3);
  font-size: 12px;
  text-align: center;
  padding: 8px 0;
}

/* ── Channel Stats Bar ───────────────────────────────────────── */
.channel-stats-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 20px;
  margin: 12px auto 0;
}
.cstat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 20px;
  gap: 2px;
}
.cstat-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--text1);
  line-height: 1.2;
}
.cstat-label {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.cstat-sep {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Recommendation Cards (channel page) ─────────────────────── */
.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding: 16px 0;
}
.rec-card {
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s, transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.rec-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}
.rec-card-live {
  border-color: var(--red, #ef4444);
}
.rec-card-live:hover {
  border-color: var(--red, #ef4444);
  box-shadow: 0 6px 24px rgba(239,68,68,0.18);
}
.rec-card-avatar {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.rec-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rec-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 700;
  color: var(--accent);
  background: var(--bg3);
}
.rec-ext-icon { font-size: 52px; }
.rec-card-info {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.rec-card-name {
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rec-partner {
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  width: 16px; height: 16px;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rec-card-plat {
  font-size: 11px;
  color: var(--text3);
}
.rec-live-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--red, #ef4444);
  background: rgba(239,68,68,0.12);
  border-radius: 4px;
  padding: 2px 6px;
  display: inline-block;
  margin-top: 3px;
}
.rec-live-title {
  font-size: 11px;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

/* Offline live recs */
.offline-live-recs {
  width: 100%;
  max-width: 700px;
  margin-top: 20px;
}
.offline-live-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--red, #ef4444);
  margin-bottom: 10px;
  text-align: center;
  letter-spacing: 0.03em;
}
.offline-live-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.offline-live-grid .rec-card {
  flex-direction: row;
  align-items: center;
  min-width: 220px;
  max-width: 300px;
  aspect-ratio: unset;
}
.offline-live-grid .rec-card-avatar {
  width: 64px;
  height: 64px;
  aspect-ratio: 1;
  flex-shrink: 0;
}

/* ── Recommendation Dashboard Rows ───────────────────────────── */
.rec-dash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg3);
  border-radius: 8px;
  margin-bottom: 6px;
  gap: 10px;
}
.rec-dash-info { flex: 1; min-width: 0; }
.rec-dash-plat {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

/* ── Chat autocomplete ─────────────────────────────────────── */
.chat-autocomplete {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  margin-bottom: 4px;
}
.ac-item {
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  font-family: monospace;
  color: var(--text);
  transition: background 0.1s;
}
.ac-item:hover, .ac-item.active {
  background: var(--bg3);
  color: var(--accent);
}

/* ── Chat input buttons (emote picker + info) ──────────────── */
.chat-btn {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 4px 7px;
  font-size: 16px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.chat-btn:hover {
  color: var(--text);
  background: var(--bg3);
}
.chat-btn.active {
  color: var(--accent);
}
.chat-input-row {
  position: relative;
}

/* ── Emote picker modal ────────────────────────────────────── */
.emote-picker-modal {
  position: fixed;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  max-width: 260px;
  max-height: 220px;
  overflow-y: auto;
}
.emote-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ep-btn:hover {
  background: var(--bg3) !important;
}

/* ── Username hover tooltip ─────────────────────────────────── */
.msg-user-link {
  cursor: pointer;
  transition: opacity .15s;
}
.msg-user-link:hover { opacity: .75; }

.chat-user-tooltip {
  position: fixed;
  z-index: 9999;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  min-width: 220px;
  max-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  pointer-events: auto;
  overflow: hidden;
}
.chat-user-tooltip .tip-link {
  display: block;
  padding: 12px;
  color: var(--text);
  text-decoration: none;
}
.chat-user-tooltip .tip-link:hover { background: var(--bg3); }
.tip-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.tip-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg4);
  display: flex; align-items: center; justify-content: center;
}
.tip-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.tip-avatar-fallback {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg4);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--text2);
}
.tip-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.tip-partner { color: var(--accent); margin-left: 4px; }
.tip-handle { font-size: 12px; color: var(--text3); margin-top: 2px; }
.tip-stats { font-size: 12px; color: var(--text2); margin-bottom: 6px; }
.tip-bio {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.4;
  margin-bottom: 8px;
}
.tip-footer {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

/* ── Stream scene overlay ───────────────────────────────────── */
.stream-scene-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,15,.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  pointer-events: none;
}
.scene-content {
  text-align: center;
  animation: scene-pulse 3s ease-in-out infinite;
}
.scene-icon {
  font-size: 64px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 20px rgba(255,255,255,.2));
}
.scene-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.scene-sub {
  font-size: 16px;
  color: var(--text2);
}
@keyframes scene-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .85; transform: scale(.98); }
}

/* ── VOD replay banner ──────────────────────────────────────── */
.vod-replay-banner {
  background: var(--bg3);
  color: var(--text2);
  font-size: 12px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Overlay Ad ─────────────────────────────────────────────── */
.overlay-ad {
  position: absolute;
  bottom: 60px;
  left: 12px;
  z-index: 30;
  background: rgba(10,10,15,.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  max-width: 320px;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
  animation: fadeInUp .3s ease;
}
.overlay-ad-inner { padding: 10px; }
.overlay-ad-img-wrap img { width: 100%; border-radius: 4px; display: block; margin-bottom: 6px; }
.overlay-ad-text { font-size: 13px; color: var(--text); display: block; margin-bottom: 6px; }
.overlay-ad-meta { display: flex; justify-content: space-between; align-items: center; }
.overlay-ad-label { font-size: 11px; color: var(--text3); }
.overlay-ad-close {
  background: none; border: none; color: var(--text3); cursor: pointer; font-size: 14px; padding: 2px 6px;
}
.overlay-ad-close:hover { color: var(--text); }

/* ── Midroll Ad ─────────────────────────────────────────────── */
.midroll-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
}
.midroll-inner { text-align: center; width: 100%; max-width: 600px; padding: 20px; }
.midroll-label { font-size: 12px; color: var(--text2); margin-bottom: 12px; }
.midroll-img { max-width: 100%; max-height: 250px; object-fit: contain; border-radius: 6px; }
.midroll-text { font-size: 18px; color: var(--text); margin: 16px 0; }
.midroll-skip {
  display: inline-block; margin-top: 16px;
  background: var(--bg3); color: var(--text); border: 1px solid var(--border);
  padding: 8px 18px; border-radius: 6px; cursor: pointer; font-size: 13px;
}
.midroll-skip:hover { background: var(--bg4); }

@keyframes fadeInUp {
  from { opacity:0; transform: translateY(10px); }
  to   { opacity:1; transform: translateY(0); }
}

/* ── Topbar ───────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-search-wrap {
  flex: 1;
  max-width: 320px;
  position: relative;
}
.topbar-search {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 14px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.topbar-search:focus { border-color: var(--accent); }
.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  z-index: 200;
  overflow: hidden;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-icon-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text2); font-size: 18px;
  transition: background .15s;
  position: relative;
}
.topbar-icon-btn:hover { background: var(--bg4); color: var(--text); }
.topbar-notif-badge {
  position: absolute; top: 2px; right: 2px;
  background: #ef4444; color: #fff; border-radius: 50%;
  width: 14px; height: 14px; font-size: 9px;
  display: flex; align-items: center; justify-content: center;
}

/* ── Poll widget ──────────────────────────────── */
.poll-widget {
  background: var(--bg2);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 12px;
  margin: 4px 8px 8px;
}
.poll-header { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; margin-bottom: 4px; }
.poll-question { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.poll-opt {
  display: flex; align-items: center; gap: 8px;
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; padding: 7px 10px; margin-bottom: 6px;
  cursor: pointer; color: var(--text); text-align: left;
  position: relative; overflow: hidden; transition: border-color .15s;
}
.poll-opt:hover { border-color: var(--accent); }
.poll-opt-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--accent); opacity: .15;
  transition: width .3s ease;
}
.poll-opt-text { flex: 1; font-size: 13px; position: relative; z-index: 1; }
.poll-opt-pct { font-size: 11px; color: var(--text3); position: relative; z-index: 1; }
.poll-footer { font-size: 11px; color: var(--text3); text-align: right; }

/* ── Chat announcement ────────────────────────── */
.chat-announcement {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; margin: 4px 8px;
  border-radius: 8px; font-size: 13px; font-weight: 500;
}
.announce-blue { background: rgba(59,130,246,.15); border-left: 3px solid #3b82f6; }
.announce-green { background: rgba(34,197,94,.15); border-left: 3px solid #22c55e; }
.announce-red { background: rgba(239,68,68,.15); border-left: 3px solid #ef4444; }
.announce-purple { background: rgba(139,92,246,.15); border-left: 3px solid #8b5cf6; }
.announce-icon { font-size: 16px; }
.announce-close { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--text3); font-size: 14px; }

/* ── Chat mode indicator ──────────────────────── */
.chat-mode-indicator {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 4px 12px;
  font-size: 11px; font-weight: 600;
  color: var(--text3); text-align: center;
  letter-spacing: .5px;
}

/* ── VIP badge ────────────────────────────────── */
.badge-vip { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; }

/* ── Share btn ────────────────────────────────── */
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── Left Sidebar ─────────────────────────────── */
.left-sidebar {
  position: fixed;
  left: 0;
  top: 56px;
  bottom: 0;
  width: 240px;
  background: #0e0e10;
  border-right: 1px solid #1f1f23;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 90;
  transition: width 0.2s ease;
  display: flex;
  flex-direction: column;
}
.left-sidebar.collapsed { width: 52px; }
.left-sidebar.collapsed .sidebar-label,
.left-sidebar.collapsed .sidebar-chan-name,
.left-sidebar.collapsed .sidebar-chan-meta { display: none; }
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #adadb8;
  flex-shrink: 0;
}
.sidebar-collapse-btn {
  background: none;
  border: none;
  color: #adadb8;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
}
.sidebar-collapse-btn:hover { background: #26262c; color: white; }
.left-sidebar.collapsed .sidebar-collapse-btn { transform: rotate(180deg); }
.sidebar-resize-handle {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 5px;
  cursor: ew-resize;
  z-index: 95;
  transition: background 0.15s;
}
.sidebar-resize-handle:hover, .sidebar-resize-handle:active { background: var(--accent); }
.left-sidebar.collapsed .sidebar-resize-handle { display: none; }
.sidebar-channels { display: flex; flex-direction: column; gap: 2px; padding: 4px 6px; }
.sidebar-chan {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  color: #dedee3;
  font-size: 13px;
  transition: background 0.1s;
  min-height: 36px;
}
.sidebar-chan:hover { background: #26262c; color: white; }
.sidebar-chan-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #3a3a3d;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.sidebar-chan-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-live-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  background: #eb0400;
  border-radius: 50%;
  border: 2px solid #0e0e10;
}
.sidebar-chan-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-chan-meta { font-size: 11px; color: #adadb8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-chan-info { min-width: 0; flex: 1; }
/* Main content offset for sidebar */
.page-with-sidebar { margin-left: 240px; transition: margin-left 0.2s ease; }
.page-with-sidebar.sidebar-collapsed { margin-left: 52px; }
@media (max-width: 768px) {
  .left-sidebar { width: 52px; }
  .left-sidebar .sidebar-label, .left-sidebar .sidebar-chan-name, .left-sidebar .sidebar-chan-meta { display: none; }
  .page-with-sidebar { margin-left: 52px; }
}

/* ── Notification / Message dropdown ─────────── */
.topbar-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 320px;
  background: #18181b;
  border: 1px solid #3a3a3d;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  z-index: 200;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}
.topbar-dropdown.open { display: block; }
.topbar-dropdown-header {
  padding: 12px 16px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #efeff1;
  border-bottom: 1px solid #3a3a3d;
}
.topbar-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #26262c;
  font-size: 13px;
  color: #dedee3;
}
.topbar-dropdown-item:last-child { border-bottom: none; }
.notif-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.notif-text { flex: 1; min-width: 0; }
.notif-name { font-weight: 600; color: #efeff1; }
.notif-time { font-size: 11px; color: #adadb8; margin-top: 2px; }
.topbar-dropdown-empty { padding: 24px 16px; text-align: center; color: #adadb8; font-size: 13px; }
.topbar-icon-btn {
  position: relative;
  background: none;
  border: none;
  color: #adadb8;
  cursor: pointer;
  font-size: 18px;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.1s, color 0.1s;
}
.topbar-icon-btn:hover { background: #26262c; color: #efeff1; }
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #eb0400;
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  padding: 0 4px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
}
.topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Raid Overlay ─────────────────────────────────────────── */
.raid-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}
.raid-inner {
  text-align: center;
  color: #fff;
  padding: 40px 48px;
  background: #18181b;
  border: 2px solid var(--accent);
  border-radius: 16px;
  min-width: 320px;
  box-shadow: 0 0 60px rgba(34,197,94,0.25);
}
.raid-emoji {
  font-size: 64px;
  margin-bottom: 8px;
  display: block;
  animation: raidBounce 0.6s ease infinite alternate;
}
.raid-title { font-size: 52px; font-weight: 900; color: var(--accent); margin-bottom: 6px; }
.raid-target { font-size: 20px; color: #dedee3; margin-bottom: 12px; }
.raid-target strong { color: #fff; }
.raid-countdown {
  font-size: 80px;
  font-weight: 900;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 20px;
}
.raid-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.raid-go { background: var(--accent); color: #000; font-weight: 700; font-size: 16px; padding: 12px 28px; }
.raid-cancel { font-size: 14px; padding: 12px 20px; }
@keyframes raidBounce { from { transform: translateY(0) rotate(-5deg); } to { transform: translateY(-12px) rotate(5deg); } }

/* ── Chat right-click context menu ─────────────────────────── */
.chat-ctx-menu {
  position: fixed;
  z-index: 9000;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  overflow: hidden;
  font-size: 13px;
}
.chat-ctx-menu .ctx-header {
  padding: 8px 14px 6px;
  font-weight: 700;
  color: var(--accent);
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  pointer-events: none;
}
.chat-ctx-menu .ctx-item {
  padding: 9px 14px;
  cursor: pointer;
  color: var(--text);
  transition: background .12s;
  white-space: nowrap;
}
.chat-ctx-menu .ctx-item:hover { background: var(--bg3); }
.chat-ctx-menu .ctx-item.ctx-danger { color: var(--red, #ef4444); }
.chat-ctx-menu .ctx-item.ctx-danger:hover { background: rgba(239,68,68,.12); }
.chat-ctx-menu .ctx-sep {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}

/* ── Banned / Timed-out chat messages ───────────────────────── */
.chat-msg.msg-banned {
  opacity: 0.25;
  text-decoration: line-through;
  pointer-events: none;
}
.chat-msg.msg-timedout {
  opacity: 0.35;
  font-style: italic;
}
.chat-msg.msg-timedout::after {
  content: ' [Auszeit]';
  font-size: 10px;
  color: var(--text3);
}

/* ── Chat collapsible ────────────────────────────────────────── */
.chat-panel.chat-collapsed {
  width: 48px !important;
  min-width: 48px !important;
  flex-shrink: 0;
}
.chat-panel.chat-collapsed .chat-messages,
.chat-panel.chat-collapsed .chat-form,
.chat-panel.chat-collapsed .chat-not-logged,
.chat-panel.chat-collapsed .chat-header-label,
.chat-panel.chat-collapsed .chat-viewers,
.chat-panel.chat-collapsed .chat-role-select { display: none !important; }
.chat-panel.chat-collapsed .chat-header { justify-content: center; padding: 12px 8px; border-bottom: none; }
.chat-inner { display: flex; flex-direction: column; flex: 1; height: 100%; overflow: hidden; }
.chat-collapse-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  transition: background .15s;
  line-height: 1;
}
.chat-collapse-btn:hover { background: var(--bg4); color: var(--text); }
.chat-role-select {
  margin-left: auto;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 11px;
  cursor: pointer;
  max-width: 100px;
}

/* ── Panel HTML content ── */
.panel-card-html { font-size: 13px; color: var(--text2); line-height: 1.6; }
.panel-card-html a { color: var(--accent); }
.panel-card-html img { max-width: 100%; border-radius: 6px; margin-top: 6px; }
.panel-card-html strong, .panel-card-html b { color: var(--text); }
