:root {
  color-scheme: dark;
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --theme-color: hsl(142, 72%, 58%);
  --theme-color-rgb: 74, 222, 128;
  
  --bg-deep: hsl(220, 30%, 4%);
  --bg-panel: rgba(15, 23, 42, 0.45);
  --sidebar-glass: rgba(5, 10, 20, 0.18);
  --border-light: rgba(255, 255, 255, 0.08);
  --text-primary: hsl(210, 40%, 98%);
  --text-muted: hsl(215, 20%, 65%);
  
  --status-online: #4ade80;
  --status-offline: #94a3b8;
  --status-maintenance: #f59e0b;
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Ambient Background Glow */
.ambient-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120vmax;
  height: 120vmax;
  background: radial-gradient(
    circle,
    rgba(var(--theme-color-rgb), 0.035) 0%,
    rgba(15, 23, 42, 0) 70%
  );
  z-index: 0;
  pointer-events: none;
  transition: background 1s ease;
}

/* Homepage Wrapper */
.homepage-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding: 1.5rem 0 0 0;
  box-sizing: border-box;
  overflow: hidden;
}

/* Header */
.homepage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 2.5rem;
  padding-right: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0;
  flex: 0 0 auto;
  transition: padding 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo-dot {
  width: 8px;
  height: 8px;
  background-color: var(--theme-color);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--theme-color);
  transition: all 0.5s ease;
}

.logo-text {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  color: var(--text-primary);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--theme-color);
  box-shadow: 0 0 8px var(--theme-color);
  animation: pulse 2s infinite ease-in-out;
  transition: all 0.5s ease;
}

.status-label {
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
}

.guest-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-cms {
  color: var(--color-accent);
  text-decoration: none;
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  border: 1px solid rgba(var(--color-accent-rgb), 0.25);
  background: rgba(var(--color-accent-rgb), 0.05);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.btn-cms:hover {
  background: rgba(var(--color-accent-rgb), 0.12);
  border-color: var(--color-accent);
}

/* Workspace */
.workspace {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.btn-toggle-details {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 3;
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  outline: none;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease,
    background-color 0.25s ease, border-color 0.25s ease;
}

.btn-toggle-details:hover {
  border-color: rgba(var(--theme-color-rgb), 0.5);
  background: rgba(var(--theme-color-rgb), 0.16);
  color: var(--theme-color);
}

.btn-toggle-details:active {
  transform: scale(0.95);
}

.btn-toggle-details.active {
  background: rgba(74, 222, 128, 0.2);
  border-color: rgba(74, 222, 128, 0.4);
  color: var(--theme-color);
  box-shadow: 0 4px 15px rgba(74, 222, 128, 0.15);
}

.details-section:not(.closed) ~ .btn-toggle-details {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

.details-section.closed ~ .btn-toggle-details {
  display: flex !important;
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  .homepage-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .homepage-header {
    margin-bottom: 0 !important; /* Touch header line */
    padding-left: 2.5rem !important;
    padding-right: 2.5rem !important;
  }

  .workspace {
    flex-direction: row;
    overflow: hidden;
    position: relative;
  }
  
  .control-grid-section {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    flex-basis: auto !important;
    max-width: none !important;
    z-index: 102 !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    background: rgba(5, 10, 20, 0.88) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-right: 1px solid var(--border-light) !important;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
    transform: translateX(0);
    opacity: 1;
    height: 100% !important;
    display: flex !important;
    padding: 1.25rem 1rem 0 !important;
    box-sizing: border-box !important;
  }
  
  .control-grid-section.closed {
    transform: translateX(-100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 100% !important;
    flex-basis: auto !important;
    max-width: none !important;
    display: flex !important;
  }
  
  .nodes-grid {
    padding-bottom: 9rem !important; /* Leave room for floating vertical stack of toggle buttons */
  }
  
  /* Toggle Fleet Button */
  .btn-toggle-fleet {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    z-index: 103 !important; /* Above mobile drawer (102) */
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    padding: 0;
    outline: none;
  }
  
  .btn-toggle-fleet:active {
    transform: scale(0.95);
  }
  
  .hamburger-line {
    width: 18px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  }
  
  .btn-toggle-fleet.active .line-1 {
    transform: translateY(6px) rotate(45deg);
  }
  
  .btn-toggle-fleet.active .line-2 {
    opacity: 0;
    transform: scaleX(0);
  }
  
  .btn-toggle-fleet.active .line-3 {
    transform: translateY(-6px) rotate(-45deg);
  }
  
  .btn-toggle-fleet.active {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.15) !important;
  }
  
  .btn-toggle-fleet.active .hamburger-line {
    background-color: #ef4444 !important;
  }

  /* Toggle Details Button */
  .btn-toggle-details {
    bottom: 5.25rem;
    z-index: 101 !important; /* Under control-grid-section (102) to hide when fleet list is open */
  }

  .control-grid-section:not(.closed) ~ .btn-toggle-details,
  .details-section:not(.closed) ~ .btn-toggle-details,
  .details-section:not(.closed) ~ .btn-toggle-fleet {
    display: none !important;
  }
  
  /* Globe section has default full width */
  
  .details-section {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    flex-basis: auto !important;
    z-index: 104 !important; /* Above the buttons (103 and 101) so it covers them when open */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-right: 0 !important;
    background: rgba(5, 10, 20, 0.88) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: translateX(0) !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
      opacity 0.3s ease, visibility 0s linear !important;
    padding: 0 !important;
    box-sizing: border-box;
    overflow: hidden !important;
  }
  
  .details-section.closed {
    transform: translateX(100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
      opacity 0.3s ease, visibility 0s linear 0.4s !important;
  }

  .details-section .pipeline-card {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-width: none !important;
    background: transparent !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-sizing: border-box;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem 1.25rem !important;
  }

  .btn-close-profile {
    display: flex !important;
    position: absolute !important;
    top: 1rem !important;
    right: 1.25rem !important;
    margin: 0 !important;
  }
}

@media (max-width: 768px) {
  .homepage-wrapper {
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .homepage-header {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    row-gap: 0.75rem !important;
    align-items: center !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    margin-bottom: 0 !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
  
  .header-center {
    display: none;
  }
  
  .header-right {
    display: contents !important;
  }
  
  #guest-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    display: flex;
    gap: 0 !important;
    align-items: center;
  }
  
  #guest-actions .btn-cms {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
  }
  
  #guest-actions a:not(:last-child)::after {
    content: "|";
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    color: var(--text-muted);
    opacity: 0.4;
    pointer-events: none;
  }
  
  .header-actions {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-self: end;
    width: auto;
  }

  .homepage-header.signed-out-header {
    padding-top: 2.1rem !important;
    padding-bottom: 2.1rem !important;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 1.1rem;
  }
  
  .pipeline-card {
    padding: 1.5rem 1.25rem;
  }
  
  .nodes-grid {
    grid-template-columns: 1fr; /* Stack node cards cleanly */
  }
}

/* Control Grid Section */
.control-grid-section {
  display: flex;
  flex-direction: column;
  width: 320px;
  flex: 0 0 320px;
  height: 100%;
  margin: 0;
  padding: 1.25rem 1rem 1rem;
  overflow: hidden;
  position: relative;
  z-index: 2;
  background: var(--sidebar-glass);
  border-right: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.section-title {
  margin-bottom: 0.8rem;
  padding: 0 0.15rem 0.7rem;
}

.section-title h2 {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
}

/* Nodes Grid */
.nodes-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
  overflow-y: auto;
  padding-right: 0.25rem;
  padding-bottom: 1rem;
  align-content: stretch;
}

.registry-smart-group {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.registry-smart-group:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.registry-smart-group > summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.15rem;
  cursor: pointer;
  list-style: none;
}

.registry-smart-group > summary::-webkit-details-marker {
  display: none;
}

.registry-smart-group > summary::before {
  content: '+';
  flex: 0 0 auto;
  color: var(--theme-color);
  font-family: monospace;
  font-size: 0.9rem;
}

.registry-smart-group[open] > summary::before {
  content: '-';
}

.registry-smart-group > summary strong {
  min-width: 0;
  flex: 1;
  color: var(--text-primary);
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.registry-smart-group-count {
  min-width: 1.75rem;
  padding: 0.18rem 0.35rem;
  border: 1px solid rgba(var(--theme-color-rgb), 0.28);
  border-radius: 3px;
  color: var(--theme-color);
  font-family: monospace;
  font-size: 0.58rem;
  text-align: center;
}

.registry-smart-group-cards {
  display: grid;
  gap: 0.4rem;
  padding: 0.15rem 0 0.65rem;
}

.nodes-grid::-webkit-scrollbar {
  width: 6px;
}
.nodes-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
}
.nodes-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
.nodes-grid::-webkit-scrollbar-thumb:hover {
  background: var(--theme-color);
}

.loading-status {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Node Card */
.node-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 0.72rem 0.8rem;
  cursor: pointer;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.2s ease, background-color 0.2s ease,
    box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.node-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(19, 29, 51, 0.94);
}

.node-card.active {
  border-color: var(--theme-color);
  box-shadow: inset 3px 0 0 var(--theme-color),
    0 0 15px rgba(var(--theme-color-rgb), 0.08);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.card-title-line,
.player-node-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.45rem;
}

.card-title-group {
  min-width: 0;
}

.card-title-group h3 {
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 0.12rem;
  overflow-wrap: anywhere;
}

.card-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.card-status-dot.online {
  background-color: var(--status-online);
  box-shadow: 0 0 8px var(--status-online);
}

.card-status-dot.offline {
  background-color: var(--status-offline);
}

.card-status-dot.maintenance {
  background-color: var(--status-maintenance);
  box-shadow: 0 0 8px var(--status-maintenance);
}

/* Details Section (Right) - Slide-out Drawer */
.details-section {
  position: absolute;
  top: 1.5rem;
  right: 2.5rem;
  width: 380px;
  height: fit-content;
  min-height: 0;
  max-height: calc(100% - 3rem);
  margin: 0;
  transition: opacity 140ms ease, visibility 0s linear;
  opacity: 1;
  visibility: visible;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 2;
}

.details-section.closed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 140ms ease, visibility 0s linear 140ms;
}

.pipeline-card {
  width: 100%;
  background: var(--sidebar-glass);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  height: fit-content;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.pipeline-card > div {
  flex-shrink: 0;
}

.pipeline-card .pipeline-details:last-child {
  margin-bottom: 0;
}

.pipeline-card::-webkit-scrollbar {
  width: 6px;
}
.pipeline-card::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
}
.pipeline-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
.pipeline-card::-webkit-scrollbar-thumb:hover {
  background: var(--theme-color);
}

/* Close Button inside card */
.btn-close-profile {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.btn-close-profile:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.pipeline-header {
  margin-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1rem;
}

.pipeline-header h2 {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  margin-bottom: 0.35rem;
}

.pipeline-header p {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.station-conditions {
  margin-bottom: 1.75rem;
  padding: 1.1rem 0 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.station-conditions[hidden] {
  display: none;
}

.station-conditions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.station-conditions-freshness {
  color: var(--theme-color);
  font-family: var(--font-title);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: right;
}

.station-conditions-freshness.stale {
  color: var(--status-maintenance);
}

.station-conditions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  margin: 0;
}

.station-condition {
  min-width: 0;
}

.station-condition.wide {
  grid-column: 1 / -1;
}

.station-condition dt {
  color: var(--text-muted);
  font-family: var(--font-title);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.station-condition dd {
  margin: 0.3rem 0 0;
  color: var(--text-primary);
  font-size: 0.76rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.pipeline-details {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 2.25rem;
}

.details-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 0.75rem;
}

.details-row:last-child {
  border-bottom: none;
}

.details-row .label {
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.details-row strong {
  color: var(--text-primary);
  font-weight: 400;
}

.status-pill {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.status-pill.online {
  background: rgba(74, 222, 128, 0.1);
  color: var(--status-online);
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.status-pill.offline {
  background: rgba(148, 163, 184, 0.1);
  color: var(--status-offline);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.status-pill.maintenance {
  background: rgba(245, 158, 11, 0.1);
  color: var(--status-maintenance);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Tune In Button Control */
.tune-in-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.btn-tune-in {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--theme-color);
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 20px rgba(var(--theme-color-rgb), 0.3);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 2;
}

.btn-tune-in:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(var(--theme-color-rgb), 0.5);
  background: hsl(142, 75%, 65%);
}

.btn-tune-in:active {
  transform: scale(0.96);
}

.btn-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--bg-deep);
}

.pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid var(--theme-color);
  opacity: 0;
  box-shadow: 0 0 15px var(--theme-color);
  pointer-events: none;
  z-index: 1;
}

.btn-tune-in.active .pulse-ring {
  animation: pulse-ring 2.5s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.tune-status-text {
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.btn-tune-in.active + .tune-status-text {
  color: var(--theme-color);
}



/* Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.75;
  }
  80%, 100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Spotify-style Bottom Player Bar */
.bottom-player-bar {
  position: relative;
  flex: 0 0 auto;
  margin-left: 0;
  margin-right: 0;
  height: 90px;
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.player-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 0 240px;
}

.btn-player-circle {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--theme-color);
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 15px rgba(var(--theme-color-rgb), 0.25);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-player-circle:hover {
  transform: scale(1.06);
  box-shadow: 0 0 20px rgba(var(--theme-color-rgb), 0.4);
  background: hsl(142, 75%, 65%);
}

.btn-player-circle.active {
  background: #ff3b30;
  box-shadow: 0 0 15px rgba(255, 59, 48, 0.4);
}

.btn-player-circle.active:hover {
  background: #ff453a;
  box-shadow: 0 0 20px rgba(255, 59, 48, 0.6);
}

.btn-player-circle:active {
  transform: scale(0.96);
}

.btn-player-circle .btn-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-player-circle .btn-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--bg-deep);
}

.player-node-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.15rem;
}

.player-node-title-row .player-node-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.player-node-name {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.player-status-text {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.player-middle {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  margin: 0 1rem;
}

.player-buffer-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.player-buffer-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-title);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.player-buffer-label span:first-child {
  min-width: 0;
}

.player-buffer-label span:last-child {
  flex-shrink: 0;
  white-space: nowrap;
  text-align: right;
}

.player-buffer-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.player-buffer-bar-fill {
  width: 0%;
  height: 100%;
  background: hsl(0, 80%, 50%);
  border-radius: 4px;
  transition: width 0.1s linear, background-color 0.1s linear;
}

.player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
  flex: 0 0 240px;
}

.player-time {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  min-width: 55px;
  text-align: right;
}

.player-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}

.player-streamers {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.player-streamers .mono-num {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--theme-color);
}

.player-streamers .label-text {
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Responsive Player Bar adjustments */
@media (max-width: 820px) {
  .bottom-player-bar {
    height: auto;
    min-height: 84px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    grid-template-areas:
      "player-left player-middle"
      "player-right player-right";
    align-content: center;
    gap: 0.3rem 0.6rem;
    padding: 0.45rem 0.75rem 0.3rem;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .player-left {
    grid-area: player-left;
    width: auto;
    gap: 0.5rem;
    justify-content: flex-start;
    min-width: 0;
  }

  .player-middle {
    grid-area: player-middle;
    width: auto;
    min-width: 0;
    margin: 0;
  }

  .player-right {
    grid-area: player-right;
    position: relative;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.2rem !important;
    padding-bottom: 0 !important;
  }

  .btn-player-circle {
    width: 40px;
    height: 40px;
  }

  .btn-player-circle .btn-icon,
  .btn-player-circle .btn-icon svg {
    width: 18px;
    height: 18px;
  }

  .player-node-info {
    min-width: 0;
    text-align: left;
    align-items: flex-start;
  }

  .player-status-text {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .player-node-name {
    max-width: 100%;
    font-size: 0.76rem;
    line-height: 1.1;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .player-status-text {
    font-size: 0.56rem;
    letter-spacing: 0.08em;
  }

  .player-buffer-column {
    min-width: 0;
  }

  .player-buffer-label {
    font-size: 0.52rem;
  }

  .player-time {
    grid-column: 1;
    justify-self: center;
    min-width: 44px;
    font-size: 0.82rem;
    text-align: center !important;
  }

  .player-divider {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 16px;
    transform: translate(-50%, -50%);
  }

  .player-streamers {
    grid-column: 2;
    justify-self: center;
  }

  .player-streamers .mono-num {
    font-size: 0.82rem;
  }

  .player-streamers .label-text {
    font-size: 0.55rem;
  }

  /* Adjust workspace layout spacing for taller mobile player bar */
  .homepage-wrapper {
    padding-bottom: 0 !important;
  }
}

@media (max-width: 380px) {
  .bottom-player-bar {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  .player-buffer-label {
    font-size: 0.48rem;
  }
}

@media (max-width: 340px) {
  .btn-player-circle {
    width: 36px;
    height: 36px;
  }

  .player-left {
    gap: 0.4rem;
  }

  .player-node-name {
    font-size: 0.7rem;
  }
}

/* About Telemetry Station Card Styles */
.about-image-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.2);
}

.about-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
}

.about-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.placeholder-text {
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.about-description-box {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
}

.about-label {
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--theme-color);
  display: block;
  margin-bottom: 0.5rem;
}

.about-description {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Globe Section */
.globe-section {
  position: absolute;
  top: 0; /* Start exactly at the bottom border of the header */
  bottom: 0; /* Start exactly at the top border of the bottom player bar */
  left: 0;
  right: 0;
  width: 100%;
  margin: 0 !important;
  border: none !important;
  background: #010205 !important;
  border-radius: 0 !important;
  overflow: hidden;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  z-index: 1;
}

#globe-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}

.btn-toggle-fleet {
  display: none;
}

/* Registry Section Headers */
.registry-section-header {
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-transform: uppercase;
  display: block;
}
.registry-section-header:first-of-type {
  margin-top: 0;
}

.node-card .lock-icon {
  margin-left: auto;
  align-self: center;
  color: var(--text-muted);
  opacity: 0.6;
  flex-shrink: 0;
}

.native-live-audio {
  position: fixed;
  width: 1px;
  height: 1px;
  left: 0;
  bottom: 0;
  opacity: 0;
  pointer-events: none;
}
