/* ==========================================================================
   Rubioverlay System - Live-Mode / View Live Watch-Bereich Stylesheet
   Styleguide Colors:
     - Primary Green: #63B22F
     - Dark Gray/Anthrazit: #414141, #14141b, #0e0e12, #1a1a26
     - Neon Accent: #D9FF3D
     - Pink Accent: #FF8EAB
     - Orange Highlight: #ff8000
   Mobile / iPhone Optimized (Safe Areas, 100dvh, Touch-Scrolling)
   ========================================================================== */

:root {
  --bg-main: #0a0a0f;
  --bg-card: #14141c;
  --bg-card-alt: #1a1a26;
  --bg-input: #101017;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #63B22F;
  --text-main: #efeff1;
  --text-muted: #adadb8;
  --text-dim: #71717a;
  
  --color-green: #63B22F;
  --color-neon: #D9FF3D;
  --color-pink: #FF8EAB;
  --color-orange: #ff8000;
  --color-twitch: #9146FF;
  --color-darkgray: #414141;

  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --chat-font-size: 14px;
  --header-height: 54px;
  --chat-width: 360px;
}

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

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh; /* Dynamic Viewport for iOS Safari / Chrome Mobile */
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  overflow: hidden; /* Strict 100vh No-Scroll */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   CONTAINER & 100DVH LAYOUT
   ========================================================================== */
.live-watch-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  position: relative;
  padding-top: env(safe-area-inset-top, 0px);
}

/* ==========================================================================
   TOP STICKY DRAWER (NO BLUR, ACCENT #FF8000 & ANTHRAZIT #141414 / #1E1E1E)
   ========================================================================== */

/* Non-blur backdrop to capture outside clicks */
.live-top-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.35); /* Crisp dark shade, strictly NO backdrop-filter / blur */
  z-index: 99990 !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.live-top-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

/* Top Sticky Live Header Bar / Drawer */
.live-watch-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: calc(100% - 32px);
  max-width: 1560px;
  height: var(--header-height);
  min-height: var(--header-height);
  z-index: 100000 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: rgba(20, 20, 24, 0.97); /* Solid Anthrazit, NO blur */
  border: 1px solid rgba(255, 128, 0, 0.4);
  border-top: none;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(255, 128, 0, 0.12);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  user-select: none;
  box-sizing: border-box;
  pointer-events: auto !important;
}

.live-watch-header.is-collapsed {
  transform: translateX(-50%) translateY(-100%);
  box-shadow: none;
}

/* Sticky Top-Drawer Edge Handle (Gleitet mit dem Header) */
.live-top-handle {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  height: 28px;
  padding: 0 16px;
  background: rgba(20, 20, 24, 0.96);
  border: 1px solid rgba(255, 128, 0, 0.45);
  border-top: none;
  border-radius: 0 0 14px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer !important;
  pointer-events: auto !important;
  color: #FF8000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7), 0 0 12px rgba(255, 128, 0, 0.2);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
  white-space: nowrap;
  z-index: 100001 !important;
}

.live-top-handle * {
  pointer-events: none;
}

.live-top-handle:hover {
  background: rgba(30, 30, 36, 0.98);
  border-color: #FF8000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 128, 0, 0.45);
  bottom: -30px;
  height: 30px;
  padding: 0 20px;
}

.live-top-handle .top-handle-icon {
  font-size: 0.85rem;
  line-height: 1;
  display: inline-block;
}

.live-top-handle .top-handle-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #FFFFFF;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.live-top-handle:hover .top-handle-label {
  color: #FF8000;
}

.live-top-handle .top-handle-arrow {
  font-size: 0.62rem;
  color: #FF8000;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}

.live-watch-header:not(.is-collapsed) .live-top-handle .top-handle-arrow,
.live-top-handle.is-open .top-handle-arrow {
  transform: rotate(180deg);
}

/* Drawer Close / Toggle Button in Header Actions */
.btn-top-drawer-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(255, 128, 0, 0.12);
  border: 1px solid rgba(255, 128, 0, 0.35);
  color: #FF8000;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-top-drawer-toggle:hover {
  background: #FF8000;
  color: #141414;
  border-color: #FF8000;
  box-shadow: 0 0 14px rgba(255, 128, 0, 0.4);
  transform: translateY(-1px);
}

.btn-top-drawer-toggle .top-drawer-toggle-icon {
  display: inline-block;
  transition: transform 0.2s ease;
}

.live-watch-container.theater-mode .live-watch-header.is-collapsed {
  transform: translateX(-50%) translateY(-100%);
  opacity: 0.2;
  pointer-events: none;
}

.live-watch-container.theater-mode .live-watch-header:not(.is-collapsed) {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.live-watch-container.theater-mode:hover .live-watch-header {
  opacity: 1;
  pointer-events: auto;
}

.header-left-zone {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.live-indicator.online,
.live-indicator.live {
  background: rgba(255, 59, 48, 0.15);
  color: #ff4444;
  border: 1px solid rgba(255, 59, 48, 0.45);
  box-shadow: 0 0 10px rgba(255, 59, 48, 0.25);
}

.live-indicator.offline {
  background: rgba(65, 65, 65, 0.35);
  color: #8c92a4;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  opacity: 0.85;
}

.live-indicator .pulse-dot,
.status-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
  transition: all 0.3s ease;
}

.live-indicator.online .pulse-dot,
.status-led.online,
.status-led.live {
  background: #ff3b30;
  box-shadow: 0 0 8px #ff3b30, 0 0 16px rgba(255, 59, 48, 0.5);
  animation: livePulse 1.8s infinite ease-in-out;
}

.live-indicator.offline .pulse-dot,
.status-led.offline {
  background: var(--color-darkgray, #414141);
  box-shadow: none;
  animation: none;
  opacity: 0.6;
}

@keyframes livePulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #ff2222, 0 0 22px rgba(255, 59, 48, 0.6); }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.live-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  color: var(--text-muted);
}

.live-meta-pill.viewers {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.3);
}

.live-meta-pill.uptime {
  color: var(--color-neon, #D9FF3D);
  border-color: rgba(217, 255, 61, 0.3);
}

.brand-channel-info {
  display: flex;
  flex-direction: column;
}

.brand-channel-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-channel-name .verified-icon {
  color: var(--color-neon);
  font-size: 0.85em;
}

.brand-stream-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Nav Links Center */
.header-nav-zone {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.nav-link-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.nav-link-btn.active {
  background: rgba(99, 178, 47, 0.15);
  color: var(--color-neon);
  border-color: rgba(99, 178, 47, 0.4);
}

/* Right Controls Zone */
.header-right-zone {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px 12px 4px 6px;
  border-radius: 20px;
  font-size: 0.82rem;
}

.user-avatar-mini {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--color-green);
  object-fit: cover;
}

.user-name-mini {
  font-weight: 700;
  color: var(--text-main);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coins-badge-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(217, 255, 61, 0.12);
  color: var(--color-neon);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(217, 255, 61, 0.25);
}

.btn-icon-action {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.btn-icon-action:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-login-twitch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-twitch);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-login-twitch:hover {
  background: #7c2cf2;
  box-shadow: 0 4px 14px rgba(145, 70, 255, 0.4);
}

/* ==========================================================================
   MAIN VIEWPORT GRID (Split Video + Chat)
   ========================================================================== */
.live-viewport-grid {
  display: flex;
  flex: 1;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  position: relative;
}

.live-watch-container.theater-mode .live-viewport-grid {
  height: 100vh;
  height: 100dvh;
}

/* ==========================================================================
   VIDEO PLAYER CONTAINER (LEFT)
   ========================================================================== */
.live-player-section {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: #000000;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.player-embed-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  background: #050508;
}

.player-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Quick Stream Control Overlay (Floating Bottom Left of Player) */
.player-quick-dock {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 14, 20, 0.85);
  backdrop-filter: blur(10px);
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateY(8px);
  z-index: 20;
  user-select: none;
}

.live-player-section:hover .player-quick-dock {
  opacity: 1;
  transform: translateY(0);
}

.quick-dock-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.quick-dock-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   LIVE CHAT SIDEBAR (RIGHT)
   ========================================================================== */
.live-chat-sidebar {
  width: var(--chat-width);
  min-width: 320px;
  max-width: 500px;
  height: 100%;
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  overflow: hidden;
  z-index: 50;
}

/* Collapsed State */
.live-chat-sidebar.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  border-left: none;
  pointer-events: none;
  opacity: 0;
}

/* Floating Expand Handle when chat is collapsed */
.chat-expand-floating-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(20, 20, 28, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  z-index: 40;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
  display: none;
}

.live-chat-sidebar.collapsed ~ .chat-expand-floating-btn,
.live-watch-container.chat-is-collapsed .chat-expand-floating-btn {
  display: flex;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.chat-expand-floating-btn:hover {
  background: var(--color-green);
  color: #000000;
  border-color: var(--color-neon);
  box-shadow: 0 0 15px rgba(99, 178, 47, 0.4);
}

/* ==========================================================================
   CHAT HEADER
   ========================================================================== */
.chat-header {
  height: 46px;
  min-height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: rgba(24, 24, 34, 0.7);
  user-select: none;
}

.chat-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-main);
}

.chat-header-title .chat-badge-icon {
  color: var(--color-orange);
}

.chat-msg-count {
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 10px;
  color: var(--text-muted);
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-chat-tool {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.15s ease;
}

.btn-chat-tool:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* ==========================================================================
   CHAT MESSAGES SCROLL VIEW
   ========================================================================== */
.chat-messages-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch; /* Smooth iOS bounce scroll */
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scroll-behavior: smooth;
  position: relative;
  font-size: var(--chat-font-size);
  line-height: 1.45;
}

/* Custom modern scrollbar */
.chat-messages-container::-webkit-scrollbar {
  width: 5px;
}

.chat-messages-container::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.chat-messages-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Individual Chat Message Row */
.chat-line {
  padding: 3px 6px;
  border-radius: 6px;
  word-break: break-word;
  transition: background-color 0.15s ease;
  position: relative;
  display: block;
}

.chat-line:hover {
  background: rgba(255, 255, 255, 0.04);
}

.chat-line.streamer-highlight {
  background: rgba(217, 255, 61, 0.08);
  border-left: 2px solid var(--color-neon);
}

.chat-line.mod-highlight {
  background: rgba(0, 238, 255, 0.08);
  border-left: 2px solid #00eeff;
}

/* Timestamp */
.chat-time {
  font-size: 0.75em;
  color: var(--text-dim);
  margin-right: 6px;
  user-select: none;
  font-family: monospace;
}

body.hide-timestamps .chat-time {
  display: none;
}

/* Badges Container */
.chat-badges {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
  margin-right: 4px;
}

.chat-badge-img {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  vertical-align: middle;
  object-fit: contain;
}

/* Username */
.chat-user {
  font-weight: 700;
  cursor: pointer;
  display: inline;
  transition: opacity 0.15s;
}

.chat-user:hover {
  text-decoration: underline;
}

.chat-colon {
  color: var(--text-muted);
  margin-right: 6px;
}

/* Message Text */
.chat-text {
  color: var(--text-main);
  vertical-align: middle;
}

/* Inline Emotes */
.chat-text .emote,
.chat-message .emote {
  height: 1.6em;
  vertical-align: -0.3em;
  margin: 0 2px;
  display: inline-block;
}

/* System Messages & Alerts */
.chat-system-line {
  background: rgba(255, 128, 0, 0.1);
  border-left: 3px solid var(--color-orange);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-main);
  margin: 3px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-system-line.follow {
  background: rgba(99, 178, 47, 0.12);
  border-left-color: var(--color-green);
}

.chat-system-line.sub {
  background: rgba(255, 142, 171, 0.15);
  border-left-color: var(--color-pink);
}

/* Scroll To Bottom Button */
.scroll-bottom-floating-btn {
  position: absolute;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--color-orange);
  color: #000000;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 30;
}

.scroll-bottom-floating-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.scroll-bottom-floating-btn:hover {
  background: #ffa033;
  transform: translateX(-50%) scale(1.05);
}

/* ==========================================================================
   CHAT INPUT AREA (BOTTOM - WITH IOS SAFE AREA)
   ========================================================================== */
.chat-input-section {
  padding: 8px 10px;
  padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
  background: var(--bg-card-alt);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}



/* Input Row */
.chat-input-box {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 3px 4px 3px 10px;
  gap: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-input-box:focus-within {
  border-color: var(--color-green);
  box-shadow: 0 0 10px rgba(99, 178, 47, 0.25);
}

.chat-text-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.88rem;
  font-family: inherit;
  padding: 6px 0;
}

.chat-text-input::placeholder {
  color: var(--text-dim);
}

.btn-emote-picker-toggle {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.btn-emote-picker-toggle:hover {
  transform: scale(1.15);
}

.btn-send-msg {
  background: var(--color-green);
  color: #000000;
  border: none;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-send-msg:hover {
  background: var(--color-neon);
  box-shadow: 0 0 10px rgba(217, 255, 61, 0.4);
}

.btn-send-msg:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   EMOTE PICKER POPUP
   ========================================================================== */
.emote-picker-popover {
  position: absolute;
  bottom: 84px;
  right: 10px;
  left: 10px;
  height: 270px;
  background: #181824;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
  display: none;
  animation: popIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.emote-picker-popover.active {
  display: flex;
}

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

.emote-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  background: #12121c;
}

.emote-search-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: #ffffff;
  padding: 4px 10px;
  font-size: 0.8rem;
  outline: none;
}

.emote-search-input:focus {
  border-color: var(--color-green);
}

.emote-picker-tabs {
  display: flex;
  padding: 4px 8px;
  background: #151520;
  border-bottom: 1px solid var(--border-color);
  gap: 4px;
  overflow-x: auto;
}

.emote-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.emote-tab-btn.active, .emote-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.emote-grid {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 6px;
  align-content: start;
}

.emote-grid-item {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.emote-grid-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.15);
}

.emote-grid-item img {
  max-width: 26px;
  max-height: 26px;
  object-fit: contain;
}

/* ==========================================================================
   SETTINGS DROPDOWN MODAL
   ========================================================================== */
.chat-settings-modal {
  position: absolute;
  top: 50px;
  right: 14px;
  width: 230px;
  background: #1a1a28;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 120;
  display: none;
}

.chat-settings-modal.active {
  display: flex;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-main);
}

.settings-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.settings-toggle-btn.active {
  background: var(--color-green);
  color: #000000;
}

/* ==========================================================================
   TRIGGER & REWARDS DRAWER (Left Side Panel)
   Zero-Distraction: Hidden by default, slides in on interaction
   ========================================================================== */

/* ==========================================================================
   QUICK-TRIGGER LEFT DRAWER & HANDLE (#FF8000 & Crisp Anthrazit - NO BLUR)
   ========================================================================== */

/* Nav Quick-Trigger Button */
.btn-quick-trigger-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #FF8000 !important;
  border-color: rgba(255, 128, 0, 0.35) !important;
  background: rgba(255, 128, 0, 0.08) !important;
  font-weight: 700 !important;
  cursor: pointer;
}

.btn-quick-trigger-nav:hover {
  background: #FF8000 !important;
  color: #141414 !important;
  border-color: #FF8000 !important;
  box-shadow: 0 0 14px rgba(255, 128, 0, 0.45);
}

/* Quick-Trigger Left Edge Proximity Handle */
.quick-trigger-handle {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100002 !important;
  width: 28px;
  height: 115px;
  background: #141414;
  border: 1px solid rgba(255, 128, 0, 0.4);
  border-left: none;
  border-radius: 0 12px 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer !important;
  pointer-events: auto !important;
  color: #FF8000;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.7), 0 0 15px rgba(255, 128, 0, 0.2);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
}

.quick-trigger-handle * {
  pointer-events: none;
}

.quick-trigger-handle:hover,
.quick-trigger-handle.proximity {
  transform: translateY(-50%) translateX(6px);
  width: 32px;
  background: #1E1E1E;
  border-color: #FF8000;
  box-shadow: 6px 0 26px rgba(0, 0, 0, 0.85), 0 0 24px rgba(255, 128, 0, 0.45);
}

.quick-trigger-handle-icon {
  font-size: 1.1rem;
  line-height: 1;
  color: #FF8000;
  text-shadow: 0 0 8px rgba(255, 128, 0, 0.6);
}

.quick-trigger-handle-label {
  writing-mode: vertical-rl;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #FFFFFF;
  text-transform: uppercase;
}

.quick-trigger-handle:hover .quick-trigger-handle-label,
.quick-trigger-handle.proximity .quick-trigger-handle-label {
  color: #FF8000;
}

/* Quick-Trigger Backdrop */
.quick-trigger-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 10, 10, 0.75);
  z-index: 100010 !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.quick-trigger-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

/* The Slide-out Quick-Trigger Drawer (Left) */
.quick-trigger-drawer {
  position: fixed;
  left: 0;
  top: 0;
  width: 440px;
  max-width: 90vw;
  height: 100vh;
  max-height: 100vh;
  background: #141414;
  border-right: 1px solid rgba(255, 128, 0, 0.35);
  box-shadow: 14px 0 45px rgba(0, 0, 0, 0.95), 0 0 30px rgba(255, 128, 0, 0.15);
  z-index: 100020 !important;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  pointer-events: auto;
}

.quick-trigger-drawer.open {
  transform: translateX(0);
}

/* Drawer Header */
.qt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #1E1E1E;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.qt-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qt-header-icon {
  font-size: 1.4rem;
  color: #FF8000;
  text-shadow: 0 0 10px rgba(255, 128, 0, 0.5);
}

.qt-title-text h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.qt-subtitle {
  font-size: 0.72rem;
  color: #9BA0AD;
  display: block;
  margin-top: 2px;
}

.qt-close-btn {
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.qt-close-btn:hover {
  background: rgba(255, 59, 48, 0.25);
  border-color: #ff3b30;
  color: #ff3b30;
  transform: scale(1.05);
}

/* Live Search Bar */
.qt-search-bar {
  padding: 12px 18px 8px;
  background: #141414;
  flex-shrink: 0;
}

.qt-search-inner {
  position: relative;
  display: flex;
  align-items: center;
}

.qt-search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.85rem;
  color: #9BA0AD;
  pointer-events: none;
}

.qt-search-input {
  width: 100%;
  height: 36px;
  background: #1E1E1E;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 34px 0 34px;
  color: #FFFFFF;
  font-size: 0.84rem;
  outline: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.qt-search-input:focus {
  border-color: #FF8000;
  background: #252525;
  box-shadow: 0 0 12px rgba(255, 128, 0, 0.25);
}

.qt-search-input::placeholder {
  color: #7A8090;
}

.qt-search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #9BA0AD;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s ease;
}

.qt-search-clear:hover {
  color: #FFFFFF;
}

/* Filter Tabs / Multi-Select Toggles */
.qt-tabs-wrap {
  display: flex;
  gap: 8px;
  padding: 8px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #141414;
  flex-shrink: 0;
}

.qt-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  background: #272a30;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #9BA0AD;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
}

.qt-tab-btn:hover {
  background: #32363e;
  color: #FFFFFF;
  border-color: rgba(255, 128, 0, 0.35);
}

.qt-tab-btn.active {
  background: rgba(255, 128, 0, 0.16);
  border-color: #FF8000;
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(255, 128, 0, 0.2);
}

.qt-tab-badge {
  background: rgba(0, 0, 0, 0.45);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #9BA0AD;
  transition: all 0.2s ease;
}

.qt-tab-btn.active .qt-tab-badge {
  background: rgba(255, 128, 0, 0.25);
  color: #FF8000;
}

/* Empty / No Filter Active State */
.qt-no-filter-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
  margin: 20px 18px;
  background: rgba(39, 42, 48, 0.45);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  text-align: center;
}

.qt-no-filter-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.85;
}

.qt-no-filter-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.qt-no-filter-text {
  font-size: 0.8rem;
  color: #9BA0AD;
  max-width: 240px;
  line-height: 1.4;
  margin-bottom: 14px;
}

.qt-filter-enable-btn {
  padding: 6px 14px;
  background: rgba(255, 128, 0, 0.16);
  border: 1px solid #FF8000;
  border-radius: 6px;
  color: #FF8000;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qt-filter-enable-btn:hover {
  background: #FF8000;
  color: #141414;
}

/* Toast Feedback Banner */
.qt-toast-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 18px 0;
  padding: 8px 12px;
  background: #1E1E1E;
  border: 1px solid #FF8000;
  border-radius: 6px;
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(255, 128, 0, 0.3);
  animation: qtToastSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

@keyframes qtToastSlide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.qt-toast-icon {
  font-size: 1rem;
}

.qt-toast-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Triggers Body */
.qt-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.qt-body::-webkit-scrollbar {
  width: 6px;
}

.qt-body::-webkit-scrollbar-track {
  background: #111111;
}

.qt-body::-webkit-scrollbar-thumb {
  background: rgba(255, 128, 0, 0.3);
  border-radius: 3px;
}

.qt-body::-webkit-scrollbar-thumb:hover {
  background: #FF8000;
}

/* Sections */
.qt-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qt-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qt-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #FFFFFF;
}

.qt-section-count {
  background: rgba(255, 128, 0, 0.15);
  color: #FF8000;
  border: 1px solid rgba(255, 128, 0, 0.3);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 800;
}

/* Grid */
.qt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.qt-loading, .qt-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 20px 10px;
  color: #9BA0AD;
  font-size: 0.82rem;
  background: #1E1E1E;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

/* Trigger Button */
.qt-trigger-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #1E1E1E;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #FFFFFF;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
  user-select: none;
  box-sizing: border-box;
}

.qt-trigger-btn:hover {
  background: #252525;
  border-color: #FF8000;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 12px rgba(255, 128, 0, 0.25);
}

.qt-trigger-btn:active,
.qt-trigger-btn.fired {
  background: rgba(255, 128, 0, 0.35) !important;
  border-color: #FF8000 !important;
  box-shadow: 0 0 20px rgba(255, 128, 0, 0.6) !important;
  transform: scale(0.96) !important;
  animation: qtTriggerPulse 0.5s ease;
}

@keyframes qtTriggerPulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.94); }
  100% { transform: scale(1); }
}

.qt-trigger-btn .qt-btn-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  line-height: 1;
}

.qt-trigger-btn .qt-btn-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.qt-trigger-btn .qt-btn-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qt-trigger-btn:hover .qt-btn-title {
  color: #FFFFFF;
}

.qt-trigger-btn .qt-btn-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: #FF8000;
  letter-spacing: 0.5px;
}

/* Footer */
.qt-footer {
  padding: 10px 18px;
  background: #181818;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.qt-footer-hint {
  font-size: 0.72rem;
  color: #9BA0AD;
  display: block;
  text-align: center;
}

/* --- Mobile Trigger Carousels (chat collapsed) --- */
.mobile-trigger-carousels {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  overflow: hidden;
}

.mobile-carousel-tabs {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.carousel-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  background: #414141;
  color: #adadb8;
  border: 1px solid #414141;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.carousel-tab-btn:hover {
  background: #4a4a4a;
  border-color: #63B22F;
  color: #ffffff;
}

.carousel-tab-btn.active {
  background: linear-gradient(135deg, rgba(99, 178, 47, 0.25), rgba(65, 65, 65, 0.95));
  border-color: #63B22F;
  color: #D9FF3D;
  box-shadow: 0 2px 8px rgba(99, 178, 47, 0.25);
}

.trigger-carousel-section {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.trigger-carousel-section.active {
  display: flex;
}

.carousel-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.carousel-section-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.carousel-scroll-hint {
  font-size: 0.68rem;
  color: var(--text-dim);
  opacity: 0.6;
}

.trigger-carousel-track {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  align-content: start;
  gap: 6px;
  padding: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.trigger-carousel-track::-webkit-scrollbar {
  width: 3px;
}

.trigger-carousel-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.carousel-trigger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  word-break: break-word;
  min-height: 44px;
}

.carousel-trigger-btn:active {
  transform: scale(0.95);
  background: rgba(99, 178, 47, 0.2);
  border-color: var(--color-green);
}

.carousel-trigger-btn.fired {
  animation: triggerFire 0.5s ease;
}

.carousel-trigger-btn .trigger-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.carousel-trigger-btn .trigger-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

/* ==========================================================================
   MOBILE & IPHONE RESPONSIVENESS
   ========================================================================== */

/* Tablet & Mobile Portrait (max-width: 860px) */
@media (max-width: 860px) {
  :root {
    --header-height: 44px;
  }

  .live-watch-header {
    width: 100%;
    border-radius: 0;
    padding: 0 10px;
    gap: 6px;
  }

  .live-top-handle {
    height: 24px;
    bottom: -24px;
    padding: 0 12px;
    gap: 6px;
  }

  .live-top-handle .top-handle-label {
    font-size: 0.58rem;
    letter-spacing: 1px;
  }

  .live-top-handle .top-handle-icon {
    font-size: 0.72rem;
  }

  .live-top-handle:hover {
    bottom: -25px;
    height: 25px;
    padding: 0 14px;
  }

  .header-left-zone {
    gap: 8px;
  }

  .live-indicator {
    padding: 2px 7px;
    font-size: 0.65rem;
    gap: 4px;
  }

  .live-indicator .pulse-dot {
    width: 6px;
    height: 6px;
  }

  .live-meta-pill {
    font-size: 0.62rem;
    padding: 1px 5px;
  }

  .brand-channel-name {
    font-size: 0.8rem;
    gap: 4px;
  }

  .brand-channel-name .verified-icon {
    font-size: 0.7em;
  }

  .header-right-zone {
    gap: 6px;
  }

  .user-name-mini {
    display: none;
  }

  .coins-badge-mini {
    display: none;
  }

  .user-status-pill {
    padding: 3px 8px 3px 4px;
    gap: 4px;
  }

  .user-avatar-mini {
    width: 22px;
    height: 22px;
  }

  .btn-icon-action {
    width: 28px;
    height: 28px;
    font-size: 0.82rem;
  }

  .btn-login-twitch {
    padding: 4px 10px;
    font-size: 0.75rem;
  }

  .brand-stream-title {
    display: none;
  }

  .header-nav-zone {
    display: none;
  }

  .btn-icon-action#btn-toggle-theater,
  .btn-icon-action#btn-toggle-fullscreen {
    display: none;
  }

  .live-viewport-grid {
    flex-direction: column;
  }

  .mobile-trigger-carousels.visible {
    display: flex;
    flex: 1;
    min-height: 0;
  }

  /* Player on top: strictly 16:9 ratio, fixed height */
  .live-player-section {
    flex: none;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 38vh;
    min-height: 200px;
    height: auto;
  }

  /* Chat below: fills remaining 100dvh height */
  .live-chat-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    flex: 1;
    min-height: 0;
    height: auto;
    border-left: none;
    border-top: 1px solid var(--border-color);
  }

  /* In mobile portrait collapsed mode */
  .live-chat-sidebar.collapsed {
    display: none !important;
  }

  .player-quick-dock {
    display: none !important;
  }

  .chat-expand-floating-btn {
    top: auto;
    bottom: 20px;
    right: 20px;
  }

  /* Quick-Trigger Drawer: Full width slide on mobile */
  .quick-trigger-handle {
    width: 24px;
    height: 90px;
  }

  .quick-trigger-drawer {
    width: 100%;
    max-width: 100vw;
  }

  .qt-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Landscape (max-height: 500px and landscape orientation) */
@media (max-height: 500px) and (orientation: landscape) {
  :root {
    --header-height: 40px;
  }

  .brand-stream-title, .header-nav-zone, .coins-badge-mini {
    display: none;
  }

  .live-viewport-grid {
    flex-direction: row;
  }

  .live-player-section {
    flex: 1;
    height: 100%;
  }

  .live-chat-sidebar {
    width: 280px !important;
    min-width: 260px !important;
    max-width: 320px !important;
    height: 100%;
  }

  /* Quick-Trigger Drawer in landscape */
  .quick-trigger-drawer {
    width: 320px;
    max-width: 85vw;
  }
}

/* ==========================================================================
   TOP-BAR MODAL OVERLAY (Song Request & Commands)
   ========================================================================== */
.live-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.live-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.live-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.live-modal-window {
  position: relative;
  z-index: 2001;
  width: 100%;
  max-width: 960px;
  height: 85vh;
  max-height: 850px;
  background: #101017;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(99, 178, 47, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.live-modal-overlay.active .live-modal-window {
  transform: scale(1) translateY(0);
}

.live-modal-header {
  height: 52px;
  min-height: 52px;
  background: #161622;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  user-select: none;
}

.live-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #efeff1;
  letter-spacing: 0.3px;
}

.live-modal-icon {
  font-size: 1.2rem;
}

.live-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-live-modal-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #adadb8;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-live-modal-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-live-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #adadb8;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-live-modal-close:hover {
  background: rgba(255, 90, 90, 0.2);
  border-color: rgba(255, 90, 90, 0.4);
  color: #ff5a5a;
}

.live-modal-body {
  flex: 1;
  width: 100%;
  height: calc(100% - 52px);
  position: relative;
  background: #0e0e10;
  overflow: hidden;
}

.live-modal-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #0e0e10;
}

@media (max-width: 768px) {
  .live-modal-overlay {
    padding: 10px;
  }

  .live-modal-window {
    height: 94vh;
    max-height: 94vh;
    border-radius: 12px;
  }

  .live-modal-header {
    padding: 0 14px;
  }

  .btn-live-modal-action span {
    display: none;
  }
}

