/* ==========================================================================
   CboxLeech Cbox — Realtime Multi-Host Debrid & Stream Platform Stylesheet
   Engineered for high utility, crisp geometry, and clean developer aesthetics.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Default Theme Tokens: Slate Obsidian Dark (Primary)
   -------------------------------------------------------------------------- */
:root, body.theme-dark {
  /* Surfaces & Backgrounds - Cyber Obsidian */
  --bg-root: #050811;
  --bg-navbar: rgba(8, 12, 22, 0.88);
  --bg-main: #070b16;
  --bg-sidebar: #090e1c;
  --bg-card: rgba(14, 20, 36, 0.80);
  --bg-card-hover: rgba(22, 32, 56, 0.90);
  --bg-surface: #0c1222;
  --bg-surface-hover: #131c34;
  --bg-input: #060913;
  --cyber-card-bg: rgba(12, 18, 32, 0.85);
  
  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-default: rgba(255, 255, 255, 0.11);
  --border-card: rgba(255, 255, 255, 0.14);
  --border-focus: #10b981;
  --border-highlight: rgba(16, 185, 129, 0.40);
  --border-glow: rgba(16, 185, 129, 0.50);

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', "SFMono-Regular", Consolas, monospace;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  /* Accent Colors - CboxLeech Electric Emerald & Cyan */
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.35);
  --brand-cyan: #06b6d4;
  --brand-gradient: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --cyber-glow: 0 0 25px rgba(16, 185, 129, 0.22);
  
  --accent-emerald: #10b981;
  --accent-emerald-bg: rgba(16, 185, 129, 0.12);
  --accent-emerald-border: rgba(16, 185, 129, 0.3);
  --accent-emerald-text: #34d399;

  --accent-amber: #f59e0b;
  --accent-amber-bg: rgba(245, 158, 11, 0.12);
  --accent-amber-border: rgba(245, 158, 11, 0.3);
  --accent-amber-text: #fbbf24;

  --accent-rose: #f43f5e;
  --accent-rose-bg: rgba(244, 63, 94, 0.12);
  --accent-rose-border: rgba(244, 63, 94, 0.3);
  --accent-rose-text: #fb7185;

  --accent-purple: #8b5cf6;
  --accent-purple-bg: rgba(139, 92, 246, 0.12);
  --accent-purple-border: rgba(139, 92, 246, 0.3);
  --accent-purple-text: #a5b4fc;

  /* Shadows & Radii */
  --radius-xs: 5px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px rgba(16, 185, 129, 0.25);

  --scrollbar-thumb: rgba(255, 255, 255, 0.12);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.22);
  --bot-card-bg: rgba(14, 20, 36, 0.85);
  --bot-card-border: rgba(255, 255, 255, 0.10);
}

/* --------------------------------------------------------------------------
   Light Theme Tokens Override
   -------------------------------------------------------------------------- */
body.theme-light {
  /* Surfaces & Backgrounds */
  --bg-root: #f8fafc;
  --bg-navbar: rgba(255, 255, 255, 0.96);
  --bg-main: #ffffff;
  --bg-sidebar: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-surface: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --bg-input: #ffffff;
  
  /* Borders & Dividers */
  --border-subtle: #e2e8f0;
  --border-card: #e2e8f0;
  --border-focus: #059669;
  --border-highlight: rgba(5, 150, 105, 0.25);

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', "SFMono-Regular", Consolas, monospace;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  /* Accent Colors */
  --primary: #059669;
  --primary-hover: #047857;
  --primary-glow: rgba(5, 150, 105, 0.18);
  --brand-cyan: #0891b2;
  --brand-gradient: linear-gradient(135deg, #059669 0%, #0891b2 100%);
  
  --accent-emerald: #059669;
  --accent-emerald-bg: #ecfdf5;
  --accent-emerald-border: #a7f3d0;
  --accent-emerald-text: #047857;

  --accent-amber: #f59e0b;
  --accent-amber-bg: #fffbeb;
  --accent-amber-border: #fde68a;
  --accent-amber-text: #b45309;

  --accent-rose: #ef4444;
  --accent-rose-bg: #fef2f2;
  --accent-rose-border: #fecaca;
  --accent-rose-text: #b91c1c;

  --accent-purple: #7c3aed;
  --accent-purple-bg: #f5f3ff;
  --accent-purple-border: #ddd6fe;
  --accent-purple-text: #6d28d9;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 16px rgba(5, 150, 105, 0.15);

  --scrollbar-thumb: #cbd5e1;
  --scrollbar-thumb-hover: #94a3b8;
  --bot-card-bg: #f8fafc;
  --bot-card-border: #e2e8f0;
}

/* ==========================================================================
   Base Reset & Document Structure
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  background-color: var(--bg-root);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ==========================================================================
   1. Global Top Navigation Bar (Command HUD Architecture)
   ========================================================================== */
.navbar-top {
  height: 58px;
  flex-shrink: 0;
  background: var(--bg-navbar);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  z-index: 50;
  position: relative;
}

.navbar-inner {
  height: 100%;
  max-width: 100%;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

/* Brand & Channel HUD */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.channel-hub-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.channel-hash {
  color: var(--primary);
  font-weight: 800;
}

.channel-name {
  color: var(--text-primary);
  font-weight: 700;
}

.channel-speed-tag {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-emerald-text);
  background: rgba(16, 185, 129, 0.18);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 2px;
}

/* Center HUD Telemetry */
.navbar-center-hud {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 860px) {
  .navbar-center-hud, .channel-hub-pill {
    display: none;
  }
}

.brand-badge {
  background: var(--brand-gradient);
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  line-height: 1.2;
  margin: 0;
  padding: 0;
}

.brand-title strong {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.badge-cbox-title {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(16, 185, 129, 0.12);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.5px;
}

/* VIP Pass Action Button in Navbar */
.btn-nav-vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff !important;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease;
  user-select: none;
}

.btn-nav-vip-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.55);
}

.vip-crown-icon {
  font-size: 13px;
}

/* Home Navigation Link */
.btn-home-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none !important;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: all 0.15s ease;
}

.btn-home-nav:hover {
  color: var(--text-primary);
  border-color: var(--border-card);
  background: var(--bg-surface-hover);
}

/* Nav Controls */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Live indicator badge */
.status-indicator-box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-secondary);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--accent-amber);
  flex-shrink: 0;
}

.live-dot.connected {
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

.live-dot.disconnected {
  background: var(--accent-rose);
}

/* Online Counter */
.online-box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.badge-num {
  font-weight: 800;
  color: var(--brand-emerald);
}

/* Icon Buttons (Sound & Theme Toggle) */
.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 14px;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-card);
  color: var(--text-primary);
}

.btn-icon.muted {
  opacity: 0.6;
}

/* Admin Link */
.btn-admin-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.btn-admin-link:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-card);
  text-decoration: none;
}

/* Public Host Stats Link */
.btn-stats-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-stats-link:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}



/* ==========================================================================
   2. Notice / Maintenance Alert Bar
   ========================================================================== */
.cbox-notice-bar {
  background: var(--accent-amber-bg);
  border-bottom: 1px solid var(--accent-amber-border);
  padding: 8px 1.25rem;
  z-index: 40;
}

.notice-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--accent-amber-text);
  font-weight: 500;
}

.notice-badge {
  background: var(--accent-amber);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.5px;
}

.notice-content {
  flex: 1;
}

.btn-close-notice {
  font-size: 18px;
  color: var(--accent-amber-text);
  opacity: 0.7;
  padding: 0 4px;
}
.btn-close-notice:hover {
  opacity: 1;
}

/* ==========================================================================
   3. Main Application Layout (Cyber-HUD Two-Pane Architecture)
   ========================================================================== */
.app-layout {
  flex: 1;
  display: flex;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 14px 20px 20px;
  gap: 16px;
  background: 
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(16, 185, 129, 0.08) 0%, transparent 70%),
    radial-gradient(circle at 100% 100%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
    var(--bg-root);
}

@media (max-width: 860px) {
  .app-layout {
    padding: 0;
    gap: 0;
  }
}

/* Main Chat Workspace */
.chat-main-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: rgba(9, 13, 24, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.55);
  position: relative;
  overflow: hidden;
}

@media (max-width: 860px) {
  .chat-main-card {
    border-radius: 0;
    border: none;
  }
}

/* Chat Card Header */
.chat-card-header {
  height: 58px;
  flex-shrink: 0;
  padding: 0 1.25rem;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.room-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  flex-shrink: 0;
}

.hash-symbol {
  color: var(--primary);
  font-size: 16px;
  font-weight: 800;
}

.room-desc {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 1px solid var(--border-subtle);
  padding-left: 12px;
}

.card-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.feed-filter-group {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 3px;
}

.feed-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.feed-filter-btn:hover {
  color: var(--text-primary);
}

.feed-filter-btn.active {
  background: var(--brand-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.feed-filter-btn.active.filter-my-links {
  background: var(--brand-gradient);
  color: #ffffff;
}

.feed-filter-btn .filter-icon {
  font-size: 11px;
}

.filter-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  font-size: 9.5px;
  font-family: var(--font-mono);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.btn-sidebar-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
  position: relative;
  z-index: 5;
}

.btn-sidebar-toggle:hover {
  background: var(--brand-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}

/* Stream Telemetry Ribbon (High-Tech Status Bar) */
.stream-telemetry-ribbon {
  height: 38px;
  background: rgba(6, 10, 20, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  flex-shrink: 0;
}

.stream-telemetry-ribbon::-webkit-scrollbar {
  display: none;
}

.ribbon-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ribbon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.pulse-green {
  animation: ribbonPulse 2s infinite;
}

@keyframes ribbonPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.ribbon-label {
  color: var(--text-dim);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.ribbon-val {
  color: var(--text-secondary);
  font-weight: 600;
}

.ribbon-val.text-emerald {
  color: #34d399;
}

.ribbon-divider {
  width: 1px;
  height: 14px;
  background: var(--border-subtle);
  flex-shrink: 0;
}

.ribbon-hosts-pills {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.host-pill-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  font-size: 10.5px;
  color: var(--text-secondary);
}

.host-pill-mini img {
  border-radius: 2px;
}

.host-more-tag {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.host-more-tag:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #fff;
}

/* Empty notice for filtered views */
.filter-empty-state {
  text-align: center;
  padding: 38px 16px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px dashed var(--border-card);
  border-radius: var(--radius-md);
  margin: 20px auto;
  max-width: 480px;
  animation: fadeIn 0.2s ease;
}

.filter-empty-state strong {
  display: block;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.filter-empty-state p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}


/* ==========================================================================
   4. Chat Feed & Messages Stream
   ========================================================================== */
.chat-feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
  position: relative;
  background: var(--bg-main);
}

/* Clean Scrollbars */
.chat-feed::-webkit-scrollbar,
.info-sidebar::-webkit-scrollbar {
  width: 6px;
}
.chat-feed::-webkit-scrollbar-track,
.info-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.chat-feed::-webkit-scrollbar-thumb,
.info-sidebar::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-full);
}
.chat-feed::-webkit-scrollbar-thumb:hover,
.info-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Load Older Messages */
.load-more-container {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.btn-load-history {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px dashed var(--border-card);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-load-history:hover {
  background: var(--bg-surface-hover);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-load-history:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Empty State */
.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  text-align: center;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.chat-empty-state h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.chat-empty-state p {
  font-size: 13px;
  max-width: 360px;
}

/* Messages Stream */
.messages-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Message Item */
.msg-item {
  display: flex;
  gap: 12px;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.18s ease;
  position: relative;
}

.msg-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}

.msg-item.is-me {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.15);
}

/* User Avatars */
.msg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  user-select: none;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* Body & Header */
.msg-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.msg-sender-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13.5px;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.msg-sender-name.is-me {
  color: var(--primary);
}

.badge-you {
  font-size: 9.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  text-transform: uppercase;
}

/* User Country Flag Badge */
.user-flag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  padding: 2px 4px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  cursor: help;
  line-height: 1;
}

.user-flag-badge:hover {
  border-color: var(--border-card);
}

.user-flag-img {
  display: block;
  border-radius: 2px;
  width: 16px;
  height: 11px;
  object-fit: cover;
}

.msg-timestamp {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-weight: 500;
  margin-left: auto;
}

.msg-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  word-break: break-word;
}

/* ==========================================================================
   5. Generator Bot & Job Message Cards (Cyber Debrid Console)
   ========================================================================== */
.msg-item.is-bot {
  background: rgba(12, 18, 34, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.msg-item.is-bot:hover {
  background: rgba(16, 24, 44, 0.95);
  border-color: rgba(16, 185, 129, 0.4);
}

.bot-avatar {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border: 2px solid #10b981;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
  flex-shrink: 0;
}

.bot-avatar.fallback-avatar {
  background: var(--bg-surface);
  color: #38bdf8;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.bot-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bot-badge-tag {
  font-size: 9.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Generator Result Card (Modern Cyber-Debrid Glass Card) */
.generator-card {
  margin-top: 10px;
  background: linear-gradient(145deg, rgba(14, 22, 42, 0.95) 0%, rgba(8, 13, 26, 0.98) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-left: 4px solid #10b981;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.14);
  position: relative;
  max-width: 580px;
  width: 100%;
}

.generator-card .msg-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: #e2e8f0;
  margin: 0;
}

.generator-card .msg-text strong {
  color: #ffffff;
  font-weight: 700;
}

.generator-card.card-processing {
  border-color: rgba(245, 158, 11, 0.5);
  border-left-color: #f59e0b;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.15);
}

.generator-card.card-failed {
  border-color: rgba(244, 63, 94, 0.5);
  border-left-color: #f43f5e;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(244, 63, 94, 0.15);
}

.generator-card.card-warning {
  border-color: rgba(245, 158, 11, 0.5);
  border-left-color: #f59e0b;
}

.generator-card.card-success {
  border-color: rgba(16, 185, 129, 0.55);
  border-left-color: #10b981;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 24px rgba(16, 185, 129, 0.22);
}

/* Light Theme Overrides for Generator Cards */
body.theme-light .msg-item.is-bot {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.theme-light .generator-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #10b981;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
}

body.theme-light .generator-card.card-success {
  border-color: #d1fae5;
  border-left-color: #10b981;
  box-shadow: 0 4px 16px -2px rgba(16, 185, 129, 0.12), 0 1px 3px rgba(0, 0, 0, 0.04);
}

body.theme-light .generator-card.card-processing {
  background: #ffffff;
  border-color: #fef3c7;
  border-left-color: #f59e0b;
  box-shadow: 0 4px 16px -2px rgba(245, 158, 11, 0.12);
}

body.theme-light .generator-card.card-failed {
  background: #ffffff;
  border-color: #ffe4e6;
  border-left-color: #f43f5e;
  box-shadow: 0 4px 16px -2px rgba(244, 63, 94, 0.12);
}

body.theme-light .generator-card .msg-text {
  color: #1e293b;
  font-weight: 500;
}

body.theme-light .generator-card .msg-text strong {
  color: #0f172a;
  font-weight: 700;
}

body.theme-light .gen-host-tag {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
  font-weight: 700;
}

body.theme-light .gen-requester-tag {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

body.theme-light .gen-requester-tag.is-me {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
  font-weight: 700;
}

body.theme-light .gen-status-badge.status-ready {
  background: #10b981;
  color: #ffffff;
  border: 1px solid #059669;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

body.theme-light .gen-file-meta {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

body.theme-light .gen-file-name {
  color: #0f172a;
}

body.theme-light .gen-file-details {
  color: #64748b;
}

body.theme-light .gen-file-details strong {
  color: #059669;
}

body.theme-light .gen-action-bar {
  border-top-color: #f1f5f9;
}

/* Card Header inside generator card */
.gen-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.gen-card-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gen-host-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #34d399;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vip-direct-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.25));
  border: 1px solid rgba(245, 158, 11, 0.5);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fbbf24;
}

.gen-requester-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-secondary);
}

.gen-requester-tag.is-me {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-weight: 700;
}

.gen-status-badge {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.gen-status-badge.status-ready {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.gen-status-badge.status-queued,
.gen-status-badge.status-downloading {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.gen-status-badge.status-failed {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.gen-status-badge.status-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Generator File Meta */
.gen-file-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}

.gen-file-name {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-primary);
  word-break: break-all;
}

.gen-file-details {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.gen-file-details strong {
  color: #34d399;
}

/* Download Actions Bar */
.gen-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.btn-download-main,
.btn-download-direct {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  background: var(--brand-gradient);
  color: #ffffff !important;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-decoration: none !important;
  border: none;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.45);
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.btn-download-main:hover,
.btn-download-direct:hover {
  box-shadow: 0 6px 26px rgba(16, 185, 129, 0.65);
  transform: translateY(-2px);
}

.btn-download-main svg,
.btn-download-direct svg {
  flex-shrink: 0;
}

/* VIP Direct Button Highlight */
.btn-vip-direct {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.45) !important;
  color: #ffffff !important;
}

.btn-vip-direct:hover {
  box-shadow: 0 6px 26px rgba(245, 158, 11, 0.65) !important;
  transform: translateY(-2px);
}

.vip-direct-badge-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

/* VIP Buy Action Button & Register Action Button */
.btn-vip-buy-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font-display);
  text-decoration: none !important;
  border: none;
  box-shadow: 0 3px 12px rgba(217, 119, 6, 0.4);
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.btn-vip-buy-action:hover {
  box-shadow: 0 5px 20px rgba(217, 119, 6, 0.6);
  transform: translateY(-1px);
}

.btn-vip-buy-action:active {
  transform: translateY(0);
}

.btn-vip-buy-action svg {
  flex-shrink: 0;
}

.vip-buy-badge-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 2px;
}

.btn-register-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary) !important;
  font-size: 12.5px;
  font-weight: 700;
  font-family: var(--font-display);
  text-decoration: none !important;
  border: 1px solid var(--border-subtle);
  transition: all 0.15s ease;
  cursor: pointer;
  user-select: none;
}

.btn-register-action:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--primary);
  color: var(--primary) !important;
  transform: translateY(-1px);
}

.btn-register-action svg {
  flex-shrink: 0;
}

.btn-download-mirror {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.btn-download-mirror:hover {
  color: var(--text-primary);
  border-color: var(--border-card);
}

.btn-copy-link.copied {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: #10b981 !important;
  color: #10b981 !important;
}

/* Floating Scroll-to-bottom badge */
.btn-float-scroll {
  position: absolute;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-md);
  z-index: 20;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-float-scroll:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ==========================================================================
   6. Chat Composer & Inset Floating Dock
   ========================================================================== */
.chat-composer-area {
  padding: 12px 18px 16px;
  background: rgba(7, 11, 22, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.composer-helper-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.helper-lbl {
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chip-sample {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-sample:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  transform: translateY(-1px);
}

.chip-sample img {
  border-radius: 2px;
}

.composer-form {
  width: 100%;
}

.composer-box {
  background: rgba(5, 8, 16, 0.95);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.composer-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25), 0 0 25px rgba(16, 185, 129, 0.15);
}

.textarea-row {
  width: 100%;
}

.textarea-row textarea {
  width: 100%;
  min-height: 28px;
  max-height: 140px;
  resize: none;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
}

.textarea-row textarea::placeholder {
  color: var(--text-dim);
}

.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-tool:hover {
  background: var(--bg-surface-hover);
  color: var(--primary);
  border-color: var(--border-card);
}

.btn-tool-private {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  transition: all 0.15s ease;
}

.private-status-pill {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-hover);
  color: var(--text-muted);
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.btn-tool-private:hover {
  border-color: #6366f1;
  color: #818cf8;
}

.btn-tool-private.active {
  background: rgba(99, 102, 241, 0.15) !important;
  border-color: #6366f1 !important;
  color: #818cf8 !important;
}

.btn-tool-private.active .private-status-pill,
.private-status-pill.is-active {
  background: #6366f1 !important;
  color: #ffffff !important;
}

.private-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #818cf8;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.msg-item.is-private {
  border-left: 2px solid #6366f1;
  background: rgba(99, 102, 241, 0.04);
}

.gen-status-badge.status-private {
  background: rgba(99, 102, 241, 0.18);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.shortcut-hint {
  font-size: 11px;
  color: var(--text-dim);
}

.shortcut-hint strong {
  color: var(--text-muted);
  font-weight: 600;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.char-counter {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.btn-send-message {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  background: var(--brand-gradient);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  border: none;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.45);
  cursor: pointer;
  user-select: none;
}

.btn-send-message:hover {
  box-shadow: 0 6px 26px rgba(16, 185, 129, 0.7);
  transform: translateY(-2px);
}

.btn-send-message:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   7. Right Sidebar / Utility Inspector Panel (Cyber Telemetry Station)
   ========================================================================== */
.info-sidebar {
  width: 330px;
  flex-shrink: 0;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--border-card) transparent;
}

@media (max-width: 860px) {
  .info-sidebar {
    border-radius: 0;
    border: none;
    width: 100%;
    max-width: 360px;
  }
}

.info-sidebar::-webkit-scrollbar {
  width: 5px;
}

.info-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.info-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: var(--radius-full);
}

.sidebar-section {
  margin: 6px 10px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: rgba(14, 20, 36, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-section:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 2px;
}

.section-header .header-left {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-primary);
}

.section-header .header-left svg {
  color: var(--primary);
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.5));
}

.section-header h4 {
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 0.8px;
  color: var(--text-primary);
  text-transform: uppercase;
}

.status-badge-online {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.section-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* User Profile Row (Cyber Identity HUD) */
.user-profile-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-profile-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.user-meta-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0e1424, #1a2238);
  border: 2px solid #10b981;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
  color: #fff;
  font-size: 16px;
  font-family: var(--font-display);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.user-status-dot {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 10px;
  height: 10px;
  background: #10b981;
  border: 2px solid var(--bg-sidebar);
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.user-profile-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.user-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.user-meta-name {
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-account-type {
  font-size: 9.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-account-type.guest {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.badge-account-type.member {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-account-type.vip {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.25));
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.user-meta-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
}

.user-profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-profile-action {
  height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-profile-action.btn-change-name {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
}

.btn-profile-action.btn-change-name:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--border-card);
  transform: translateY(-1px);
}

.btn-profile-action.btn-auth-action {
  color: #fff;
  background: var(--brand-gradient);
  border: none;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-profile-action.btn-auth-action:hover {
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.btn-profile-action.btn-auth-logout {
  color: #fb7185 !important;
  background: rgba(244, 63, 94, 0.12) !important;
  border: 1px solid rgba(244, 63, 94, 0.3) !important;
}

.btn-profile-action.btn-auth-logout:hover {
  background: #f43f5e !important;
  color: #fff !important;
  border-color: #f43f5e !important;
  box-shadow: 0 3px 10px rgba(244, 63, 94, 0.4);
}

.user-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.user-stat-item {
  background: rgba(8, 12, 22, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-label {
  font-size: 9.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.stat-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* User Quota Box (High-Tech Progress Gauge) */
.user-quota-box {
  background: rgba(8, 12, 22, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quota-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quota-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  font-family: var(--font-display);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.quota-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.quota-badge.quota-full {
  color: var(--accent-rose-text);
  background: var(--accent-rose-bg);
  border-color: var(--accent-rose-border);
}

.quota-progress-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.quota-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--brand-gradient);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.quota-progress-bar.bar-full {
  background: var(--accent-rose);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.5);
}

.quota-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.quota-remain {
  color: var(--text-muted);
}

.quota-remain strong {
  color: var(--text-primary);
}

.btn-quota-info {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--primary);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.btn-quota-info:hover {
  color: var(--brand-cyan);
  text-decoration: underline;
}

.quota-reset-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 9px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
}

.quota-reset-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.quota-reset-label {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.quota-reset-countdown {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
}

.quota-reset-bottom {
  font-size: 10.5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* User VIP Card (Luxury Gold Holographic Accent) */
.user-vip-card {
  position: relative;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(16, 22, 38, 0.85) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.12);
  transition: all 0.2s ease;
}

.user-vip-card:hover {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.2);
}

.user-vip-card.is-vip-active {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(16, 22, 38, 0.85) 100%);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.15);
}

.vip-card-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vip-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vip-card-icon-box {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.user-vip-card.is-vip-active .vip-card-icon-box {
  background: var(--brand-gradient);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.vip-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vip-card-title {
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font-display);
  color: #fbbf24;
}

.user-vip-card.is-vip-active .vip-card-title {
  color: #34d399;
}

.vip-badge-tag {
  font-size: 9px;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
  letter-spacing: 0.5px;
}

.vip-card-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.btn-vip-upgrade {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-display);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease;
}

.btn-vip-upgrade:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(245, 158, 11, 0.5);
}

.user-vip-card.is-vip-active .btn-vip-upgrade {
  background: var(--brand-gradient);
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.35);
}

/* Host Telemetry List */
.host-telemetry-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.telemetry-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(8, 12, 22, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  font-size: 11.5px;
  transition: border-color 0.15s ease;
}

.telemetry-item:hover {
  border-color: var(--border-card);
}

.host-label {
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.host-limit {
  font-size: 10.5px;
  color: var(--text-muted);
}

.host-status-online {
  font-size: 10px;
  font-weight: 700;
  color: #34d399;
}

.guideline-note {
  font-size: 10.5px;
  color: var(--text-dim);
  text-align: center;
  padding-top: 4px;
}

/* Daily Visitors by Country */
.visitor-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.visitor-card-header-left {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
}

.visitor-total-badge {
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--primary);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.visitor-list-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 150px;
  overflow-y: auto;
}

.visitor-list-container::-webkit-scrollbar {
  width: 4px;
}

.visitor-list-container::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 2px;
}

.visitor-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  background: rgba(8, 12, 22, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
}

.visitor-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.visitor-count {
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--primary);
  min-width: 20px;
  text-align: right;
  flex-shrink: 0;
}

.visitor-flag-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 13px;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.visitor-flag-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 13px;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.visitor-flag-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.visitor-country-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.visitor-empty-state {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  padding: 12px 6px;
  font-family: var(--font-mono);
}

/* Live Host Telemetry Widget */
.host-telemetry-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.telemetry-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  font-size: 11px;
}

.telemetry-item .host-label {
  font-weight: 600;
  color: var(--text-primary);
}

.telemetry-item .host-limit {
  font-size: 10.5px;
  color: var(--text-muted);
}

.telemetry-item .host-status-online {
  font-size: 10px;
  color: var(--accent-emerald);
  font-weight: 600;
}

.guideline-note {
  margin-top: 4px;
  padding: 5px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.35;
  text-align: center;
}

/* ==========================================================================
   8. Nickname Change Modal Dialog
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  z-index: 9999;
  overflow-y: auto;
  box-sizing: border-box;
  animation: fadeInModal 0.2s ease forwards;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-dialog {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  animation: scaleInModal 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  margin: auto;
}

body.theme-dark .modal-dialog {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.modal-dialog-lg,
.vip-modal-dialog {
  max-width: 760px !important;
  width: 96% !important;
}

.vip-modal-dialog {
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.vip-modal-step {
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  height: 100%;
  overflow: hidden;
}

.vip-modal-step[style*="display: none"],
.vip-modal-step[style*="display:none"] {
  display: none !important;
}

.vip-modal-step[style*="display: block"],
.vip-modal-step[style*="display:block"] {
  display: flex !important;
  flex-direction: column !important;
}

.vip-modal-dialog .modal-top {
  flex-shrink: 0;
  padding: 12px 18px;
}

.vip-modal-dialog .modal-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 20px;
  -webkit-overflow-scrolling: touch;
}

.vip-modal-dialog .modal-actions {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 12px 20px;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.06);
}

@keyframes scaleInModal {
  from { transform: scale(0.95); }
  to { transform: scale(1); }
}

.modal-top {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title-box h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-close-x {
  font-size: 20px;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  line-height: 1;
}

.btn-close-x:hover {
  color: var(--text-primary);
}

.modal-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
}

.modal-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

.modal-section-heading {
  display: block;
  margin-top: 14px;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-content label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-with-icon input {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.input-with-icon input:focus {
  border-color: var(--primary);
  box-shadow: none;
}

.input-help-text {
  font-size: 11px;
  color: var(--text-muted);
}

.modal-actions {
  padding: 12px 18px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.btn-modal-cancel {
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-modal-cancel:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-modal-submit {
  padding: 6px 16px;
  border-radius: var(--radius-xs);
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-modal-submit:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Host Info Modal Specific Styling */
.modal-dialog.modal-dialog-lg {
  max-width: 620px;
  max-height: 88vh;
}

.host-search-box {
  margin-bottom: 8px;
}

.host-search-box input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.host-search-box input:focus {
  border-color: var(--primary);
  box-shadow: none;
}

.host-modal-body {
  overflow-y: auto;
  max-height: 52vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.host-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  flex-wrap: wrap;
  gap: 8px;
}

.host-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
}

.host-summary-item strong {
  color: var(--text-primary);
}

.host-provider-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
}

.host-provider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.host-provider-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.host-provider-title strong {
  font-size: 12.5px;
  color: var(--text-primary);
}

.host-badge-online {
  font-size: 9.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
}

.host-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px;
}

.host-card-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 9px;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  font-size: 11px;
  font-family: var(--font-mono);
  transition: border-color 0.15s ease;
}

.host-card-pill:hover {
  border-color: var(--primary);
  transform: none;
}

.host-card-pill .host-name-wrap {
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-card-pill .host-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  margin-right: 6px;
}

.host-card-pill .host-name {
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-card-pill .host-speed {
  font-size: 9.5px;
  color: #10b981;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
  margin-left: 4px;
}

.host-empty-notice {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 12.5px;
}

/* ==========================================================================
   9. Mobile & Tablet Responsiveness
   ========================================================================== */
@media (max-width: 1024px) {
  .hosts-ticker {
    display: none;
  }

  .info-sidebar {
    position: fixed;
    top: 60px;
    right: 0;
    bottom: 0;
    width: 300px;
    z-index: 45;
    background: var(--bg-card);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
  }

  .info-sidebar.open {
    transform: translateX(0);
  }
}

@media (max-width: 640px) {
  .navbar-inner {
    padding: 0 0.75rem;
    gap: 8px;
  }

  .brand-tag {
    display: none;
  }

  .room-desc {
    display: none;
  }

  .shortcut-hint {
    display: none;
  }

  .chat-card-header {
    padding: 6px 0.75rem;
    height: auto;
    min-height: 50px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .card-header-right {
    gap: 6px;
    max-width: 100%;
    overflow: hidden;
  }

  .feed-filter-group {
    max-width: calc(100vw - 125px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .feed-filter-group::-webkit-scrollbar {
    display: none;
  }

  .chat-feed {
    padding: 1rem 0.75rem;
  }

  .chat-composer-area {
    padding: 0.75rem;
  }

  .online-box {
    display: none;
  }

  .btn-admin-link .admin-text {
    display: none;
  }
}

/* ==========================================================================
   VIP / PREMIUM SUBSCRIPTION & QRIS PAYMENT STYLES
   ========================================================================== */

/* Chatroom VIP Badges */
.vip-crown-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-xs);
  vertical-align: middle;
  margin-left: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

body.theme-dark .vip-crown-badge {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
}

.vip-direct-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-sm);
  margin-right: 6px;
}

body.theme-dark .vip-direct-badge {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.2);
}

/* VIP Purchase Modal Perks Grid */
.vip-perks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
}

@media (max-width: 520px) {
  .vip-perks-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.vip-perk-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.vip-perk-icon {
  font-size: 14px;
  line-height: 1.2;
  flex-shrink: 0;
  margin-top: 2px;
}

.vip-perk-item strong {
  font-size: 11.5px;
  color: var(--text-primary);
  display: block;
}

.vip-perk-item p {
  font-size: 10.5px;
  color: var(--text-muted);
  margin: 1px 0 0;
  line-height: 1.3;
}

/* VIP Packages Selection Cards */
.vip-packages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 720px) {
  .vip-packages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 380px) {
  .vip-packages-grid {
    grid-template-columns: 1fr;
  }
}

.vip-pkg-card {
  position: relative;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  border-radius: var(--radius-xs);
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease;
  user-select: none;
}

.vip-pkg-card:hover {
  border-color: #d97706;
}

.vip-pkg-card.selected {
  border-color: #d97706;
  background: rgba(245, 158, 11, 0.08);
}

body.theme-dark .vip-pkg-card.selected {
  background: rgba(245, 158, 11, 0.14);
}

.vip-pkg-popular-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: #d97706;
  color: white;
  font-size: 8.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 2px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.vip-pkg-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.vip-pkg-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.vip-pkg-price {
  font-size: 15px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #d97706;
  margin: 4px 0 2px;
}

body.theme-dark .vip-pkg-price {
  color: #fbbf24;
}

.vip-pkg-duration {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  line-height: 1.25;
}

.vip-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xs);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 12.5px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s ease;
}

.vip-input:focus {
  border-color: #d97706;
  box-shadow: none;
}

.btn-vip-checkout {
  background: #d97706;
  color: white;
  border: 1px solid #d97706;
  border-radius: var(--radius-xs);
  padding: 7px 16px;
  font-size: 12.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.btn-vip-checkout:hover {
  background: #b45309;
}

/* Step 2 QRIS Payment Screen */
.qris-payment-box {
  max-width: 420px;
  margin: 0 auto;
}

.qris-package-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  margin-bottom: 12px;
}

.qris-amount-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 12px;
  margin-bottom: 16px;
}

.amount-label {
  font-size: 11.5px;
  color: var(--text-muted);
}

.amount-val {
  font-size: 26px;
  font-weight: 800;
  color: #d97706;
  letter-spacing: 0.5px;
  margin: 4px 0 8px;
}

body.theme-dark .amount-val {
  color: #fbbf24;
}

.btn-copy-amount {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-amount:hover {
  border-color: #f59e0b;
  color: #d97706;
}

.qris-image-container {
  display: inline-block;
  background: white;
  padding: 16px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.qris-img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  display: block;
}

.qris-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.qris-secure-text {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.qris-timer-row {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.qris-poll-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
}

.poll-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(245, 158, 11, 0.2);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* VIP Payment Method Selector & USDT Card */
.vip-methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .vip-methods-grid {
    grid-template-columns: 1fr;
  }
}

.vip-method-card {
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vip-method-card:hover {
  border-color: #d97706;
}

.vip-method-card.selected {
  border-color: #d97706;
  background: rgba(245, 158, 11, 0.08);
}

body.theme-dark .vip-method-card.selected {
  background: rgba(245, 158, 11, 0.14);
}

.vip-method-left {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.vip-method-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vip-method-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.vip-method-subtitle {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.vip-method-badge {
  font-size: 9.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
  text-transform: uppercase;
}

body.theme-dark .vip-method-badge {
  color: #fbbf24;
}

.usdt-payment-card {
  background: var(--bg-surface);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-xs);
  padding: 16px 14px;
  margin-bottom: 16px;
  text-align: center;
}

.usdt-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.usdt-crypto-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.usdt-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.usdt-card-subtitle {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.usdt-instructions {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.45;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

.btn-usdt-gateway {
  background: #10b981;
  color: white;
  border: 1px solid #10b981;
  border-radius: var(--radius-xs);
  padding: 9px 18px;
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-usdt-gateway:hover {
  background: #059669;
  border-color: #059669;
  color: white;
}

.usdt-status-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.4;
}

/* ==========================================================================
   11. User Account & Authentication Modal
   ========================================================================== */
.badge-account-type {
  font-size: 9.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 1.5px 6px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-account-type.guest {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
}

.badge-account-type.registered {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

body.theme-dark .badge-account-type.registered {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.btn-auth-action {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.btn-auth-action:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: none;
}

.btn-auth-action.btn-auth-logout {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.btn-auth-action.btn-auth-logout:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

/* Auth Modal Specifics */
.modal-dialog.modal-auth-dialog {
  max-width: 440px;
}

.auth-tabs {
  display: flex;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 4px 16px 0;
  gap: 8px;
}

.auth-tab-btn {
  flex: 1;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.auth-tab-btn:hover {
  color: var(--text-primary);
}

.auth-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.auth-modal-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-card);
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-form-group label {
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.auth-form-group .input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.auth-form-group .input-with-icon input,
.auth-form-group .input-with-icon .auth-input,
.auth-form-group .auth-input,
.auth-input {
  width: 100%;
  padding: 9px 36px 9px 12px !important;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.auth-form-group .input-with-icon input:focus,
.auth-form-group .input-with-icon .auth-input:focus,
.auth-form-group .auth-input:focus,
.auth-input:focus {
  border-color: var(--primary);
  box-shadow: none;
}

.btn-pwd-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: var(--radius-xs);
  transition: color 0.15s ease;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-pwd-toggle:hover {
  color: var(--text-primary);
}

.input-hint {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.3;
}

.auth-upgrade-banner {
  display: flex;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-xs);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  margin-bottom: 2px;
}

.upgrade-banner-text strong {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.upgrade-banner-text p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.35;
  margin: 0;
}

.auth-alert {
  padding: 9px 12px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-family: var(--font-mono);
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-alert.error {
  background: var(--accent-rose-bg);
  border: 1px solid var(--accent-rose-border);
  color: var(--accent-rose-text);
}

.auth-alert.success {
  background: var(--accent-emerald-bg);
  border: 1px solid var(--accent-emerald-border);
  color: var(--accent-emerald-text);
}

.auth-submit-row {
  margin-top: 6px;
}

.btn-auth-submit {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-xs);
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 700;
  border: 1px solid var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.btn-auth-submit:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-switch-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.auth-switch-note a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.auth-switch-note a:hover {
  text-decoration: underline;
}

.auth-link-subtle {
  font-size: 11.5px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.auth-link-subtle:hover {
  text-decoration: underline;
  color: var(--primary-hover, #1d4ed8);
}

.email-verify-bar {
  background: rgba(245, 158, 11, 0.1);
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
}

.btn-resend-verify {
  padding: 4px 12px;
  background: #f59e0b;
  color: #1e293b;
  border: none;
  border-radius: var(--radius-xs, 4px);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-resend-verify:hover {
  background: #d97706;
  color: #fff;
}

.btn-resend-verify:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.badge-account-type.unverified {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
}

body.theme-dark .badge-account-type.unverified {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

/* ==========================================================================
   Mobile Bottom Navigation Bar (Cbox Stream & Debrid Workbench)
   ========================================================================== */
.cbox-mobile-nav {
  display: none;
}

.btn-close-sidebar-mobile {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 768px) {
  .chat-composer-area {
    padding: 0.55rem 0.75rem;
  }

  .cbox-mobile-nav {
    display: block;
    flex-shrink: 0;
    width: 100%;
    background: rgba(12, 16, 28, 0.96);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 40;
    transition: background-color 0.2s ease, border-color 0.2s ease;
  }

  body.theme-light .cbox-mobile-nav {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    border-top: 1px solid var(--border-card);
  }

  .cbox-mobile-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 56px;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 12px;
    gap: 8px;
  }

  .cbox-mob-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
    padding: 4px 0;
  }

  .cbox-mob-nav-item:active {
    transform: scale(0.93);
  }

  .cbox-mob-nav-item:hover,
  .cbox-mob-nav-item:focus-visible {
    color: var(--primary);
  }

  body.theme-light .cbox-mob-nav-item:hover,
  body.theme-light .cbox-mob-nav-item:focus-visible {
    color: var(--primary-hover);
  }

  .cbox-mob-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 26px;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  }

  .cbox-mob-nav-item:hover .cbox-mob-icon-wrap,
  .cbox-mob-nav-item:active .cbox-mob-icon-wrap {
    background-color: var(--primary-glow);
    color: var(--primary);
  }

  .cbox-mob-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
    transition: transform 0.15s ease;
  }

  .cbox-mob-label {
    line-height: 1.1;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: -0.2px;
  }

  /* Distinct Center Item: Upgrade VIP */
  .cbox-mob-vip-item {
    color: var(--accent-amber-text);
  }

  .cbox-mob-vip-pill {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 28px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    color: #ffffff;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4), 0 0 16px rgba(245, 158, 11, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .cbox-mob-vip-item:active .cbox-mob-vip-pill {
    transform: scale(0.92);
    box-shadow: 0 1px 6px rgba(245, 158, 11, 0.5);
  }

  .cbox-mob-vip-icon {
    width: 17px;
    height: 17px;
    color: #ffffff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  }

  .cbox-mob-vip-pulse {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: #fbbf24;
    border-radius: 50%;
    border: 1.5px solid var(--bg-root);
    box-shadow: 0 0 6px #f59e0b;
    animation: cboxVipPulse 2s infinite ease-in-out;
  }

  @keyframes cboxVipPulse {
    0% {
      box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }
    70% {
      box-shadow: 0 0 0 7px rgba(245, 158, 11, 0);
    }
    100% {
      box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
  }

  .cbox-mob-vip-label {
    font-weight: 700;
    color: #fbbf24;
    letter-spacing: 0.1px;
  }

  body.theme-light .cbox-mob-vip-label {
    color: #b45309;
  }

  /* Mobile Sidebar Close Button & Backdrop */
  .btn-close-sidebar-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-xs);
    transition: all 0.15s ease;
  }

  .btn-close-sidebar-mobile:hover {
    background: rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
  }

  body.theme-light .btn-close-sidebar-mobile {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--border-subtle);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 44;
  }
}

