/* ===========================
   :root - CSS Variables
=========================== */
:root {
  /* Colors */
  --color-background: #121212;
  --color-navbar: rgba(18, 18, 18, 0.95);
  --color-white: #fff;
  --color-gray-light: rgba(255, 255, 255, 0.1);
  --color-gray-medium: rgba(255, 255, 255, 0.2);
  --color-gray-dark: rgba(255, 255, 255, 0.3);
  --color-primary: rgba(0, 0, 204, 0.8);
  --color-secondary: rgba(254, 31, 169, 0.8);
  --color-error: rgba(244, 67, 54, 0.9);
  --color-success: rgba(76, 175, 80, 0.9);
  --color-warning: rgba(255, 152, 0, 0.9);
  --color-info: rgba(33, 150, 243, 0.9);

  /* Modern Font Stack */
  --font-primary: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "SF Pro Display", "Inter", "Roboto", sans-serif;

  /* Font Sizes */
  --font-size-small: 10px;
  --font-size-medium: 12px;
  --font-size-large: 14px;
  --font-size-xl: 16px;
  --font-size-xxl: 18px;
  --font-size-xxxl: 22px;

  /* Spacing */
  --spacing-xs: 5px;
  --spacing-sm: 10px;
  --spacing-md: 15px;
  --spacing-lg: 20px;

  /* Border Radii */
  --border-radius-xs: 8px;
  --border-radius-sm: 12px;
  --border-radius-md: 16px;
  --border-radius-lg: 20px;

  /* Navbar Widths */
  --navbar-collapsed-width: 45px;
  --navbar-expanded-width: 300px;

  /* Modern Shadow Effects */
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.1);
  --shadow-large: 0 8px 32px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* ===========================
   Reset and Base Styles
=========================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Update the base layout */
body {
  display: grid;
  grid-template-columns: auto 1fr;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: var(--color-background);
  font-family: var(--font-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#customNotification {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2000;
  display: none;
  box-sizing: border-box;
  width: max-content;
  min-width: 0;
  min-height: 0;
  max-width: min(480px, calc(100vw - 32px));
  padding: 16px 20px;
  color: #0a0a0a;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.24);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
}

/* Inactive discarded navigation experiment. The active menu is defined in
   ControlCenter-modular.css. */
@media not all {

/* ==========================================================================
   Inactive discarded navigation experiment
========================================================================== */
:root {
  --cc-cyber-black: #02060b;
  --cc-cyber-ink: #07111c;
  --cc-cyber-panel: #0b1724;
  --cc-cyber-panel-strong: #101d2d;
  --cc-cyber-line: #29445d;
  --cc-cyber-line-bright: #61dfff;
  --cc-cyber-cyan: #00d8ff;
  --cc-cyber-pink: #ff20d4;
  --cc-cyber-blue: #1b75ff;
  --cc-cyber-teal: #04d3d0;
  --cc-cyber-red: #ff4a43;
  --cc-cyber-green: #36f18a;
}

body {
  background:
    radial-gradient(circle at 14% 14%, rgba(0, 151, 255, 0.08), transparent 30%),
    radial-gradient(circle at 92% 78%, rgba(255, 0, 196, 0.05), transparent 34%),
    var(--cc-cyber-black);
}

.navbar {
  width: var(--navbar-collapsed-width);
  padding: 10px 8px 16px;
  background:
    linear-gradient(90deg, rgba(0, 216, 255, 0.03), transparent 12%, transparent 88%, rgba(255, 32, 212, 0.04)),
    linear-gradient(180deg, rgba(8, 19, 31, 0.99), rgba(2, 8, 14, 0.99));
  border-right: 1px solid rgba(71, 115, 147, 0.72);
  box-shadow:
    0 0 24px rgba(0, 0, 0, 0.76),
    inset -1px 0 rgba(0, 216, 255, 0.12),
    inset 1px 0 rgba(255, 32, 212, 0.08);
}

.navbar::before {
  content: "";
  position: absolute;
  inset: 9px 7px;
  border: 1px solid rgba(58, 109, 141, 0.64);
  clip-path: polygon(0 17px, 17px 0, calc(100% - 17px) 0, 100% 17px, 100% calc(100% - 17px), calc(100% - 17px) 100%, 17px 100%, 0 calc(100% - 17px));
  pointer-events: none;
  z-index: 0;
}

.navbar::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background:
    linear-gradient(90deg, transparent 0 5px, rgba(0, 216, 255, 0.2) 5px 6px, transparent 6px 100%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 5px);
  pointer-events: none;
  z-index: 0;
}

.navbar > * {
  position: relative;
  z-index: 1;
}

.navbar.expanded,
.navbar:hover {
  width: var(--navbar-expanded-width);
  padding: 10px 8px 16px;
  background:
    linear-gradient(90deg, rgba(0, 216, 255, 0.045), transparent 14%, transparent 86%, rgba(255, 32, 212, 0.055)),
    linear-gradient(180deg, rgba(8, 19, 31, 0.995), rgba(2, 8, 14, 0.995));
  border-right-color: rgba(68, 130, 164, 0.9);
  box-shadow:
    0 0 28px rgba(0, 0, 0, 0.82),
    0 0 20px rgba(0, 216, 255, 0.06),
    inset -1px 0 rgba(0, 216, 255, 0.2),
    inset 1px 0 rgba(255, 32, 212, 0.12);
}

.navbar-header {
  min-height: 136px;
  padding: 18px 12px 13px;
  margin-bottom: 0;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  border-bottom: 0;
}

.navbar-header::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 0;
  left: 4px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cc-cyber-cyan), var(--cc-cyber-pink), transparent);
  opacity: 0.76;
}

.control-center-logo,
.navbar:hover .control-center-logo {
  width: 74px;
  height: 74px;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  clip-path: polygon(0 16%, 16% 0, 84% 0, 100% 16%, 100% 84%, 84% 100%, 16% 100%, 0 84%);
  box-shadow: 0 0 18px rgba(0, 216, 255, 0.12), 0 0 22px rgba(255, 32, 212, 0.1);
  transform: none;
}

.vertical-title {
  width: 100%;
  height: auto;
  margin: 0;
  font-size: 0;
  line-height: 1;
  text-align: center;
  letter-spacing: 0;
  text-transform: none;
}

.vertical-title::before {
  content: "CONTROL CENTER";
  display: block;
  color: #a7efff;
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-shadow: 0 0 8px rgba(0, 216, 255, 0.46);
  white-space: nowrap;
}

#menuToggleButton {
  top: 19px;
  right: 15px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 216, 255, 0.62);
  border-radius: 0;
  clip-path: polygon(0 8px, 8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px));
  background: rgba(6, 18, 30, 0.92);
  color: var(--cc-cyber-cyan);
  box-shadow: inset 0 0 0 1px rgba(255, 32, 212, 0.1), 0 0 12px rgba(0, 216, 255, 0.08);
}

#menuToggleButton:hover {
  border-color: var(--cc-cyber-pink);
  background: rgba(28, 16, 43, 0.94);
  color: #fff;
}

.nav-buttons {
  gap: 12px;
  width: 100%;
  min-height: 0;
  padding: 15px 10px 24px;
  overflow-x: hidden;
  scrollbar-color: rgba(0, 216, 255, 0.6) rgba(4, 12, 20, 0.8);
  scrollbar-width: thin;
}

.nav-buttons::-webkit-scrollbar {
  width: 5px;
}

.nav-buttons::-webkit-scrollbar-track {
  background: rgba(4, 12, 20, 0.8);
}

.nav-buttons::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cc-cyber-cyan), var(--cc-cyber-pink));
  border-radius: 0;
}

.nav-button,
a.nav-button {
  min-height: 46px;
  width: 100%;
  margin: 0;
  padding: 11px 15px;
  border: 1px solid rgba(55, 86, 112, 0.96);
  border-radius: 0;
  clip-path: polygon(0 10px, 10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px));
  background: linear-gradient(180deg, rgba(15, 29, 44, 0.96), rgba(7, 16, 27, 0.96));
  color: #f3f8ff;
  font-family: "Roboto", "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1px;
  line-height: 1.1;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  box-shadow: inset 0 0 0 1px rgba(0, 216, 255, 0.035), 0 4px 10px rgba(0, 0, 0, 0.28);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.nav-button::before {
  display: none;
}

.nav-button:hover,
a.nav-button:hover {
  transform: translateY(-1px);
  border-color: var(--cc-cyber-line-bright);
  background: linear-gradient(180deg, rgba(18, 42, 61, 0.98), rgba(8, 24, 38, 0.98));
  box-shadow: inset 0 0 14px rgba(0, 216, 255, 0.09), 0 0 14px rgba(0, 216, 255, 0.1);
}

.nav-button:active,
a.nav-button:active {
  transform: translateY(0);
}

.nav-button:focus-visible,
a.nav-button:focus-visible {
  outline: 2px solid var(--cc-cyber-pink);
  outline-offset: 3px;
}

.nav-button > i:first-child,
.nav-button > .fas:first-child,
.party-panel-nav-button > i:first-child {
  flex: 0 0 23px;
  width: 23px;
  color: #b6d9ed;
  font-size: 17px;
  text-align: center;
  text-shadow: 0 0 8px rgba(0, 216, 255, 0.18);
}

.nav-button-label,
.party-panel-nav-button > span {
  min-width: 0;
  flex: 1;
  text-align: left;
}

.party-panel-nav-button {
  background: linear-gradient(180deg, rgba(13, 31, 46, 0.98), rgba(7, 16, 27, 0.98));
}

.party-panel-nav-button > i:first-child {
  color: var(--cc-cyber-cyan);
}

.party-panel-nav-button::after,
.nav-section-toggle::after {
  content: "›";
  flex: 0 0 auto;
  color: var(--cc-cyber-cyan);
  font-family: "Roboto Mono", monospace;
  font-size: 23px;
  line-height: 1;
}

.nav-section-toggle::after {
  display: none;
}

.demo-mode-nav-button {
  background: linear-gradient(180deg, rgba(255, 33, 209, 0.92), rgba(119, 4, 104, 0.94));
  border-color: rgba(255, 71, 220, 0.94);
  box-shadow: inset 0 0 14px rgba(255, 32, 212, 0.25), 0 0 15px rgba(255, 32, 212, 0.16);
}

.demo-mode-nav-button > i:first-child {
  color: #ffd9fb;
}

.demo-mode-nav-button:hover {
  background: linear-gradient(180deg, rgba(255, 53, 220, 0.98), rgba(145, 7, 125, 0.98));
  border-color: #fff;
}

#volumeSliderContainer {
  min-height: 60px;
  width: 100%;
  padding: 12px 13px;
  border: 1px solid rgba(54, 91, 119, 0.96);
  border-radius: 0;
  clip-path: polygon(0 10px, 10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px));
  background: linear-gradient(180deg, rgba(13, 29, 43, 0.98), rgba(6, 15, 25, 0.98));
  box-shadow: inset 0 0 0 1px rgba(0, 216, 255, 0.035), 0 4px 10px rgba(0, 0, 0, 0.26);
}

#volumeSliderContainer:hover {
  border-color: var(--cc-cyber-cyan);
  background: linear-gradient(180deg, rgba(15, 37, 54, 0.98), rgba(7, 19, 31, 0.98));
}

.volume-icon {
  flex: 0 0 auto;
  color: var(--cc-cyber-cyan);
  font-size: 16px;
}

#volumeSliderContainer label {
  flex: 0 0 auto;
  color: #eaf7ff;
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

#volumeSlider {
  --volume-fill: 33%;
  flex: 1 1 auto;
  width: auto;
  min-width: 60px;
  height: 7px;
  margin: 0;
  appearance: none;
  border-radius: 0;
  background: linear-gradient(90deg, var(--cc-cyber-cyan) 0 var(--volume-fill), rgba(122, 163, 191, 0.34) var(--volume-fill) 100%);
  accent-color: var(--cc-cyber-cyan);
}

#volumeSlider::-webkit-slider-runnable-track {
  height: 7px;
  border: 1px solid rgba(111, 194, 229, 0.42);
  border-radius: 0;
  background: linear-gradient(90deg, var(--cc-cyber-cyan) 0 var(--volume-fill), rgba(122, 163, 191, 0.34) var(--volume-fill) 100%);
}

#volumeSlider::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  margin-top: -6px;
  appearance: none;
  border: 2px solid #082438;
  border-radius: 50%;
  background: var(--cc-cyber-cyan);
  box-shadow: 0 0 8px rgba(0, 216, 255, 0.86);
}

#volumeSlider::-moz-range-track {
  height: 7px;
  border: 1px solid rgba(111, 194, 229, 0.42);
  border-radius: 0;
  background: rgba(122, 163, 191, 0.34);
}

#volumeSlider::-moz-range-progress {
  height: 7px;
  background: var(--cc-cyber-cyan);
}

#volumeSlider::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 2px solid #082438;
  border-radius: 50%;
  background: var(--cc-cyber-cyan);
  box-shadow: 0 0 8px rgba(0, 216, 255, 0.86);
}

#muteIconNav {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(255, 74, 67, 0.35));
}

.nav-cyber-section {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
  width: 100%;
  padding: 11px 9px 10px;
  border: 1px solid rgba(48, 82, 109, 0.96);
  clip-path: polygon(0 13px, 13px 0, calc(100% - 13px) 0, 100% 13px, 100% calc(100% - 13px), calc(100% - 13px) 100%, 13px 100%, 0 calc(100% - 13px));
  background: linear-gradient(180deg, rgba(12, 27, 42, 0.72), rgba(6, 15, 25, 0.78));
  box-shadow: inset 0 0 18px rgba(0, 216, 255, 0.025), 0 4px 12px rgba(0, 0, 0, 0.22);
}

.nav-cyber-section--shortcuts {
  border-color: rgba(0, 216, 255, 0.44);
}

.nav-cyber-section--shortcuts::before {
  content: "/// SHORTCUTS";
  padding: 0 7px;
  color: var(--cc-cyber-cyan);
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-shadow: 0 0 8px rgba(0, 216, 255, 0.38);
}

.nav-cyber-section--utility {
  padding: 0;
  border: 0;
  clip-path: none;
  background: transparent;
  box-shadow: none;
}

.nav-section-toggle {
  min-height: 34px;
  padding: 0 7px;
  border: 0;
  clip-path: none;
  background: transparent;
  box-shadow: none;
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.nav-section-toggle:hover {
  transform: none;
  border-color: transparent;
  background: rgba(0, 216, 255, 0.06);
  box-shadow: none;
}

.nav-section-toggle > i:first-child {
  color: var(--cc-cyber-cyan);
}

.nav-section-toggle .section-chevron {
  flex: 0 0 auto;
  width: auto;
  color: var(--cc-cyber-cyan);
  font-size: 13px;
  transition: transform 0.18s ease;
}

.nav-section-toggle[aria-expanded="true"] .section-chevron {
  transform: rotate(180deg);
}

#shortcutsDropdown {
  position: absolute;
  top: 54px;
  right: 9px;
  left: 9px;
  z-index: 12;
  max-height: min(62vh, 430px);
  overflow: auto;
  padding: 13px;
  border: 1px solid var(--cc-cyber-cyan);
  border-radius: 0;
  clip-path: polygon(0 12px, 12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px));
  background: rgba(3, 12, 21, 0.98);
  box-shadow: 0 0 22px rgba(0, 216, 255, 0.18), inset 0 0 18px rgba(0, 216, 255, 0.06);
}

#shortcutsDropdown h2,
#shortcutsDropdown h3 {
  color: var(--cc-cyber-cyan);
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  text-transform: uppercase;
}

#addStreamForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 0;
  margin: 0;
}

#newChannel {
  width: 100%;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid rgba(91, 130, 157, 0.68);
  border-radius: 0;
  clip-path: polygon(0 8px, 8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px));
  background: rgba(4, 12, 21, 0.96);
  color: #eefaff;
  font-family: "Roboto", "Inter", sans-serif;
  font-size: 12px;
  outline: none;
}

#newChannel::placeholder {
  color: rgba(205, 232, 245, 0.52);
}

#newChannel:focus {
  border-color: var(--cc-cyber-cyan);
  box-shadow: 0 0 12px rgba(0, 216, 255, 0.14);
}

#addStreamForm .nav-button {
  background: linear-gradient(180deg, rgba(255, 32, 212, 0.96), rgba(126, 7, 115, 0.96));
  border-color: var(--cc-cyber-pink);
  box-shadow: inset 0 0 14px rgba(255, 32, 212, 0.24), 0 0 11px rgba(255, 32, 212, 0.12);
}

#addStreamForm .nav-button > i:first-child {
  color: #fff;
  font-size: 18px;
}

#backUpStreamButton {
  border-color: rgba(0, 230, 230, 0.86);
  background: linear-gradient(180deg, rgba(0, 145, 159, 0.84), rgba(2, 60, 78, 0.94));
  box-shadow: inset 0 0 15px rgba(0, 216, 255, 0.16), 0 0 11px rgba(0, 216, 255, 0.09);
}

#backUpStreamButton > i:first-child {
  color: #a9ffff;
}

#refreshPageButton {
  border-color: rgba(35, 132, 255, 0.92);
  background: linear-gradient(180deg, rgba(12, 99, 223, 0.88), rgba(4, 43, 111, 0.96));
}

#refreshPageButton > i:first-child {
  color: #a5d2ff;
}

#removeOfflineStreamsButton {
  border-color: rgba(255, 74, 67, 0.9);
  background: linear-gradient(180deg, rgba(166, 33, 35, 0.9), rgba(71, 12, 18, 0.96));
}

#removeOfflineStreamsButton > i:first-child {
  color: #ffb2b0;
}

#customizeStreamsButton > i:first-child,
#copyBrowserSourceButton > i:first-child,
#startTutorialButton > i:first-child {
  color: #99c9e3;
}

.mode-buttons,
.livewindowstyle-buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(60, 100, 130, 0.86);
  border-radius: 0;
  clip-path: polygon(0 12px, 12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px));
  background: linear-gradient(180deg, rgba(11, 28, 43, 0.92), rgba(5, 14, 24, 0.96));
  box-shadow: inset 0 0 16px rgba(0, 216, 255, 0.04);
}

#singleModeButton,
#dualModeButton {
  min-height: 42px;
  width: 100%;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(67, 100, 125, 0.86);
  border-radius: 0;
  clip-path: polygon(0 8px, 8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px));
  background: rgba(9, 20, 33, 0.95);
  color: #e7f4ff;
  text-transform: uppercase;
  letter-spacing: 1px;
  justify-content: center;
}

#singleModeButton > i:first-child,
#dualModeButton > i:first-child {
  flex: 0 0 auto;
  width: auto;
  color: #a5bfd3;
}

#singleModeButton::before,
#dualModeButton::before,
#singleModeButton::after,
#dualModeButton::after {
  display: none;
}

#singleModeButton.active-mode-button {
  border-color: var(--cc-cyber-blue);
  background: linear-gradient(180deg, rgba(21, 105, 255, 0.98), rgba(6, 45, 132, 0.98));
  box-shadow: inset 0 0 16px rgba(0, 216, 255, 0.22), 0 0 13px rgba(27, 117, 255, 0.24);
}

#singleModeButton.active-mode-button > i:first-child {
  color: #bceaff;
}

#dualModeButton.active-mode-button {
  border-color: var(--cc-cyber-green);
  background: linear-gradient(180deg, rgba(23, 132, 88, 0.96), rgba(7, 68, 48, 0.98));
}

#windowControlsButton {
  margin-top: 0;
}

#windowControlsButton.active {
  border-color: rgba(54, 241, 138, 0.9);
  background: linear-gradient(180deg, rgba(20, 137, 84, 0.94), rgba(6, 67, 45, 0.98));
  box-shadow: inset 0 0 15px rgba(54, 241, 138, 0.16), 0 0 10px rgba(54, 241, 138, 0.1);
}

#windowControlsButton:not(.active) {
  border-color: rgba(255, 74, 67, 0.92);
  background: linear-gradient(180deg, rgba(164, 34, 36, 0.92), rgba(73, 13, 18, 0.98));
}

.status-chip {
  flex: 0 0 auto;
  min-width: 30px;
  padding: 3px 7px;
  border: 1px solid currentColor;
  color: #d9f3ff;
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-align: center;
  opacity: 0.92;
}

#windowControlsButton.active .status-chip {
  color: #bffff0;
}

.navbar.menu-collapsed .nav-buttons,
.navbar.menu-collapsed:hover .nav-buttons {
  padding-inline: 0;
}

@media (max-width: 600px) {
  .navbar.expanded,
  .navbar:hover {
    width: min(var(--navbar-expanded-width), calc(100vw - 24px));
    max-width: calc(100vw - 24px);
  }

  .nav-buttons {
    padding-inline: 8px;
  }

  .vertical-title::before {
    font-size: 13px;
  }
}

.stream-load-window {
  position: fixed;
  top: 10px;
  left: calc(50% + (var(--navbar-collapsed-width) / 2));
  z-index: 900;
  display: flex;
  align-items: center;
  width: min(430px, calc(100vw - var(--navbar-collapsed-width) - 28px));
  min-height: 66px;
  padding: 10px 14px;
  color: #fff;
  background: rgba(12, 14, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.42);
  pointer-events: none;
  transform: translateX(-50%);
}

.stream-load-window[hidden] {
  display: none;
}

.stream-load-window__spinner,
.loading-spinner__ring {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #66b6ff;
  border-radius: 50%;
  animation: stream-loading-spin 0.8s linear infinite;
}

.stream-load-window[data-state="complete"] .stream-load-window__spinner {
  border-color: #63d997;
  animation: none;
}

.stream-load-window__content {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 11px;
  gap: 2px;
}

#streamLoadTitle,
#streamLoadSummary,
#streamLoadDetail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#streamLoadTitle {
  font-size: 13px;
  letter-spacing: 0.01em;
}

#streamLoadSummary,
#streamLoadDetail {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}

#streamLoadProgress {
  width: 100%;
  height: 4px;
  margin-block: 2px;
  overflow: hidden;
  accent-color: #4fa9ff;
  border: 0;
  border-radius: 999px;
}

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

}

/* ===========================
   Parent Container
=========================== */
.parent-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* ===========================
   Navbar
=========================== */
.navbar {
  position: relative;
  width: var(--navbar-collapsed-width);
  height: 100vh;
  background: linear-gradient(135deg, rgba(18, 18, 18, 0.98), rgba(15, 15, 15, 0.98));
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-right: 2px solid rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-sm);
  box-shadow:
    var(--shadow-large),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 1000;
  transition:
    width 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    border-right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.navbar.expanded,
.navbar:hover {
  width: var(--navbar-expanded-width);
  background: linear-gradient(135deg, rgba(22, 22, 22, 0.99), rgba(18, 18, 18, 0.99));
  border-right: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    var(--shadow-large),
    0 0 30px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.navbar.menu-collapsed,
.navbar.menu-collapsed:hover {
  width: var(--navbar-collapsed-width);
  padding-inline: 0;
  background: linear-gradient(135deg, rgba(18, 18, 18, 0.98), rgba(15, 15, 15, 0.98));
  border-right: 2px solid rgba(255, 255, 255, 0.15);
  /* A shadow painted over the adjacent first-column Twitch frame makes the
     provider's tracked-visibility check report the player as obscured. */
  box-shadow: none;
}

.navbar:hover ~ .container,
.navbar.expanded ~ .container {
  /* Remove left and width adjustments */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.navbar.menu-collapsed ~ .container,
.navbar.menu-collapsed:hover ~ .container {
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.nav-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  overflow-y: auto;
  opacity: 0;
  transition:
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden;
  width: 100%;
  padding: var(--spacing-sm);
  transform: translateX(-20px);
  transform-origin: left center;
}

.navbar.expanded .nav-buttons,
.navbar:hover .nav-buttons {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0.15s;
}

.navbar.menu-collapsed .nav-buttons,
.navbar.menu-collapsed:hover .nav-buttons {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-20px);
  transition-delay: 0s;
}

/* Enhanced Mode Button Container */
.mode-buttons,
.livewindowstyle-buttons {
  display: flex;
  flex-direction: column;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  margin: var(--spacing-sm) 0;
  width: 100%;
  padding: 6px;
}

/* Enhanced Mode Button Styling */
#singleModeButton,
#dualModeButton {
  flex: 1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.05));
  color: var(--color-white);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 3px 0;
  border-radius: var(--border-radius-xs);
  font-family: var(--font-display);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
}

/* Mode Button Icons */
#singleModeButton::before {
  content: "👤";
  font-size: 16px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#dualModeButton::before {
  content: "👥";
  font-size: 16px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mode Button Hover Effects */
#singleModeButton:hover,
#dualModeButton:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

#singleModeButton:hover::before,
#dualModeButton:hover::before {
  transform: scale(1.2);
}

/* Active Mode Button Styling */
#singleModeButton.active-mode-button {
  background: linear-gradient(135deg, #007bff, #0056cc);
  color: var(--color-white);
  border-color: rgba(0, 123, 255, 0.5);
  box-shadow:
    0 4px 15px rgba(0, 123, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateX(0);
  font-weight: 700;
  position: relative;
}

#dualModeButton.active-mode-button {
  background: linear-gradient(135deg, #28a745, #1e7e34);
  color: var(--color-white);
  border-color: rgba(40, 167, 69, 0.5);
  box-shadow:
    0 4px 15px rgba(40, 167, 69, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateX(0);
  font-weight: 700;
  position: relative;
}

/* Active Mode Button Glow Effect */
#singleModeButton.active-mode-button::after {
  content: "ACTIVE";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(0, 123, 255, 0.8);
}

#dualModeButton.active-mode-button::after {
  content: "ACTIVE";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(40, 167, 69, 0.8);
}

/* Enhanced Logo Styles */
.logo {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.navbar:hover .logo {
  transform: scale(1.15);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.4),
    0 0 25px rgba(255, 255, 255, 0.15);
}

/* Enhanced Navigation Title */
.navbar h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-white);
  margin: 0;
  display: none;
  opacity: 0;
  transform: translateX(-20px);
  transition:
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff, #f0f0f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  overflow: hidden;
}

.navbar.expanded h1,
.navbar:hover h1 {
  display: block;
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.2s;
}

/* ===========================
   Volume Slider Container - Modernized
=========================== */
#volumeSliderContainer {
  display: flex;
  align-items: center;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.06);
  padding: 8px 14px;
  border-radius: var(--border-radius-sm);
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 0;
}

#volumeSliderContainer:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
}

#volumeSliderContainer label {
  color: var(--color-white);
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0.3px;
  cursor: pointer;
  font-weight: 500;
  opacity: 0.9;
}

#volumeSlider {
  width: 150px;
  margin: 0;
  cursor: pointer;
}

/* Mute Icon */
#muteIconNav {
  width: 20px;
  height: 20px;
  background-size: contain;
  cursor: pointer;
  transition: background-image 0.3s;
}

#muteIconNav:not(.muted) {
  background-image: url('data:image/svg+xml;utf8,<svg fill="%234a90e2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"/></svg>');
}

#muteIconNav.muted {
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23e74c3c" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"/></svg>');
}

/* ===========================
   Dropdown
=========================== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #2a2a2a;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-radius: var(--border-radius-xs);
  top: 100%;
  left: 0;
  margin-top: 2px;
  transition: opacity 0.2s, transform 0.2s;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.dropdown-content a {
  color: var(--color-white);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: background-color 0.3s;
  font-size: var(--font-size-medium);
}

.dropdown-content a:hover {
  background-color: #3a3a3a;
}

.dropdown:hover .dropdown-content {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ===========================
   Combined Input - Modernized
=========================== */
.combined-input {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-sm);
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0;
}

.combined-input:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background-color: rgba(255, 255, 255, 0.08);
}

.combined-input input {
  background: transparent;
  border: none;
  color: var(--color-white);
  padding: 10px 14px;
  font-size: 14px;
  width: 100%;
  transition: background-color 0.25s;
  font-family: var(--font-primary);
  font-weight: 400;
  letter-spacing: 0.2px;
}

.combined-input input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.05);
}

.combined-input input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

.combined-input button {
  background: linear-gradient(135deg, var(--color-secondary), rgba(254, 31, 169, 0.9));
  border: none;
  border-radius: var(--border-radius-sm);
  color: var(--color-white);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  text-transform: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-soft);
  letter-spacing: 0.3px;
}

.combined-input button:hover {
  background: linear-gradient(135deg, rgba(254, 31, 169, 1), rgba(254, 31, 169, 0.8));
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.combined-input button i {
  font-size: 14px;
}

/* ===========================
   Shortcuts
=========================== */
.shortcuts {
  margin-left: 20px;
  font-size: var(--font-size-medium);
  background-color: #2a2a2a;
  padding: 5px 12px;
  border-radius: var(--border-radius-xs);
  display: flex;
  align-items: center;
}

.shortcuts h2 {
  margin-right: 10px;
  font-size: 16px;
  font-weight: 500;
}

.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shortcut {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-medium);
}

.shortcut-key {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: var(--border-radius-xs);
  font-family: monospace;
  margin-right: 8px;
}

/* ===========================
   Add Stream Form - Modernized
=========================== */
#addStreamForm {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 10px;
}

#addStreamForm input {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius-sm);
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--color-white);
  font-size: 14px;
  width: 220px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-primary);
  letter-spacing: 0.2px;
}

#addStreamForm input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(254, 31, 169, 0.2);
}

#addStreamForm input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

#addStreamForm button {
  background: linear-gradient(135deg, var(--color-secondary), rgba(254, 31, 169, 0.9));
  border: none;
  border-radius: var(--border-radius-sm);
  color: var(--color-white);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.3px;
  padding: 10px 16px;
  box-shadow: var(--shadow-soft);
}

#addStreamForm button:hover {
  background: linear-gradient(135deg, rgba(254, 31, 169, 1), rgba(254, 31, 169, 0.8));
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* ===========================
   Additional Buttons - Modernized
=========================== */
#refreshPageButton,
#removeOfflineStreamsButton,
#swapPreviousStreamButton,
#backUpStreamButton {
  border: none;
  border-radius: var(--border-radius-sm);
  color: var(--color-white);
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.3px;
  box-shadow: var(--shadow-soft);
  font-family: var(--font-display);
}

#refreshPageButton {
  background: linear-gradient(135deg, rgba(0, 133, 204, 0.85), rgba(0, 113, 184, 0.85));
}

#refreshPageButton:hover {
  background: linear-gradient(135deg, rgba(0, 153, 224, 1), rgba(0, 133, 204, 1));
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

#removeOfflineStreamsButton {
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.85), rgba(224, 47, 34, 0.85));
}

#removeOfflineStreamsButton:hover {
  background: linear-gradient(135deg, rgba(255, 77, 64, 1), rgba(244, 67, 54, 1));
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

#swapPreviousStreamButton {
  background: linear-gradient(135deg, rgba(255, 138, 7, 0.85), rgba(235, 118, 0, 0.85));
}

#swapPreviousStreamButton:hover {
  background: linear-gradient(135deg, rgba(255, 158, 27, 1), rgba(255, 138, 7, 1));
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

#backUpStreamButton {
  background: linear-gradient(135deg, rgba(0, 150, 136, 0.85), rgba(0, 130, 116, 0.85));
}

#backUpStreamButton:hover {
  background: linear-gradient(135deg, rgba(0, 170, 156, 1), rgba(0, 150, 136, 1));
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* ===========================
   Container and Streams
=========================== */
.container {
  position: relative;
  height: 100vh;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  grid-auto-rows: minmax(300px, 1fr);
  gap: 2px;
  padding: 2px;
  overflow: hidden;
  box-sizing: border-box;
  transition: margin-left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#streamsGrid {
  align-content: start;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#streamsGrid.overview-fit {
  align-content: start;
  overflow: auto;
}

#streamsGrid.overview-fit.overview-compact {
  align-content: stretch;
  overflow: hidden;
}

body.streams-loading #streamsGrid {
  padding-top: 82px;
}

#streamsGrid.overview-fit > .stream {
  min-width: 0;
  min-height: 0;
  margin: 0;
  aspect-ratio: auto;
}

#streamsGrid.overview-fit .stream-preview {
  padding: clamp(7px, 1vw, 12px);
}

#streamsGrid.overview-fit .stream-preview-play {
  width: clamp(38px, 4vw, 50px);
  height: clamp(38px, 4vw, 50px);
}

#streamsGrid.overview-fit .stream-preview-name {
  font-size: clamp(13px, 1.35vw, 18px);
}

#streamsGrid.overview-fit .stream-preview-label,
#streamsGrid.overview-fit .stream-preview-hint {
  font-size: clamp(9px, 0.85vw, 11px);
}

body.demo-mode {
  overflow: hidden;
}

body.demo-mode #streamsGrid {
  height: 100vh;
  min-height: 0;
  overflow: auto;
}

body.demo-mode #streamsGrid.overview-compact {
  overflow: hidden;
}

.navbar:hover ~ .container,
.navbar.expanded ~ .container {
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
}

.stream {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 16/9;
  margin: auto;
  background-color: rgba(31, 31, 31, 0.6);
  border-radius: var(--border-radius-xs);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: auto;
  opacity: 1;
  transform: scale(1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.1),
    0 0 10px rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  transform: none;
  backface-visibility: hidden;
}

.stream:hover {
  background-color: rgba(31, 31, 31, 0.7);
  box-shadow:
    0 8px 32px 0 rgb(0, 0, 0, 0.5),
    0 0 15px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.offline-message {
  position: absolute;
  top: 50%;
  left: 50%;
  display: none;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.75);
  pointer-events: none;
  z-index: 1;
}

.stream.offline .offline-message {
  display: block;
}

.loading-spinner {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.86);
  background:
    radial-gradient(circle at center, rgba(43, 78, 122, 0.28), transparent 48%),
    #080a0d;
  font-size: clamp(9px, 0.85vw, 12px);
  letter-spacing: 0.02em;
  cursor: progress;
}

.loading-spinner__ring {
  width: clamp(20px, 3vw, 32px);
  height: clamp(20px, 3vw, 32px);
}

.loading-spinner__label {
  max-width: calc(100% - 18px);
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-autoplay-pending .pip-button,
.stream-autoplay-pending .clip-button,
.stream-autoplay-pending .stream-number,
.stream-autoplay-pending .remove-button,
.stream-autoplay-pending .stream-name,
.stream-autoplay-pending .offline-message,
.stream-autoplay-pending .grid-activate-button,
.stream-autoplay-pending .movement-arrows {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Keep the Twitch frame as the only painted child during its visibility
   handshake. The controls return as soon as PLAYING clears the pending state. */
.stream-autoplay-pending > .twitch-card-rail {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.stream-autoplay-pending {
  border: none !important;
  overflow: hidden !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  backface-visibility: visible !important;
}

.stream-preview {
  position: absolute;
  inset: 0;
  /* Keep the preview above the empty direct-player host while the card is
     waiting for the user's first Play click. The host and preview share the
     same stacking level; the preview is appended after the host, while the
     control rails remain above both at z-index: 2. */
  z-index: 1;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 20% 20%, rgba(53, 107, 171, 0.28), transparent 42%),
    #15171b;
  color: #fff;
  padding: 18px;
}

.stream-preview-image,
.stream-preview-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stream-preview-image {
  z-index: -2;
  object-fit: cover;
  opacity: 0.72;
}

.stream-preview-shade {
  z-index: -1;
  background: linear-gradient(180deg, rgba(5, 8, 14, 0.04), rgba(5, 8, 14, 0.92));
}

.stream-preview-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  color: #fff;
  background: rgba(11, 16, 27, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.36), 0 0 0 6px rgba(0, 0, 0, 0.14);
  font: inherit;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.stream-preview-play i {
  margin-left: 3px;
  font-size: 18px;
}

.stream-preview-play:hover:not(:disabled),
.stream-preview-play:focus-visible {
  background: rgba(0, 143, 255, 0.96);
  border-color: #fff;
  outline: 2px solid rgba(255, 255, 255, 0.86);
  outline-offset: 3px;
  transform: translate(-50%, -50%) scale(1.06);
}

.stream-preview-play:focus-visible {
  outline-offset: 5px;
}

.stream-preview-play:disabled {
  cursor: wait;
  opacity: 0.72;
}

.stream.offline .stream-preview-play {
  display: none;
}

.stream-preview-play.is-loading i {
  animation: stream-preview-play-pulse 0.9s ease-in-out infinite alternate;
}

@keyframes stream-preview-play-pulse {
  from { opacity: 0.46; }
  to { opacity: 1; }
}

.stream-preview-label,
.stream-preview-hint {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stream-preview-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(16px, 2vw, 24px);
  line-height: 1.1;
}

.stream-preview-hint {
  letter-spacing: 0.02em;
  text-transform: none;
}

.twitch-player-host {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: transparent;
  overflow: hidden;
}

/* Twitch rejects autoplay when page chrome clips, filters, or overlaps its
   iframe. Direct stream cards therefore reserve two app-control rails and a
   separate, untransformed 640x360-or-larger player surface between them. */
.stream.twitch-stream-card,
.stream.twitch-stream-card:hover {
  display: grid;
  grid-template-columns: minmax(640px, 1fr);
  grid-template-rows: 40px minmax(360px, 1fr) 36px;
  align-items: stretch;
  justify-items: stretch;
  min-width: 640px;
  min-height: 436px;
  aspect-ratio: auto;
  background: #080808;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  opacity: 1 !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
  backface-visibility: visible !important;
}

.stream.twitch-stream-card > .twitch-player-host--direct {
  position: relative !important;
  inset: auto !important;
  grid-column: 1;
  grid-row: 2;
  z-index: 1;
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-width: 400px;
  min-height: 300px;
  margin: 0;
  padding: 0;
  overflow: visible;
  isolation: auto;
  opacity: 1;
  visibility: visible;
  filter: none;
  backdrop-filter: none;
  transform: none;
  clip-path: none;
  /* An empty startup host must not become an invisible click shield over the
     preview. Playback-state selectors below turn this back on for the real
     Twitch iframe and its native recovery controls. */
  pointer-events: none;
}

.stream.twitch-stream-card.stream-playback-staging > .twitch-player-host--direct,
.stream.twitch-stream-card.stream-playback-loading > .twitch-player-host--direct,
.stream.twitch-stream-card.stream-playback-active > .twitch-player-host--direct,
.stream.twitch-stream-card.stream-playback-blocked > .twitch-player-host--direct,
.stream.twitch-stream-card.stream-playback-needs-gesture > .twitch-player-host--direct {
  pointer-events: auto;
}

.stream.twitch-stream-card > .twitch-card-rail {
  position: relative;
  z-index: 2;
  grid-column: 1;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background: #080808;
  filter: none;
  backdrop-filter: none;
  transform: none;
}

.stream.twitch-stream-card > .twitch-card-rail--top {
  grid-row: 1;
  min-height: 40px;
}

.stream.twitch-stream-card > .twitch-card-rail--bottom {
  grid-row: 3;
  min-height: 36px;
}

.twitch-card-rail .stream-name,
.twitch-card-rail .stream-number,
.twitch-card-rail .remove-button,
.twitch-card-rail .pip-button,
.twitch-card-rail .clip-button,
.twitch-card-rail .grid-activate-button {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  max-height: 100%;
  margin: 0;
  border-radius: 0;
  transform: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.twitch-card-rail .stream-name {
  flex: 0 1 auto;
  height: 40px;
  padding-block: 9px;
}

.twitch-card-rail .remove-button {
  margin-left: auto;
}

.twitch-card-rail .clip-button {
  margin-left: auto;
}

.twitch-stream-card > .movement-arrows {
  display: none !important;
}

.twitch-player-host--direct > .offline-message {
  z-index: 3;
  padding: 6px 10px;
  background: rgba(8, 10, 13, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: clamp(9px, 0.8vw, 12px);
}

.stream.twitch-stream-card > .twitch-player-host--direct > iframe.twitch-player,
.stream.twitch-stream-card.stream-playback-staging > .twitch-player-host--direct > iframe.twitch-player,
.stream.twitch-stream-card.stream-playback-loading > .twitch-player-host--direct > iframe.twitch-player {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 400px !important;
  min-height: 300px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  transform: none !important;
  clip-path: none !important;
}

/* Overview tiles must be allowed to shrink with the grid. The larger native
   Twitch startup surface is useful when a player is active, but its 640px
   column floor makes the two control rails overflow a narrow overview tile. */
#streamsGrid.overview-fit > .stream.twitch-stream-card,
#streamsGrid.overview-fit > .stream.twitch-stream-card:hover {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 416px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 28px minmax(360px, 1fr) 28px;
  overflow: hidden !important;
}

#streamsGrid.overview-fit
  > .stream.twitch-stream-card
  > .twitch-card-rail--top,
#streamsGrid.overview-fit
  > .stream.twitch-stream-card
  > .twitch-card-rail--bottom {
  height: 28px;
  min-height: 28px;
}

#streamsGrid.overview-fit
  > .stream.twitch-stream-card
  > .twitch-card-rail--top
  .stream-name {
  height: 28px;
  padding-block: 4px;
}

#streamsGrid.overview-fit
  > .stream.twitch-stream-card
  > .twitch-card-rail,
#streamsGrid.overview-fit
  > .stream.twitch-stream-card
  > .twitch-player-host--direct {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
}

#streamsGrid.overview-fit
  > .stream.twitch-stream-card
  > .twitch-player-host--direct {
  min-height: 360px;
}

.twitch-direct-video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  object-fit: contain;
}

/* At large roster sizes, isolate each tile so video paints do not invalidate
   neighboring cards. Every player remains mounted and playing. */
#streamsGrid[data-playback-profile="large-roster"] .stream.twitch-stream-card {
  contain: layout paint style;
  transition: none;
}

/* Direct HLS playback no longer needs Twitch's 400x300 iframe startup floor.
   Once the first stream settles, every card can share the available viewport
   and the video itself letterboxes inside the remaining 16:9 surface. */
#streamsGrid.overview-fit.overview-compact
  > .stream.twitch-stream-card,
#streamsGrid.overview-fit.overview-compact
  > .stream.twitch-stream-card:hover {
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows:
    var(--overview-rail-height, 22px)
    minmax(0, 1fr)
    var(--overview-rail-height, 22px);
  overflow: hidden !important;
}

#streamsGrid.overview-fit.overview-compact
  > .stream.twitch-stream-card
  > .twitch-card-rail--top,
#streamsGrid.overview-fit.overview-compact
  > .stream.twitch-stream-card
  > .twitch-card-rail--bottom {
  height: var(--overview-rail-height, 22px);
  min-height: 0;
}

#streamsGrid.overview-fit.overview-compact
  > .stream.twitch-stream-card
  > .twitch-card-rail--top
  .stream-name {
  height: var(--overview-rail-height, 22px);
  padding-block: 2px;
  font-size: clamp(9px, 0.75vw, 12px);
}

#streamsGrid.overview-fit.overview-compact
  > .stream.twitch-stream-card
  > .twitch-player-host--direct {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

#streamsGrid.overview-fit.overview-compact
  > .stream.twitch-stream-card
  > .twitch-player-host--direct
  > iframe.twitch-player {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

#streamsGrid.overview-fit.overview-compact .twitch-card-rail button {
  min-height: 0;
  padding: 2px 6px;
  font-size: clamp(8px, 0.65vw, 10px);
}

#streamsGrid.overview-fit
  > .stream.twitch-stream-card
  > .twitch-player-host--direct
  > iframe.twitch-player {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

/* Twitch requires a visible 400x300 interactive player for autoplay. The
   dedicated host above stays larger than that floor throughout startup. */
.stream.stream-playback-staging {
  transform: none !important;
}

.stream-playback-loading .stream-preview,
.stream-playback-active .stream-preview,
.stream-playback-blocked .stream-preview {
  z-index: 0;
  display: flex;
  opacity: 0;
  filter: none;
  transform: none;
  pointer-events: none;
}

/* When Twitch leaves its native Play control visible, do not put a blurred
   thumbnail underneath it. The native frame is the actionable fallback. */
.stream-playback-needs-gesture .stream-preview {
  display: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.stream-playback-loading .stream-preview-play,
.stream-playback-active .stream-preview-play,
.stream-playback-blocked .stream-preview-play,
.stream-playback-loading .stream-preview-label,
.stream-playback-active .stream-preview-label,
.stream-playback-needs-gesture .stream-preview-label,
.stream-playback-blocked .stream-preview-label,
.stream-playback-loading .stream-preview-name,
.stream-playback-active .stream-preview-name,
.stream-playback-needs-gesture .stream-preview-name,
.stream-playback-blocked .stream-preview-name,
.stream-playback-loading .stream-preview-hint,
.stream-playback-active .stream-preview-hint,
.stream-playback-blocked .stream-preview-hint {
  visibility: hidden;
}

.stream iframe,
.stream .player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

/* Playing frames fill their cards without transforms. Startup selectors below
   temporarily hold Twitch's documented 400x300 interactive minimum. */
.stream iframe.twitch-player {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  top: auto !important;
  left: auto !important;
  margin: 0 !important;
  transform: none !important;
  transform-origin: top left !important;
}

.stream.stream-playback-staging iframe.twitch-player,
.stream.stream-playback-loading iframe.twitch-player {
  width: 400px !important;
  height: 300px !important;
}

/* ===========================
   Common Buttons
=========================== */
.pip-close-button,
.close-button {
  position: absolute;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  width: 24px;
  height: 24px;
  top: 2%;
  right: 1%;
}

.pip-close-button:hover,
.close-button:hover {
  background: rgba(255, 255, 255, 0.8);
  color: #000;
}

.close-button {
  display: none;
}

/* ===========================
   Stream Titles - Modernized
=========================== */
.stream-name {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.85));
  color: var(--color-white);
  padding: 10px 14px;
  border-radius: 0 0 var(--border-radius-sm) 0;
  font-size: 15px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  box-shadow: var(--shadow-soft);
  z-index: 22;
  cursor: pointer;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-display);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.stream-name:hover {
  background: linear-gradient(135deg, rgba(0, 168, 3, 0.95), rgba(0, 168, 3, 0.85));
  transform: scale(1.05);
  padding: 11px 18px;
  max-width: 280px;
  box-shadow: var(--shadow-medium);
  letter-spacing: 0.4px;
}

.stream-name:active {
  transform: scale(1.02) translateX(2px);
}

.stream-name.active {
  background: linear-gradient(135deg, rgba(255, 50, 50, 0.95), rgba(255, 80, 80, 0.85));
  box-shadow:
    var(--shadow-medium),
    0 0 15px rgba(255, 50, 50, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.stream-name.active::before {
  content: "●";
  margin-right: 6px;
  color: #ff4444;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===========================
   Action Buttons - Modernized
=========================== */
.pip-button,
.clip-button,
.stream-number {
  position: absolute;
  font-size: var(--font-size-medium);
  font-weight: 500;
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.85);
  color: var(--color-white);
  text-transform: none;
  letter-spacing: 0.3px;
  display: none;
  pointer-events: none;
  opacity: 0;
  font-family: var(--font-display);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
}

.pip-button:hover,
.clip-button:hover,
.stream-number:hover {
  background-color: rgba(0, 0, 0, 0.95);
  transform: scale(1.08);
  box-shadow: var(--shadow-medium);
}

.pip-button {
  bottom: 0;
  left: 0;
  border-radius: 0 var(--border-radius-sm) 0 0;
  background: linear-gradient(135deg, rgb(0, 160, 168), rgb(0, 140, 148));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transform-origin: bottom left;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pip-button:hover {
  background: linear-gradient(135deg, rgb(41, 221, 229), rgb(21, 201, 209));
  transform: scale(1.05) translateY(-2px);
  padding: 8px 14px;
  box-shadow: var(--shadow-medium);
}

.pip-button.active-pip {
  background: linear-gradient(135deg, #ff3333, #ff5555);
  box-shadow: 0 3px 8px rgba(255, 51, 51, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.pip-button.active-pip::before {
  content: "🔴 LIVE";
  margin-right: 4px;
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.clip-button {
  bottom: 0;
  right: 0;
  border-radius: var(--border-radius-sm) 0 0 0;
  background: linear-gradient(135deg, rgb(80, 0, 199), rgb(60, 0, 179));
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transform-origin: bottom right;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.clip-button:hover {
  background: linear-gradient(135deg, rgb(119, 44, 232), rgb(99, 24, 212));
  transform: scale(1.05) translateY(-2px);
  padding: 8px 14px;
  box-shadow: var(--shadow-medium);
}

.stream-number {
  display: none !important;
}

.stream-number::before {
  content: "⚪";
  margin-right: 3px;
  font-size: 16px;
}

.stream-number:hover {
  background-color: rgb(0, 168, 3, 0.6);
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.stream-number:active {
  transform: translateX(-50%) scale(0.95);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.stream-number.active {
  background: linear-gradient(135deg, #ff3333, #ff5555);
  box-shadow: 0 3px 8px rgba(255, 51, 51, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-weight: 700;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.stream-number.active::before {
  content: "🔴";
  margin-right: 4px;
  font-size: 16px;
}

.stream:not(.inactive) .stream-name,
.stream:not(.inactive) .stream-number {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: none !important;
}

.stream.no-hover:hover .stream-name,
.stream.no-hover:hover .stream-number {
  opacity: 0 !important;
  visibility: hidden !important;
}

.stream:hover .stream-name,
.stream:hover .stream-number {
  opacity: 1;
  visibility: visible;
}

/* ===========================
   Notification and Shortcuts Consolidation
=========================== */
/* Previously duplicated sections have been merged above */

/* ===========================
   Grid Activate Button
=========================== */
.grid-activate-button {
  position: absolute;
  bottom: 1%;
  background-color: rgb(26, 26, 26, 0.9);
  color: var(--color-white);
  padding: 6px 12px;
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-medium);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 1;
  display: none;
  pointer-events: auto;
  border: 2px solid rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 3;
}

body:not(.popup-mode) .grid-activate-button {
  display: block !important;
  opacity: 1;
  pointer-events: auto;
}

.grid-activate-button:hover {
  background-color: rgb(0, 168, 11, 0.9);
  transform: scale(1.05);
  box-shadow: 0 0 10px rgb(0, 0, 0, 0.5);
}

.stream.grid-active .grid-activate-button {
  background-color: rgb(0, 148, 0, 0.9);
}

.stream.grid-active .grid-activate-button:hover {
  background-color: rgba(204, 0, 0, 0.9);
}

/* ===========================
   Stream Number Activation with PIP
=========================== */
body:not(.popup-mode) .stream-name,
body:not(.popup-mode) .pip-button,
body:not(.popup-mode) .clip-button,
body:not(.popup-mode) .stream-number {
  display: none;
  pointer-events: none;
  opacity: 0;
}

body:not(.popup-mode) .stream:hover .stream-name {
  display: block;
  pointer-events: auto;
  opacity: 1;
  transform: translateX(-50%) scale(1.1);
  transition: all 0.3s ease;
}

body.popup-mode .stream-name,
body.popup-mode .pip-button,
body.popup-mode .clip-button,
body.popup-mode .stream-number {
  display: block;
  pointer-events: auto;
  opacity: 1;
}

/* ===========================
   Notification and Shortcuts Consolidation
=========================== */
/* Previously duplicated sections have been merged above */

/* ===========================
   Tutorial Active Styles
=========================== */

/* Update tutorial overlay styles */
#tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  pointer-events: none;
}

.tutorial-content {
  position: fixed; /* Change to fixed positioning */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(31, 31, 31, 0.95);
  padding: 30px;
  border-radius: var(--border-radius-sm);
  max-width: 450px;
  width: 90%;
  text-align: left;
  color: var(--color-white);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  z-index: 10001; /* Ensure it's above the overlay */
}

/* Keep only the necessary tutorial-active styles */
body.tutorial-active .navbar {
  width: var(--navbar-expanded-width);
}

body.tutorial-active .nav-buttons {
  opacity: 1;
  visibility: visible;
}

/* Grid Mode Active Stream Layout */
.container.has-active-stream {
  display: grid;
  grid-template-rows: 60% 40%;
  width: 100%;
  height: 100vh;
  gap: 2px;
  padding: 2px;
  box-sizing: border-box;
  overflow: auto;
}

/* Active stream container */
.container.has-active-stream .stream.grid-active {
  grid-row: 1;
  grid-column: 1 / -1;
  width: 100%;
  height: 100%;
  min-width: 400px;
  min-height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Add this to prevent overflow */
}

/* Bottom grid container for inactive streams */
.container.has-active-stream .inactive-streams-container {
  grid-row: 2;
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  grid-auto-rows: minmax(300px, 1fr);
  gap: 2px;
  overflow: auto;
}

/* Inactive stream items */
.container.has-active-stream .stream:not(.grid-active) {
  width: 100%;
  height: 100%;
  aspect-ratio: 16/9;
  min-width: 400px;
  min-height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Add this to prevent overflow */
}

/* Ensure proper iframe sizing */
.stream iframe,
.stream .player {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 16/9;
  object-fit: contain; /* Add this to maintain aspect ratio */
}

/* Update highlight effect */
.highlight {
  position: relative;
  z-index: 9999;
  animation: tutorialPulse 0.75s infinite alternate;
  pointer-events: auto;
}

@keyframes tutorialPulse {
  from {
    box-shadow:
      0 0 0 4px rgba(255, 0, 0, 0.8),
      0 0 20px rgba(128, 0, 0, 0.4);
  }
  to {
    box-shadow:
      0 0 0 8px rgba(255, 0, 0, 1),
      0 0 40px rgba(255, 0, 0, 0.6);
  }
}

/* Add these new styles */
.coming-soon-button {
  position: relative;
  cursor: not-allowed !important;
}

.coming-soon-button::after {
  content: "Coming Soon";
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-warning);
  color: var(--color-white);
  padding: 4px 8px;
  border-radius: var(--border-radius-xs);
  font-size: var(--font-size-small);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.coming-soon-button:hover::after {
  opacity: 1;
}

.coming-soon-button.nav-button {
  opacity: 0.5;
  background-color: var(--color-gray-dark);
}

.coming-soon-button.nav-button:hover {
  transform: none;
  background-color: var(--color-gray-dark);
}

/* Stream Movement Arrows - Modernized */
.move-arrow {
  position: absolute;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
  color: var(--color-white);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 18px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  opacity: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

/* Modern arrow icons using unicode */
.move-arrow::before {
  font-family: var(--font-primary);
  font-weight: 700;
}

.move-up::before {
  content: "↑";
}

.move-down::before {
  content: "↓";
}

.move-left::before {
  content: "←";
}

.move-right::before {
  content: "→";
}

.stream:hover .move-arrow {
  opacity: 0.8;
}

.move-arrow:hover {
  background: linear-gradient(135deg, var(--color-primary), rgba(0, 0, 204, 0.9));
  opacity: 1;
  transform: scale(1.15);
  box-shadow: var(--shadow-medium);
  border-color: rgba(255, 255, 255, 0.3);
}

.move-arrow:active {
  transform: scale(1);
  background: linear-gradient(135deg, var(--color-primary), rgba(0, 0, 204, 0.7));
}

/* Arrow Positions - Cleaner positioning */
.move-up {
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
}

.move-down {
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
}

.move-left {
  left: 15%;
  top: 50%;
  transform: translateY(-50%);
}

.move-right {
  right: 15%;
  top: 50%;
  transform: translateY(-50%);
}

/* Hover transforms */
.move-up:hover {
  transform: translateX(-50%) scale(1.15);
}

.move-down:hover {
  transform: translateX(-50%) scale(1.15);
}

.move-left:hover {
  transform: translateY(-50%) scale(1.15);
}

.move-right:hover {
  transform: translateY(-50%) scale(1.15);
}

/* Active transforms */
.move-up:active {
  transform: translateX(-50%) scale(1);
}

.move-down:active {
  transform: translateX(-50%) scale(1);
}

.move-left:active {
  transform: translateY(-50%) scale(1);
}

.move-right:active {
  transform: translateY(-50%) scale(1);
}

/* Add active state for stream name when in live window */
.stream.active .stream-name {
  background-color: rgb(0, 184, 0); /* Solid green color for active state */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.stream.active .stream-name:hover {
  background-color: rgb(0, 200, 0); /* Slightly lighter green on hover while active */
  transform: scale(1.02);
}

/* Update common button styles */
.pip-button,
.clip-button,
.remove-button {
    position: absolute;
    padding: 6px 6px;
    border-radius: 0;
    font-size: var(--font-size-m);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    color: var(--color-white);
    z-index: 3;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Position PIP button in bottom left corner */
.pip-button {
    bottom: 0;
    left: 0;
    border-radius: 0 var(--border-radius-xs) 0 0;
    background-color: rgb(0, 160, 168);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform-origin: bottom left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pip-button:hover {
    background-color: rgb(0, 184, 0);
    transform: scale(1.2);
    padding: 8px 12px;
    box-shadow: 2px -2px 8px rgba(0, 0, 0, 0.3);
}

/* Position Clip button in bottom right corner */
.clip-button {
    bottom: 0;
    right: 0;
    border-radius: var(--border-radius-xs) 0 0 0;
    background-color: rgb(80, 0, 199);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.clip-button:hover {
    background-color: rgb(119, 44, 232);
    transform: scale(1.2);
    padding: 8px 12px;
    box-shadow: -2px -2px 8px rgba(0, 0, 0, 0.3);
}

/* Position Remove button in top right corner */
.remove-button {
    top: 0;
    right: 0;
    border-radius: 0 0 0 var(--border-radius-xs);
    background-color: rgb(128, 0, 0);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: auto;
    height: auto;
}

.remove-button:hover {
    background-color: rgb(255, 0, 0);
    transform: scale(1.2);
    padding: 8px 8px;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.3);
}

/* Shortcuts Dropdown Styling */
#shortcutsDropdown {
  position: absolute;
  top: 50px;
  right: 0;
  width: 350px;
  max-height: 80vh;
  overflow-y: auto;
  background-color: var(--color-gray-dark);
  border: 1px solid var(--color-secondary);
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  padding: 15px;
  z-index: 1000;
  display: none;
}

#shortcutsDropdown h2 {
  color: var(--color-secondary);
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

#shortcutsDropdown h3 {
  color: var(--color-white);
  font-size: 15px;
  margin-bottom: 5px;
  border-left: 3px solid var(--color-secondary);
  padding-left: 8px;
}

.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shortcut {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--border-radius-sm);
  transition: background-color 0.2s;
}

.shortcut:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.shortcut-key {
  display: inline-block;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  margin-right: 10px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.shortcut-note {
  color: rgba(255, 255, 255, 0.6);
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  padding: 8px;
  margin-top: 15px;
  font-size: 12px;
}

/* Scrollbar Styles for Dropdowns - Modernized */
.shortcuts-dropdown::-webkit-scrollbar,
.dropdown-content::-webkit-scrollbar,
.nav-buttons::-webkit-scrollbar {
  width: 10px;
}

.shortcuts-dropdown::-webkit-scrollbar-track,
.dropdown-content::-webkit-scrollbar-track,
.nav-buttons::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
}

.shortcuts-dropdown::-webkit-scrollbar-thumb,
.dropdown-content::-webkit-scrollbar-thumb,
.nav-buttons::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.15));
  border-radius: 5px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.shortcuts-dropdown::-webkit-scrollbar-thumb:hover,
.dropdown-content::-webkit-scrollbar-thumb:hover,
.nav-buttons::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.25));
}

/* Global scrollbar styling */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--color-background);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.1));
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.2));
}

::-webkit-scrollbar-corner {
  background: var(--color-background);
}

/* Simplified Active Stream Aesthetics */
.stream.active {
  position: relative;
  border: 3px solid #ff3333;
  background: linear-gradient(135deg, rgba(255, 51, 51, 0.1), rgba(255, 51, 51, 0.05));
  box-shadow:
    0 0 15px rgba(255, 51, 51, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.2);
  transform: scale(1.01);
  transition: all 0.3s ease;
}

.stream-name.active {
  background: linear-gradient(135deg, #ff3333, #ff5555);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stream-name.active::before {
  content: "🔴 LIVE";
  margin-right: 8px;
  font-size: 12px;
  font-weight: 700;
}

.stream-number.active {
  background: linear-gradient(135deg, #ff3333, #ff5555);
  box-shadow: 0 3px 8px rgba(255, 51, 51, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-weight: 700;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.stream-number.active::before {
  content: "🔴";
  margin-right: 4px;
  font-size: 16px;
}

/* Simplified PIP Button for Active Streams */
.stream.active .pip-button.active-pip {
  background: linear-gradient(135deg, #ff3333, #ff5555);
  box-shadow: 0 3px 8px rgba(255, 51, 51, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.stream.active .pip-button.active-pip::before {
  content: "🔴 LIVE";
  margin-right: 4px;
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Enhanced navigation buttons */
.nav-button {
  width: 100%;
  padding: 14px 20px;
  margin: 5px 0;
  border: none;
  border-radius: var(--border-radius-sm);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.05));
  color: var(--color-white);
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  position: relative;
  overflow: hidden;
  font-family: var(--font-display);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent);
  transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-button:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    var(--shadow-medium),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.nav-button:hover::before {
  left: 100%;
}

.nav-button:active {
  transform: translateY(0);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.demo-mode-nav-button {
  flex: 0 0 auto;
  color: var(--color-white);
  background: linear-gradient(135deg, rgba(254, 31, 169, 0.86), rgba(188, 31, 132, 0.86));
  border-color: rgba(255, 255, 255, 0.28);
  font-weight: 700;
  text-decoration: none;
}

.demo-mode-nav-button:hover {
  background: linear-gradient(135deg, rgba(254, 31, 169, 0.98), rgba(210, 34, 148, 0.98));
  border-color: rgba(255, 255, 255, 0.52);
}

.demo-mode-nav-button:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

.demo-mode-nav-button[hidden] {
  display: none;
}

/* Window Controls Button */
#windowControlsButton {
  position: relative;
  font-family: var(--font-display);
}

#windowControlsButton.active {
  background: linear-gradient(135deg, #5cb85c, #4cae4c);
  box-shadow: var(--shadow-soft);
}

#windowControlsButton.active:hover {
  background: linear-gradient(135deg, #6cc86c, #5cb85c);
  box-shadow: var(--shadow-medium);
}

#windowControlsButton:not(.active) {
  background: linear-gradient(135deg, #d9534f, #c9302c);
  box-shadow: var(--shadow-soft);
}

#windowControlsButton:not(.active):hover {
  background: linear-gradient(135deg, #e9635f, #d9534f);
  box-shadow: var(--shadow-medium);
}

/* Enhanced Navbar Header */
.navbar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.navbar.menu-collapsed .navbar-header,
.navbar.menu-collapsed:hover .navbar-header {
  min-height: 80px;
  padding: 35px 5px 12px;
}

.navbar.menu-collapsed .logo,
.navbar.menu-collapsed:hover .logo {
  width: 32px;
  height: 32px;
  transform: none;
}

.navbar.menu-collapsed .vertical-title,
.navbar.menu-collapsed:hover .vertical-title {
  display: none;
}

#menuToggleButton {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease, border-color 0.2s ease;
}

#menuToggleButton:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
}

#menuToggleButton:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

#menuToggleButton i {
  transition: transform 0.25s ease;
}

@media (max-width: 600px) {
  body {
    grid-template-columns: var(--navbar-collapsed-width) minmax(0, 1fr);
  }

  .navbar {
    grid-column: 1;
    grid-row: 1;
  }

  .navbar.expanded,
  .navbar:hover {
    position: fixed;
    top: 0;
    left: 0;
    max-width: calc(100vw - 24px);
  }

  .navbar.menu-collapsed,
  .navbar.menu-collapsed:hover {
    position: relative;
    top: auto;
    left: auto;
    max-width: none;
  }

  .container,
  .navbar:hover ~ .container,
  .navbar.expanded ~ .container {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: auto;
    align-content: start;
    width: 100% !important;
    height: 100dvh !important;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .stream {
    width: 100% !important;
    height: auto !important;
    min-width: 0;
    min-height: 0;
    margin: 0;
    aspect-ratio: 16 / 9;
  }

  .stream.stream-playback-staging {
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }

  #streamsGrid.overview-compact > .stream {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto;
  }

  .stream iframe.twitch-player {
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
  }

}

/* ========================================================================
   Active navigation first-paint contract

   The complete component styling is refined in ControlCenter-modular.css,
   but these structural rules intentionally live at the end of the first
   local stylesheet too. They prevent the legacy rail/header definitions
   above from appearing while the larger stylesheet and brand artwork load.
   ======================================================================== */
:root {
  --left-nav-expanded-width: 380px;
  --left-nav-collapsed-width: 68px;
  --left-rail-gutter: 20px;
}

body.left-nav-layout {
  grid-template-columns: var(--left-nav-collapsed-width) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

body.left-nav-layout.menu-open {
  grid-template-columns: var(--left-nav-expanded-width) minmax(0, 1fr);
}

body.left-nav-layout .navbar,
body.left-nav-layout .navbar:hover,
body.left-nav-layout .navbar.menu-collapsed,
body.left-nav-layout .navbar.menu-collapsed:hover {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  width: var(--left-nav-collapsed-width);
  max-width: none;
  height: 100dvh;
  min-height: 0;
  padding: 0;
  align-items: stretch;
  overflow: hidden;
  border: 0;
  border-right: 1px solid rgba(198, 192, 188, 0.34);
  border-radius: 0;
  background: #0b0b0d;
  box-shadow: 10px 0 28px rgba(0, 0, 0, 0.28);
}

body.left-nav-layout .navbar.expanded,
body.left-nav-layout .navbar.expanded:hover {
  width: var(--left-nav-expanded-width);
  max-width: none;
  height: 100dvh;
  padding: 0;
  align-items: stretch;
  overflow: hidden;
  border: 0;
  border-right: 1px solid rgba(198, 192, 188, 0.34);
  background: #0b0b0d;
  box-shadow: 10px 0 28px rgba(0, 0, 0, 0.28);
}

body.left-nav-layout .navbar-header,
body.left-nav-layout .navbar.menu-collapsed .navbar-header,
body.left-nav-layout .navbar.menu-collapsed:hover .navbar-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 42px;
  flex: 0 0 72px;
  width: 100%;
  min-height: 72px;
  height: 72px;
  margin: 0;
  padding: 12px var(--left-rail-gutter);
  gap: 12px;
  align-items: center;
  justify-content: initial;
  border: 0;
  border-bottom: 1px solid rgba(198, 192, 188, 0.15);
}

body.left-nav-layout .control-center-logo-image {
  display: block;
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  align-self: center;
  width: 48px;
  height: 56px;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
}

body.left-nav-layout .control-center-title {
  display: block;
  min-width: 0;
  width: auto;
  height: auto;
  margin: 0;
  overflow: hidden;
  color: #f5f2ef;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.05;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.left-nav-layout #menuToggleButton,
body.left-nav-layout .navbar.menu-collapsed #menuToggleButton,
body.left-nav-layout .navbar.menu-collapsed:hover #menuToggleButton {
  position: static;
  justify-self: end;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(198, 192, 188, 0.38);
  border-radius: 10px;
  background: #18181a;
  color: #f5f2ef;
}

body.left-nav-layout .collapsed-rail-title,
body.left-nav-layout .collapsed-rail-travel-light,
body.left-nav-layout .collapsed-rail-shimmer,
body.left-nav-layout .vertical-title {
  display: none;
}

body.left-nav-layout .nav-buttons,
body.left-nav-layout .navbar.expanded .nav-buttons,
body.left-nav-layout .navbar:hover .nav-buttons {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  gap: 12px !important;
  padding: 13px var(--left-rail-gutter) 18px !important;
  overflow-x: hidden;
  overflow-y: auto !important;
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  scrollbar-color: #5d5a5b #0a0a0c;
  scrollbar-width: thin;
}

@media (max-height: 940px) {
  body.left-nav-layout .navbar-header {
    flex-basis: 64px;
    min-height: 64px;
    height: 64px;
    padding-block: 10px;
  }

  body.left-nav-layout .nav-buttons,
  body.left-nav-layout .navbar.expanded .nav-buttons,
  body.left-nav-layout .navbar:hover .nav-buttons {
    gap: 8px !important;
    padding-block: 10px 12px !important;
  }
}

@media (max-height: 820px) {
  body.left-nav-layout .navbar-header {
    flex-basis: 58px;
    min-height: 58px;
    height: 58px;
    padding-block: 7px;
  }

  body.left-nav-layout .nav-buttons,
  body.left-nav-layout .navbar.expanded .nav-buttons,
  body.left-nav-layout .navbar:hover .nav-buttons {
    gap: 4px !important;
    padding-block: 4px !important;
  }
}
