/* Radio Gram — Zen Horizon (pixel match to mockup) */

/* --- Kill legacy night gradients; show sunset photo --- */
body.zen-h,
body.zen-h.night-mode:not(.visual-only):not(.relax-fullscreen) {
  color: #f4f7ff;
  background: transparent !important;
  background-image: none !important;
  animation: none !important;
  justify-content: flex-start;
  padding: 0 !important;
}

body.zen-h::before,
body.zen-h.night-mode::before {
  display: none !important;
}

body.zen-h #reactive-bg,
body.zen-h #reactive-bg.zen-sunset {
  opacity: 1 !important;
  mix-blend-mode: normal !important;
  background:
    linear-gradient(180deg, rgba(4, 10, 28, 0.38) 0%, rgba(4, 10, 28, 0.06) 44%, rgba(4, 10, 28, 0.52) 100%),
    url('/189405_morze_zachod_slonca.jpg') center 42% / cover no-repeat !important;
  filter: saturate(1.08) brightness(0.94) !important;
  box-shadow: none !important;
}

body.zen-h #visualizer-canvas,
body.zen-h #visualizer-canvas.active {
  display: none !important;
}

body.zen-h .zen-top-tools {
  display: none !important;
}

body.zen-h .app-container {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: block;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

/* --- Top stream bar --- */
.zen-stream-bar {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 140;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  max-width: min(94vw, 560px);
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.zen-stream-bar::-webkit-scrollbar { display: none; }

.zen-stream-pill {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.78);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 2px 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
}

.zen-stream-pill:hover { color: #fff; }

.zen-stream-pill.active {
  color: #fff;
  border-bottom-color: #5ce8d8;
  text-shadow: none;
}

.zen-stream-dot {
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  user-select: none;
  pointer-events: none;
  margin: 0 2px;
}

/* --- Center play + orbit ring --- */
body.zen-h .play-wrapper {
  position: fixed;
  top: 44vh;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  z-index: 35;
}

body.zen-h .play-ring {
  width: 210px;
  height: 210px;
  border: none;
  border-radius: 50%;
  opacity: 0.7;
  background: conic-gradient(
    from 200deg,
    transparent 0deg,
    rgba(92, 232, 216, 0.55) 60deg,
    rgba(255, 168, 88, 0.45) 120deg,
    transparent 200deg,
    transparent 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: zenRingSpin 9s linear infinite;
  box-shadow: none;
}

body.zen-h .play-ring.active { opacity: 1; }

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

body.zen-h .play-btn-main {
  width: 104px;
  height: 104px;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.62) !important;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.2), inset 0 0 20px rgba(255, 255, 255, 0.04) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.zen-h .play-btn-main::before,
body.zen-h .play-btn-main::after {
  display: none !important;
}

body.zen-h .play-btn-main:hover {
  transform: scale(1.04);
  border-color: rgba(255, 255, 255, 0.82) !important;
}

body.zen-h .play-btn-main.playing {
  border-color: rgba(255, 255, 255, 0.75) !important;
  box-shadow: 0 0 32px rgba(92, 232, 216, 0.22), inset 0 0 20px rgba(255, 255, 255, 0.06) !important;
}

body.zen-h .play-btn-glyphs {
  width: 40px;
  height: 40px;
}

body.zen-h .play-btn-glyphs .play-icon,
body.zen-h .play-btn-glyphs .pause-icon {
  width: 36px;
  height: 36px;
  filter: none;
}

body.zen-h .play-btn-glyphs .play-icon path {
  fill: #fff !important;
  stroke: none !important;
}

body.zen-h .play-btn-glyphs .pause-icon rect {
  fill: #fff !important;
  stroke: none !important;
}

/* --- Horizon equalizer at sunset line --- */
#horizon-eq-canvas {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 50vh;
  bottom: auto;
  width: min(96vw, 920px);
  height: min(20vh, 130px);
  z-index: 15;
  pointer-events: none;
  opacity: 0.92;
}

/* --- Hide legacy chrome --- */
body.zen-h .rg-sidebar,
body.zen-h .rg-right-panel,
body.zen-h .hero-toolbar,
body.zen-h .rg-main-actions,
body.zen-h .title-section,
body.zen-h .stream-hint-pop,
body.zen-h .rg-mobile-vk-playlist,
body.zen-h .listen-time-badge,
body.zen-h .viz-mode-modal-btn,
body.zen-h .desktop-volume,
body.zen-h .immersive-switch,
body.zen-h .viz-fullscreen-btn,
body.zen-h .zen-only-fs,
body.zen-h .listen-time-chip,
body.zen-h .desktop-viz-controls .settings-row {
  display: none !important;
}

/* --- Now playing card (center bottom) --- */
body.zen-h .rg-mobile-now {
  display: block !important;
  position: fixed;
  left: 50%;
  bottom: calc(56px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 125;
  width: min(90vw, 440px);
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

body.zen-h .rg-mobile-now .rg-partners-mini,
body.zen-h .rg-mobile-now .rg-donate-block,
body.zen-h .rg-mobile-now .track-hint,
body.zen-h .rg-mobile-now .stream-quality-badge,
body.zen-h .rg-mobile-now .track-art {
  display: none !important;
}

body.zen-h .rg-mobile-now .track-label {
  margin-bottom: 6px;
  justify-content: center;
}

body.zen-h .rg-mobile-now .track-label-left span:first-child {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.04em;
}

body.zen-h .rg-mobile-now .track-info-row {
  display: block;
  cursor: default;
}

body.zen-h .rg-mobile-now .track-text {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

body.zen-h .zen-track-genre {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* --- Listeners below card --- */
body.zen-h .listeners-badge {
  position: fixed;
  bottom: calc(22px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 126;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

body.zen-h .zen-listeners-icon {
  display: inline;
  font-size: 13px;
  opacity: 0.8;
}

/* --- Bottom-left dock (single glass card) --- */
body.zen-h .bottom-controls {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  right: auto;
  z-index: 140;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.22);
  transform: none !important;
  max-width: min(78vw, 360px);
}

body.zen-h .desktop-viz-controls {
  display: none !important;
}

body.zen-h .viz-mode-selector {
  display: none !important;
}

body.zen-h .zen-viz-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 48px;
  padding: 6px 4px !important;
  border-radius: 10px;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.72) !important;
  box-shadow: none !important;
  font-size: 9px;
}

body.zen-h .zen-viz-btn:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

body.zen-h .zen-viz-btn.active {
  color: #fff !important;
  border-color: rgba(92, 232, 216, 0.45) !important;
  background: rgba(92, 232, 216, 0.12) !important;
}

body.zen-h .zen-viz-glyph {
  font-size: 15px;
  line-height: 1;
  opacity: 0.9;
}

body.zen-h .zen-viz-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

body.zen-h .bottom-controls > .settings-row,
body.zen-h .zen-settings-row {
  display: flex !important;
  flex-wrap: nowrap;
  gap: 2px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  max-width: none;
}

body.zen-h .zen-setting-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 48px;
  padding: 6px 4px !important;
  border-radius: 10px;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.72) !important;
  box-shadow: none !important;
}

body.zen-h .zen-setting-btn:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

body.zen-h .zen-setting-glyph {
  font-size: 15px;
  line-height: 1;
}

body.zen-h .zen-setting-label {
  font-size: 9px;
  font-weight: 500;
  color: inherit;
  letter-spacing: 0.02em;
}

body:not(.zen-h) .zen-viz-glyph,
body:not(.zen-h) .zen-viz-label,
body:not(.zen-h) .zen-setting-label,
body:not(.zen-h) .zen-only-fs,
body:not(.zen-h) .zen-listeners-icon {
  display: none !important;
}

body:not(.zen-h) .zen-viz-btn {
  flex-direction: row;
  min-width: auto;
}

body:not(.zen-h) .zen-setting-btn {
  flex-direction: row;
  min-width: auto;
}

/* --- Right social rail (minimal, no box) --- */
.zen-social-rail {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(100px + env(safe-area-inset-bottom));
  z-index: 140;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
  padding: 0;
  background: transparent;
  border: none;
  backdrop-filter: none;
}

.zen-social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.82);
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  min-width: 44px;
  padding: 2px;
  letter-spacing: 0.02em;
}

.zen-social-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  opacity: 0.88;
}

.zen-social-btn:hover { color: #fff; }

/* --- Mobile --- */
@media (max-width: 768px) {
  #horizon-eq-canvas {
    top: 48vh;
    width: min(98vw, 720px);
    height: 14vh;
  }

  body.zen-h .play-wrapper {
    top: 42vh;
  }

  body.zen-h .play-btn-main {
    width: 92px;
    height: 92px;
  }

  body.zen-h .play-ring {
    width: 180px;
    height: 180px;
  }

  body.zen-h .bottom-controls {
    left: 10px;
    bottom: 10px;
    max-width: calc(100vw - 80px);
    padding: 10px;
  }

  body.zen-h .zen-viz-btn,
  body.zen-h .zen-setting-btn {
    min-width: 42px;
    padding: 5px 3px !important;
  }

  body.zen-h .viz-mode-selector {
    flex-wrap: wrap;
    max-width: 240px;
  }

  .zen-social-rail {
    bottom: calc(88px + env(safe-area-inset-bottom));
    gap: 14px;
    right: 10px;
  }

  body.zen-h .rg-mobile-now {
    bottom: calc(50px + env(safe-area-inset-bottom));
    width: min(94vw, 400px);
    padding: 14px 16px;
  }

  body.zen-h .listeners-badge {
    bottom: calc(16px + env(safe-area-inset-bottom));
    font-size: 11px;
  }

  .zen-stream-bar {
    padding: 8px 16px;
    max-width: 96vw;
  }

  .zen-stream-pill { font-size: 13px; }
}

@media (max-width: 380px) {
  body.zen-h .rg-mobile-now .track-text { font-size: 15px; }
  body.zen-h .zen-viz-btn,
  body.zen-h .zen-setting-btn { min-width: 38px; }
}

/* Visual-only / relax fullscreen */
body.zen-h.visual-only .zen-stream-bar,
body.zen-h.visual-only .zen-social-rail,
body.zen-h.visual-only .rg-mobile-now,
body.zen-h.visual-only .listeners-badge,
body.zen-h.visual-only .bottom-controls {
  opacity: 0;
  pointer-events: none;
}

body.zen-h.relax-fullscreen .zen-stream-bar,
body.zen-h.relax-fullscreen .zen-social-rail {
  opacity: 0.35;
}

body.zen-h.relax-fullscreen .zen-stream-bar:hover,
body.zen-h.relax-fullscreen .zen-social-rail:hover {
  opacity: 1;
}
