/* Radio Fonki — основні стилі (Bootstrap 4.3.1 + Font Awesome 5.15.4) */
:root {
  --brand: #1f8f88;
  --brand-2: #2bb3a9;
  --accent: #d6342f;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f4;
  --text: #1d2430;
  --muted: #6b7684;
  --border: rgba(20, 30, 45, .09);
  --shadow: 0 6px 24px rgba(20, 30, 45, .08);
  --radius: 16px;
  --player-h: 72px;
  --tabbar-h: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
[data-theme="dark"] {
  --bg: #0f141a;
  --surface: #171e26;
  --surface-2: #212a34;
  --text: #e7ecf2;
  --muted: #94a0ae;
  --border: rgba(255, 255, 255, .08);
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
@media (max-width: 991.98px) { :root { --tabbar-h: 58px; --player-h: 64px; } }

html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: calc(var(--player-h) + var(--tabbar-h) + var(--safe-b));
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s;
}
body.no-player { padding-bottom: calc(var(--tabbar-h) + var(--safe-b)); }
a { color: var(--brand); }
a:hover { color: var(--brand-2); text-decoration: none; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5 { font-weight: 800; letter-spacing: -.01em; }
.text-muted { color: var(--muted) !important; }
.min-w-0 { min-width: 0; }
.opacity-75 { opacity: .75; }
.hp { position: absolute !important; left: -9999px !important; height: 1px; width: 1px; opacity: 0; }
.container-xl { width: 100%; max-width: 1280px; padding-left: 16px; padding-right: 16px; margin: 0 auto; }
@media (min-width: 768px) { .container-xl { padding-left: 24px; padding-right: 24px; } }
.page { min-height: 60vh; outline: none; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 2000; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Bootstrap під тему */
.btn { border-radius: 12px; font-weight: 700; }
.btn-sm { border-radius: 10px; }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:not(:disabled):not(.disabled):active { background: #187770; border-color: #187770; }
.btn-outline-primary { color: var(--brand); border-color: var(--brand); }
.btn-outline-primary:hover, .btn-outline-primary:not(:disabled):not(.disabled):active { background: var(--brand); border-color: var(--brand); }
.badge-primary { background: var(--brand); }
.form-control { border-radius: 12px; background: var(--surface); color: var(--text); border-color: var(--border); }
.form-control:focus { background: var(--surface); color: var(--text); border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(31, 143, 136, .2); }
.form-control:disabled { background: var(--surface-2); }
.custom-control-input:checked ~ .custom-control-label::before { background: var(--brand); border-color: var(--brand); }
.dropdown-menu { border-radius: 14px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); padding: 6px; }
.dropdown-item { border-radius: 8px; color: var(--text); padding: .45rem .9rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-2); color: var(--text); }
.dropdown-divider { border-color: var(--border); }
.page-link { color: var(--brand); background: var(--surface); border-color: var(--border); }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); }
.page-item.disabled .page-link { background: var(--surface); border-color: var(--border); }
.alert-light { background: var(--surface-2); color: var(--text); }
[data-theme="dark"] .btn-light { background: #2b3540; border-color: #2b3540; color: #fff; }
[data-theme="dark"] .close { color: #fff; }

/* ---------- Верхня панель ---------- */
.topbar {
  position: sticky; top: 0; z-index: 1030;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  background: var(--surface);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}
@supports (backdrop-filter: blur(1px)) {
  .topbar { background: rgba(255, 255, 255, .82); }
  [data-theme="dark"] .topbar { background: rgba(23, 30, 38, .82); }
}
.topbar .container-xl { height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-family: 'Comfortaa', 'Nunito', sans-serif; font-size: 1.25rem; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand b { color: var(--accent); }
.main-nav a { color: var(--muted); font-weight: 700; padding: 8px 12px; border-radius: 10px; margin-right: 2px; white-space: nowrap; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a.active { color: var(--brand); background: rgba(31, 143, 136, .1); }
.top-search { position: relative; width: 100%; max-width: 300px; }
.top-search > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; }
.top-search input { width: 100%; height: 38px; border-radius: 12px; border: 1px solid transparent; background: var(--surface-2); color: var(--text); padding: 0 12px 0 34px; outline: none; transition: .15s; }
.top-search input:focus { border-color: var(--brand); background: var(--surface); }
@media (max-width: 575.98px) {
  .top-search { max-width: none; flex: 1; margin-left: 10px !important; }
  .brand span { display: none; }
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--text);
  cursor: pointer; transition: background .15s, transform .1s; flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.sm { width: 30px; height: 30px; font-size: .85rem; }
.icon-btn.lg { width: 48px; height: 48px; font-size: 1.25rem; }
.icon-btn:focus { outline: none; box-shadow: 0 0 0 .2rem rgba(31, 143, 136, .25); }
.user-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; padding: 3px 10px 3px 3px; border-radius: 30px; }
.user-chip:hover { background: var(--surface-2); color: var(--text); }
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; line-height: 1; }

/* ---------- Нижнє меню (телефон) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; background: var(--surface); border-top: 1px solid var(--border);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: .68rem; font-weight: 700; gap: 3px; }
.tabbar a i { font-size: 1.15rem; }
.tabbar a.active { color: var(--brand); }

/* ---------- Плеєр ---------- */
.player {
  position: fixed; left: 0; right: 0; z-index: 1035;
  bottom: calc(var(--tabbar-h) + var(--safe-b)); height: var(--player-h);
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .06);
  transition: transform .25s ease;
}
.player.is-empty { transform: translateY(calc(100% + var(--tabbar-h) + var(--safe-b) + 10px)); }
.player-inner { display: flex; align-items: center; height: 100%; gap: 12px; }
.player-art { border: 0; padding: 0; background: none; width: 48px; height: 48px; border-radius: 10px; overflow: hidden; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.player-art img { width: 100%; height: 100%; object-fit: cover; }
.player-info { flex: 1; min-width: 0; cursor: pointer; }
.player-station { display: block; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-station:hover { color: var(--brand); }
.player-track { font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 6px; min-width: 0; }
.player-track span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-controls { display: flex; align-items: center; gap: 4px; }
.player-extra { display: flex; align-items: center; gap: 4px; }
.volume { width: 100px; accent-color: var(--brand); }
.player-progress { position: absolute; top: -2px; left: 0; right: 0; height: 2px; overflow: hidden; }
.player.is-loading .player-progress span { position: absolute; width: 30%; height: 100%; background: var(--brand); animation: loadbar 1s infinite linear; }
@keyframes loadbar { from { left: -30%; } to { left: 100%; } }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: inline-block; flex-shrink: 0; }
.is-playing .live-dot, .now-box .live-dot { background: #e53935; box-shadow: 0 0 0 0 rgba(229, 57, 53, .6); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 57, 53, .55); } 70% { box-shadow: 0 0 0 7px rgba(229, 57, 53, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); } }
.fav-toggle.is-active i { color: #e53935; }

.play-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 0; flex-shrink: 0;
  background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.05rem; cursor: pointer; transition: transform .12s, background .15s; box-shadow: 0 4px 14px rgba(31, 143, 136, .35);
}
.play-btn:hover { background: #187770; }
.play-btn:active { transform: scale(.92); }
.play-btn:focus { outline: none; box-shadow: 0 0 0 .25rem rgba(31, 143, 136, .3); }
.play-btn .fa-play { margin-left: 3px; }
.play-btn.sm { width: 36px; height: 36px; font-size: .85rem; box-shadow: none; }
.play-btn.xl { width: 68px; height: 68px; font-size: 1.6rem; }

/* ---------- Повноекранний плеєр ---------- */
.sheet { position: fixed; inset: 0; z-index: 1060; visibility: hidden; pointer-events: none; }
.sheet.open { visibility: visible; pointer-events: auto; }
.sheet-bg { position: absolute; inset: -40px; background: #123 center/cover no-repeat; filter: blur(40px) brightness(.45) saturate(1.3); transform: scale(1.1); opacity: 0; transition: opacity .3s; }
.sheet.open .sheet-bg { opacity: 1; }
.sheet-content {
  position: relative; height: 100%; color: #fff; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 22px calc(var(--safe-b) + 24px);
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.sheet.open .sheet-content { transform: none; }
.sheet .icon-btn { color: #fff; }
.sheet .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.sheet-head { width: 100%; max-width: 480px; display: flex; align-items: center; justify-content: space-between; letter-spacing: .08em; opacity: .9; }
.sheet-art { width: min(78vw, 340px); height: min(78vw, 340px); border-radius: 22px; object-fit: cover; margin: 24px 0; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); background: #fff; }
.sheet-title { font-size: 1.5rem; font-weight: 800; text-align: center; }
.sheet-track { opacity: .85; text-align: center; min-height: 1.5em; margin-top: 4px; max-width: 480px; }
.sheet-controls { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 380px; margin: 26px 0 18px; }
.sheet-controls .play-btn { background: #fff; color: #111; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.sheet-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn-glass { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn-glass:hover, .btn-glass.active, .btn-glass.is-active { background: rgba(255, 255, 255, .26); color: #fff; }
.sheet-history { width: 100%; max-width: 480px; margin-top: 26px; }
.sheet .track-list li { border-color: rgba(255, 255, 255, .12); }
.sheet .track-list time { color: rgba(255, 255, 255, .6); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(120deg, #136f69 0%, #1f8f88 45%, #2c6f9e 100%); color: #fff; padding: 42px 0 46px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 70%); }
.hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 10px; }
.hero .lead { opacity: .92; max-width: 620px; font-size: 1.1rem; }
.text-gradient { background: linear-gradient(90deg, #ffe08a, #ff9a8b); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-search { display: flex; align-items: center; background: #fff; border-radius: 16px; padding: 6px; max-width: 560px; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); }
.hero-search > i { color: #8a94a0; margin: 0 8px 0 12px; }
.hero-search input { flex: 1; border: 0; outline: none; background: transparent; min-width: 0; font-size: 1.05rem; color: #1d2430; }
.hero-search.plain { box-shadow: var(--shadow); background: var(--surface); }
.hero-search.plain input { color: var(--text); }
.hero-wave { display: flex; align-items: flex-end; gap: 7px; height: 120px; }
.hero-wave span { width: 10px; border-radius: 6px; background: rgba(255, 255, 255, .55); animation: wave 1.2s ease-in-out infinite; }
.hero-wave span:nth-child(odd) { animation-delay: -.4s; } .hero-wave span:nth-child(3n) { animation-delay: -.8s; }
@keyframes wave { 0%, 100% { height: 20%; } 50% { height: 100%; } }
@media (prefers-reduced-motion: reduce) { .hero-wave span, .eq i { animation: none !important; } }

/* ---------- Секції, чіпи ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 14px; }
.section-head h2 { font-size: 1.35rem; margin: 0; }
.section-head a { font-weight: 700; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 7px 14px; border-radius: 30px; background: var(--surface); color: var(--text); font-weight: 700; font-size: .92rem; border: 1px solid var(--border); transition: .15s; cursor: pointer; }
.chip small { color: var(--muted); font-weight: 600; }
.chip:hover { color: var(--brand); border-color: var(--brand); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.active small { color: rgba(255, 255, 255, .8); }
.chip-glass { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .25); padding: 4px 12px; font-size: .82rem; }
.chip-glass:hover { color: #fff; background: rgba(255, 255, 255, .28); border-color: rgba(255, 255, 255, .4); }
.chip-check input { accent-color: var(--brand); margin: 0; }
.chip-check:has(input:checked) { border-color: var(--brand); background: rgba(31, 143, 136, .1); }
.sort-bar { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); }
.sort-bar a, .tabs-scroll a { padding: 8px 14px; color: var(--muted); font-weight: 700; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sort-bar a.active, .tabs-scroll a.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs-scroll { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); }
.tabs-scroll small { background: var(--surface-2); border-radius: 10px; padding: 1px 7px; margin-left: 2px; }
.card-soft { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.empty { text-align: center; padding: 50px 16px; color: var(--muted); }
.empty > i { font-size: 3rem; opacity: .35; margin-bottom: 14px; display: block; }
.empty p { max-width: 420px; margin: 0 auto 18px; }

/* ---------- Картки станцій ---------- */
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
@media (max-width: 575.98px) { .st-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (min-width: 576px) and (max-width: 767.98px) { .st-grid { grid-template-columns: repeat(3, 1fr); } }
.st-grid-sm { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.st-card { position: relative; min-width: 0; }
.st-card-art { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.st-card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.st-card:hover .st-card-art img { transform: scale(1.05); }
.st-card-play {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
  opacity: 0; transform: translateY(6px); transition: .2s; cursor: pointer;
}
.st-card-play .fa-play { margin-left: 3px; }
.st-card:hover .st-card-play, .st-card-play:focus, .st-card.is-current .st-card-play { opacity: 1; transform: none; outline: none; }
@media (hover: none) { .st-card-play { opacity: 1; transform: none; width: 38px; height: 38px; } }
.st-card-title { display: block; margin-top: 8px; font-weight: 800; color: var(--text); line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.st-card-title.stretched::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.st-card-title:hover { color: var(--brand); }
.st-card-meta { font-size: .78rem; color: var(--muted); display: flex; gap: 10px; margin-top: 2px; }
.eq { position: absolute; left: 10px; bottom: 12px; display: none; gap: 3px; align-items: flex-end; height: 18px; z-index: 2; background: rgba(0, 0, 0, .45); padding: 4px 5px; border-radius: 6px; box-sizing: content-box; }
.eq i { width: 3px; background: #fff; border-radius: 2px; animation: wave .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
.st-card.is-current .eq { display: flex; }
.st-card.is-current:not(.is-playing) .eq i { animation-play-state: paused; }
.st-card.is-current .st-card-art::after { content: ''; position: absolute; inset: 0; border: 3px solid var(--brand); border-radius: inherit; pointer-events: none; z-index: 1; }
.pending-badge { position: absolute; top: 8px; left: 8px; z-index: 3; }

.st-list { display: flex; flex-direction: column; gap: 8px; }
.st-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.st-row img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #fff; }
.st-row-title { font-weight: 800; color: var(--text); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.recent-row { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.recent-row .st-card { width: 120px; flex-shrink: 0; }

/* ---------- Жанри ---------- */
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
@media (max-width: 575.98px) { .genre-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.genre-tile { position: relative; height: 120px; border-radius: var(--radius); overflow: hidden; color: #fff; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(135deg, hsl(var(--h), 60%, 45%), hsl(calc(var(--h) + 40), 65%, 35%)); box-shadow: var(--shadow); }
.genre-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; mix-blend-mode: luminosity; transition: transform .3s; }
.genre-tile:hover { color: #fff; } .genre-tile:hover img { transform: scale(1.06); }
.genre-name { position: relative; font-weight: 800; font-size: 1.2rem; line-height: 1.2; }
.genre-count { position: relative; font-size: .82rem; opacity: .9; }

/* ---------- Сторінка станції ---------- */
.station-hero { position: relative; z-index: 2; color: #fff; padding: 34px 0 30px; margin-bottom: 24px; background: #1b2a33; }
.station-hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.station-hero-bg::before { content: ''; position: absolute; inset: -60px; background: center/cover no-repeat; background-image: var(--cover); filter: blur(45px) brightness(.5) saturate(1.4); transform: scale(1.15); }
.station-hero > .container-xl { position: relative; }
.station-hero-inner { display: flex; gap: 32px; align-items: center; }
.station-cover { width: 260px; flex-shrink: 0; }
.station-cover img { width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; border-radius: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); background: #fff; }
.station-main { flex: 1; min-width: 0; }
.station-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.station-title { font-size: clamp(1.7rem, 4vw, 2.8rem); margin-bottom: 14px; word-break: break-word; }
.now-box { background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: 10px 14px; margin-bottom: 18px; max-width: 640px; }
.now-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; display: inline-flex; align-items: center; gap: 7px; }
.now-title { font-size: 1.1rem; font-weight: 700; margin-top: 2px; word-break: break-word; }
.now-title .artist { opacity: .75; font-weight: 600; }
.text-muted-light { color: rgba(255, 255, 255, .6); }
.station-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.station-actions .play-btn.xl { box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.station-actions .btn-glass { height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.like-group .btn-glass:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.like-group .btn-glass:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.fav-btn.is-active i { color: #ff6b6b; }
.station-stats { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 18px; font-size: .9rem; opacity: .85; }
@media (max-width: 767.98px) {
  .station-hero { padding: 20px 0 22px; }
  .station-hero-inner { flex-direction: column; text-align: center; gap: 18px; }
  .station-cover { width: 200px; }
  .station-cats, .station-actions, .station-stats { justify-content: center; }
  .now-box { margin-left: auto; margin-right: auto; }
}
.collapsed-text { max-height: 220px; overflow: hidden; position: relative; }
.collapsed-text.is-long::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60px; background: linear-gradient(transparent, var(--surface)); }
.collapsed-text.expanded { max-height: none; } .collapsed-text.expanded::after { display: none; }
.station-about { line-height: 1.6; }

.track-list { list-style: none; padding: 0; margin: 0; }
.track-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.track-list li:last-child { border-bottom: 0; }
.track-list time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .85rem; width: 42px; flex-shrink: 0; }
.track-list span { flex: 1; min-width: 0; word-break: break-word; }
.track-list li.is-new { animation: flash 1.2s; }
@keyframes flash { from { background: rgba(31, 143, 136, .18); } to { background: transparent; } }
.track-yt { color: var(--muted); opacity: .6; } .track-yt:hover { color: #ff0000; opacity: 1; }
.track-list.compact li { padding: 6px 0; font-size: .9rem; }

/* ---------- Коментарі ---------- */
.comment { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.comment-author { font-weight: 800; color: var(--text); }
.comment-text { margin-top: 3px; word-break: break-word; line-height: 1.5; }
.comment-form { display: flex; gap: 12px; margin-bottom: 10px; }

/* ---------- Профіль ---------- */
.profile-hero { background: linear-gradient(120deg, #136f69, #2c6f9e); color: #fff; padding: 30px 0 0; margin-bottom: 20px; }
.profile-head { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.profile-avatar .avatar { border: 4px solid rgba(255, 255, 255, .85); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.profile-head h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.profile-meta { display: flex; gap: 16px; flex-wrap: wrap; opacity: .9; font-size: .92rem; }
.profile-about { margin: 10px 0 0; opacity: .95; max-width: 640px; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 22px; }
.profile-stats > div { text-align: center; padding: 14px 6px; }
.profile-stats b { display: block; font-size: 1.4rem; font-weight: 800; }
.profile-stats span { font-size: .8rem; opacity: .85; }
.profile-hero .profile-stats { border-top: 1px solid rgba(255, 255, 255, .2); }
@media (max-width: 575.98px) { .profile-head { flex-direction: column; text-align: center; } .profile-meta, .profile-actions { justify-content: center; } }

/* ---------- Форми ---------- */
.auth-box { max-width: 460px; margin: 10px auto 40px; padding: 30px 26px; }
.cover-upload { position: relative; display: block; cursor: pointer; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; max-width: 220px; margin: 0 auto 6px; background: var(--surface-2); }
.cover-upload img { width: 100%; height: 100%; object-fit: cover; }
.cover-upload span { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-weight: 700; font-size: .9rem; }
.prose { line-height: 1.7; }
.donate-card { background: linear-gradient(135deg, #1f8f88, #2c6f9e); color: #fff; border-radius: 18px; padding: 22px; max-width: 420px; box-shadow: var(--shadow); }
.donate-number { font-size: 1.6rem; font-weight: 800; letter-spacing: .06em; margin: 8px 0 12px; font-variant-numeric: tabular-nums; }
.blockquote-soft { border-left: 4px solid var(--brand); padding: 4px 0 4px 14px; margin: 14px 0; color: var(--muted); font-style: italic; }
.blockquote-soft cite { display: block; font-size: .85rem; font-style: normal; margin-top: 2px; }

/* ---------- Футер, тости ---------- */
.site-footer { margin-top: 50px; padding: 30px 0 20px; background: var(--surface); border-top: 1px solid var(--border); }
.site-footer h6 { font-weight: 800; margin-bottom: 10px; }
.site-footer a:not(.brand) { display: block; color: var(--muted); padding: 3px 0; }
.site-footer a:not(.brand):hover { color: var(--brand); }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--player-h) + var(--tabbar-h) + var(--safe-b) + 14px); z-index: 2000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: calc(100% - 32px); max-width: 440px; }
.toast-msg { background: #222b35; color: #fff; padding: 11px 18px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-weight: 600; animation: toastIn .25s; pointer-events: auto; }
.toast-msg.error { background: #c62828; }
.toast-msg.success { background: #1f8f88; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
.route-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--brand); z-index: 2100; width: 0; opacity: 0; transition: width .3s, opacity .3s; }
.route-progress.active { opacity: 1; width: 70%; transition: width 4s cubic-bezier(.1, .7, .1, 1); }
.route-progress.done { width: 100%; opacity: 0; transition: width .2s, opacity .4s .2s; }
.page.is-leaving { opacity: .55; transition: opacity .15s; }

/* Перемикач якості на сторінці станції */
.quality-switch { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.q-btn { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .2); border-radius: 20px; padding: 3px 12px; font-size: .85rem; font-weight: 700; cursor: pointer; transition: .15s; }
.q-btn:hover { background: rgba(255, 255, 255, .26); }
.q-btn.active { background: #fff; color: #1d2430; border-color: #fff; }
.q-btn:focus { outline: none; box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .35); }

/* Перемикач мови */
.lang-btn { font-size: .78rem; font-weight: 800; letter-spacing: .02em; }
.site-footer .footer-langs a { display: inline-block; color: var(--muted); margin-left: 12px; padding: 0; }
.footer-langs a.active { color: var(--brand); font-weight: 800; }
.dropdown-item.active, .dropdown-item:active { background: var(--brand); color: #fff; }
.stream-check { display: block; margin-top: 4px; min-height: 1em; word-break: break-word; }

/* Статистика онлайн */
.site-stats { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-stats .live-dot, .listeners-now .live-dot { background: #2ecc71; box-shadow: none; animation: none; }
.listeners-now { display: inline-flex; align-items: center; gap: 6px; }

/* Реклама: окремий блок з підписом, не стрибає й не заважає */
.ad-slot { margin: 28px auto; max-width: 970px; text-align: center; min-height: 120px; }
.ad-slot .ad-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.ad-slot ins { display: block; }
.ad-slot.ad-side { margin: 0 0 24px; min-height: 250px; }
.ad-slot:has(ins[data-ad-status="unfilled"]), .ad-slot:has(ins[data-ad-status="unfill-optimized"]), .ad-slot.is-unfilled { display: none; }
.stat-flash { animation: statFlash 1s; }
@keyframes statFlash { from { color: var(--brand); } }

/* Hero: плавний фон і хвилі */
.hero { background-size: 200% 200%; animation: heroShift 18s ease-in-out infinite alternate; padding-bottom: 70px; }
@keyframes heroShift { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-bg span { position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(60px); opacity: .35; }
.hero-bg span:nth-child(1) { background: #3fd2c7; left: -120px; top: -160px; animation: blob1 22s ease-in-out infinite alternate; }
.hero-bg span:nth-child(2) { background: #5b7fd6; right: -140px; bottom: -220px; animation: blob2 26s ease-in-out infinite alternate; }
@keyframes blob1 { to { transform: translate(260px, 120px) scale(1.2); } }
@keyframes blob2 { to { transform: translate(-300px, -80px) scale(1.15); } }
.hero-waves { position: absolute; left: 0; bottom: -1px; width: 200%; height: 70px; pointer-events: none; }
.hero-waves path { fill: var(--bg); }
.hero-waves .w1 { opacity: .25; animation: waveMove 16s linear infinite; }
.hero-waves .w2 { opacity: .45; animation: waveMove 11s linear infinite reverse; }
.hero-waves .w3 { opacity: 1; }
@keyframes waveMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.hero::after { display: none; }
@media (prefers-reduced-motion: reduce) { .hero, .hero-bg span, .hero-waves path { animation: none !important; } }

/* Історія треків */
.track-list time small { display: block; font-size: .7rem; line-height: 1; opacity: .8; }
.track-link { color: var(--muted); opacity: .55; padding: 2px 4px; }
.track-link:hover { opacity: 1; }
.track-hc:hover { color: var(--brand); }
.track-yt:hover { color: #ff0000; }

/* Живий пошук */
.top-search, .hero-search { position: relative; }
.search-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 1100; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; max-height: 70vh; overflow-y: auto; text-align: left; }
.top-search .search-suggest { min-width: 300px; }
.search-suggest .sg-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; cursor: pointer; }
.search-suggest .sg-item:hover, .search-suggest .sg-item.active { background: var(--surface-2); }
.search-suggest img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: #fff; flex-shrink: 0; }
.search-suggest .sg-title { flex: 1; min-width: 0; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-suggest .sg-all { display: block; text-align: center; padding: 8px; font-weight: 700; }
.search-suggest .sg-empty { padding: 10px; color: var(--muted); }
@media (max-width: 575.98px) { .top-search .search-suggest { position: fixed; left: 8px; right: 8px; top: 64px; min-width: 0; } }
.hero { overflow: visible; z-index: 5; }
.hero > .container-xl { position: relative; z-index: 2; }
.track-hc img { display: block; width: 18px; height: 18px; }
.track-link.track-hc { opacity: .8; }
.track-link.track-hc:hover { opacity: 1; }
.track-list li { gap: 8px; }
.ad-slot.ad-multiplex { max-width: none; min-height: 280px; }
.donate-jar-btn { background: #000; border-color: #000; color: #fff; border-radius: 14px; }
.donate-jar-btn:hover { background: #222; color: #fff; }
[data-theme="dark"] .donate-jar-btn { background: #fff; border-color: #fff; color: #000; }
.donate-jar { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.donate-qr { text-align: center; }
.donate-qr img { display: block; width: 150px; height: 150px; padding: 10px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); margin: 0 auto 6px; }
pre, code, kbd { color: var(--text); }
pre { font-size: .85rem; }

/* Перевірка потоків */
.check-row { align-items: flex-start; }
.check-row img { margin-top: 2px; }
.check-row .st-row-title { white-space: normal; }
.check-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; max-width: 180px; }
.progress { background: var(--surface-2); }

/* Плеєр для сайту */
.modal-content.embed-modal { background: var(--surface); color: var(--text); border-radius: 18px; border: 1px solid var(--border); }
.embed-modal .modal-header { border-color: var(--border); }
.embed-modal .close { color: var(--text); }
.embed-preview { background: repeating-conic-gradient(var(--surface-2) 0% 25%, transparent 0% 50%) 50% / 16px 16px; padding: 12px; border-radius: 14px; }
.embed-preview iframe { width: 100%; height: 100px; border: 0; display: block; }
.embed-colors { display: flex; gap: 8px; }
.embed-color { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0; }
.embed-color.active { border-color: var(--text); }
.embed-opts label { cursor: pointer; font-weight: 600; }
.embed-code { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; }
/* Поля «тільки для читання» і вимкнені — в кольорах теми (Bootstrap робить їх світло-сірими) */
.form-control[readonly], .form-control:disabled { background: var(--surface-2); color: var(--text); opacity: 1; }
.embed-opts input[type=checkbox], .chip-check input { accent-color: var(--brand); width: 18px; height: 18px; vertical-align: -3px; }
.embed-opts label { font-size: .95rem; }
.embed-code { color: var(--text); line-height: 1.5; }
.embed-sites { max-height: 420px; overflow-y: auto; }
