* {
  box-sizing: border-box;
}

:root {
  --bg: #091a2a;
  --glass: rgba(255, 255, 255, 0.16);
  --glass-strong: rgba(255, 255, 255, 0.22);
  --glass-border: rgba(255, 255, 255, 0.24);
  --text-main: #f4f8ff;
  --text-muted: rgba(239, 246, 255, 0.72);
  --brand: #5ea3ff;
  --brand-soft: rgba(94, 163, 255, 0.22);
  --shadow: 0 22px 45px rgba(0, 0, 0, 0.34);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --ease: 280ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

body {
  margin: 0;
  font-family: "SF Pro Display", "SF Pro Text", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  background: var(--bg);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(3, 9, 24, 0.52) 0%,
    rgba(6, 14, 36, 0.44) 50%,
    rgba(5, 10, 24, 0.56) 100%
  );
  z-index: -1;
  pointer-events: none;
}

.site-bg-video-wrap {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.site-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 34vw, 420px);
  grid-template-areas: "map panel";
  gap: 14px;
  height: 100dvh;
  padding: 14px;
}

.sidebar {
  grid-area: panel;
  border: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 2px;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  gap: 12px;
}

.brand {
  margin: 0 0 8px;
  font-size: clamp(21px, 2.2vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.desc {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 13px;
}

.admin-shortcut {
  display: inline-flex;
  align-items: center;
  margin: 0 0 14px;
  text-decoration: none;
  border: 1px solid #bfd1e7;
  border-radius: 999px;
  padding: 8px 12px;
  color: #1146a6;
  font-size: 13px;
  font-weight: 600;
}

.admin-shortcut:hover {
  background: #eff6ff;
}

.pois-panel {
  margin: 0;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  flex: 1 1 auto;
  height: 100%;
  align-self: stretch;
  max-height: none;
  position: relative;
}

.pois-panel:not([open]) {
  flex: 0 0 auto;
  height: auto;
  max-height: none;
  align-self: start;
}

.pois-panel:not([open]) .pois-body {
  display: none;
}

.pois-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #eaf2ff;
  background: rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  transition: background var(--ease);
}

.pois-summary::-webkit-details-marker {
  display: none;
}

.pois-panel[open] .pois-summary::after {
  content: " -";
  float: right;
}

.pois-panel:not([open]) .pois-summary::after {
  content: " +";
  float: right;
}

.pois-body {
  padding: 10px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border-bottom-left-radius: calc(var(--radius-lg) - 2px);
  border-bottom-right-radius: calc(var(--radius-lg) - 2px);
  clip-path: inset(0 round 0 0 calc(var(--radius-lg) - 2px) calc(var(--radius-lg) - 2px));
}

.radio-player {
  margin: 0;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 8px 12px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.14) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.radio-player::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(
      135deg,
      rgba(255, 188, 48, 0.2) 0%,
      rgba(255, 188, 48, 0.14) 22%,
      rgba(255, 188, 48, 0.08) 44%,
      rgba(255, 188, 48, 0.04) 66%,
      rgba(255, 188, 48, 0.015) 84%,
      rgba(255, 188, 48, 0) 100%
    ),
    linear-gradient(
      45deg,
      rgba(8, 207, 141, 0.18) 0%,
      rgba(8, 207, 141, 0.13) 24%,
      rgba(8, 207, 141, 0.08) 46%,
      rgba(8, 207, 141, 0.04) 68%,
      rgba(8, 207, 141, 0.015) 86%,
      rgba(8, 207, 141, 0) 100%
    );
  filter: blur(0.55px);
  z-index: 0;
}

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

.radio-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}

.radio-head-text {
  min-width: 0;
}

.radio-logo {
  display: block;
  width: 62px;
  height: 62px;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  box-shadow: none;
}

.radio-title {
  margin: 0 0 2px;
  font-size: 29px;
  letter-spacing: -0.015em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio-slogan {
  margin: 0;
  font-size: 12px;
  font-style: italic;
  color: rgba(227, 239, 255, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio-track {
  margin: 0;
  font-size: 10px;
  color: rgba(236, 245, 255, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
  padding-left: 34px;
  position: relative;
}

.radio-track-text {
  display: inline-block;
  white-space: nowrap;
  transform: translateX(0);
  will-change: transform;
}

.radio-track.is-marquee {
  text-overflow: clip;
}

.radio-track.is-marquee .radio-track-text {
  animation: radioMarquee var(--marquee-duration, 12s) linear infinite;
}

@keyframes radioMarquee {
  0%,
  12% {
    transform: translateX(0);
  }
  88%,
  100% {
    transform: translateX(calc(-1 * var(--marquee-shift, 0px)));
  }
}

.radio-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 0;
  min-height: 44px;
}

.radio-inline {
  min-width: 0;
  height: 44px;
  display: grid;
  grid-template-rows: auto auto;
  row-gap: 2px;
  align-content: center;
}

.radio-volume-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.radio-btn {
  border: none;
  border-radius: 12px;
  width: 48px;
  height: 48px;
  padding: 0;
  background: transparent;
  color: #f8fbff;
  font-size: 0;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--ease), background var(--ease), box-shadow var(--ease);
  position: relative;
  box-shadow: none;
}

.radio-btn::before {
  content: "";
  position: absolute;
  inset: 15px 13px 15px 16px;
  background: #f6f9ff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.radio-btn.is-playing::before {
  inset: 14px 16px;
  clip-path: none;
  background:
    linear-gradient(90deg, #f6f9ff 0 36%, transparent 36% 64%, #f6f9ff 64% 100%);
}

.radio-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}

.radio-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.radio-volume {
  display: flex;
  align-items: center;
  gap: 10px;
}

.radio-wave {
  width: 28px;
  height: 24px;
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 3px;
  opacity: 0.92;
}

.radio-wave span {
  display: block;
  width: 4px;
  background: rgba(242, 248, 255, 0.9);
  border-radius: 999px;
  height: 8px;
  transition: height 120ms linear;
}

.radio-wave span:nth-child(1) {
  height: 8px;
}

.radio-wave span:nth-child(2) {
  height: 14px;
}

.radio-wave span:nth-child(3) {
  height: 20px;
}

.radio-wave.is-playing span:nth-child(1) {
  animation: wavePulse 0.75s ease-in-out infinite;
}

.radio-wave.is-playing span:nth-child(2) {
  animation: wavePulse 0.55s ease-in-out infinite 80ms;
}

.radio-wave.is-playing span:nth-child(3) {
  animation: wavePulse 0.9s ease-in-out infinite 120ms;
}

@keyframes wavePulse {
  0%,
  100% { height: 7px; opacity: 0.75; }
  50% { height: 20px; opacity: 1; }
}

.radio-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: min(190px, 54vw);
  height: 6px;
  border-radius: 999px;
  outline: none;
  background: linear-gradient(90deg, rgba(122, 176, 255, 0.95) 0%, rgba(96, 163, 255, 0.6) 45%, rgba(255, 255, 255, 0.2) 100%);
}

.radio-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(248, 252, 255, 0.96);
  box-shadow: 0 8px 14px rgba(2, 10, 25, 0.35);
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease);
}

.radio-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.06);
  box-shadow: 0 10px 18px rgba(2, 10, 25, 0.42);
}

.radio-volume-slider::-moz-range-track {
  height: 6px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(122, 176, 255, 0.95) 0%, rgba(96, 163, 255, 0.6) 45%, rgba(255, 255, 255, 0.2) 100%);
}

.radio-volume-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  background: rgba(248, 252, 255, 0.96);
  box-shadow: 0 8px 14px rgba(2, 10, 25, 0.35);
  cursor: pointer;
}

.search {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 13px;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
  background: rgba(255, 255, 255, 0.14);
  color: #f4f8ff;
}

.search::placeholder {
  color: rgba(241, 247, 255, 0.6);
}

.search:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(94, 163, 255, 0.24);
  background: rgba(255, 255, 255, 0.18);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.chip {
  border: 1px solid var(--chip-border, rgba(255, 255, 255, 0.28));
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 10px;
  cursor: pointer;
  background: var(--chip-bg, rgba(255, 255, 255, 0.12));
  color: var(--chip-text, #eef4ff);
  transition: all var(--ease);
}

.chip.active {
  border-color: var(--chip-border, rgba(163, 205, 255, 0.6));
  background: var(--chip-bg, var(--brand-soft));
  color: var(--chip-text, #eef5ff);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.16);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  padding-bottom: 2px;
  min-height: 0;
  height: 100%;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior: contain;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  clip-path: inset(0 round 0 0 12px 12px);
  scroll-padding-bottom: 18px;
}

.list::after {
  content: "";
  display: block;
  height: 0;
  flex: 0 0 auto;
}

.list::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.category-group {
  border: 1px solid var(--cat-line, rgba(255, 255, 255, 0.22));
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--cat-soft, rgba(255, 255, 255, 0.1)) 0%, rgba(255, 255, 255, 0.07) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  isolation: isolate;
}

.category-group:last-child {
  margin-top: auto;
  margin-bottom: 2px;
}

.list.has-open .category-group:last-child {
  margin-top: auto;
  margin-bottom: 2px;
}

.list.all-collapsed {
  height: auto;
  overflow: visible;
  padding-bottom: 1px;
}

.list.all-collapsed .category-group:last-child {
  margin-top: auto;
}

.pois-panel.all-collapsed {
  height: auto;
  max-height: none;
  align-self: start;
}

.pois-panel.all-collapsed .pois-body {
  grid-template-rows: auto auto auto;
  height: auto;
}

.category-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 700;
  color: #f3f8ff;
  background: linear-gradient(180deg, var(--cat-soft-2, rgba(255, 255, 255, 0.15)) 0%, var(--cat-soft, rgba(255, 255, 255, 0.08)) 100%);
  border-bottom: none;
  box-shadow: inset 0 -1px var(--cat-line, rgba(255, 255, 255, 0.16));
}

.category-summary::-webkit-details-marker {
  display: none;
}

.category-summary:focus,
.category-summary:focus-visible {
  outline: none;
}

.category-group[open] .category-summary::after {
  content: " -";
}

.category-group:not([open]) .category-summary::after {
  content: " +";
}

.category-group:not([open]) .category-summary {
  box-shadow: none;
}

.category-items {
  padding: 0 7px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 260ms ease, opacity 220ms ease, padding 220ms ease;
}

.category-group[open] .category-items {
  padding: 7px 7px 6px;
  max-height: clamp(150px, 34vh, 300px);
  opacity: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-group[open] .category-items::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.list.has-open .category-group[open] {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.list.has-open .category-group[open] .category-items {
  max-height: none;
  height: auto;
}

.empty-list {
  margin: 0;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: rgba(239, 246, 255, 0.86);
  background: rgba(255, 255, 255, 0.09);
}

.item {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 8px 10px;
  cursor: pointer;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease), background var(--ease);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.item:hover {
  border-color: rgba(163, 205, 255, 0.6);
  box-shadow: 0 14px 22px rgba(2, 9, 25, 0.26);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
}

.item h3 {
  margin: 0 0 2px;
  font-size: 13px;
}

.item p {
  margin: 0;
  font-size: 11px;
  color: rgba(241, 248, 255, 0.82);
}

.item small {
  display: inline-block;
  margin-top: 3px;
  font-size: 10px;
  color: rgba(227, 238, 255, 0.7);
}

.map-wrap {
  grid-area: map;
  position: relative;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 0;
  backdrop-filter: blur(8px);
}

#map {
  width: 100%;
  height: 100%;
}

#map .leaflet-tile {
  filter: saturate(1.12) contrast(0.96) brightness(1.01) hue-rotate(-4deg);
}

#map .leaflet-tile-pane {
  opacity: 0.97;
}

.leaflet-bottom.leaflet-left .leaflet-control-zoom {
  margin: 0 0 14px 14px;
  border: 1px solid rgba(188, 208, 232, 0.38);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(146, 168, 194, 0.2);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
}

.leaflet-bottom.leaflet-left .leaflet-control-zoom a {
  width: 38px;
  height: 38px;
  line-height: 36px;
  border: none;
  color: rgba(235, 245, 255, 0.94);
  background: rgba(150, 174, 202, 0.22);
  font-size: 22px;
  font-weight: 500;
  transition: background var(--ease), color var(--ease);
}

.leaflet-bottom.leaflet-left .leaflet-control-zoom a:hover {
  background: rgba(166, 190, 216, 0.34);
  color: #f2f8ff;
}

.leaflet-bottom.leaflet-left .leaflet-control-zoom a:first-child {
  border-bottom: 1px solid rgba(192, 213, 236, 0.3);
}

.leaflet-control-attribution {
  background: rgba(22, 38, 58, 0.24) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(188, 208, 232, 0.18);
  border-radius: 999px 0 0 0;
  padding: 1px 7px !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
  color: rgba(224, 236, 251, 0.78) !important;
}

.leaflet-control-attribution a {
  color: rgba(210, 229, 249, 0.82) !important;
  text-decoration: none;
}

.leaflet-control-attribution a:hover {
  color: rgba(236, 246, 255, 0.94) !important;
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 40vw);
    gap: 12px;
    padding: 12px;
  }

  .sidebar {
    padding: 2px;
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr minmax(34vh, 40vh);
    grid-template-areas:
      "panel"
      "map";
    height: 100dvh;
    min-height: 100dvh;
    padding: 10px;
    gap: 10px;
  }

  .sidebar {
    height: 100%;
    min-height: 0;
    padding: 2px;
  }

  .map-wrap {
    min-height: 34vh;
  }

  .pois-panel {
    height: 100%;
    max-height: none;
  }
}

@media (max-width: 640px) {
  .layout {
    padding: 8px;
    gap: 8px;
    grid-template-rows: 1fr minmax(32vh, 36vh);
    height: 100dvh;
  }

  .sidebar {
    height: 100%;
    min-height: 0;
    padding: 2px;
    border-radius: 0;
  }

  .map-wrap {
    border-radius: 18px;
    min-height: 32vh;
  }

  .brand {
    font-size: 22px;
  }

  .desc {
    font-size: 13px;
  }

  .radio-title {
    font-size: 16px;
  }

  .radio-slogan {
    font-size: 10px;
  }

  .radio-logo {
    width: 56px;
    height: 56px;
  }

  .radio-actions {
    gap: 8px;
    min-height: 46px;
  }

  .radio-inline {
    height: 46px;
  }

  .radio-volume-slider {
    width: min(150px, 38vw);
  }

  .radio-track {
    font-size: 9px;
    padding-left: 30px;
  }

  .pois-summary {
    padding: 10px 12px;
    font-size: 13px;
  }

  .pois-body {
    padding: 10px;
  }

  .pois-panel {
    height: 100%;
    max-height: none;
  }
}
