:root {
  /* Core Theme Colors */
  --bg-space: #07050d;
  --bg-primary: #0d0a17;
  --bg-secondary: #130f24;
  --bg-surface: #1a1432;
  --bg-card: #20183e;
  --bg-card-hover: #291f4f;

  /* Neon Accent Gradients */
  --accent-red: #ff3568;
  --accent-pink: #ff5aa8;
  --accent-violet: #c060ff;
  --accent-gold: #f5c451;
  --accent-emerald: #00f59b;
  --accent-blue: #3b82f6;

  --grad-primary: linear-gradient(135deg, #ff3568 0%, #ff5aa8 45%, #c060ff 100%);
  --grad-gold: linear-gradient(135deg, #f5c451 0%, #e0982f 100%);
  --grad-emerald: linear-gradient(135deg, #00f59b 0%, #00b4d8 100%);
  --grad-soft: linear-gradient(135deg, rgba(255, 53, 104, 0.15), rgba(192, 96, 255, 0.15));
  --grad-surface: linear-gradient(180deg, rgba(32, 24, 62, 0.85) 0%, rgba(26, 20, 50, 0.95) 100%);

  /* Borders & Lines */
  --border-line: rgba(255, 255, 255, 0.08);
  --border-line-hover: rgba(255, 255, 255, 0.18);
  --border-glow: rgba(192, 96, 255, 0.4);

  /* Typography Colors */
  --text-main: #f8f6ff;
  --text-dim: #cfc9e2;
  --text-muted: #958cb5;
  --text-faint: #635b82;

  /* Typography Fonts */
  --font-display: 'Unbounded', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Space Mono', monospace;

  /* Radii & Shadows */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-neon: 0 10px 30px -10px rgba(255, 53, 104, 0.4);
  --shadow-card: 0 16px 36px -12px rgba(0, 0, 0, 0.7);

  /* Transitions */
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.18s;
  --dur-mid: 0.28s;
}

/* Base Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  background-color: var(--bg-space);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Cockpit Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-space);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: 999px;
  border: 1px solid var(--border-line);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-violet);
}

/* Top Cockpit Header */
.cockpit-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 10, 23, 0.82);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--border-line);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-inner {
  max-width: 1720px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Brand Logo */
.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  cursor: pointer;
}

.brand-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-neon);
  position: relative;
  overflow: hidden;
}

.brand-icon-box svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

.brand-text-box h1 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent-gold);
  text-transform: uppercase;
}

/* Center Cockpit Telemetry Hub */
.cockpit-telemetry {
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-line);
  padding: 6px 16px;
  border-radius: var(--r-lg);
}

.telemetry-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.telemetry-item svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.clock-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.05em;
}

.telemetry-divider {
  width: 1px;
  height: 16px;
  background: var(--border-line);
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--dur-mid) var(--ease-smooth);
}

.mode-badge.driving {
  background: rgba(0, 245, 155, 0.15);
  border: 1px solid rgba(0, 245, 155, 0.35);
  color: var(--accent-emerald);
}

.mode-badge.park {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: var(--accent-blue);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.3);
    opacity: 1;
    filter: drop-shadow(0 0 6px currentColor);
  }

  100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
}

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-cockpit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-line);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-mid) var(--ease-smooth);
  text-decoration: none;
}

.btn-cockpit:hover {
  background: var(--bg-card);
  border-color: var(--border-line-hover);
  transform: translateY(-1px);
}

.btn-cockpit svg {
  width: 17px;
  height: 17px;
  color: var(--text-dim);
}

.btn-cockpit.highlight {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 53, 104, 0.3);
}

.btn-cockpit.highlight:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 22px rgba(255, 53, 104, 0.5);
}

/* User Profile Badge */
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-line);
  border-radius: var(--r-md);
  padding: 5px 12px 5px 6px;
  cursor: pointer;
  transition: all var(--dur-mid) var(--ease-smooth);
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-line-hover);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--grad-gold);
  color: #150d03;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pro-tag {
  background: var(--grad-gold);
  color: #120900;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.user-status {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Main Layout Grid */
.main-wrapper {
  max-width: 1720px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

/* Hero & Player Section */
.stage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

@media (min-width: 1280px) {
  .stage-grid {
    grid-template-columns: 2.2fr 1fr;
  }
}

/* Player Container (Optimized) */
.player-card {
  background: #000;
  border: 1px solid var(--border-line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
  display: flex;
  flex-direction: column;
}

.player-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle at center, #150f29 0%, #06040a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Video & Canvas Elements */
#video-player,
#canvas-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#canvas-player {
  display: block;
}

#video-player {
  display: none;
}

/* Player Placeholder State */
.player-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  text-align: center;
  padding: 30px;
  user-select: none;
}

.car-silhouette {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--grad-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(192, 96, 255, 0.3);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.car-silhouette svg {
  width: 44px;
  height: 44px;
  color: var(--accent-violet);
}

.player-empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-main);
  font-weight: 700;
}

.player-empty-state p {
  max-width: 480px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* Loading Spinner */
.player-spinner {
  position: absolute;
  inset: 0;
  background: rgba(7, 5, 13, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-mid) ease;
}

.player-spinner.active {
  opacity: 1;
  pointer-events: auto;
}

.spin-circle {
  width: 52px;
  height: 52px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-pink);
  border-right-color: var(--accent-violet);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Cockpit HUD Floating Overlay over Player */
.player-hud-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none;
}

.hud-channel-info {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(13, 10, 23, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-line);
  padding: 6px 14px 6px 8px;
  border-radius: var(--r-md);
  pointer-events: auto;
}

.hud-channel-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.08);
  object-fit: contain;
  padding: 4px;
}

.hud-channel-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.hud-channel-text span {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.hud-stats-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(13, 10, 23, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-line);
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-emerald);
  pointer-events: auto;
}

/* In-Motion Safety Advisory Banner */
.safety-advisory-bar {
  background: rgba(255, 53, 104, 0.1);
  border-top: 1px solid rgba(255, 53, 104, 0.25);
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.76rem;
  color: #ff94b1;
}

.safety-advisory-bar strong {
  color: #fff;
}

/* Player Cockpit Bottom Controls Bar */
.player-controls-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-line);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.controls-left,
.controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ctrl-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-line);
  color: var(--text-main);
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--dur-fast) ease;
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--border-line-hover);
  color: #fff;
  transform: translateY(-1px);
}

.ctrl-btn.play-btn {
  background: var(--grad-primary);
  width: 48px;
  height: 48px;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(255, 53, 104, 0.4);
}

.ctrl-btn.play-btn:hover {
  filter: brightness(1.15);
}

.ctrl-btn svg {
  width: 20px;
  height: 20px;
}

/* Volume Slider */
.volume-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-violet);
  box-shadow: 0 0 8px var(--accent-violet);
  cursor: pointer;
}

/* Engine Mode Switcher Button in Player */
.engine-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-line);
  padding: 8px 14px;
  border-radius: var(--r-md);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--dur-mid) ease;
}

.engine-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-line-hover);
  color: var(--text-main);
}

/* Right Side: Quick Cockpit Widget Panel */
.cockpit-side-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cockpit-widget {
  background: var(--grad-surface);
  border: 1px solid var(--border-line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-line);
  padding-bottom: 10px;
}

.widget-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title svg {
  width: 18px;
  height: 18px;
  color: var(--accent-violet);
}

/* Quick Telemetry Specs Table */
.specs-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.spec-label {
  color: var(--text-muted);
}

.spec-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-main);
}

.spec-val.active-mode {
  color: var(--accent-emerald);
}

/* Mode Switch Card in Widget */
.mode-switch-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.mode-card-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-line);
  border-radius: var(--r-md);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--dur-mid) var(--ease-smooth);
}

.mode-card-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-line-hover);
}

.mode-card-btn.active {
  background: var(--grad-soft);
  border-color: var(--accent-violet);
  box-shadow: 0 0 20px rgba(192, 96, 255, 0.2);
}

.mode-card-btn .m-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

.mode-card-btn .m-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
}

/* Navigation Mini-Map Overlay (Cockpit Floating Window) */
.nav-map-overlay {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 380px;
  height: 280px;
  background: rgba(13, 10, 23, 0.94);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-line-hover);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  z-index: 150;
  display: none;
  flex-direction: column;
  overflow: hidden;
  transition: transform var(--dur-mid) ease;
}

.nav-map-overlay.visible {
  display: flex;
}

.nav-map-overlay.minimized {
  height: 48px;
  width: 260px;
}

.map-header {
  padding: 10px 14px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
}

.map-header h4 {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-gold);
}

.map-ctrls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-ctrl-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
}

.map-ctrl-btn:hover {
  color: #fff;
}

#leaflet-map {
  flex: 1;
  width: 100%;
  height: 100%;
}

/* Channels & IPTV Hub Section */
.channels-hub {
  margin-top: 10px;
}

.hub-toolbar {
  background: rgba(19, 15, 36, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-line);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Source / Category Tabs Row */
.categories-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.categories-row::-webkit-scrollbar {
  display: none;
}

.cat-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-line);
  border-radius: var(--r-md);
  color: var(--text-dim);
  padding: 9px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--dur-mid) var(--ease-smooth);
}

.cat-tab:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-color: var(--border-line-hover);
}

.cat-tab.active {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 53, 104, 0.35);
}

.cat-tab .count {
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

/* Search & Actions Bar */
.hub-search-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.search-box svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: var(--r-md);
  color: var(--text-main);
  padding: 13px 18px 13px 46px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all var(--dur-mid) ease;
}

.search-box input:focus {
  border-color: var(--accent-violet);
  box-shadow: 0 0 0 3px rgba(192, 96, 255, 0.2);
  background: var(--bg-card-hover);
}

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

/* Channels Grid */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}

@media (min-width: 1440px) {
  .channels-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* Channel Card */
.channel-card {
  background: var(--grad-surface);
  border: 1px solid var(--border-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: all var(--dur-mid) var(--ease-spring);
  box-shadow: var(--shadow-card);
}

.channel-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--accent-pink);
  box-shadow: 0 16px 36px -10px rgba(255, 53, 104, 0.35);
}

.channel-card.now-playing {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 24px rgba(0, 245, 155, 0.3);
}

.channel-card.now-playing::after {
  content: 'ŞU AN OYNUYOR';
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--grad-emerald);
  color: #061e13;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 5;
}

.card-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: radial-gradient(circle at center, rgba(32, 24, 62, 0.8), rgba(13, 10, 23, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.channel-logo-img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  transition: transform var(--dur-mid) var(--ease-smooth);
}

.channel-card:hover .channel-logo-img {
  transform: scale(1.1);
}

.badge-live-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 53, 104, 0.9);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 4;
}

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(13, 10, 23, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-line);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  opacity: 0;
  transition: all var(--dur-fast) ease;
}

.channel-card:hover .fav-btn {
  opacity: 1;
}

.fav-btn.active,
.fav-btn:hover {
  color: var(--accent-gold);
  border-color: rgba(245, 196, 81, 0.5);
  background: rgba(245, 196, 81, 0.15);
  opacity: 1;
}

.card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: linear-gradient(180deg, rgba(26, 20, 50, 0.4) 0%, rgba(19, 15, 36, 0.9) 100%);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--dur-fast) ease;
}

.channel-card:hover .card-title {
  color: var(--accent-pink);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.card-cat {
  color: var(--accent-violet);
  font-weight: 600;
}

/* Modals (IPTV Import & Account Modal) */
.modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(5, 4, 10, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: all var(--dur-mid) ease;
}

.modal-scrim.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: linear-gradient(180deg, #1d163a 0%, #120d26 100%);
  border: 1px solid var(--border-glow);
  border-radius: var(--r-xl);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
  width: 100%;
  max-width: 580px;
  overflow: hidden;
  transform: scale(0.95) translateY(20px);
  transition: all var(--dur-mid) var(--ease-spring);
}

.modal-scrim.open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-line);
  padding-bottom: 12px;
}

.m-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: all var(--dur-fast) ease;
}

.m-tab.active {
  background: var(--bg-surface);
  color: var(--accent-pink);
}

/* Form Groups */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
}

.form-input {
  width: 100%;
  background: var(--bg-space);
  border: 1px solid var(--border-line);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #fff;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-violet);
  box-shadow: 0 0 0 3px rgba(192, 96, 255, 0.2);
}

/* Footer Legal & Info */
.cockpit-footer {
  margin-top: 50px;
  border-top: 1px solid var(--border-line);
  padding-top: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cockpit-footer a {
  color: var(--accent-violet);
  text-decoration: none;
}

.cockpit-footer a:hover {
  text-decoration: underline;
}

/* Mobile & Touch Adjustments */
@media (max-width: 768px) {
  .cockpit-telemetry {
    display: none;
  }

  .header-inner {
    padding: 10px 16px;
  }

  .main-wrapper {
    padding: 14px 16px 40px;
  }

  .nav-map-overlay {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 20px;
  }
}