/* ==========================================================================
   Gravity Player - Modern Dark UI (TiviMate / Smarters Pro Hybrid Layout)
   ========================================================================== */

:root {
  --bg-obsidian: #07090e;
  --bg-deep: #0b0f19;
  --bg-panel: #111624;
  --bg-panel-elevated: #171e30;
  --bg-hover: #1e273d;
  --bg-active: #25314d;

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(0, 229, 255, 0.45);

  --accent-cyan: #00e5ff;
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  --accent-danger: #ef4444;

  --text-primary: #f3f6fc;
  --text-secondary: #9ba5bc;
  --text-muted: #636e88;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.55);
  --gradient-brand: linear-gradient(135deg, #00e5ff 0%, #6366f1 55%, #a855f7 100%);
}

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

html,
body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.4);
}

/* ==========================================================================
   1. LOGIN SCREEN
   ========================================================================== */

.login-screen {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background: radial-gradient(circle at 50% 0%, #131b31 0%, var(--bg-obsidian) 75%);
}

.login-ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.28;
}
.orb-1 {
  width: 420px;
  height: 420px;
  background: var(--accent-cyan);
  top: -120px;
  left: -80px;
}
.orb-2 {
  width: 480px;
  height: 480px;
  background: var(--accent-indigo);
  bottom: -150px;
  right: -100px;
}
.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--accent-purple);
  top: 40%;
  left: 55%;
  opacity: 0.15;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 450px;
  background: rgba(17, 22, 36, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: 34px 32px 28px;
  box-shadow: var(--shadow-card);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.login-logo {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 18px rgba(0, 229, 255, 0.25));
}

.login-brand-text h1 {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-brand-text p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 2px;
}

/* Saved Profiles Section */
.saved-profiles-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.text-link-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s;
}
.text-link-btn:hover {
  color: var(--accent-danger);
}

.saved-profiles-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-panel-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.18s;
}
.profile-chip:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-hover);
}
.profile-chip .chip-srv {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.14);
  color: var(--accent-cyan);
}

/* Server Selector Grid (Supports 2 to 4 servers cleanly) */
.form-group {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.server-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.server-pill {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  background: var(--bg-deep);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.server-pill:hover {
  background: var(--bg-panel-elevated);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-primary);
}

.server-pill.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(99, 102, 241, 0.14));
  border-color: var(--accent-cyan);
  color: var(--text-primary);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.14);
}

.server-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s;
}

.server-pill.active .server-dot {
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.server-pill-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.server-pill-text strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.server-pill-text small {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Input Controls */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 42px 12px 42px;
  background: var(--bg-deep);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
}

.icon-action-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.icon-action-btn svg {
  width: 18px;
  height: 18px;
}
.icon-action-btn:hover {
  color: var(--text-primary);
}

.login-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.checkbox-label input {
  accent-color: var(--accent-cyan);
  width: 15px;
  height: 15px;
}

.login-error {
  padding: 11px 14px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 13px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient-brand);
  color: #050811;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.btn-primary:hover {
  box-shadow: 0 8px 25px rgba(0, 229, 255, 0.3);
  transform: translateY(-1px);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  background: var(--bg-panel-elevated);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}
.btn-secondary:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-hover);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-login {
  width: 100%;
  padding: 13px;
  font-size: 15px;
}

.login-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* Spinners */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(5, 8, 17, 0.25);
  border-top-color: #050811;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.spinner-lg {
  width: 42px;
  height: 42px;
  border: 3.5px solid rgba(0, 229, 255, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   2. MAIN APP SHELL & HEADER
   ========================================================================== */

.app-shell {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-obsidian);
}

.top-header {
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-subtle);
  gap: 16px;
}

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

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.header-logo {
  width: 36px;
  height: 36px;
}

.brand-titles {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.server-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.14);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: var(--accent-cyan);
}

/* Main Navigation Tabs */
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.nav-tab svg {
  width: 16px;
  height: 16px;
  opacity: 0.85;
}

.nav-tab:hover {
  background: var(--bg-panel);
  color: var(--text-primary);
}

.nav-tab.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.14), rgba(99, 102, 241, 0.16));
  border-color: rgba(0, 229, 255, 0.4);
  color: var(--accent-cyan);
}

.tab-count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.nav-tab.active .tab-count {
  background: rgba(0, 229, 255, 0.2);
  color: var(--accent-cyan);
}

/* Header Right: Search + Account */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.global-search-box {
  position: relative;
  width: 260px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.global-search-box input {
  width: 100%;
  padding: 8px 30px 8px 34px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  transition: all 0.2s;
}
.global-search-box input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  width: 300px;
}

.clear-search-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}

.account-info-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-dot.online {
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.account-info-pill .divider {
  opacity: 0.3;
}

.header-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
}
.header-icon-btn svg {
  width: 17px;
  height: 17px;
}
.header-icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  background: var(--bg-hover);
}
.logout-btn:hover {
  color: #fca5a5;
  border-color: var(--accent-danger);
}

/* ==========================================================================
   3. WORKSPACE & LEFT CATEGORIES SIDEBAR
   ========================================================================== */

.workspace {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.categories-sidebar {
  width: 245px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-deep);
  border-right: 1px solid var(--border-subtle);
  transition: width 0.2s ease;
}

.categories-sidebar.collapsed {
  width: 52px;
}
.categories-sidebar.collapsed .sidebar-title,
.categories-sidebar.collapsed .category-search-wrap,
.categories-sidebar.collapsed .categories-list {
  display: none;
}

.sidebar-header {
  height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
}

.icon-btn-sm {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
}
.icon-btn-sm svg {
  width: 16px;
  height: 16px;
}
.icon-btn-sm:hover {
  color: var(--text-primary);
}

.category-search-wrap {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.category-search-wrap input {
  width: 100%;
  padding: 7px 11px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
}
.category-search-wrap input:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.categories-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.category-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  margin-bottom: 2px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.14s;
}

.category-item:hover {
  background: var(--bg-panel-elevated);
  color: var(--text-primary);
}

.category-item.active {
  background: var(--bg-active);
  color: var(--accent-cyan);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent-cyan);
}

.category-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.category-item.active .category-count {
  color: var(--accent-cyan);
}

/* ==========================================================================
   4. LIVE TV VIEW (TiviMate Hybrid 3-Column Layout)
   ========================================================================== */

.content-view {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
}

.live-view {
  display: flex;
  flex-direction: row;
}

.channels-column {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-subtle);
}

.column-header {
  height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.column-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.column-title-group h2 {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-panel-elevated);
  color: var(--text-secondary);
}

.channels-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}

.channel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  transition: all 0.14s;
}

.channel-row:hover {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.06);
}

.channel-row.active {
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.15), rgba(99, 102, 241, 0.08));
  border-color: rgba(0, 229, 255, 0.45);
}

.ch-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.ch-logo-box {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--bg-obsidian);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.ch-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.ch-info {
  flex: 1;
  min-width: 0;
}

.ch-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ch-epg-sub {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.ch-fav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
}
.ch-fav-btn:hover {
  transform: scale(1.15);
  color: var(--accent-gold);
}
.ch-fav-btn.favorited {
  color: var(--accent-gold);
}

/* Live Player + EPG Column */
.live-player-column {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-obsidian);
  overflow-y: auto;
}

.video-stage-wrapper {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 340px;
  max-height: 580px;
  flex-shrink: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}
.video-element.aspect-fill {
  object-fit: cover;
}
.video-element.aspect-stretch {
  object-fit: fill;
}

.player-placeholder {
  text-align: center;
  padding: 32px;
  color: var(--text-secondary);
}
.placeholder-logo {
  width: 68px;
  height: 68px;
  opacity: 0.55;
  margin-bottom: 12px;
}
.player-placeholder h3 {
  font-size: 17px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.buffer-overlay,
.stream-error-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 14, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 24px;
  z-index: 10;
}

.stream-error-overlay svg {
  width: 42px;
  height: 42px;
  color: var(--accent-danger);
}
.error-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

/* Player Control Bar */
.player-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 12px;
  padding: 12px 18px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-subtle);
}

.now-playing-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.active-ch-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--bg-panel);
  padding: 4px;
  border: 1px solid var(--border-subtle);
}

.active-ch-text h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.sub-badge {
  font-size: 11px;
  color: var(--accent-cyan);
}

.player-actions-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.format-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 4px;
}

.format-label {
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 6px;
}

.format-btn {
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.format-btn.active {
  background: var(--accent-cyan);
  color: #050811;
}

.ctrl-pill-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.ctrl-pill-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}
.ctrl-pill-btn.favorited {
  color: var(--accent-gold);
  border-color: rgba(245, 158, 11, 0.45);
}

/* Active Channel EPG Panel */
.live-epg-panel {
  flex: 1;
  padding: 16px 18px;
  background: var(--bg-obsidian);
}

.epg-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.epg-panel-header h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.epg-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-cyan);
}

.epg-program-card {
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  margin-bottom: 10px;
}

.epg-program-card.now-playing {
  border-color: rgba(0, 229, 255, 0.35);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.07), rgba(17, 22, 36, 0.95));
}

.epg-prog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.epg-now-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-cyan);
  color: #050811;
}

.epg-time-range {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.epg-prog-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.epg-prog-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.epg-progress-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}
.epg-progress-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 999px;
}

.epg-empty-state {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-panel);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-subtle);
}

/* ==========================================================================
   5. MOVIES & SERIES POSTER GRIDS
   ========================================================================== */

.grid-view,
.epg-guide-view,
.favorites-view {
  flex-direction: column;
  background: var(--bg-obsidian);
  overflow: hidden;
}

.grid-toolbar {
  height: 52px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toolbar-left h2 {
  font-size: 16px;
  font-weight: 700;
}

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

.toolbar-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.dark-select {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12px;
}

.media-poster-grid {
  flex: 1;
  overflow-y: auto;
  padding: 26px 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  grid-auto-rows: max-content;
  gap: 24px;
  align-content: start;
}

.poster-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 350px;
  min-height: 350px;
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.poster-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-cyan);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
}

.poster-thumb-wrap {
  position: relative;
  width: 100%;
  height: 282px;
  min-height: 282px;
  flex-shrink: 0;
  background: var(--bg-deep);
  overflow: hidden;
}

.poster-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.poster-card:hover .poster-thumb-wrap img {
  transform: scale(1.05);
}

.poster-rating-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(7, 9, 14, 0.82);
  backdrop-filter: blur(4px);
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.poster-fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(7, 9, 14, 0.78);
  color: var(--text-secondary);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: all 0.15s;
}
.poster-fav-btn:hover,
.poster-fav-btn.favorited {
  color: var(--accent-gold);
  background: rgba(7, 9, 14, 0.95);
}

.poster-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 14, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.poster-card:hover .poster-play-overlay {
  opacity: 1;
}

.play-circle-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #050811;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 229, 255, 0.4);
}

.poster-meta {
  padding: 10px 12px;
}

.poster-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poster-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  justify-content: space-between;
}

.load-more-wrap {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 18px 0 28px;
}

/* ==========================================================================
   6. MULTI-CHANNEL EPG GUIDE VIEW
   ========================================================================== */

.epg-clock-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent-cyan);
}

.epg-guide-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.epg-guide-row {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  min-height: 86px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.16s;
}

.epg-guide-row:hover {
  border-color: rgba(0, 229, 255, 0.35);
}

.epg-guide-ch-cell {
  width: 255px;
  flex-shrink: 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-deep);
  border-right: 1px solid var(--border-subtle);
  cursor: pointer;
}
.epg-guide-ch-cell:hover {
  background: var(--bg-hover);
}

.epg-guide-programs {
  flex: 1;
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  overflow-x: auto;
  align-items: stretch;
}

.epg-slot-pill {
  min-width: 250px;
  max-width: 340px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel-elevated);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.epg-slot-pill.current {
  border-color: var(--accent-cyan);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(17, 22, 36, 0.92));
}
.epg-slot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ==========================================================================
   7. FAVORITES & HISTORY VIEW
   ========================================================================== */

.sub-filter-pills {
  display: flex;
  gap: 6px;
}

.sub-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.sub-pill.active {
  background: var(--accent-cyan);
  color: #050811;
  border-color: var(--accent-cyan);
}

.favorites-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
}

/* ==========================================================================
   8. MOVIE & SERIES DETAILS MODAL
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.84);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.media-modal-card {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  overflow-y: auto;
  box-shadow: var(--shadow-card);
}

.modal-close-btn {
  position: sticky;
  top: 16px;
  float: right;
  margin: 16px 16px 0 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(7, 9, 14, 0.78);
  color: var(--text-primary);
  font-size: 22px;
  cursor: pointer;
  z-index: 5;
}
.modal-close-btn:hover {
  background: var(--accent-danger);
}

.modal-hero-backdrop {
  position: relative;
  width: 100%;
  height: 230px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-deep);
}

.modal-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(17, 22, 36, 0.2) 0%, var(--bg-panel) 100%);
}

.modal-body-content {
  position: relative;
  padding: 0 32px 32px;
  margin-top: -90px;
}

.modal-main-info {
  display: flex;
  gap: 26px;
  align-items: flex-start;
}

.modal-poster-img {
  width: 185px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
  flex-shrink: 0;
  background: var(--bg-deep);
}

.modal-meta-column {
  flex: 1;
  min-width: 0;
  padding-top: 20px;
}

.modal-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.badge-accent {
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.16);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.badge-outline {
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
}

.badge-gold {
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.badge-mono {
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--bg-panel-elevated);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
}

.modal-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
}

.modal-genre {
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.modal-plot {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.modal-credits {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.modal-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-play-hero {
  padding: 12px 26px;
  font-size: 15px;
}

/* Series Seasons & Episodes Section */
.series-seasons-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.seasons-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.season-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.season-tab-btn {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-deep);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.season-tab-btn.active {
  background: var(--accent-cyan);
  color: #050811;
  border-color: var(--accent-cyan);
}

.episodes-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}

.episode-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.16s;
}
.episode-card:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-hover);
}

.ep-num-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-panel-elevated);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ep-info {
  flex: 1;
  min-width: 0;
}

.ep-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   9. FULLSCREEN VOD / SERIES PLAYER MODAL
   ========================================================================== */

.vod-player-modal {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  z-index: 200;
}

.vod-player-topbar {
  height: 58px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 15, 25, 0.92);
  border-bottom: 1px solid var(--border-subtle);
}

.vod-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-back-player {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
}
.btn-back-player svg {
  width: 16px;
  height: 16px;
}
.btn-back-player:hover {
  border-color: var(--accent-cyan);
}

.vod-playing-titles h3 {
  font-size: 15px;
  font-weight: 700;
}
.vod-subtitle {
  font-size: 12px;
  color: var(--accent-cyan);
}

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

.vod-video-container {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.vod-video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ==========================================================================
   10. CLOSED CAPTIONS (CC) & SUBTITLES MENU
   ========================================================================== */

.cc-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.ctrl-pill-btn.cc-active {
  background: rgba(0, 229, 255, 0.16);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.cc-popover-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--bg-panel-elevated);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 8px;
  z-index: 250;
}

.vod-topbar-right .cc-popover-menu {
  bottom: auto;
  top: calc(100% + 8px);
}

.cc-menu-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.cc-tracks-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 240px;
  overflow-y: auto;
}

.cc-track-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.14s;
}

.cc-track-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.cc-track-btn.active {
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan);
}

video::cue {
  background-color: rgba(5, 8, 17, 0.82);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 1.05em;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

/* ==========================================================================
   11. MULTI-VIEW (2x2 QUAD / SPLIT SCREEN ARENA)
   ========================================================================== */

.multiview-view {
  flex-direction: column;
  background: var(--bg-obsidian);
  overflow: hidden;
}

.multiview-grid {
  flex: 1;
  min-height: 0;
  padding: 14px;
  display: grid;
  gap: 14px;
}

.multiview-grid.layout-2 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 1fr;
}

.multiview-grid.layout-3 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}
.multiview-grid.layout-3 .mv-slot-card:first-child {
  grid-column: 1 / -1;
}

.multiview-grid.layout-4 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.mv-slot-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #000;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 0;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.mv-slot-card.audio-focused {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.22);
}

.mv-slot-header {
  height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  z-index: 3;
}

.mv-slot-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mv-slot-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-panel-elevated);
  color: var(--accent-cyan);
}

.mv-slot-ch-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mv-slot-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mv-mini-btn {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.mv-mini-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}
.mv-mini-btn.audio-on {
  background: rgba(0, 229, 255, 0.16);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.mv-video-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  cursor: pointer;
}

.mv-video-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mv-empty-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  text-align: center;
  padding: 20px;
}

/* Multi-View Channel Picker Modal */
.mv-picker-card {
  width: 100%;
  max-width: 680px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.mv-picker-header {
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-subtle);
}

.mv-picker-filters {
  padding: 12px 22px;
  display: flex;
  gap: 12px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-subtle);
}

.mv-search-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  color: var(--text-primary);
  font-size: 13px;
}
.mv-search-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.mv-picker-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-auto-rows: max-content;
  gap: 10px;
}

/* ==========================================================================
   12. TOAST NOTIFICATIONS & RESPONSIVE BREAKPOINTS
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 22px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 300;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-panel-elevated);
  border: 1px solid var(--accent-cyan);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-card);
  animation: fadeInUp 0.22s ease;
}

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

@media (max-width: 1100px) {
  .live-view {
    flex-direction: column;
    overflow-y: auto;
  }
  .channels-column {
    width: 100%;
    height: 320px;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .account-info-pill {
    display: none;
  }
}

@media (max-width: 768px) {
  .top-header {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 12px;
  }
  .categories-sidebar {
    width: 180px;
  }
  .modal-main-info {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .modal-action-buttons {
    justify-content: center;
  }
}
