:root {
    /* Primary color alias kept for backward compatibility */
    --primary-color: #f5f7f9;
    --prymary-color: var(--primary-color);
    --secondary-color: #f0eeff;
    /* Brand: 2024–2025 palette */
    --brand-primary: #a158ff; /* base */
    --brand-accent:  #c513da; /* accent */
    --accent-color: var(--brand-accent);
    --accent-border-color: var(--brand-primary);
    --gray-color: #e2e2e2;
    --gray-medium-color: #dbdbdb;
    --gray-dark-color: #575757;
    --black-color: #000;
    --white-color: #f2f3f4;
    --background-color: #fafafa;
    --background-footer-color: #ececec;
    --background-sidebar-color: #fffefe;
    --btn-background-color: #efe6ff40;
    --font-size-12px: 12px;
    --font-size-14px: 14px;
    /* Theming helpers */
    --text-color: #000000;
    --heading-color: #000000;
    --text-muted-color: #666666;
    --link-color: var(--brand-primary);
    --link-hover-color: var(--brand-accent);
    --inverse-text-color: #ffffff;
    /* Surfaces and inputs */
    --surface-1: #ffffff;
    --surface-2: #ffffff; /* inputs/cards */
    --input-border-color: #cfd3da;
    --input-text-color: #111111;
    --placeholder-color: #9aa0a6;
    --divider-color: #e8eaf0; /* subtle hairline for light theme */
    --row-hover-bg: #f9f9ff;
    /* Modern search UI */
    --search-height: 48px;
    --search-radius: 14px;
    --search-shadow: 0 6px 22px rgba(16, 24, 40, 0.06);
    --search-icon-color: #6b7280; /* light gray-500 */
    /* Bottom audio player height for layout spacing */
    --player-height: 80px;
    /* Approximate footer height to keep it pinned at bottom */
    --footer-height: 120px;
    /* Glass surfaces (light) */
    --glass-bg: rgba(255, 255, 255, 0.80);
    --glass-border: rgba(17, 24, 39, 0.08);
    /* Override Bootstrap dropdown active defaults to avoid blue */
    --bs-dropdown-link-active-bg: transparent;
    --bs-dropdown-link-active-color: #ffffff;
}

/* Dark theme overrides (manual) */
:root[data-theme="dark"] {
    color-scheme: dark;
    --primary-color: #0f1116;
    --secondary-color: #161a22;
    --accent-color: #bb86fc;
    --accent-border-color: #9f6be3;
    --gray-color: #2a2f3a;
    --gray-medium-color: #33394a;
    --gray-dark-color: #c7c7c7;
    --black-color: #f4f6f8;
    --white-color: #0e0f12;
    --background-color: #111322; /* dark site background */
    --background-footer-color: #12141a;
    --background-sidebar-color: #1a1f30; /* dark sidebar background */
    --btn-background-color: #efe6ff1a;
    --text-color: #e6e7ea;
    --heading-color: #e6e6e6;
    --text-muted-color: #b3b7bd;
    --link-color: #caa6ff; /* lighter primary for dark BG */
    --link-hover-color: #ff78ef; /* lighter accent on hover */
    --inverse-text-color: #ffffff;
    --player-bg: #1b0836;
    --divider-color: rgba(255,255,255,0.10); /* subtle hairline for dark theme */
    --row-hover-bg: rgba(255,255,255,0.035);
    --surface-1: #151a2a;
    --surface-2: #101422; /* inputs/cards */
    --input-border-color: #2e3447;
    --input-text-color: #e6e7ea;
    --placeholder-color: #7f8699;
    --search-shadow: 0 8px 24px rgba(2, 6, 23, 0.45);
    --search-icon-color: #9aa4b2; /* muted light for dark bg */
    --glass-bg: rgba(17, 19, 34, 0.55);
    --glass-border: rgba(255,255,255,0.12);
    /* Keep active link readable on dark */
    --bs-dropdown-link-active-bg: transparent;
    --bs-dropdown-link-active-color: #ffffff;
}

/* Match sidebar surface in dark mode */
:root[data-theme="dark"] #sidebar { background-color: var(--background-sidebar-color); }
.filter-and-sorting { border-top: 1px solid var(--divider-color); }
:root[data-theme="dark"] .filter-and-sorting { border-top-color: #5e4674; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .filter-and-sorting { border-top-color: #5e4674; }
}

/* Auto theme via system preference when no manual theme set */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: dark;
    --primary-color: #0f1116;
    --secondary-color: #161a22;
    --accent-color: #bb86fc;
    --accent-border-color: #9f6be3;
    --gray-color: #2a2f3a;
    --gray-medium-color: #33394a;
    --gray-dark-color: #c7c7c7;
    --black-color: #f4f6f8;
    --white-color: #0e0f12;
    --background-color: #111322; /* dark site background (auto) */
    --background-footer-color: #12141a;
    --background-sidebar-color: #1a1f30; /* dark sidebar background (auto) */
    --btn-background-color: #efe6ff1a;
    --text-color: #e6e7ea;
    --heading-color: #e6e6e6;
    --text-muted-color: #b3b7bd;
    --link-color: #caa6ff;
    --link-hover-color: #ff78ef;
    --inverse-text-color: #ffffff;
    --player-bg: #1b0836;
    --divider-color: #2d2833;
    --row-hover-bg: rgba(255,255,255,0.035);
    --surface-1: #151a2a;
    --surface-2: #101422;
    --input-border-color: #2e3447;
    --input-text-color: #e6e7ea;
    --placeholder-color: #7f8699;
    --search-shadow: 0 8px 24px rgba(2, 6, 23, 0.45);
    --search-icon-color: #9aa4b2;
    --glass-bg: rgba(17, 19, 34, 0.55);
    --glass-border: rgba(255,255,255,0.12);
  }

/* Compact mobile search variables */
@media (max-width: 576px) {
  :root { --search-height: 44px; --search-radius: 12px; }
}
  /* Auto-dark sidebar surface */
  :root:not([data-theme="light"]):not([data-theme="dark"]) #sidebar { background-color: var(--background-sidebar-color); }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .border-top { border-top: var(--bs-border-width) var(--bs-border-style) var(--divider-color) !important; }
}

/* Dark theme border override for Bootstrap helpers */
:root[data-theme="dark"] .border-top { border-top: var(--bs-border-width) var(--bs-border-style) var(--divider-color) !important; }

/* Minimal theme application to common elements */
body { background: var(--background-color); color: var(--text-color); }
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 { color: var(--heading-color); }
a:not(.btn) { color: var(--link-color); text-decoration: none; }
a:not(.btn):hover { color: var(--link-hover-color); text-decoration: none; }
/* Система пагинации по страницам отключена визуально на всех выборках */
#pagination { display: none !important; }
/* Subtle horizontal rule */
hr { border: 0; border-top: 1px solid var(--divider-color); opacity: 1; }
/* Subtle bottom borders to match divider tone */
.border-bottom { border-bottom-color: var(--divider-color) !important; }

/* Dark theme: neutral link color for better readability */
:root[data-theme="dark"] a:not(.btn) { color: #d6d3dc; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) a:not(.btn) { color: #d6d3dc; }
}

/* Light theme: enforce black links for readability (manual and auto) */
:root[data-theme="light"] a:not(.btn) { color: #000000; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) a:not(.btn) { color: #000000; }
}

/* Themed logos switching (light/dark/auto) */
.logo-dark { display: none !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .logo-light { display: none !important; }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .logo-dark { display: block !important; }
}
#player-bottom { /* placeholder: overridden in main block below */ }

/* Gradient layer on #content (auto from logo) */
#content { position: relative; }
#content::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 340px;
  background-image: var(--auto-gradient, none);
  background-repeat: no-repeat;
  background-size: 100% 340px;
  background-position: top left;
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: none;
  z-index: 0;
}
#content.gradient-visible::before { opacity: 1; }

/* Top play button (station page) */
#play-station.btn {
  border-radius: 999px;
  height: 42px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 20%, transparent), transparent),
    linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 72%, var(--brand-primary)));
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  transition: transform .12s ease, filter .18s ease, box-shadow .18s ease;
}
#play-station.btn:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,.22); }
#play-station.btn i { font-size: 14px; }

/* Top stream chips (station page) */
#player .stream-button {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 70%, #000);
  font-size: 12px;
  padding: 4px 12px;
  font-weight: 600;
  background-color: rgba(0,0,0,0.02);
  color: inherit;
  transition: background-color .12s ease, border-color .12s ease, transform .1s ease;
}
#player .stream-button:hover { border-color: var(--brand-accent); background-color: rgba(0,0,0,0.04); transform: translateY(-1px); }

/* Forced-colors (high contrast) safe defaults */
@media (forced-colors: active) {
  * { forced-color-adjust: auto; }
  body { background: Canvas; color: CanvasText; }
  a { color: LinkText; }
  .btn, button { border-color: ButtonText; }
  #player-bottom { background: Canvas; border-color: CanvasText; }
}

/* Print styles */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  #player-bottom, .navbar, nav.navbar, #sidebar, .footer { display: none !important; }
}

/* ===================== Add Station (Verify Cards) ===================== */
.verify-grid { row-gap: 16px; }
.verify-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px;
  border-radius: 16px;
  background: var(--surface-1);
  color: var(--text-color);
  border: 1px solid var(--divider-color);
  box-shadow: 0 8px 18px rgba(16,24,40,.06);
  transition: transform .14s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}
.verify-card:hover { 
  transform: translateY(-2px);
  border-color: var(--accent-border-color);
  box-shadow: 0 12px 26px rgba(16,24,40,.10);
}
.verify-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-primary) 40%, transparent);
  outline-offset: 3px;
}
.verify-card i { 
  color: var(--brand-primary); 
  line-height: 1; 
}
.verify-card h3 {
  margin: 8px 0 4px;
  font-weight: 800;
  color: var(--heading-color);
}
.verify-card p {
  margin: 0;
  color: var(--text-muted-color);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .verify-card {
    background: var(--surface-2);
    box-shadow: 0 10px 24px rgba(2,6,23,.42);
  }
}

:root[data-theme="dark"] .verify-card {
  background: var(--surface-2);
  box-shadow: 0 10px 24px rgba(2,6,23,.42);
}

/* ===================== Add Station Form (2025 UI) ===================== */
.form-card {
  background: var(--surface-1);
  border: 1px solid var(--divider-color);
  border-radius: 16px;
  padding: 24px 22px 26px;
  box-shadow: 0 8px 22px rgba(16,24,40,.06);
}
:root[data-theme="dark"] .form-card,
:root:not([data-theme="light"]):not([data-theme="dark"]) .form-card {
  background: var(--surface-2);
  box-shadow: 0 10px 28px rgba(2,6,23,.42);
}
.form-card h2 {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--heading-color);
  margin: 20px 0 10px;
}
.form-card h2:not(:first-of-type) {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--divider-color);
}
.form-card .form-group { margin-bottom: 14px; }
.form-card label {
  font-weight: 800;
  color: var(--heading-color);
  margin-bottom: 6px;
  font-size: .95rem;
}
.form-card .form-text { color: var(--text-muted-color) !important; font-size: .86rem; line-height: 1.25; }
.form-card input[type="text"],
.form-card input[type="url"],
.form-card input[type="email"],
.form-card input[type="tel"],
.form-card input[type="number"],
.form-card textarea,
.form-card select {
  width: 100%;
  background: var(--surface-2);
  color: var(--input-text-color);
  border: 1px solid var(--input-border-color);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: .95rem;
  transition: border-color .14s ease, box-shadow .18s ease, background-color .14s ease;
  box-shadow: 0 1px 0 rgba(16,24,40,.02);
}
.form-card textarea { min-height: 96px; }
.form-card input:focus,
.form-card textarea:focus,
.form-card select:focus {
  outline: none;
  border-color: var(--accent-border-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 24%, transparent);
}
.form-card input::placeholder,
.form-card textarea::placeholder { color: var(--placeholder-color); opacity: 1; }
.form-card .invalid-feedback { color: #d32f2f; font-weight: 600; }
.form-card .row { row-gap: 14px; }

/* Select2 alignment inside form-card */
.form-card .select2-container--default .select2-selection--single,
.form-card .select2-container--default .select2-selection--multiple {
  background: var(--surface-2);
  border: 1px solid var(--input-border-color);
  border-radius: 14px;
  min-height: 46px;
}
.form-card .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 46px; font-size: .95rem; }
.form-card .select2-container--default .select2-selection--single .select2-selection__arrow { height: 46px; }
.form-card .select2-container--default .select2-selection--multiple { padding: 6px 6px; min-height: 46px; }
.form-card .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: var(--surface-1);
  border: 1px solid var(--divider-color);
  border-radius: 999px;
  font-size: .86rem;
}

.form-card .btn.btn-primary {
  border-radius: 999px;
  font-weight: 800;
  padding: 12px 20px;
  background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent),
    linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary)));
  border: 0;
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
}
.form-card .btn.btn-primary:hover { filter: brightness(1.03); transform: translateY(-1px); }
.form-card .btn.btn-primary:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-primary) 40%, transparent); outline-offset: 3px; }

@media (max-width: 576px) {
  .form-card { padding: 18px 14px 20px; }
  .form-card .row { row-gap: 12px; }
}

/* --------- Body Options ---------- */

html,
body,
#content-container,
#content {
    max-width: 100vw; 
    overflow-x: hidden;
    overscroll-behavior-x: none;
    touch-action: pan-y;
}

/* ===================== Comments (2025 UI) ===================== */
.comment-card { position: relative; background: var(--surface-1); border: 1px solid var(--divider-color); border-radius: 12px; padding: 12px; margin: 8px 0; box-shadow: 0 6px 16px rgba(16,24,40,.05); }
:root[data-theme="dark"] .comment-card { background: color-mix(in srgb, var(--surface-1) 88%, rgba(255,255,255,0)); box-shadow: 0 8px 22px rgba(2,6,23,.42); }
.comment-header { display:flex; align-items:center; gap:10px; margin-bottom: 6px; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: var(--surface-2); display:flex; align-items:center; justify-content:center; }
.comment-avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; display:block; }
.avatar-fallback { width: 100%; height: 100%; display:flex; align-items:center; justify-content:center; color: var(--text-muted-color); }
.avatar-fallback i { font-size: 20px; line-height: 1; }
.avatar-fallback.friendly { background:
  radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 10%, transparent), transparent),
  linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 16%, #fff), color-mix(in srgb, var(--brand-accent) 12%, var(--surface-1))); color: color-mix(in srgb, var(--brand-primary) 60%, #000); }
.comment-meta { display:flex; flex-direction:column; min-width:0; }
.author-and-time { display:flex; gap:8px; align-items:baseline; flex-wrap:wrap; }
.comment-author { color: var(--heading-color); font-weight: 800; }
.comment-time { color: var(--text-muted-color); font-size: .9rem; }
.comment-body { margin-left: 48px; margin-top: -6px; }
.comment-text { margin: 0; font-size: 0.95rem; line-height: 1.42; color: var(--text-color); }
.comment-actions { display:flex; align-items:center; gap: 8px; margin-left: 48px; margin-top: 8px; }
.btn-reaction { display:inline-flex; align-items:center; gap:6px; border: 1px solid var(--divider-color); background: var(--surface-2); border-radius: 999px; padding: 4px 10px; color: var(--text-color); font-weight: 700; font-size: .86rem; transition: background .12s ease, border-color .12s ease, transform .08s ease; }
.btn-reaction i { font-size: 16px; }
.btn-reaction:hover { background: var(--row-hover-bg); transform: translateY(-1px); }
.btn-reaction.active { color: #fff; border-color: var(--brand-primary); background:
  radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent),
  linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary))); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.btn-like.active i, .btn-dislike.active i { filter: brightness(1.1); }
.btn-reaction .count { min-width: 1.5em; text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 576px) {
  .comment-body, .comment-actions { margin-left: 0; }
}

/* Segmented control (generic, used for comments and sorting) */
.comments-filter .filter-label { color: var(--text-muted-color); font-weight: 600; }
.segmented { display: inline-flex; padding: 2px; background: var(--surface-2); border: 1px solid var(--divider-color); border-radius: 999px; gap: 2px; }
.seg-btn { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-weight: 800; color: var(--text-color); text-decoration: none; }
.seg-btn:hover { background: var(--row-hover-bg); text-decoration: none; }
.seg-btn.active { color: #fff; background:
  radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent),
  linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary))); box-shadow: 0 6px 18px rgba(0,0,0,.18); }

/* Light theme tweaks: improve contrast inside segmented controls */
:root[data-theme="light"] .segmented { background: #f4f6fb; border-color: #e3e7f0; }
:root[data-theme="light"] .seg-btn { color: #273142; }
:root[data-theme="light"] .seg-btn:hover { background: #eef1f7; }
:root[data-theme="light"] .seg-btn.active { color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,.18); }

/* Auto-light (system) when no manual theme set */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .segmented { background: #f4f6fb; border-color: #e3e7f0; }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .seg-btn { color: #273142; }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .seg-btn:hover { background: #eef1f7; }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .seg-btn.active { color: #ffffff; text-shadow: 0 1px 0 rgba(0,0,0,.18); }
}

/* Sidebar dropdowns (theme + language) — 2025 glass style */
.sidebar-wrapper .dropdown-toggle { color: var(--text-color); font-weight: 800; text-decoration: none; }
.sidebar-wrapper .dropdown-toggle:hover { text-decoration: none; filter: brightness(1.02); }
.sidebar-wrapper .dropdown-menu {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 14px 32px rgba(16,24,40,.18);
  border-radius: 14px;
  padding: 6px;
  min-width: 220px;
}
.sidebar-wrapper .dropdown-item {
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text-color);
  font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}
.sidebar-wrapper .dropdown-item:hover, .sidebar-wrapper .dropdown-item:focus {
  background: var(--row-hover-bg);
  color: var(--text-color);
}
.sidebar-wrapper .dropdown-item.active,
.sidebar-wrapper .dropdown-item:active,
.language-dropdown .dropdown-item.active,
.language-dropdown .dropdown-item:active,
.dropdown-menu.rs-lang-menu .dropdown-item.active,
.dropdown-menu.rs-lang-menu .dropdown-item:active {
  color: #fff !important;
  background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent) !important,
    linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary))) !important;
  box-shadow: 0 6px 18px rgba(0,0,0,.18) !important;
}
/* Remove default Bootstrap primary (blue) highlight for active items in our language menu scope */
.language-dropdown .dropdown-item:focus,
.dropdown-menu.rs-lang-menu .dropdown-item:focus {
  background: var(--row-hover-bg) !important;
  color: var(--text-color) !important;
}
.sidebar-wrapper .dropdown-divider { border-top-color: var(--divider-color); opacity: 1; }
.sidebar-wrapper .language-menu-close { color: var(--text-color); font-weight: 800; }
.sidebar-wrapper .language-menu-close:hover { background: var(--row-hover-bg); color: var(--text-color); }
/* Small muted note under sidebar items */
.sidebar-subnote { font-size: 0.82rem; color: var(--text-muted-color); margin-top: 6px; }
.sidebar-subnote a { color: inherit; text-decoration: none; }
.sidebar-subnote a:hover { text-decoration: underline; }
/* Align theme label under toggle (accounting for icon width + gap) */
/* Removed current-theme-label block */

/* ===================== Profile Settings (2025 UI) ===================== */
.profile-card { margin-top: 8px; }
.profile-card .avatar-block { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; }
.profile-card .avatar-preview { width: 92px; height: 92px; border-radius: 14px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--divider-color); display: grid; place-items: center; }
.profile-card .avatar-img { width: 100%; height: 100%; object-fit: cover; }
.profile-card .avatar-actions { display: flex; flex-direction: column; gap: 6px; }
.profile-card .form-group { margin-bottom: 14px; }
.profile-card label { font-weight: 800; color: var(--heading-color); margin-bottom: 6px; }
.profile-card input[type="text"],
.profile-card input[type="email"],
.profile-card input[type="password"] { background: var(--surface-2); color: var(--input-text-color); border: 1px solid var(--input-border-color); border-radius: 14px; padding: 12px 14px; transition: border-color .14s ease, box-shadow .18s ease, background-color .14s ease; }
.profile-card input:focus { outline: none; border-color: var(--accent-border-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 24%, transparent); }
.profile-card .save-button { border-radius: 999px; padding: 10px 18px; font-weight: 800; }
.profile-card .separator-line { border: 0; border-top: 1px solid var(--divider-color); opacity: 1; margin: 12px 0; }
.profile-card .invalid-feedback { font-weight: 700; }

@media (max-width: 576px) {
  .profile-card .avatar-block { grid-template-columns: 72px 1fr; gap: 10px; }
  .profile-card .avatar-preview { width:72px; height:72px; border-radius: 12px; }
}

/* ===================== Page Article (info pages) ===================== */
.page-article { color: var(--text-color); font-size: 1rem; line-height: 1.7; }
.page-article p { margin: 0 0 1rem; }
.page-article h2, .page-article h3, .page-article h4 { color: var(--heading-color); font-weight: 900; margin: 1.25rem 0 .5rem; line-height: 1.25; }
.page-article h2 { font-size: 1.4rem; }
.page-article h3 { font-size: 1.2rem; }
.page-article h4 { font-size: 1.05rem; }
.page-article ul, .page-article ol { padding-left: 1.25rem; margin: .75rem 0; }
.page-article li { margin: .25rem 0; }
.page-article a { color: var(--link-color); text-decoration: underline; }
.page-article a:hover { color: var(--link-hover-color); }
.page-article img { max-width: 100%; height: auto; display: block; border-radius: 16px; border: 1px solid var(--divider-color); background: var(--surface-1); box-shadow: 0 8px 24px rgba(16,24,40,.12); margin: .5rem auto 1rem; }
.page-article figure { margin: 0 0 1.2rem; }
.page-article figcaption { text-align: center; margin-top: .5rem; font-size: .9rem; color: var(--text-muted-color); }
.page-article blockquote { margin: 1rem 0; padding: .75rem 1rem; border-left: 4px solid var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 6%, var(--surface-1)); border-radius: 12px; }
.page-article hr { border: 0; border-top: 1px solid var(--divider-color); opacity: 1; margin: 1.2rem 0; }
.page-article pre, .page-article code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.page-article pre { overflow: auto; padding: .75rem 1rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--divider-color); }
.page-article table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.page-article th, .page-article td { border: 1px solid var(--divider-color); padding: .5rem .75rem; }

/* ===================== Home (2025 UI) ===================== */
.home-hero-title { font-weight: 900; letter-spacing: .2px; color: var(--heading-color); }
.home-card { background: var(--surface-1); border: 1px solid var(--divider-color); border-radius: 16px; box-shadow: 0 8px 22px rgba(16,24,40,.06); }
:root[data-theme="dark"] .home-card,
:root:not([data-theme="light"]):not([data-theme="dark"]) .home-card { background: var(--surface-2); box-shadow: 0 10px 24px rgba(2,6,23,.42); }
.home-section-title { font-weight: 900; color: var(--heading-color); }
.home-page .home-section-title { margin-top: 18px !important; margin-bottom: 14px !important; }
@media (min-width: 992px) {
  .home-page .home-section-title { margin-top: 22px !important; margin-bottom: 16px !important; }
}
.home-subtitle { color: var(--text-color); }
.home-subtitle p { color: var(--text-color); max-width: 900px; margin: 0 auto; }

/* Harmonized vertical rhythm on homepage */
.home-page section { margin-bottom: 22px !important; }
.home-page .home-subtitle { margin: 8px 0 16px !important; }
.home-page .search { margin: 16px 0 22px !important; }
.home-page .country-detection { margin: 16px 0 24px !important; }
.home-page .container.home-container-b { margin-top: 22px !important; margin-bottom: 22px !important; }
@media (min-width: 992px) {
  .home-page section { margin-bottom: 26px !important; }
  .home-page .home-subtitle { margin: 10px 0 18px !important; }
  .home-page .search { margin: 18px 0 26px !important; }
  .home-page .country-detection { margin: 22px 0 28px !important; }
  .home-page .container.home-container-b { margin-top: 26px !important; margin-bottom: 26px !important; }
}

/* Top stations grid */
.network-stations-grid .network-station-item a { border-radius: 14px; transition: transform .12s ease, box-shadow .18s ease, background-color .18s ease; }
.network-station-logo { border-radius: 12px; background: var(--surface-1); border: 1px solid var(--divider-color); box-shadow: 0 8px 20px rgba(16,24,40,.08); }
.network-station-item a:hover { transform: translateY(-2px); }

/* Popular genres */
.genre-item { border-radius: 14px; border: 1px solid var(--divider-color); background: var(--surface-1); transition: background .14s ease, border-color .14s ease, transform .12s ease; }
.genre-item:hover { background: var(--row-hover-bg); transform: translateY(-1px); }
.genre-item .genre-name { font-weight: 800; color: var(--heading-color); }
.genre-item .genre-station-count { color: var(--text-muted-color); }

/* Popular countries */
.popular-countries .country-item { border-radius: 14px; border: 1px solid var(--divider-color) !important; background: var(--surface-1); transition: transform .12s ease, background .14s ease, border-color .14s ease; }
.popular-countries .country-item:hover { background: var(--row-hover-bg); transform: translateY(-1px); }
.popular-countries .network-station-name span { color: var(--text-color) !important; }

/* Genre top stations sections */
.genre-top-stations { border-radius: 16px; background: var(--surface-1); border: 1px solid var(--divider-color); }
.genre-top-stations.alt-bg { background: color-mix(in srgb, var(--brand-primary) 3%, var(--surface-1)); }
.home-page .genre-top-stations { margin-bottom: 32px !important; padding: 16px 0 !important; }
@media (min-width: 992px) {
  .home-page .genre-top-stations { margin-bottom: 36px !important; }
}


/* Mobile dropdown sizing and touch targets */
@media (max-width: 991.98px) {
  .sidebar-wrapper .dropdown-menu {
    min-width: calc(100% - 16px);
    left: 8px !important;
    right: 8px !important;
    padding: 8px;
  }
  .sidebar-wrapper .dropdown-item { padding: 12px 14px; }
}

/* Light theme: increase readability inside glass menu */
:root[data-theme="light"] .sidebar-wrapper .dropdown-menu { background: rgba(255,255,255,.9); border-color: rgba(17,24,39,.08); }
:root[data-theme="light"] .sidebar-wrapper .dropdown-item.active { text-shadow: 0 1px 0 rgba(0,0,0,.18); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .sidebar-wrapper .dropdown-menu { background: rgba(255,255,255,.9); border-color: rgba(17,24,39,.08); }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .sidebar-wrapper .dropdown-item.active { text-shadow: 0 1px 0 rgba(0,0,0,.18); }
}

/* Comments pagination 2025 */
.pagination-2025 { display:flex; align-items:center; justify-content:center; gap: 10px; margin-top: 12px; }
.pagination-2025 .pager { display:flex; gap:6px; }
.pagination-2025 .pages { display:flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.pagination-2025 .page-link { display:inline-flex; align-items:center; justify-content:center; height: 34px; min-width: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--divider-color); background: var(--surface-2); color: var(--text-color); font-weight: 700; text-decoration: none; transition: background .12s ease, border-color .12s ease, transform .08s ease; }
.pagination-2025 .page-link:hover { background: var(--row-hover-bg); transform: translateY(-1px); }
.pagination-2025 .page-link.current { color: #fff; border-color: var(--brand-primary); background:
  radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent),
  linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary))); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.pagination-2025 .page-link.disabled { opacity: .45; pointer-events: none; }
.pagination-2025 .pager-btn { font-size: 16px; }
.pagination-2025 .chip { font-variant-numeric: tabular-nums; }

/* Modern baseline and accessibility tweaks */
:root { color-scheme: light; }
*, *::before, *::after { box-sizing: border-box; }
/* Use focus-visible to avoid focus rings on mouse interactions */
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid #7d14db; outline-offset: 2px; }

@media (prefers-contrast: more) {
  :focus-visible { outline-width: 3px; }
}

/* Respect user preference to reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { 
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  /* Disable prominent spinners and marquee effects */
  .refresh-icon.rotating,
  #ajax-loader-overlay .loader,
  .list-player-button.loading::after,
  .scrolling-track-title .scrolling-inner { animation: none !important; }
}

body.no-scroll {
    overflow: hidden;
}

body {
    overflow-x: hidden;
    font-size: 0.89rem;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Cookie Consent Banner === */
.cookie-consent-banner {
    position: fixed;
    /* Place banner just above the fixed player */
    bottom: calc(var(--player-height) + 12px);
    left: 0;
    right: 0;
    z-index: 9999;
    background: #17062e;
    color: #fff;
    padding: 36px 14px;
    text-align: center;
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.20);
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
}

/* When cookie banner is visible, reserve extra space so footer not overlapped */
body:has(#cookieConsentBanner) #content {
    padding-bottom: calc(var(--player-height) + 12px + 140px);
}
body:has(#cookieConsentBanner) .footer {
    margin-bottom: 140px;
}
/* Fallback for browsers without :has() */
body.has-cookie-banner #content {
    padding-bottom: calc(var(--player-height) + 12px + 140px);
}
body.has-cookie-banner .footer {
    margin-bottom: 140px;
}

/* Alerts: ensure close button doesn't overlap text */
.alert.alert-dismissible {
    padding-right: 3.25rem; /* space for .btn-close on the right */
}

/* === Trendy Alerts (2025 UI) === */
.alert { 
  --_bg: color-mix(in srgb, var(--surface-1) 92%, transparent);
  --_tint: transparent;               /* цветной полупрозрачный слой */
  --_bd: var(--glass-border);         /* цвет рамки */
  --_stripe: var(--_bd);              /* цвет левой полосы */
  --_fg: var(--text-color);           /* цвет текста */
  position: relative;
  overflow: hidden;
  background: linear-gradient(0deg, var(--_tint), transparent), var(--_bg);
  color: var(--_fg);
  border: 1px solid var(--_bd);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(16,24,40,.08);
  backdrop-filter: saturate(140%) blur(6px);
}
.alert::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--_stripe);
}
:root[data-theme="dark"] .alert {
  --_bg: color-mix(in srgb, var(--surface-1) 82%, rgba(255,255,255,0));
  box-shadow: 0 14px 34px rgba(2,6,23,.45);
}
.alert a { color: var(--link-color); text-decoration: underline; }
.alert a:hover { color: var(--link-hover-color); }
.alert .btn-close { filter: none; opacity: .6; }
:root[data-theme="dark"] .alert .btn-close { filter: invert(1) brightness(1.2); opacity: .8; }
.alert .btn-close:hover { opacity: 1; }

/* Variants with soft, modern tones */
/* Цветные алерты в стиле 2025: мягкий цветовой слой, акцентная полоса слева */
.alert-success { 
  --_tint: color-mix(in srgb, #22c55e 18%, transparent);
  --_bg: color-mix(in srgb, var(--surface-1) 92%, transparent);
  --_bd: color-mix(in srgb, #22c55e 40%, var(--glass-border));
  --_stripe: linear-gradient(180deg, #22c55e, color-mix(in srgb, #22c55e 70%, #111));
  --_fg: #0a0a0a; /* более читаемый текст в auto/light */
}
:root[data-theme="dark"] .alert-success {
  --_tint: color-mix(in srgb, #22c55e 14%, transparent);
  --_bg: color-mix(in srgb, var(--surface-2) 90%, rgba(255,255,255,0));
  --_fg: #bff6da;
}
.alert-danger { 
  --_tint: color-mix(in srgb, #ef4444 18%, transparent);
  --_bg: color-mix(in srgb, var(--surface-1) 92%, transparent);
  --_bd: color-mix(in srgb, #ef4444 42%, var(--glass-border));
  --_stripe: linear-gradient(180deg, #ef4444, color-mix(in srgb, #ef4444 70%, #111));
  --_fg: #0a0a0a;
}
:root[data-theme="dark"] .alert-danger {
  --_tint: color-mix(in srgb, #ef4444 14%, transparent);
  --_bg: color-mix(in srgb, var(--surface-2) 90%, rgba(255,255,255,0));
  --_fg: #fecaca;
}
.alert-warning { 
  --_tint: color-mix(in srgb, #f59e0b 18%, transparent);
  --_bg: color-mix(in srgb, var(--surface-1) 92%, transparent);
  --_bd: color-mix(in srgb, #f59e0b 44%, var(--glass-border));
  --_stripe: linear-gradient(180deg, #f59e0b, color-mix(in srgb, #f59e0b 70%, #111));
  --_fg: #0a0a0a;
}
:root[data-theme="dark"] .alert-warning {
  --_tint: color-mix(in srgb, #f59e0b 14%, transparent);
  --_bg: color-mix(in srgb, var(--surface-2) 90%, rgba(255,255,255,0));
  --_fg: #ffe8ad;
}
.alert-info { 
  --_tint: color-mix(in srgb, #0ea5e9 18%, transparent);
  --_bg: color-mix(in srgb, var(--surface-1) 92%, transparent);
  --_bd: color-mix(in srgb, #0ea5e9 42%, var(--glass-border));
  --_stripe: linear-gradient(180deg, #0ea5e9, color-mix(in srgb, #0ea5e9 70%, #111));
  --_fg: #0a0a0a;
}

/* Auto‑light: принудительно делаем текст ещё плотнее, если тема не выбрана явно */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .alert-success { --_fg: #0a0a0a; }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .alert-warning { --_fg: #0a0a0a; }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .alert-info    { --_fg: #0a0a0a; }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .alert-danger  { --_fg: #0a0a0a; }
}

/* Auto‑theme: делаем текст светлым и усиливаем цветовой слой для контраста */
:root:not([data-theme="light"]):not([data-theme="dark"]) .alert-success {
  --_fg: #ffffff;
  --_tint: color-mix(in srgb, #22c55e 26%, transparent);
  --_bg: color-mix(in srgb, var(--surface-1) 88%, transparent);
}
:root:not([data-theme="light"]):not([data-theme="dark"]) .alert-warning {
  --_fg: #ffffff;
  --_tint: color-mix(in srgb, #f59e0b 28%, transparent);
  --_bg: color-mix(in srgb, var(--surface-1) 88%, transparent);
}
:root:not([data-theme="light"]):not([data-theme="dark"]) .alert-info {
  --_fg: #ffffff;
  --_tint: color-mix(in srgb, #0ea5e9 26%, transparent);
  --_bg: color-mix(in srgb, var(--surface-1) 88%, transparent);
}
:root:not([data-theme="light"]):not([data-theme="dark"]) .alert-danger {
  --_fg: #ffffff;
  --_tint: color-mix(in srgb, #ef4444 26%, transparent);
  --_bg: color-mix(in srgb, var(--surface-1) 88%, transparent);
}
:root[data-theme="dark"] .alert-info {
  --_tint: color-mix(in srgb, #0ea5e9 14%, transparent);
  --_bg: color-mix(in srgb, var(--surface-2) 90%, rgba(255,255,255,0));
  --_fg: #c8ecff;
}

/* Compact alert spacing helpers */
.alert + .alert { margin-top: 10px; }
.django-messages .alert { margin-bottom: 8px; }

/* === Sidebar language dropdown: scroll above player === */
/* Языковое меню в сайдбаре (без переноса в body) */
.language-dropdown .dropdown-menu {
  max-height: min(70vh, calc(100vh - var(--player-height) - var(--cookie-banner-height, 0px) - 24px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-gutter: stable;
  z-index: 4000; /* выше плеера и сайдбара */
}

/* Global style for language menu when reparented to body */
/* rs-lang-menu больше не используем; оставляем только базовые правила для обычного меню в сайдбаре */
.dropdown-menu.rs-lang-menu .dropdown-item {
  font-weight: 800;
  font-size: 0.92rem;
  padding: 6px 10px;
  color: var(--text-color);
}
.dropdown-menu.rs-lang-menu .dropdown-item:hover,
.dropdown-menu.rs-lang-menu .dropdown-item:focus {
  background: var(--row-hover-bg) !important;
  color: var(--text-color) !important;
}
.dropdown-menu.rs-lang-menu .dropdown-item.active,
.dropdown-menu.rs-lang-menu .dropdown-item:active {
  color: #fff !important;
  background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent) !important,
    linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary))) !important;
  box-shadow: 0 6px 18px rgba(0,0,0,.18) !important;
}
/* Активному пункту добавим лёгкий маркер справа (современный UI-указатель) */
.dropdown-menu.rs-lang-menu .dropdown-item.active::after {
  content: "\2713"; /* checkmark */
  font-weight: 900;
  margin-left: auto;
}
.language-dropdown .dropdown-menu .language-menu-close { position: sticky; top: 0; z-index: 1; }

.cookie-consent-banner .cookie-text {
    display: inline-block;
    font-size: 1rem;
    margin-right: 10px;
    max-width: 400px;
    text-align: left;
}

.cookie-consent-banner .cookie-accept-btn {
    background: #ff2a8f;
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 7px 32px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.18s;
    font-weight: 600;
}
.cookie-consent-banner .cookie-accept-btn:hover {
    background: #da2479;
}

.cookie-consent-banner .cookie-decline-btn {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 100px;
    padding: 7px 32px;
    font-size: 1rem;
    cursor: pointer;
    margin-left: 8px;
    font-weight: 600;
    transition: background 0.18s, color 0.18s;
}
.cookie-consent-banner .cookie-decline-btn:hover {
    background: #da2479;
    color: #fff;
}

.cookie-consent-banner .cookie-link {
    color: #dbadff;
    text-decoration: underline;
    margin-left: 10px;
    font-size: 0.97rem;
}
.cookie-consent-banner .cookie-link:hover {
    color: #da2479;
}

tbody, td, tfoot, th, thead, tr {
    border-color: #f2f2f2;
    border-style: solid;
    border-width: 1px;
    padding: 12px;
}

.btn:first-child:active {
    background-color: unset;
    border-color: unset;
}

/* 2025 UIX loader (glass + modern conic ring) */
#ajax-loader-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .28s ease;
    pointer-events: none;
    /* убираем затемнение и блюр: чистый индикатор без замутнения */
    background: transparent;
}
#ajax-loader-overlay.visible { opacity: 1; pointer-events: all; }
#ajax-loader-overlay .loader {
    width: 74px;
    height: 74px;
    border-radius: 999px;
    background: conic-gradient(from 0deg,
        color-mix(in srgb, var(--brand-primary) 95%, #fff0),
        color-mix(in srgb, var(--brand-accent) 95%, #fff0),
        color-mix(in srgb, var(--brand-primary) 95%, #fff0)
    );
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 8px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 8px));
    box-shadow: 0 10px 30px rgba(16,24,40,.18), inset 0 2px 8px rgba(255,255,255,.12);
    animation: spin360 0.9s linear infinite;
}
@keyframes spin360 { to { transform: rotate(1turn); } }

/* Inline loader for stations batch (2025 UIX) */
.stations-loader {
    position: static;
    display: flex;               /* гарантируем горизонтальную раскладку */
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px 22px; /* внутренний отступ, чтобы текст не упирался в края */
    border-radius: 999px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 26px rgba(16,24,40,.18);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    width: max-content;          /* чтобы центрировалось авто-отступами */
    margin: 12px auto 16px;      /* центрируем под списком */
}
.stations-loader .spinner {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: conic-gradient(from 0deg,
      color-mix(in srgb, var(--brand-primary) 95%, transparent),
      color-mix(in srgb, var(--brand-accent) 95%, transparent),
      color-mix(in srgb, var(--brand-primary) 95%, transparent)
    );
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 7px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 7px));
    animation: spin360 .9s linear infinite;
}
.stations-loader .loader-text { color: var(--text-color); font-weight: 800; letter-spacing: .2px; padding: 2px 2px 2px 1px; white-space: nowrap; }

@media (max-width: 576px) {
  .stations-loader { bottom: 18px; gap: 10px; padding: 10px 14px; }
  .stations-loader .spinner { width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .stations-loader .spinner { animation: none !important; }
}

.refresh-icon{
    display:inline-block;
    margin-left:6px;
    font-size:1rem;
    color:#7d13db;
}

.refresh-icon.rotating{
    animation:rs-spin .8s linear infinite !important; 
}

@keyframes rs-spin {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
}

#refresh-last-tracks {
    border: 0;
    background: 0;
}

#station-suggest-list {
    cursor: pointer;
}
#station-suggest-list li {
    padding: 4px 10px;
}
#station-suggest-list li:hover {
    background: #e7f3ff;
}

#tracks-loader-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.82);
    z-index: 2222;
}
#tracks-loader-overlay .spinner-border {
    width: 3rem !important;
    height: 3rem !important;
}

#play-station {
    background-color: #f3e1ff;
}

.hidden {
    display: none;
}


#mobile-sidebar .mobile-sidebar-content {
    padding: 1rem;
}

#close-mobile-sidebar {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1051;
}

/* ——— Facebook button ——— */
.btn-facebook {
    background:#1877F2;
    border-color:#1877F2;
    color:#fff;
}
.btn-facebook:hover,
.btn-facebook:focus {
    background:#166fe5;
    border-color:#166fe5;
    color:#fff;
}
.btn-facebook i {
    vertical-align:middle;
    margin-right:.5rem;
    font-size:1.2em;
}

/* ——— Google button ——— */
.btn-google {
    background:#d93025;
    border-color:#d93025;
    color:#fff;
}
.btn-google:hover,
.btn-google:focus {
    background:#c5221f;
    border-color:#c5221f;
    color:#fff;
}
.btn-google i {
    vertical-align:middle;
    margin-right:.5rem;
    font-size:1.2em;
}

.edit-badge {
    position: relative;
    display: flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #6d35b5;
    color: #ffffff;
    font-size: 16px;
    left: 8px;
    margin: 0 8px;
}
.edit-badge:hover{ 
    opacity: 0.7;
    color: #ffffff;
    text-decoration:none; 
}

.station-item{ position:relative; }

.select2-container--default .select2-selection--single {
    height: 43px !important;   
  }
  

  .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 43px !important;  
  }
  

  .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 43px !important;
  }
  

  .select2-container--default .select2-selection--multiple {
    min-height: 38px !important;
    padding: 4px 6px; /* ensure tag chips remain visible */
  }
  

  .select2-container--default .select2-selection--multiple .select2-selection__choice {
    line-height: 20px !important;
    height: 24px;
  }

#clear-history-button {
    background-color: unset;
    color: inherit;
    padding: 6px 40px;
}

.country-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--black-color);
    font-weight: 700;
}

.country-link-h {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--black-color);
    font-weight: 700;
}

.sorting-links {
    text-align: right;
    margin-bottom: 1rem;
}

/* Filter/Sorting links: unified styling */
.filter-link,
.sorting-link {
    text-decoration: none;
    border-bottom: 5px solid transparent;
    padding-bottom: 2px;
    font-weight: normal;
    color: inherit;
}

.filter-link.active-sorting,
.sorting-link.active-sorting {
    border-bottom-color: #7d14db;
}

.filter-and-sorting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--divider-color);
    padding-top: 6px;
}

.country-filter-links,
.sorting-links {
    margin: 0;
    padding: 0;
}


#player-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--player-height);
    display: flex;
    justify-content: space-between;
    background-color: #192030;
    padding: 10px 10px;
    color: var(--inverse-text-color);
    z-index: 3000;
    align-items: center;
}

.station-logo-container {
    flex-shrink: 0;
    margin-right: 8px;
}

#station-logo {
    width: auto;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
}


#player-bottom .play-pause-icon,
#player-bottom .mute-unmute-icon { color: var(--inverse-text-color); }

#player-volume-str {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

#player-volume-str.show-streams #stream-buttons-bottom {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    bottom: 60px;
    right: 0;
    background-color: rgba(18, 22, 33, .96);
    padding: 10px;
    border-radius: 12px;
    z-index: 999;
    box-shadow: 0 12px 32px rgba(0,0,0,.35);
    backdrop-filter: saturate(140%) blur(6px);
}

.player-controls {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    gap: 6px;
}

.breadcrumbs {
    list-style: none;
    padding: 0;
    display: flex;
    font-size: 0.8rem;
    margin: 6px 0 8px 0;
    flex-wrap: wrap;
}

.breadcrumbs li {
    margin-right: 4px;
}

.breadcrumbs li::after {
    content: "›";
    margin-left: 4px;
}

.breadcrumbs li:last-child::after {
    content: "";
}

/* Breadcrumbs: single line with horizontal scroll (always end visible) */
.breadcrumbs { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; overflow-y: hidden; white-space: nowrap; -webkit-overflow-scrolling: touch; gap: 0; scrollbar-width: thin; padding-bottom: 2px; width: 100%; max-width: 100%; }
.breadcrumbs::-webkit-scrollbar { height: 6px; }
.breadcrumbs li { flex: 0 0 auto; white-space: nowrap; }
.breadcrumbs a, .breadcrumbs span { color: var(--text-muted-color); white-space: nowrap; }
.breadcrumbs a:hover { color: var(--link-hover-color); }

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

.network-stations-grid {
    margin-top: 15px;
}

.network-station-item {
    text-align: center;
}

.network-station-logo {
    width: 100px;
    height: auto;
    border-radius: 8px;
}

.network-station-name {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.2;
}

.country-station-count {
    font-size: 0.8rem;
    font-weight: 400;
}

.network-station-item a {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    text-decoration: none;
    align-items: center;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 0.4rem;
    font-family: 'Mulish', sans-serif;
    font-weight: 800;
    line-height: 1.2;
}

.h1,
h1 {
    font-size: 1.6rem;
}

.h3, h3 {
    font-size: 1.1rem;
}

.hero-text h1 {
    font-size: 2.0rem;
}

.active-link {
    color: var(--accent-color);
    font-weight: 800;
}

a.back-to-selection-link { font-weight: 800; color: var(--link-color); font-size: 16px; margin-top: 10px; }


.feature-box { padding: 20px; border: 1px solid var(--divider-color); background: var(--surface-1); border-radius: 14px; text-align: left; margin-bottom: 20px; transition: transform .12s ease, box-shadow .18s ease, background .14s ease, border-color .14s ease; box-shadow: 0 8px 20px rgba(16,24,40,.06); }
.feature-box:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(16,24,40,.10); }

.feature-icon { font-size: 1.6rem; color: var(--brand-primary); margin-bottom: 0; }

.feature-title { font-size: 1.12rem; font-weight: 800; margin-bottom: 8px; color: var(--heading-color); }

.feature-description { font-size: 1rem; color: var(--text-color); margin-bottom: 0; }

.block-hello-h { border-radius: 12px; }

.rating-form {
    display: flex;
    justify-content: center;
}

.star-svg {
    width: 24px;
    height: 24px;
    /* default star fill for non-SVG-path based icons */
    fill: orange;
}

.star-svg path {
    fill: #ffce68;
    stroke: #edaf00;
    stroke-width: 1px;
}

.rating-form label {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.star-rating-radio {
    display: none;
}

.star-rating-label {
    cursor: pointer;
}

/* (merged into the .star-svg block above) */

.star-rating-label:hover,
.star-rating-label:hover~.star-rating-label {
    opacity: 0.7;
}

.average-rating {
    font-size: 20px;
    margin-right: 10px;
    vertical-align: middle;
}

.station-rating {
    display: flex;
    margin-left: auto;
    margin-right: 0;
}

.starability-growRotate input[type="radio"] { display: none !important; }
.starability-growRotate label svg path { fill: none !important; }
.starability-growRotate input[type="radio"]:checked ~ label svg path { fill: orange !important; }
.starability-growRotate input[type="radio"]:hover ~ label svg path,
.starability-growRotate input[type="radio"]:focus ~ label svg path { fill: #ffb300 !important; }

.form-control,
.form-select {
    width: 100%;
    padding: 12px 12px;
    margin-bottom: 10px;
    border: 1.5px solid var(--input-border-color) !important;
    box-sizing: border-box;
    border-radius: 12px !important;
    background-color: var(--surface-2);
    color: var(--input-text-color);
}
.form-control::placeholder { color: var(--placeholder-color); }
.form-select:focus, .form-control:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 25%, transparent); border-color: var(--brand-primary) !important; }


.btn {
    padding: 10px 40px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.1s, border-color 0.1s, color 0.1s;
}

.btn-primary { background-color: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }

.btn-outline-secondary {
    background-color: unset;
    border-color: var(--black-color);
    color: var(--black-color);
}

.btn-primary:hover, .btn-primary:focus { background-color: var(--brand-accent); border-color: var(--brand-accent); color: #fff; }

.btn-outline-primary { background-color: transparent; border-color: var(--brand-primary); color: var(--brand-primary); }

.btn-outline-primary:hover, .btn-outline-primary:focus { background-color: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }

.btn.active { color: var(--brand-primary); background-color: transparent; border-color: var(--brand-primary); }

.btn:hover { opacity: 0.9; }

.btn[disabled], .btn.disabled { background-color: var(--brand-primary); border-color: var(--brand-primary); opacity: 0.65; color: #fff; }


.btn:focus {
    outline: none;
    box-shadow: none;
}

.btn-check:checked+.btn, .btn.active, .btn.show, .btn:first-child:active, :not(.btn-check)+.btn:active { color: var(--brand-primary); background-color: transparent; border-color: var(--brand-primary); border: 1px var(--brand-primary) solid; }

.account-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

#playlist-days .btn,
#playlist-days .btn-outline-primary {
    padding: 6px 2% !important;
}

.btn-update-meta {
    font-weight: 600;
    color: #7432c9;
    background-color: unset;
    border-color: #a158ff;
    text-decoration: none;
}


.verification-method {
    display: flex;
    align-items: center;
    font-weight: 700;
    margin-bottom: 12px;
}


.verification-method input[type="radio"] {
    margin-right: 10px;
}


.verification-method label {
    margin-bottom: 0;
}

.verification-method label {
    cursor: pointer;
}

.new-station-button {
    font-weight: 700;
    text-decoration: underline !important;
}


a.button {
    display: inline-block;
    text-decoration: none;
    margin-top: 10px;
}


.alert {
    padding: 15px;
    margin-top: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}


#verification-options,
#station-url-field,
#root_directory_form,
#meta_tag_form {
    margin-bottom: 20px;
}

#root_directory_form a {
    margin-left: 12px;
    font-weight: 700;
    text-decoration: underline;
}


.verification-methods {
    list-style: none;
    padding: 0;
}

/* --------- Text ---------- */

.h2,
h2 {
    font-size: 1.3rem;
}

p {
    line-height: 1.6;
}

a {
    color: #000000;
    text-decoration: underline;
    text-decoration-color: #d7d7d7;
}

a:hover {
    color: #000000;
    text-decoration: none;
    opacity: 0.6;
}

.icon-spacing {
    margin-right: 4px;
}



/* --------- Forms ---------- */

.form-control:focus {
    background-color: #fff;
    border-color: var(--gray-dark-color);
    outline: 0;
    box-shadow: unset;
}


/* --------- Modal ---------- */


.modal .modal-header {
    padding: 1rem 1rem;
}

.modal-content {
    border-radius: 18px;
}

.modal-backdrop.show {
    opacity: .6;
}

.modal-body {
    padding: 1rem 2rem;
}

.modal-title {
    line-height: 1.5;
    font-size: 1.6rem;
    display: table;
    margin: 0 auto;
}

.modal .btn-close {
    position: absolute;
    right: 0;
    margin: 15px;
}

.modal .form-control {
    margin: 18px 0;
    background-color: var(--white-color) !important;
}

.fade {
    transition: opacity .09s linear;
}

#authModal #showRegisterForm,
#authModal #showLoginForm {
    text-align: center;
    margin: 8px auto;
    display: table;
    text-decoration: underline;
}

#authModal .btn-primary {
    margin: 12px auto;
    display: block;
    width: 100%;
    height: 48px;
}

.dropdown-menu {
    top: 100%;
    left: 0;
    transform: none;
}


/* --------- Radio Player ---------- */

.radio-player h1 {
    font-size: 1.6rem;
    font-weight: 800;
}

.stations-list {
    display: flex;
    flex-direction: column;
}

/* ===================== Dropdowns (2025 UI) ===================== */
/* Глобально убираем синий Bootstrap-актив в выпадающих меню и применяем фирменный стиль */
.dropdown-item.active,
.dropdown-item:active,
.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active {
  color: #fff !important;
  background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent) !important,
    linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary))) !important;
  text-shadow: 0 1px 0 rgba(0,0,0,.18);
  box-shadow: 0 6px 18px rgba(0,0,0,.14);
  border: 0 !important;
  /* На случай, если где-то задан только background-color */
  background-color: color-mix(in srgb, var(--brand-primary) 85%, var(--brand-accent)) !important;
}
/* Фокус без синего, мягкий hover/фокус в духе сайта */
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
  background: var(--row-hover-bg) !important;
  color: var(--text-color) !important;
}

.stations-list .station-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--divider-color);
    padding: 8px 15px 8px 0;
}

.stations-list .station-details {
    display: flex;
    align-items: center;
    gap: 15px;
}


.stations-list .station-item:hover { background-color: var(--row-hover-bg); }

.stations-list .station-item:hover .station-play-icon,
.stations-list .station-play-icon.active-play,
.stations-list .station-play-icon.loading {
    opacity: 1;
    pointer-events: auto;
}

.station-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.station-link:hover {
    opacity: 1;
}

.stations-list .station-play-icon {
    position: relative;
    flex-shrink: 0;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background-color: rgba(216, 216, 216, 0.2);
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.1s ease, background-color 0.1s ease;
    cursor: pointer;
    opacity: 0;
    margin-left: auto;
}

.station-item:hover .station-play-icon {
    opacity: 1;
    pointer-events: auto;
}

.station-play-icon.active-play {
    opacity: 1 !important;
    pointer-events: auto;
}

.stations-list .station-play-icon.loading {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.stations-list .station-play-icon.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    border: 2px solid transparent;
    border-top: 2px solid #8247b6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.station-play-icon:hover {
    background-color: rgb(216 216 216 / 100%);
}


.stations-list .station-logo {
    border-radius: 6px;
    background-color: var(--surface-2);
    margin-left: 8px;
    padding: 4px;
}

.station-logo {
    border-radius: 8px;
    background-color: var(--surface-2);
}

.radio-player .station-logo {
    border-radius: 8px;
    background-color: var(--surface-2);
    width: 140px;
    height: auto;
}


.radio-player-right {
    border-left: 1px solid var(--divider-color);
    padding-left: 12px;
}

.track-now {
    color: #c512da;
}

.station-item,
.station-link,
.category-label,
.station-play-icon {
    cursor: pointer;
}

.stations-list .station-logo img {
    border-radius: 6px;
    width: 110px;
    height: auto;
}

.stations-list .station-title {
    font-size: 0.96rem;
    font-weight: 700;
    font-family: 'Mulish', sans-serif;
}

/* Dark theme typography tweaks */
:root[data-theme="dark"] .stations-list .station-title { font-weight: 700; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .stations-list .station-title { font-weight: 700; }
}

a.station-title-link {
    text-decoration: none;
}

.stations-list .station-title:hover {
    color: #7d14db;
}

.stations-list .current-track {
    font-size: 12px;
    font-weight: 400;
    color: #909090;
}

.stations-list .station-info {
    margin-left: 10px;
}

.stations-list .station-categories {
    display: flex;
}

.stations-list .category-label,
.stations-list .station-country {
    font-size: var(--font-size-12px);
    color: var(--gray-dark-color);
    margin-right: 3px;
}

.stations-list .station-country {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px; /* отступ между флагом и названием */
}
/* на случай, если gap не поддержан в окружении */
.stations-list .station-country > .fflag { margin-right: 6px; }
.stations-list .station-country > [class^="radio-flag"],
.stations-list .station-country > [class*=" radio-flag"] { margin-right: 6px; }


.countries-grid {
    display: flex;
    justify-content: space-between;
}

.country-column {
    width: 32%;
    padding-bottom: 14px;
}

.country-column a {
    font-weight: 700;
    text-decoration: none;
    display: block;
    margin: 12px 0;
    border-bottom: 1px solid var(--divider-color);
    padding-bottom: 6px;
}
/* Dark/auto themes: divider via variable */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .country-column a { border-bottom-color: var(--divider-color); }
}

.continent-list {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
    border-bottom: 1px solid var(--divider-color);
    padding: 12px 0;
    margin-bottom: 12px;
}

.continent-list li {
    margin: 0 8px 8px 0;
    padding: 0;
    display: inline-block;
}

.continent-list li a {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    background: transparent;
    font-weight: 800;
}
.continent-list li a:hover {
    background: var(--row-hover-bg);
    border-color: var(--divider-color);
}
.current-continent a,
.current-continent a:visited {
    color: #1a1330 !important; /* тёмный читаемый текст для светлой темы */
    border: 0;
    background:
      radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent),
      linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 88%, #fff), color-mix(in srgb, var(--brand-accent) 58%, var(--brand-primary)));
    box-shadow: 0 6px 16px rgba(0,0,0,.18);
}

/* 2026 Countries Grid — modern chips */
.countries-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 12px;
  align-items: start;
}
.country-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--divider-color);
  background: var(--surface-1);
  color: var(--text-color);
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06);
  transition: transform .12s ease, filter .18s ease, box-shadow .18s ease, border-color .12s ease;
  font-weight: 800;
}
.country-chip:hover { transform: translateY(-1px); filter: brightness(1.02); border-color: color-mix(in srgb, var(--brand-primary) 55%, #000); box-shadow: 0 8px 18px rgba(16,24,40,.08); }
.country-chip .chip-flag { flex: 0 0 auto; }
.country-chip .chip-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

:root[data-theme="dark"] .country-chip { background: var(--surface-2); border-color: var(--divider-color); box-shadow: 0 6px 16px rgba(2,6,23,.32); }
:root[data-theme="dark"] .country-chip:hover { filter: brightness(1.06); border-color: color-mix(in srgb, var(--brand-primary) 70%, #fff); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .country-chip { background: var(--surface-2); border-color: var(--divider-color); box-shadow: 0 6px 16px rgba(2,6,23,.32); }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .country-chip:hover { filter: brightness(1.06); border-color: color-mix(in srgb, var(--brand-primary) 70%, #fff); }
}

/* Genres: modern chips grid */
.genres-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 12px;
}
.genre-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 6px 0; /* без подложек и отступов-подушек */
  border: 0; /* убираем рамку-подложку */
  background: transparent; /* без фона */
  color: var(--text-color);
  box-shadow: none;
  transition: color .12s ease, text-decoration-color .12s ease;
  font-weight: 800;
}
.genre-chip:hover { text-decoration: underline; color: var(--link-hover-color); }
.genre-chip .chip-icon { display: none; width: 0; height: 0; }
.genre-chip .chip-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.genre-title { margin: 6px 0 10px; font-size: 1.1rem; }

:root[data-theme="dark"] .genre-chip { background: transparent; border: 0; box-shadow: none; }
:root[data-theme="dark"] .genre-chip:hover { color: var(--link-hover-color); text-decoration: underline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .genre-chip { background: var(--surface-2); border-color: var(--divider-color); box-shadow: 0 6px 16px rgba(2,6,23,.32); }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .genre-chip:hover { filter: brightness(1.06); border-color: color-mix(in srgb, var(--brand-primary) 70%, #fff); }
}

/* Genres top navigation (chips) */
.genres-nav { position: relative; margin: 10px 0 22px; border-bottom: 1px solid var(--divider-color); padding-bottom: 8px; }
.genres-nav-inner { display: flex; gap: 8px; overflow-x: auto; padding: 4px 44px 4px 44px; scrollbar-width: thin; position: relative; z-index: 1; }
.genres-nav-inner::-webkit-scrollbar { height: 8px; }
.genres-nav-inner::-webkit-scrollbar-thumb { background: var(--divider-color); border-radius: 999px; }
.nav-chip { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--text-color); background: var(--surface-1); border: 1px solid var(--divider-color); font-weight: 800; white-space: nowrap; transition: background .12s ease, border-color .12s ease, transform .08s ease; }
.nav-chip:hover { transform: translateY(-1px); background: var(--row-hover-bg); border-color: color-mix(in srgb, var(--brand-primary) 55%, #000); }
.nav-chip.active { color: #fff !important; border: 0; background:
  radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent),
  linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary))); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.genres-nav-scroll { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--divider-color); background: var(--surface-1); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3; pointer-events: auto; }
.genres-nav-scroll.left { left: 4px; }
.genres-nav-scroll.right { right: 0; }
.genres-nav-scroll:hover { background: var(--row-hover-bg); }
:root[data-theme="dark"] .nav-chip { background: var(--surface-2); border-color: var(--divider-color); }
:root[data-theme="dark"] .genres-nav-scroll { background: var(--surface-2); border-color: var(--divider-color); box-shadow: 0 6px 12px rgba(2,6,23,.32); }
:root[data-theme="dark"] .nav-chip.active { color: #fff !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .nav-chip { background: var(--surface-2); border-color: var(--divider-color); }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .genres-nav-scroll { background: var(--surface-2); border-color: var(--divider-color); box-shadow: 0 6px 12px rgba(2,6,23,.32); }
}
.genre-title { scroll-margin-top: 90px; }
.genres-grid-modern { margin-top: 8px; }

/* Genre blocks as subtle tinted cards */
.genre-card { padding: 12px; border-radius: 14px; border: 1px solid var(--divider-color); background: var(--surface-1); box-shadow: 0 6px 16px rgba(16,24,40,.06); margin-bottom: 12px; cursor: pointer; transition: transform .12s ease, box-shadow .18s ease, border-color .12s ease; }
.genre-card:hover { transform: translateY(-2px); border-color: var(--accent-border-color); box-shadow: 0 10px 22px rgba(16,24,40,.12); }
.genre-card .genre-title { margin: 4px 0 8px; }
.genre-card.tint-a, .genre-card.tint-b, .genre-card.tint-c, .genre-card.tint-d { background: var(--surface-1); }

:root[data-theme="dark"] .genre-card { background: var(--surface-2); border-color: var(--divider-color); box-shadow: 0 8px 18px rgba(2,6,23,.34); }
:root[data-theme="dark"] .genre-card.tint-a,
:root[data-theme="dark"] .genre-card.tint-b,
:root[data-theme="dark"] .genre-card.tint-c,
:root[data-theme="dark"] .genre-card.tint-d { background: var(--surface-2); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .genre-card { background: var(--surface-2); border-color: var(--divider-color); box-shadow: 0 8px 18px rgba(2,6,23,.34); }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .genre-card.tint-a { background: color-mix(in srgb, var(--brand-primary) 16%, var(--surface-2)); }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .genre-card.tint-b { background: color-mix(in srgb, var(--brand-accent) 16%, var(--surface-2)); }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .genre-card.tint-c { background: color-mix(in srgb, var(--brand-primary) 12%, var(--surface-2)); }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .genre-card.tint-d { background: color-mix(in srgb, var(--brand-accent) 12%, var(--surface-2)); }
}

.highlighted-country { color: #cd3091; }
.country-link.highlighted-country { border-bottom: 1px solid #cd3090 !important; }
.country-chip.highlighted-country {
  border: 0;
  color: #fff !important;
  background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent),
    linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary)));
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .country-chip.highlighted-country { box-shadow: 0 10px 24px rgba(2,6,23,.52); }
}
:root[data-theme="dark"] .country-chip.highlighted-country { box-shadow: 0 10px 24px rgba(2,6,23,.52); }

/* Dark theme explicit contrast for highlighted items */
:root[data-theme="dark"] .country-chip.highlighted-country,
:root[data-theme="dark"] .country-chip.highlighted-country:visited {
  color: #ffffff !important;
  background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 26%, transparent), transparent),
    linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 92%, #fff), color-mix(in srgb, var(--brand-accent) 68%, var(--brand-primary)));
  outline: 1px solid rgba(255,255,255,0.10);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .country-chip.highlighted-country,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .country-chip.highlighted-country:visited {
    color: #ffffff !important;
    background:
      radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 26%, transparent), transparent),
      linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 92%, #fff), color-mix(in srgb, var(--brand-accent) 68%, var(--brand-primary)));
    outline: 1px solid rgba(255,255,255,0.10);
  }
}

/* Dark theme: ensure active continent chip is vivid */
:root[data-theme="dark"] .current-continent a,
:root[data-theme="dark"] .current-continent a:visited {
  color: #ffffff !important;
  background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 22%, transparent), transparent),
    linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 92%, #fff), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary)));
  box-shadow: 0 8px 20px rgba(2,6,23,.44);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .current-continent a,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .current-continent a:visited {
    color: #ffffff !important;
    background:
      radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 22%, transparent), transparent),
      linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 92%, #fff), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary)));
    box-shadow: 0 8px 20px rgba(2,6,23,.44);
  }
}

.popular-locations,
.popular-languages {
    padding: 8px 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.radio-player {
    margin: 12px 0 16px 0;
    gap: 14px;
    padding: 16px;
    display: flex !important;
    flex-wrap: wrap;
    flex-direction: row;
    background: var(--glass-bg, rgba(255,255,255,0.65));
    border: 1px solid var(--glass-border, rgba(255,255,255,0.45));
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(16, 24, 40, 0.16);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    background-clip: padding-box;
}

#play-pause {
    border-radius: 50%;
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    border: 0;
    color: #fff;
}

#play-pause:hover {
    transform: scale(1.1);
    color: #f0f0f0;
}

#play-pause i {
    color: inherit;
}

.station-location {
    font-size: 85%;
    color: var(--gray-dark-color);
}

.station-tags {
    padding: 0;
    list-style: none;
    text-indent: 0;
    font-size: 85%;
    color: var(--gray-dark-color);
    margin-bottom: 0.8rem;
}

.station-tags>li {
    margin: 0 0 0;
    padding: 0;
    display: inline-block;
}

.station-tags>li:not(:last-child)::after {
    display: inline-block;
    vertical-align: middle;
    content: '';
    margin: auto 0.24em auto 0.48em;
    height: 0.28em;
    width: 0.28em;
    background: var(--accent-color);
    border-radius: 50%;
}

/* Language inline like genres (no chip) */
.station-tags > li.station-lang-chip a { display: inline; padding: 0; border: 0; background: none; font-weight: inherit; }
.station-tags > li.station-lang-chip i { color: inherit; font-size: .95em; }

.station-links {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 6px 0;
    font-size: 95%;
    color: var(--gray-dark-color);
}

.track-info img,
.track-item img {
    border-radius: 8px;
}

.track-info {
    display: flex;
    align-items: center;
    border-bottom: 1px var(--gray-medium-color) solid;
    padding-bottom: 14px;
}

.track-info-flex {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: wrap;
    min-width: 0;
    margin-top: 2px;
}

.track-now-label {
    color: #9a11ff;
    font-weight: 500;
    margin-right: 8px;
    white-space: nowrap;
    font-size: 1rem;
}


#track-title {
    font-size: 90%;
}

.track-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.track-item {
    padding: 2px 0 8px 0;
    display: flex;
    gap: 8px;
    font-size: 0.9rem;
    align-items: center;
}

.track-details .track-time {
    color: var(--gray-dark-color);
    border: 1px var(--gray-medium-color) solid;
    display: table;
    border-radius: 4px;
    padding: 0 8px;
    font-size: 84%;
}

#player {
    align-items: center;
    display: flex;
    gap: 12px;
    flex-direction: row;
    flex-wrap: wrap;
}

#play-pause {
    border-radius: 50%;
    width: 64px;
    height: 64px;
    border: 0;
    color: #fff;
    background:
      radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 24%, transparent), transparent),
      linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 72%, var(--brand-primary)));
    box-shadow: 0 10px 24px rgba(0,0,0,.25);
    transition: transform .14s ease, box-shadow .18s ease, filter .18s ease;
}
#play-pause:hover { transform: scale(1.06); filter: brightness(1.04); }
#play-pause:active { transform: scale(0.98); }
#play-pause:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-primary) 40%, transparent); outline-offset: 3px; }

/* Subtle pulse while in 'play' state (waiting to start) */
@keyframes play-pulse {
  0% { box-shadow: 0 0 0 0 rgba(161, 88, 255, 0.45); }
  70% { box-shadow: 0 0 0 18px rgba(161, 88, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(161, 88, 255, 0); }
}
#play-pause.play { animation: play-pulse 1.9s ease-out infinite; }





#volume-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    gap: 10px;
    z-index: 10;
}

#mute-unmute {
    border: 0;
    background-color: transparent;
    color: var(--inverse-text-color);
    font-size: 20px;
    width: 34px;
    height: 34px;
    cursor: pointer;
    position: relative;
    z-index: 1100;
}

#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 140px;
    height: 24px;
    transform: rotate(-90deg);
    background: linear-gradient(to right, color-mix(in srgb, var(--brand-primary) 65%, #000) var(--volume-percentage, 0%), rgba(255,255,255,0.18) var(--volume-percentage, 0%));
    border-radius: 999px;
    position: absolute;
    bottom: calc(100% + 16px);
    left: 50%;
    transform-origin: center;
    transform: translateX(-50%) rotate(-90deg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    z-index: 1200; /* above mute icon and popovers */
}

#volume-slider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    width: 2px;
    height: 380%;
    background-color: rgba(255,255,255,0.18);
    border-radius: 1px;
    z-index: -1;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    z-index: 1;
    margin-top: -7px;
    margin-bottom: -7px;
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
}

#volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
}

#volume-control:hover #volume-slider {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Keep visible when hovering the slider itself */
#volume-slider:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Desktop precise position: slider exactly above volume button */
@media (min-width: 992px) {
  #volume-control { position: relative; }
  #volume-slider { bottom: calc(100% + 20px); left: 50%; transform: translateX(-50%) rotate(-90deg); }
  /* Hover-bridge area so cursor can reach slider without closing */
  #volume-control::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 0px);
    width: 84px;
    height: 22px; /* matches the gap */
    background: transparent;
    pointer-events: auto;
  }
}

/* Mobile: open as a modern panel with horizontal slider */
@media (max-width: 768px) {
  #player-volume-str.show-streams { position: relative; }
  #player-volume-str.show-streams #volume-control { position: absolute; right: 8px; bottom: 60px; }
  #player-volume-str.show-streams #volume-slider {
    width: 200px;
    height: 8px;
    transform: none;
    left: auto;
    right: 8px;
    bottom: calc(60px + 12px);
    opacity: 1; visibility: visible; pointer-events: auto;
    background: linear-gradient(to right, color-mix(in srgb, var(--brand-primary) 65%, #000) var(--volume-percentage, 0%), rgba(255,255,255,0.18) var(--volume-percentage, 0%));
  }
  #player-volume-str.show-streams #volume-slider::before { width: 100%; height: 4px; border-radius: 2px; transform: translate(-50%, -50%); }
}


.player-left {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.player-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
}

#track-cover {
    width: 54px;
    height: 54px;
    border-radius: 6px;
    object-fit: cover;
}

.cover-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.08));
    box-shadow:
      0 12px 24px rgba(23, 6, 46, 0.16),
      0 3px 8px rgba(23, 6, 46, 0.10);
}
.cover-eq {
    position: absolute;
    left: 6px; right: 6px; bottom: 2px;
    height: 20%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: clamp(3px, 0.9vw, 8px);
    pointer-events: none;
    z-index: 2;
}
.cover-eq::before {
    content: '';
    position: absolute;
    inset: -10px -10px -6px -10px;
    background: radial-gradient(60% 80% at 50% 100%, rgba(0,0,0,.14), transparent 70%);
    filter: blur(6px);
    z-index: -1;
}
.cover-eq div {
    --max: 1.05; /* индивидуальный максимум (nth-child переопределит) */
    flex: 1 0 auto;
    max-width: clamp(5px, 1.6vw, 9px);
    height: 64%;
    transform-origin: bottom center;
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand-accent) 70%, transparent) 0%, color-mix(in srgb, var(--brand-primary) 70%, transparent) 100%);
    border-radius: 4px 4px 0 0;
    box-shadow: 0 6px 16px rgba(0,0,0,.18);
    opacity: .95;
    background-size: 100% 200%;
    animation:
      eq-bounce var(--dur, .88s) var(--ease, cubic-bezier(.28,.01,.2,1)) var(--delay, 0s) infinite,
      eq-shimmer 2.2s linear infinite;
}
.cover-eq div:nth-child(1){ --dur: .78s; --delay: .00s; --max: 1.15; }
.cover-eq div:nth-child(2){ --dur: .92s; --delay: .06s; --max: 1.05; }
.cover-eq div:nth-child(3){ --dur: .84s; --delay: .12s; --max: 1.22; }
.cover-eq div:nth-child(4){ --dur: 1.02s; --delay: .04s; --max: 1.08; }
.cover-eq div:nth-child(5){ --dur: .86s; --delay: .10s; --max: 1.18; }
.cover-eq div:nth-child(6){ --dur: .96s; --delay: .02s; --max: 1.04; }
.cover-eq div:nth-child(7){ --dur: .80s; --delay: .14s; --max: 1.25; }
.cover-eq div:nth-child(8){ --dur: 1.08s; --delay: .08s; --max: 1.10; }

@keyframes eq-bounce {
  0%   { transform: scaleY(.22); }
  12%  { transform: scaleY(var(--max)); }
  24%  { transform: scaleY(.45); }
  36%  { transform: scaleY(calc(var(--max) * .82)); }
  52%  { transform: scaleY(.38); }
  68%  { transform: scaleY(calc(var(--max) * .72)); }
  84%  { transform: scaleY(.34); }
  100% { transform: scaleY(.26); }
}
@keyframes eq-shimmer {
  0% { background-position: 0 0; }
  100% { background-position: 0 200%; }
}

/* Dark theme tuning for equalizer */
:root[data-theme="dark"] .cover-eq div {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-accent) 58%, #ffffff20) 0%, color-mix(in srgb, var(--brand-primary) 58%, #00000000) 100%);
  box-shadow: 0 9px 20px rgba(2,6,23,.34);
  opacity: .98;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .cover-eq div {
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand-accent) 58%, #ffffff20) 0%, color-mix(in srgb, var(--brand-primary) 58%, #00000000) 100%);
    box-shadow: 0 8px 18px rgba(2,6,23,.36);
    opacity: .95;
  }
}

/* album cover modern look */
.cover-wrapper { aspect-ratio: 1 / 1; }
.cover-wrapper .album-cover {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: cover;
    will-change: transform, opacity;
    backface-visibility: hidden;
}
.cover-wrapper .album-cover.incoming {
    opacity: 0;
    transform: scale(0.985);
    transition: opacity .28s ease, transform .28s ease;
    z-index: 1;
}
.cover-wrapper .album-cover.incoming.show {
    opacity: 1;
    transform: scale(1);
}

/* Responsive size for "What was playing" cover */
.last-three-tracks .cover-wrapper { width: 120px; }
@media (max-width: 576px) {
  .last-three-tracks .cover-wrapper { width: 96px; }
}
/* Make covers (especially the first/current) slightly larger on wide screens */
@media (min-width: 992px) { /* lg */
  .last-three-tracks .cover-wrapper { width: 128px; }
  .last-three-tracks .track-item:first-child .cover-wrapper { width: 152px; }
}
@media (min-width: 1200px) { /* xl */
  .last-three-tracks .cover-wrapper { width: 136px; }
  .last-three-tracks .track-item:first-child .cover-wrapper { width: 168px; }
}

/* Modern meta row for Now */
.track-now-meta { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.track-now-label { display: inline-flex; align-items: center; justify-content: center; height: 24px; line-height: 24px; padding: 0 10px; border-radius: 999px; font-weight: 800; font-size: .86rem; color: #fff; background:
  radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent),
  linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary)));
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.track-now-times { display:block; margin-top: 4px; color: var(--text-muted-color); font-size: .82rem; line-height: 1.2; }
.track-now-times .time-item { display:inline-flex; align-items: baseline; gap: 6px; }
.track-now-times .time-label { font-weight: 700; color: var(--heading-color); opacity: .75; }
.track-now-times .sep { opacity: .35; margin: 0 6px; }
.track-now-time { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: .9rem; }
.last-three-tracks .track-details { font-size: 1rem; }
@media (max-width: 576px) {
  .last-three-tracks .track-item .track-details { font-size: .88rem !important; }
}

/* Playlist button modern look */
.playlist-link-wrap { margin-top: 6px; margin-bottom: 6px; }
.inside-last-three { margin-top: 8px; margin-bottom: 0; }
.last-three-tracks .track-item:last-child { margin-bottom: 2px !important; }
.btn-playlist { border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 700; color: #fff; text-decoration: none; background:
  radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent),
  linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary)));
  box-shadow: 0 8px 22px rgba(0,0,0,.18); transition: transform .12s ease, filter .18s ease, box-shadow .18s ease; gap: 8px; text-shadow: none; letter-spacing: .01em; }
.btn-playlist, .btn-playlist:visited { color: #fff !important; }
.btn-playlist:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,.22); color: #fff; }
.btn-playlist-icon { font-size: 18px; margin-right: 6px; flex: 0 0 auto; }
.btn-playlist { max-width: 100%; flex-wrap: nowrap !important; white-space: nowrap !important; overflow: hidden; }
.btn-playlist-text { display: inline-block; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; min-width: 0; max-width: 100%; }
@media (max-width: 576px) {
  .inside-last-three .btn-playlist { width: 100%; }
}

/* Earlier tracks typography: match top-tracks for non-now items */
.last-three-tracks .track-item:not(:first-child) .track-details {
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.95rem;
}

#player-bottom .track-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    max-width: 100%;
}

#current-station-name,
#current-track-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.84rem;
}

#current-station-name {
    font-weight: 700;
}




#stream-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    margin: 6px 0 0 0;
    justify-content: space-between;
}

#player .stream-button {
    border-radius: 50px;
    background-color: white;
    border: 1px #b4b4b4 solid;
    font-size: 12px;
    padding: 2px 13px;
    font-weight: 500;
}

#player .stream-button:hover {
    border: 1px #cd3091 solid;
    color: #cd3091;
}

#player-bottom .stream-button {
    border-radius: 50px;
    border: 1px solid color-mix(in srgb, var(--brand-primary) 70%, #000);
    font-size: 12px;
    padding: 4px 13px;
    font-weight: 600;
    background-color: rgba(255,255,255,0.04);
    color: var(--inverse-text-color);
    transition: background-color .12s ease, border-color .12s ease;
}

#player-bottom .stream-button:hover { border: 1px var(--brand-accent) solid; background-color: rgba(255,255,255,0.08); color: var(--inverse-text-color); }

.btn-more-options { background: none; border: none; color: var(--inverse-text-color); font-size: 20px; padding: 8px; }

#stream-buttons-bottom { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 6px; margin: 0 8px; }
.active-stream-button { border: 1px var(--brand-accent) solid !important; color: var(--inverse-text-color) !important; background-color: rgba(255,255,255,0.12); }

/* Compact player for very low viewports */
@media (max-height: 560px) {
  :root { --player-height: 64px; }
  #player-bottom { height: var(--player-height); padding: 8px; }
  #station-logo { height: 44px; }
  #play-pause { width: 52px; height: 52px; }
  #current-station-name, #current-track-title { font-size: 0.78rem; }
  #player-bottom .stream-button { padding: 2px 10px; font-size: 11px; }
  #player-volume-str { gap: 4px; }
}
@media (max-height: 480px) {
  :root { --player-height: 56px; }
  #player-bottom { height: var(--player-height); padding: 6px; }
  .station-logo-container { display: none; }
  #play-pause { width: 48px; height: 48px; }
  #current-station-name, #current-track-title { display: none; }
  #stream-buttons-bottom { gap: 4px; }
}

#toggle-favorite { border-radius: 50px; width: 42px; height: 42px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid color-mix(in srgb, var(--brand-primary) 70%, #000); color: color-mix(in srgb, var(--brand-primary) 70%, #000); background: transparent; transition: background-color .15s ease, border-color .15s ease, color .15s ease, filter .15s ease; }
#toggle-favorite:hover { background-color: rgba(255,255,255,0.06); filter: brightness(1.06); }
#toggle-favorite i { font-size: 18px; line-height: 1; }
#toggle-favorite:has(#favorite-icon.text-danger) { border: 0; color: #fff; background: linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 72%, var(--brand-primary))); box-shadow: 0 6px 18px rgba(0,0,0,.24); }
#toggle-favorite:has(#favorite-icon.text-danger):hover { filter: brightness(1.04); }
#favorite-icon.text-danger { color: currentColor !important; }
/* Dark theme: make favorite button more visible */
:root[data-theme="dark"] #toggle-favorite {
  border-color: color-mix(in srgb, var(--brand-primary) 85%, #fff);
  color: color-mix(in srgb, var(--brand-primary) 85%, #fff);
  background-color: rgba(255,255,255,0.04);
  box-shadow: 0 6px 16px rgba(2,6,23,.32);
}
:root[data-theme="dark"] #toggle-favorite:hover { background-color: rgba(255,255,255,0.08); filter: brightness(1.08); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) #toggle-favorite {
    border-color: color-mix(in srgb, var(--brand-primary) 85%, #fff);
    color: color-mix(in srgb, var(--brand-primary) 85%, #fff);
    background-color: rgba(255,255,255,0.04);
    box-shadow: 0 6px 16px rgba(2,6,23,.32);
  }
  :root:not([data-theme="light"]):not([data-theme="dark"]) #toggle-favorite:hover { background-color: rgba(255,255,255,0.08); filter: brightness(1.08); }
}


.navbar {
    min-height: 60px;
    background-color: var(--prymary-color) !important;
}

#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    margin-top: 0;
    background-color: var(--background-sidebar-color);
    z-index: 2000 !important;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* Keep inner content clear of the fixed bottom player */
    padding-bottom: calc(var(--player-height) + var(--cookie-banner-height, 0px) + 12px);
    transition: transform 0.3s ease;
    transform: translateX(0);
}



.sidebar-content-top {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar-content-bottom {
    flex-shrink: 0;
}
/* Remove horizontal borders in sidebar bottom area */
#sidebar .border-top,
.sidebar-content-bottom.border-top { border-top: 0 !important; }

#sidebar .sidebar-link {
    position: relative;
    padding: 4px 10% 4px 10%;
    font-size: 0.92rem;
    font-family: 'Mulish', sans-serif;
}

#sidebar .sidebar-link a {
    color: var(--text-color);
    font-weight: 800;
    display: flex;
    align-items: center;
    padding: 6px 10px;
    text-decoration: none;
    gap: 8px;
    border-radius: 12px;
    transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .18s ease;
}
#sidebar .sidebar-link a:hover { background: var(--row-hover-bg); text-decoration: none; }
#sidebar .sidebar-link i { color: var(--text-muted-color); width: 18px; text-align: center; }
#sidebar .sidebar-link a:hover i { color: var(--link-hover-color); }

.language-dropdown .dropdown-menu a { font-weight: 800; font-size: 0.92rem; padding: 6px 10px; }

#sidebar .sidebar-link a.active {
    border: 0 !important;
    color: #fff !important;
    background:
      radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent),
      linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary)));
    box-shadow: 0 8px 18px rgba(16,24,40,.18);
}
:root[data-theme="dark"] #sidebar .sidebar-link a.active { color: #fff !important; }

.sidebar-content-bottom {
    padding: 16px 0 16px;
}

img.sidebar-logo { width: 150px; height: auto; display: block; margin: 0 auto; }

.sidebar-brand {
    padding: 0;
}

.sidebar-menu li.dropdown {
    list-style: none;
    height: 138px;
    white-space: nowrap;
    overflow: unset;
    bottom: 0;
    position: absolute;
}

.sidebar-menu {
    margin: 15px auto;
    border-top: 1px var(--divider-color) dotted;
    padding-top: 30px;
    max-width: 220px;
}

.lang-menu .dropdown-menu.show {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 12px 32px rgba(16,24,40,.15);
}

.lang-menu .dropdown-menu .dropdown-item {
    font-weight: 500;
}

.sidebar-menu a {
    color: var(--white-color);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    letter-spacing: .08em;
}

#content {
    width: 100%;
    min-height: 94vh;
    padding-bottom: 80px;
    transition: all 0.3s;
    padding-left: 246px;
    box-sizing: border-box;
}


#close-sidebar {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
}

#content {
    min-height: 100vh;
    padding-top: 15px;
    /* Reserve space for fixed bottom player to prevent footer overlap */
    padding-bottom: calc(var(--player-height) + 12px);
}

.content-grow {
    flex-grow: 1;
}

.genres-list ul {
    padding: 0;
    list-style: none;
}

.footer {
    padding: 20px 0;
    font-size: 0.94rem;
    margin-top: 15px;
    border-top: 1px solid var(--divider-color);
}
/* Footer divider honors theme via variable */

.footer-menu {
    list-style: none;
    padding: 0;
}

.footer-menu li {
    display: inline;
    margin-right: 15px;
}


ul.footer-menu {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.footer .row {
    align-items: center;
}

.three-columns {
    column-count: 3;
}

.genres-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.genre-group {
    flex: 0 0 auto;
    min-width: 250px;
    margin-bottom: 18px;
}

.genre-group h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.genre-columns {
    display: flex;
}

.genre-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.genre-list li {
    display: inline-flex;
    position: relative;
    padding-right: 16px;
}

.genre-list ul {
    color: #280f70;
}

.genre-list a {
    text-decoration: none;
    font-size: 0.90rem;
    line-height: 1.9;
    font-weight: 400;
}


.genre-list li::after {
    content: '•';
    position: absolute;
    right: 4px;
    top: 0;
    font-size: 1.2rem;
    line-height: 1.3;
    color: #d2138a;
}

.genre-list li:last-child::after {
    display: none;
}

.d-none {
    display: none;
}

.toggle-genres {
    display: table;
    margin-top: 0.4rem;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px #a12effa8 solid;
    border-radius: 50px;
    padding: 4px 26px;
}

/* --------- Search Form ---------- */

.search-form {
    position: relative;
    width: 94%;
    margin: 15px auto 0 auto;
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--input-border-color);
    border-radius: var(--search-radius);
    background: var(--surface-2);
    box-shadow: var(--search-shadow);
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.search-form { overflow: hidden; }
.search-form:has(input:focus) { border-color: var(--brand-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 18%, transparent), var(--search-shadow); }

.sidebar-content-top .search-form { margin: 15px auto; }


.search-input,
.search-form input[type="text"],
.search-form-home input[type="text"],
.sidebar-content-top input[type="text"] {
    flex: 1 1 auto;
    width: auto !important;
    min-height: var(--search-height);
    padding: 0 16px; /* no internal icon */
    border: 0 !important;
    outline: none;
    box-shadow: none !important;
    font-size: 16px;
    color: var(--input-text-color);
    background: transparent !important;
}

.search-input::placeholder,
.search-form input[type="text"]::placeholder,
.search-form-home input[type="text"]::placeholder,
.sidebar-content-top input[type="text"]::placeholder { color: var(--placeholder-color); font-style: normal; }

.search-form-home {
    display: flex;
}

/* Home form inherits .search-form wrapper; inputs are transparent inside */

/* Sidebar form inherits styles from .search-form */

/* Generic search form input covered above */

.search-button {
    width: var(--search-height);
    height: var(--search-height);
    border-top-right-radius: var(--search-radius);
    border-bottom-right-radius: var(--search-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 72%, var(--brand-primary)));
    border: 0;
    color: #fff;
}

.search-form-home .search-button { width: var(--search-height); height: var(--search-height); border-top-right-radius: var(--search-radius); border-bottom-right-radius: var(--search-radius); background: linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 72%, var(--brand-primary))); border: 0; color: #fff; }
.search-button:focus { outline: none; box-shadow: none; }

.search-button:hover { filter: brightness(1.03); }
.search-button i { font-size: 1.1rem; }

/* Load more stations button */
#load-more-stations {
    display: block;
    margin: 12px auto 0 auto;
    padding: 12px 20px;
    border-radius: 12px;
    background-color: var(--brand-primary);
    border: 1.5px solid var(--brand-primary);
    color: #fff;
    font-weight: 700;
    letter-spacing: .02em;
}
#load-more-stations:hover,
#load-more-stations:focus {
    background-color: var(--brand-accent);
    border-color: var(--brand-accent);
    color: #fff;
}

/* Theme-specific enforcement to override Bootstrap button colors */
:root[data-theme="light"] #load-more-stations { color: #fff !important; background-color: var(--brand-primary) !important; border-color: var(--brand-primary) !important; }
:root[data-theme="dark"] #load-more-stations  { color: #fff !important; background-color: var(--brand-primary) !important; border-color: var(--brand-primary) !important; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) #load-more-stations { color: #fff !important; background-color: var(--brand-primary) !important; border-color: var(--brand-primary) !important; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) #load-more-stations  { color: #fff !important; background-color: var(--brand-primary) !important; border-color: var(--brand-primary) !important; }
}

.search-button svg {
    vertical-align: middle;
    margin-left: -6px;
}

.search-button:hover {
    opacity: 0.9;
}

.search-button img {
    width: 100%;
    height: auto;
}

/* --------- Account Page ---------- */

.account-page {
    color: #333;
    margin: 0 auto;
    /* Не допускаем сужения flex-элемента: ширина как у контейнера */
    width: 100%;
}

/* Sidebar: language dropdown — всегда в пределах экрана */
.sidebar-wrapper .language-dropdown .dropdown-menu {
  max-height: min(70vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  z-index: 1060; /* поверх сайдбара и соседних элементов */
}

/* На больших экранах центрируем видимую область ближе к пункту меню
   (Popper задаёт translate3d; смещение компенсируем лёгким отрицательным отступом) */
@media (min-width: 992px) {
  .sidebar-wrapper .language-dropdown.show .dropdown-menu {
    margin-top: -10vh; /* сдвиг вверх, чтобы список не сползал вниз */
  }
}

/* ===== Stream buttons — unified modern style (top and bottom) ===== */
#player .stream-button,
#player-bottom .stream-button {
  position: relative;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 60%, #000);
  font-size: 12px;
  padding: 6px 14px;
  font-weight: 600;
  min-width: 56px;
  line-height: 1;
  text-align: center;
  background-color: rgba(0,0,0,0.04);
  color: var(--text-color);
  transition: background-color .14s ease, border-color .14s ease, transform .12s ease, filter .14s ease;
}
#player .stream-button:hover,
#player-bottom .stream-button:hover {
  border-color: var(--brand-accent);
  background-color: rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
.active-stream-button {
  border: 1px var(--brand-accent) solid !important;
  background-color: color-mix(in srgb, var(--brand-accent) 16%, transparent) !important;
}
.active-stream-button::after {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--brand-accent);
  vertical-align: middle;
}

/* Ensure readable active state per context */
/* Top player: neutral premium chip (distinct from Play/Fav gradient) */
#player .active-stream-button {
  color: var(--heading-color) !important;
  background: color-mix(in srgb, var(--brand-primary) 10%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--brand-primary) 40%, #000) !important;
  box-shadow: 0 6px 16px rgba(16,24,40,.08);
}
#player .active-stream-button:hover { filter: brightness(1.03); transform: translateY(-1px); }
/* Bottom player: keep light text on dark surface */
#player-bottom .active-stream-button {
  color: var(--inverse-text-color) !important;
}
#player .stream-button:focus-visible,
#player-bottom .stream-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-primary) 40%, transparent); outline-offset: 2px; }

/* Theme-specific tuning */
:root[data-theme="dark"] #player .stream-button,
:root[data-theme="dark"] #player-bottom .stream-button { background-color: rgba(255,255,255,0.06); color: var(--inverse-text-color); border-color: color-mix(in srgb, var(--brand-primary) 68%, #000); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) #player .stream-button,
  :root:not([data-theme="light"]):not([data-theme="dark"]) #player-bottom .stream-button { background-color: rgba(255,255,255,0.06); color: var(--inverse-text-color); border-color: color-mix(in srgb, var(--brand-primary) 68%, #000); }
}
/* Dark theme: distinct active chip for top player */
:root[data-theme="dark"] #player .active-stream-button {
  background-color: rgba(255,255,255,0.12) !important;
  color: var(--inverse-text-color) !important;
  border-color: color-mix(in srgb, var(--brand-primary) 68%, #000) !important;
}
@media (max-width: 768px) {
  #player .stream-button,
  #player-bottom .stream-button { padding: 4px 10px; min-width: 48px; }
}

.account-header {
    margin-bottom: 12px;
}

.account-action-button {
    border-radius: 100px;
    padding: 6px 35px;
}

.my-stations h2 {
    margin: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.5rem;
}

.separator-line {
    border: none;
    height: 2px;
    background-color: #b1b1e1;
    margin-top: 6px;
    margin-bottom: 12px;
}

.avatar-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

.avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-avatar {
    float: left;
    margin-right: 12px;
    font-size: 2rem;
}

.comment-avatar .avatar-img {
    width: 40px;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--gray-color);
}

.username-and-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.username-display {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.username-label {
    font-weight: 800;
    margin-bottom: 5px;
}

.username {
    font-size: 18px;
    font-weight: 700;
}

.generate-avatar-btn {
    padding: 5px 20px;
    border: 1px solid var(--black-color);
    cursor: pointer;
    border-radius: 50px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    margin-top: 10px;
}

.generate-avatar-btn:hover {
    opacity: 0.5;
}

.profile-settings-container {
    margin-bottom: 20px;
}

.profile-settings-container h1 {
    text-align: center;
    color: #333;
}

.form-group,
.form-control {
    margin-bottom: 15px;
}

.profile-form .username {
    display: flex;
    gap: 4px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}


.form-control::placeholder {
    color: #A3A3A3;
    font-style: italic;
}


.profile-settings-container .separator-line {
    margin-top: 40px;
    margin-bottom: 40px;
}

.save-button {
    margin-right: 0;
    margin-left: auto;
}

.save-button:hover {
    opacity: 0.8;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.pagination .step-links {
    display: flex;
    margin: 0;
    padding: 0;
}

.pagination .step-links a {
    display: inline-block;
    width: 42px;
    height: 38px;
    line-height: 38px;
    text-align: center;
    border: 1px solid var(--gray-dark-color);
    margin: 0 4px;
    border-radius: 8px;
    color: var(--black-color);
    text-decoration: none;
    transition: opacity 0.1s;
    margin-bottom: 8px;
}

.pagination .step-links a:hover {
    opacity: 0.5;
}

.pagination .current {
    display: inline-block;
    width: 36px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    border: 1px solid #ddd;
    margin: 0 4px;
    border-radius: 50%;
    background-color: var(--black-color);
    color: var(--white-color) !important;
    transition: opacity 0.1s;
}

.pagination .current:hover {
    opacity: 0.7;
}


#load-more-stations {
    background: transparent !important;
    width: 100%;
    border: 1px solid var(--gray-dark-color);
    border-radius: 12px;
    padding: 16px 0;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.1s;
    font-size: 0.9rem;
    margin-top: 15px;
    font-family: 'Mulish', sans-serif;
    font-weight: 800;
}

#load-more-stations:hover {
    opacity: 0.7;
    border: 1px solid #7d13db;
}



.form-card {
    padding: 20px 20px 60px 20px;
}

.form-title {
    margin-bottom: 20px;
    font-size: 1.35rem;
    color: var(--heading-color);
}

.station-form .form-group {
    margin-bottom: 15px;
}

.station-form .form-group label {
    font-weight: 800;
    color: var(--heading-color);
}

.station-form .form-group input,
.station-form .form-group textarea,
.station-form .form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--input-border-color);
    border-radius: 12px;
    font-size: .95rem;
    background: var(--surface-2);
    color: var(--input-text-color);
}

.station-form .form-group input[type="submit"] {
    background: #0056b3;
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 4px;
}

.station-form .form-group input[type="submit"]:hover {
    background: #004494;
}

.comment {
    background-color: #ffffffb0;
    border-radius: 8px;
    border: 1px solid #ededed;
}

.comments-text {
    font-size: 14px;
}


.radio-desc {
    border-bottom: 0;
    background-color: transparent;
}

#player-bottom .play-pause-icon.loading {
    position: relative;
    color: transparent !important;
}
#player-bottom .play-pause-icon.loading::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 36px; height: 36px;
    margin: -18px 0 0 -18px;
    border: 4px solid #fff3;
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spinPlayer 0.8s linear infinite;
    z-index: 2;
}
@keyframes spinPlayer {
    100% { transform: rotate(360deg); }
}


.scrolling-track-title {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.scrolling-track-title .scrolling-inner {
    display: inline-flex;
    align-items: center;
    will-change: transform;
}

.scrolling-track-title .scrolling-text {
    display: inline-block;
    white-space: nowrap;
    padding-right: 40px;
}

@keyframes marquee-loop {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (min-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .container.home-container {
        max-width: 1400px !important;
    }

    .container.home-container-b {
        max-width: 1100px !important;
    }

}

@media (min-width: 992px) {
    .d-lg-none {
        display: none !important;
    }

    #toggle-sidebar {
        display: none;
    }
}

@media (max-width: 992px) {

    .container, .container-fluid, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        padding-right: calc(var(--bs-gutter-x)* .5);
        padding-left: calc(var(--bs-gutter-x)* .5);
    }

    .mobile-navbar-logo {
        height: 48px;
    }

    #sidebar {
        transform: translateX(-850px);
        width: 83%;
    }

    #sidebar.open {
        transform: translateX(0);
        box-shadow: rgba(0, 0, 0, 0.5) 0px -2px 5px;
    }

    #content {
        width: 100%;
        padding-left: unset;
        box-sizing: border-box;
    }

    #toggle-sidebar {
        color: #fff;
        background-color: unset;
        padding: 10px 30px;
        border-radius: 8px;
        border: 2px #791fc5 solid;
        font-weight: 900;
        color: #791fc5;
        font-size: 18px;
    }

    .stations-list .station-details {
        gap: 4px;
    }

    .stations-list .station-logo {
        margin-left: 2px;
        padding: 2px;
    }

    #station-logo {
        height: 42px;
    }

}

@media (max-width: 991.98px){
    #content{
        padding-left: 0;
    }

    .row{
        margin-right: 0 !important;
        margin-left: 0  !important;
    }
}

/* === Layout overrides (footer visibility above player & cookie banner) === */
:root { --cookie-banner-height: 0px; }
#content { padding-bottom: calc(var(--player-height) + 12px + var(--cookie-banner-height)) !important; }
#content { min-height: 0 !important; }
.content-grow { 
  min-height: calc(100vh - var(--player-height) - var(--cookie-banner-height, 0px) - var(--footer-height)) !important;
  display: flex; 
  flex-direction: column;
}
.footer { margin-top: auto !important; }
.footer { margin-bottom: 8px; }

@media (max-width: 768px) {

    body {
        font-size: 90%;
    }

    .hero-text h1 {
        font-size: 2.0rem;
        line-height: 1.0;
    }

    .home-page .lead {
        font-size: 1.0rem;
        font-weight: 300;
    }

    #mobile-sidebar #sidebar {
        position: relative;
        left: 0;
        width: 100%;
        height: auto;
    }

    #content {
        padding-left: 0;
        box-sizing: border-box;
    }

    #sidebar.active {
        left: 0;
        background-color: var(--background-sidebar-color);
    }

    #content.active {
        padding-left: 250px;
    }

    #close-sidebar {
        display: block;
    }

    .track-item {
        width: 100%;
    }

    .countries-grid {
        flex-direction: column;
    }

    .country-column {
        width: 100%;
    }

    .continent-list {
        column-count: 1;
    }

    .three-columns {
        column-count: 2;
    }

    .form-group.username {
        flex-direction: column;
        align-items: center;
    }

    .avatar-wrapper {
        margin-bottom: 20px;
    }

    .verification-method {
        flex-direction: column;
        align-items: flex-start;
    }

    .verification-method input[type="radio"] {
        margin: 0 0 10px 0;
    }

    .station-rating {
        margin-left: unset;
    }

    #player {
        gap: 18px;
    }

    .g-3,
    .gy-3 {
        --bs-gutter-y: 1rem;
    }

    .radio-player h1 {
        font-size: 1.4rem;
        text-align: center;
    }

    .radio-player-right {
        border-left: unset;
    }

    #player {
        align-items: center;
        display: flex;
        flex-direction: row-reverse;
        flex-wrap: wrap;
        justify-content: center;
    }

    .radio-player {
        justify-content: center;
    }

    .station-tags {
        text-align: center;
    }

    .stations-list .station-categories {
        flex-wrap: wrap;
    }

    .pagination .step-links {
        display: flex;
        margin: 0;
        padding: 0;
        flex-wrap: wrap;
        justify-content: center;
        flex-direction: row;
    }

    .h1,
    h1 {
        font-size: 1.25rem;
    }

    .h2,
    h2 {
        font-size: 1.1rem;
    }

    .breadcrumbs {
        list-style: none;
        padding: 0;
        display: flex;
        font-size: 0.8rem;
        margin: 0 0 8px 0;
        flex-wrap: wrap;
        flex-direction: row;
    }

    .stations-list .station-item {
        padding: 8px 8px 8px 0;
    }

    .stations-list .station-play-icon {
        background-color: rgb(216 216 216 / 13%);
        opacity: 1;
        margin-left: auto;
    }

    .stations-list .station-logo img {
        border-radius: 4px;
        width: 100%;
        height: auto;
    }

    .stations-list .station-title {
        font-size: 0.84rem;
    }

    .station-play-icon i.fas.fa-play {
        color: #fff !important;
    }

    #play-pause {
        width: 54px;
        height: 54px;
    }

    #player-volume-str #volume-control,
    #player-volume-str #stream-buttons-bottom {
        display: none;
    }
    
    #player-volume-str.show-streams #volume-control,
    #player-volume-str.show-streams #stream-buttons-bottom {
        display: flex !important;
    }
    
    #player-volume-str.show-streams #stream-buttons-bottom {
        flex-direction: column;
        position: absolute;
        bottom: 60px;
        right: 156%;
        background-color: #2f0e6d;
        padding: 10px;
        border-radius: 10px;
        z-index: 999;
    }
    
    #player-volume-str.show-streams #volume-control {
        flex-direction: column;
        align-items: center;
        background: #230853;
        padding: 8px 0 10px 0;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 6px 18px 0 #0002;
    }

    #volume-slider {
        bottom: 155px;
        width: 192px;
        height: 36px;
        left: -178%;
    }

    .track-info-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    .track-now-label {
        margin-right: 0;
        margin-bottom: 2px;
        display: block;
    }
    

}

@media (min-width: 769px) {
    #sidebar {
        margin-top: 0;
        background-color: var(--background-sidebar-color);
    }

    #close-sidebar {
        display: none;
    }
}

@media (max-height: 1000px), (max-width: 768px) {
    /* Mobile dropdown should keep glass style and fit sidebar width */
    .language-dropdown .dropdown-menu.show {
        position: absolute !important;
        inset: auto auto auto auto;
        left: 8px !important; right: 8px !important;
        width: calc(100% - 16px) !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        padding: 10px !important;
        background: var(--glass-bg) !important;
        border: 1px solid var(--glass-border) !important;
        box-shadow: 0 12px 32px rgba(16,24,40,.25) !important;
    }
    .language-menu-close { display: none !important; }
}
textarea, pre, code {
    font-family: "Noto Sans", "Noto Sans Thai", Arial, Tahoma, sans-serif;
}

.widget-type-tile {
    border: 2px solid #f4f4f4;
    border-radius: 16px;
    padding: 16px 22px 8px 22px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s, opacity 0.15s;
    box-shadow: none;
    outline: none;
    opacity: 1;
}
.widget-type-tile:hover,
.widget-type-tile:focus {
    opacity: 0.7;
}
.widget-type-tile.active {
    border: 2px solid #d561e3 !important;
    opacity: 1;
}

#widget-preview {
    width: 100%;
    height: auto;
    overflow: auto;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 14px;
    border-radius: 8px;
}

input[type="range"]::-webkit-slider-thumb {
    background: #c512da;
    border: none;
}
input[type="range"]::-moz-range-thumb {
    background: #c512da;
    border: none;
}
input[type="range"]::-ms-thumb {
    background: #c512da;
    border: none;
}
input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px #e5c3ee;
}
input[type="range"]:focus::-moz-range-thumb {
    box-shadow: 0 0 0 4px #e5c3ee;
}
input[type="range"]:focus::-ms-thumb {
    box-shadow: 0 0 0 4px #e5c3ee;
}
/* Ensure minimal gap when top-tracks precede related grid */
.top-tracks + .network-stations-grid { margin-top: .5rem; }

/* ====== Top 10 Tracks (2025-styled) ====== */
.top-tracks .track-item { border-radius: 12px; padding: 6px 8px; transition: background-color .14s ease, transform .12s ease; }
.top-tracks .track-item:hover { background-color: var(--row-hover-bg); }
.top-tracks .track-details { line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 576px) {
  .top-tracks .track-item .track-details { font-size: .9rem !important; }
}

.track-number-badge {
  display: grid; place-items: center;
  width: 30px; height: 30px; /* фиксируем круг, чтобы 10 не растягивало */
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 60%, #000);
  background: color-mix(in srgb, var(--brand-primary) 14%, #ffffff);
  color: color-mix(in srgb, var(--brand-primary) 75%, #000);
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
  flex: 0 0 30px;
}
/* Двузначное 10 — чуть меньше шрифт, чтобы сохранять круг */
.track-number-badge.rank-10 { font-size: 0.74rem; letter-spacing: 0; }

/* Единый стиль для всех бейджей Top‑10 (без выделения топ‑3) */
.top-tracks .track-number-badge,
.top-tracks .track-number-badge.rank-1,
.top-tracks .track-number-badge.rank-2,
.top-tracks .track-number-badge.rank-3 {
  border: 0;
  background: color-mix(in srgb, var(--brand-primary) 12%, var(--surface-1));
  color: color-mix(in srgb, var(--brand-primary) 72%, #000);
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
}

/* Compact covers inside top list */
.top-tracks .album-cover { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; }

/* Mobile tuning */
@media (max-width: 576px) {
  .top-tracks .track-item { padding: 8px 10px; }
  .track-number-badge { width: 28px; height: 28px; font-size: 0.86rem; }
  .track-number-badge.rank-10 { font-size: 0.76rem; }
  .top-tracks .album-cover { width: 38px; height: 38px; border-radius: 8px; }
  .top-tracks .track-details { white-space: normal; }
}

/* Dark theme: soften top-10 badges contrast */
:root[data-theme="dark"] .track-number-badge {
  border-color: color-mix(in srgb, var(--brand-primary) 40%, #fff);
  background: color-mix(in srgb, var(--brand-primary) 10%, var(--surface-1));
  color: color-mix(in srgb, var(--brand-primary) 85%, #fff);
  box-shadow: 0 3px 10px rgba(2,6,23,.42);
}
:root[data-theme="dark"] .top-tracks .track-number-badge,
:root[data-theme="dark"] .top-tracks .track-number-badge.rank-1,
:root[data-theme="dark"] .top-tracks .track-number-badge.rank-2,
:root[data-theme="dark"] .top-tracks .track-number-badge.rank-3 {
  border: 0;
  background: color-mix(in srgb, var(--brand-primary) 10%, var(--surface-1));
  color: color-mix(in srgb, var(--brand-primary) 85%, #fff);
  box-shadow: 0 3px 10px rgba(2,6,23,.42);
  filter: none;
}

/* Restore gradient highlight for Top‑3 in dark theme (no border) */
:root[data-theme="dark"] .top-tracks .track-number-badge.rank-1,
:root[data-theme="dark"] .top-tracks .track-number-badge.rank-2,
:root[data-theme="dark"] .top-tracks .track-number-badge.rank-3 {
  border: 0; color: #fff; box-shadow: 0 6px 16px rgba(2,6,23,.46);
}
:root[data-theme="dark"] .top-tracks .track-number-badge.rank-1 { background:
  radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 20%, transparent), transparent),
  linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 72%, var(--brand-primary))); }
:root[data-theme="dark"] .top-tracks .track-number-badge.rank-2 { background:
  radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 14%, transparent), transparent),
  linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 88%, #fff), color-mix(in srgb, var(--brand-accent) 48%, var(--brand-primary))); }
:root[data-theme="dark"] .top-tracks .track-number-badge.rank-3 { background:
  radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 10%, transparent), transparent),
  linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 82%, #fff), color-mix(in srgb, var(--brand-accent) 36%, var(--brand-primary))); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .track-number-badge {
    border-color: color-mix(in srgb, var(--brand-primary) 40%, #fff);
    background: color-mix(in srgb, var(--brand-primary) 10%, var(--surface-1));
    color: color-mix(in srgb, var(--brand-primary) 85%, #fff);
    box-shadow: 0 3px 10px rgba(2,6,23,.42);
  }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .top-tracks .track-number-badge,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .top-tracks .track-number-badge.rank-1,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .top-tracks .track-number-badge.rank-2,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .top-tracks .track-number-badge.rank-3 {
    border: 0;
    background: color-mix(in srgb, var(--brand-primary) 10%, var(--surface-1));
    color: color-mix(in srgb, var(--brand-primary) 85%, #fff);
    box-shadow: 0 3px 10px rgba(2,6,23,.42);
    filter: none;
  }

  /* Auto dark: gradient highlight for Top‑3 (no border) */
  :root:not([data-theme="light"]):not([data-theme="dark"]) .top-tracks .track-number-badge.rank-1,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .top-tracks .track-number-badge.rank-2,
  :root:not([data-theme="light"]):not([data-theme="dark"]) .top-tracks .track-number-badge.rank-3 {
    border: 0; color: #fff; box-shadow: 0 6px 16px rgba(2,6,23,.46);
  }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .top-tracks .track-number-badge.rank-1 { background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 20%, transparent), transparent),
    linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 72%, var(--brand-primary))); }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .top-tracks .track-number-badge.rank-2 { background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 14%, transparent), transparent),
    linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 88%, #fff), color-mix(in srgb, var(--brand-accent) 48%, var(--brand-primary))); }
  :root:not([data-theme="light"]):not([data-theme="dark"]) .top-tracks .track-number-badge.rank-3 { background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 10%, transparent), transparent),
    linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 82%, #fff), color-mix(in srgb, var(--brand-accent) 36%, var(--brand-primary))); }
}

/* ====== Load more/less buttons (visible yet neat) ====== */
#load-more-network-stations,
#show-less-network-stations {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent),
    linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary)));
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  transition: transform .12s ease, filter .18s ease, box-shadow .18s ease;
}
#show-less-network-stations { /* secondary look */
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 24%, #666), color-mix(in srgb, var(--brand-accent) 18%, #444));
}
#load-more-network-stations:hover,
#show-less-network-stations:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,.22); }
#load-more-network-stations:focus-visible,
#show-less-network-stations:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-primary) 40%, transparent); outline-offset: 2px; }

/* Country stations list modern UI */
.stations-list { display: flex; flex-direction: column; gap: 6px; }
.stations-list .station-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--divider-color); border-radius: 12px; background: var(--surface-1); box-shadow: none; transition: background-color .12s ease, border-color .12s ease; }
.stations-list .station-item:hover { background-color: var(--row-hover-bg); border-color: var(--divider-color); }
.stations-list .station-details { display: flex; align-items: center; gap: 12px; min-width: 0; }
.stations-list .station-logo { width: 120px; height: 68px; flex: 0 0 auto; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.stations-list .station-logo img { width: 100%; height: 100%; object-fit: contain; }
.stations-list .station-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stations-list .station-title-link .station-title { font-weight: 800; font-size: 1.02rem; color: var(--heading-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stations-list .station-categories { display: flex; flex-wrap: wrap; gap: 6px; }
.stations-list .station-categories .category-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text-color); text-decoration: none; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--divider-color); background: var(--surface-2); }
.stations-list .current-track { font-size: .86rem; color: var(--text-muted-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stations-list .current-track::before { content: "\f001"; font-family: "Font Awesome 5 Free"; font-weight: 900; margin-right: 6px; opacity: .7; }
.stations-list .station-play-icon { width: 46px; height: 46px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; flex: 0 0 auto; color: #fff; background:
  radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent),
  linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary))); box-shadow: 0 8px 22px rgba(0,0,0,.18); transition: transform .12s ease, filter .18s ease, box-shadow .18s ease; }
.stations-list .station-play-icon:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 10px 26px rgba(0,0,0,.22); }
.stations-list .station-play-icon i { font-size: 14px; color: #fff !important; }

/* Modern edit badge for station item */
.stations-list .edit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: 8px;
  border-radius: 999px;
  text-decoration: none;
  border: 0;
  color: #fff !important;
  background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 12%, transparent), transparent),
    linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 52%, var(--brand-primary)));
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  transition: transform .12s ease, filter .18s ease, box-shadow .18s ease;
}
.stations-list .edit-badge:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,.22); }
.stations-list .edit-badge i { font-size: 16px; color: #fff !important; }

@media (max-width: 768px) {
  .stations-list .station-item { align-items: stretch; }
  .stations-list .station-details { align-items: center; gap: 10px; }
  .stations-list .station-logo { width: 100px; height: 56px; }
  .stations-list .station-title-link .station-title { font-size: .98rem; }
  .stations-list .station-categories { gap: 4px; flex-wrap: nowrap; overflow: hidden; }
  .stations-list .station-categories .category-label { white-space: nowrap; }
  .stations-list .station-categories .category-label { padding: 3px 8px; font-size: .9rem; }
  .stations-list .station-play-icon { width: 42px; height: 42px; }
}

:root[data-theme="dark"] .stations-list .station-item { background: var(--surface-2); border-color: var(--divider-color); box-shadow: none; }
:root[data-theme="dark"] .stations-list .station-item:hover { box-shadow: none; }
:root[data-theme="dark"] .stations-list .station-categories .category-label { background: rgba(255,255,255,0.04); border-color: var(--divider-color); }

/* Inline loader under last station — overridden by modern glass ring styles above */
.stations-loader.hidden { display: none; }

/* ====== Spacing between station thematic blocks ====== */
#last-three-tracks-wrap,
.top-tracks,
.network-stations-grid,
.block-desc,
.comments-form,
.comments-section,
.radio-description,
.station-contacts-card { margin-top: 22px; margin-bottom: 22px; }
@media (min-width: 992px) {
  #last-three-tracks-wrap,
  .top-tracks,
  .network-stations-grid,
  .block-desc,
  .comments-form,
  .comments-section,
  .radio-description,
  .station-contacts-card { margin-top: 28px; margin-bottom: 28px; }
}
@media (min-width: 1200px) {
  #last-three-tracks-wrap,
  .top-tracks,
  .network-stations-grid,
  .block-desc,
  .comments-form,
  .comments-section,
  .radio-description,
  .station-contacts-card { margin-top: 34px; margin-bottom: 34px; }
}

/* Tighten space directly under section headings */
/* Unified spacing for section titles */
.section-title { margin: 0 0 12px 0 !important; }
h2.station-contacts-title { margin: 0 0 12px 0 !important; }
h2 + #last-three-tracks-wrap,
h2 + .top-tracks,
h2 + .network-stations-grid,
h2 + .block-desc,
h2 + .comments-form,
h2 + .comments-section,
h2 + .radio-description,
h2.station-contacts-title + .row,
h2 + .station-contacts-card { margin-top: 0 !important; }

/* ====== Modern comments form ====== */
.comments-form { background: var(--surface-1); border: 1px solid var(--glass-border); border-radius: 16px; padding: 14px; box-shadow: 0 10px 28px rgba(0,0,0,.08); }
/* Универсальные стили поля */
.comments-form .form-control {
  border-radius: 14px !important;
  border: 1px solid var(--input-border-color) !important;
  background: var(--surface-2) !important;
  color: var(--input-text-color) !important;
}
/* Текстовая область комментария — увеличенная высота */
.comments-form textarea.form-control { min-height: 120px; }
/* Поле имени гостя — адекватная высота в одну строку */
.comments-form input.form-control { height: 44px; min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
.comments-form .form-control:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 25%, transparent); }
/* Placeholder цвета для светлой/тёмной темы через переменные */
.comments-form .form-control::placeholder { color: var(--placeholder-color) !important; opacity: 1; }
/* Autofill в WebKit: приводим цвет текста к теме и скрываем жёлтую заливку */
.comments-form input.form-control:-webkit-autofill,
.comments-form input.form-control:-webkit-autofill:hover,
.comments-form input.form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--input-text-color) !important;
  box-shadow: 0 0 0px 1000px var(--surface-2) inset !important;
  transition: background-color 9999s ease-in-out 0s;
}
.comments-form .btn-primary { height: 44px; border-radius: 999px; font-weight: 700; }

/* ====== Trendy station info card ====== */
.radio-description { position: relative; padding: 14px 16px; border: 1px solid var(--glass-border); border-radius: 16px; background: var(--surface-1); box-shadow: 0 12px 28px rgba(0,0,0,.06); }
.radio-description::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 4px; background: linear-gradient(180deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 72%, var(--brand-primary))); }

/* Stylish contacts card */
.station-contacts-card { position: relative; padding: 16px 16px 10px 16px; border: 1px solid var(--glass-border); border-radius: 16px; background: var(--surface-1); box-shadow: 0 12px 28px rgba(0,0,0,.06); }
.station-contacts-title { font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; gap: 10px; margin: 0 0 10px 0; }
.station-contacts-card .my-2 { padding: 4px 0; border-bottom: 1px solid var(--divider-color); }
.station-contacts-card .my-2:last-child { border-bottom: 0; }

/* ===== Tracklist page: modern list (no solid background) ===== */
#playlist-content .list-group { background: transparent; border: 0; }
#playlist-content .list-group-item {
  background: transparent; border: 0; margin: 0; padding: 10px 6px;
  display: flex; align-items: center; gap: 12px; color: var(--text-color);
  border-bottom: 1px solid var(--divider-color);
}
#playlist-content .list-group-item:last-child { border-bottom: 0; }
#playlist-content .list-group-item:hover { background-color: var(--row-hover-bg); border-radius: 10px; }
#playlist-content .list-group-item > span:first-child {
  flex: 0 0 auto; width: 86px; color: var(--text-muted-color);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .9rem;
}
#playlist-content .list-group-item > span:nth-child(2) {
  flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25;
  color: var(--text-color); font-size: 0.98rem;
}
@media (max-width: 576px) {
  #playlist-content .list-group-item > span:nth-child(2) { font-size: .92rem !important; }
}

/* Tracklist (day view) — same modern style */
#playlist-content-day .list-group { background: transparent; border: 0; }
#playlist-content-day .list-group-item {
  background: transparent !important; border: 0 !important; margin: 0; padding: 10px 6px !important;
  display: flex; align-items: center; gap: 12px; color: var(--text-color) !important;
  border-bottom: 1px solid var(--divider-color) !important;
}
#playlist-content-day .list-group-item:last-child { border-bottom: 0 !important; }
#playlist-content-day .list-group-item:hover { background-color: var(--row-hover-bg) !important; border-radius: 10px; }
#playlist-content-day .list-group-item > span:first-child {
  flex: 0 0 auto; min-width: 86px !important; text-align: right !important; margin-right: 12px !important;
  color: var(--text-muted-color) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .9rem;
}
#playlist-content-day .list-group-item > span:nth-child(2) {
  flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25;
  color: var(--text-color) !important; font-size: 0.98rem !important;
}
@media (max-width: 576px) {
  #playlist-content-day .list-group-item > span:nth-child(2) { font-size: .92rem !important; }
}

/* Tracklist page global tweaks */
.tracklist-page h1 { color: var(--heading-color); }
.tracklist-page p.text-muted { color: var(--text-muted-color) !important; }
.tracklist-page .back-link { color: var(--link-color); transition: color .12s ease, opacity .12s ease; }
.tracklist-page .back-link:hover { color: var(--link-hover-color); opacity: .95; }
.tracklist-page .back-link .arrow-icon { filter: none; opacity: .9; }
:root[data-theme="dark"] .tracklist-page .back-link .arrow-icon { filter: invert(1) brightness(1.4); opacity: .95; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .tracklist-page .back-link .arrow-icon { filter: invert(1) brightness(1.4); opacity: .95; }
}
/* ===================== Auth Forms (2025 UI) ===================== */
.auth-card { max-width: 600px; }
.auth-title { font-weight: 900; color: var(--heading-color); margin: 6px 0 12px; }
.auth-page .form-text a { color: var(--link-color); text-decoration: none; }
.auth-page .form-text a:hover { text-decoration: underline; }
.auth-page .separator-line { border: 0; border-top: 1px solid var(--divider-color); opacity: 1; margin: 14px 0; }
.auth-card .form-group label { font-weight: 800; color: var(--heading-color); margin-bottom: 6px; }
.auth-card .form-control {
  background: var(--surface-2);
  color: var(--input-text-color);
  border: 1px solid var(--input-border-color);
  border-radius: 14px;
  padding: 12px 14px;
}
.auth-card .form-control:focus {
  outline: none;
  border-color: var(--accent-border-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 24%, transparent);
}
.auth-page .invalid-feedback { font-weight: 700; }

/* ===================== Contact Form (2025 UI) ===================== */
.contact-card { max-width: 900px; }
.contact-card .form-group label { font-weight: 800; color: var(--heading-color); margin-bottom: 6px; }
.contact-card .form-control, .contact-card .form-select, .contact-card textarea {
  background: var(--surface-2);
  color: var(--input-text-color);
  border: 1px solid var(--input-border-color);
  border-radius: 14px;
  padding: 12px 14px;
}
.contact-card textarea { min-height: 120px; }
.contact-card .form-control:focus, .contact-card .form-select:focus, .contact-card textarea:focus {
  outline: none;
  border-color: var(--accent-border-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 24%, transparent);
}
.contact-card .invalid-feedback { font-weight: 700; }

/* Bootstrap tooltip theming (light/dark) */
.tooltip .tooltip-inner {
  background: var(--surface-2);
  color: var(--text-color);
  border: 1px solid var(--divider-color);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(16,24,40,.12);
  font-weight: 600;
}
.tooltip .tooltip-arrow::before { border-top-color: var(--surface-2); border-bottom-color: var(--surface-2); border-left-color: var(--surface-2); border-right-color: var(--surface-2); }
.bs-tooltip-top .tooltip-arrow::before { border-top-color: var(--surface-2) !important; }
.bs-tooltip-bottom .tooltip-arrow::before { border-bottom-color: var(--surface-2) !important; }
.bs-tooltip-start .tooltip-arrow::before { border-left-color: var(--surface-2) !important; }
.bs-tooltip-end .tooltip-arrow::before { border-right-color: var(--surface-2) !important; }
/* ===================== Account: Mobile Profile Menu (2025 UI) ===================== */
.profile-menu-mobile { margin-top: 8px; }
.profile-menu-mobile #profileMenuButton {
  width: 100%;
  border-radius: 14px;
  border: 0;
  font-weight: 800;
  letter-spacing: .2px;
  padding: 10px 14px;
  color: #fff;
  background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent),
    linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary)));
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.profile-menu-mobile #profileMenuButton:hover { filter: brightness(1.03); transform: translateY(-1px); }
.profile-menu-mobile .dropdown-menu {
  margin-top: 8px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  box-shadow: 0 14px 28px rgba(16,24,40,.18);
  min-width: calc(100% - 16px);
  left: 8px !important;
  right: 8px !important;
  padding: 6px;
}
.profile-menu-mobile .dropdown-item {
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  color: var(--text-color);
}
.profile-menu-mobile .dropdown-item:hover,
.profile-menu-mobile .dropdown-item:focus { background: var(--row-hover-bg); color: var(--text-color); }
.profile-menu-mobile .dropdown-item.active,
.profile-menu-mobile .dropdown-item:active {
  color: #fff !important;
  background:
    radial-gradient(80% 80% at 30% 20%, color-mix(in srgb, var(--brand-accent) 18%, transparent), transparent) !important,
    linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-accent) 60%, var(--brand-primary))) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.18) !important;
}
@media (min-width: 768px) { .profile-menu-mobile { display:none !important; } }
/* ===================== Widget Generator (2025 UI) ===================== */
.widget-page { display: grid; gap: 12px; }
.widget-title { font-weight: 900; letter-spacing: .2px; color: var(--heading-color); margin-bottom: 6px; }
.widget-card { background: var(--surface-1); border: 1px solid var(--glass-border); border-radius: 16px; box-shadow: 0 10px 26px rgba(16,24,40,.08); padding: 14px; }
:root[data-theme="dark"] .widget-card,
:root:not([data-theme="light"]):not([data-theme="dark"]) .widget-card { background: var(--surface-2); box-shadow: 0 12px 28px rgba(2,6,23,.42); }

.widget-type-tiles { align-items: center; flex-wrap: wrap; }
.widget-type-tile { width: 160px; min-height: 110px; display: grid; place-items: center; gap: 8px; border: 1px dashed var(--divider-color); border-radius: 16px; cursor: pointer; transition: transform .12s ease, box-shadow .18s ease, border-color .12s ease, background-color .12s ease; }
.widget-type-tile .tile-illustration { width: 100px; height: 48px; border-radius: 12px; border: 2px dashed var(--divider-color); }
.widget-type-tile .tile-button { width: 60px; height: 60px; border-radius: 14px; }
.widget-type-tile .tile-title { font-weight: 900; color: var(--heading-color); }
.widget-type-tile:hover { transform: translateY(-2px); border-color: var(--accent-border-color); box-shadow: 0 12px 24px rgba(16,24,40,.12); background: var(--row-hover-bg); }
.widget-type-tile.active { border-style: solid; background: color-mix(in srgb, var(--brand-primary) 4%, var(--surface-1)); }
.widget-type-tile.active { border-style: solid; }
:root[data-theme="dark"] .widget-type-tile.active { background: color-mix(in srgb, var(--brand-primary) 8%, var(--surface-2)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .widget-type-tile.active { background: color-mix(in srgb, var(--brand-primary) 8%, var(--surface-2)); }
}

.widget-form .form-label { font-weight: 800; color: var(--heading-color); }
.widget-form .form-range::-webkit-slider-thumb { background: var(--brand-primary); }
.widget-form .form-control, .widget-form .form-select { border-radius: 12px; }
/* Themed inputs — remove white backgrounds in both themes */
.widget-form .form-control,
.widget-form .form-select,
.widget-form .form-control-color {
  background: var(--surface-2) !important;
  color: var(--input-text-color) !important;
  border: 1px solid var(--input-border-color) !important;
}
.widget-form .form-control::placeholder { color: var(--placeholder-color) !important; opacity: 1; }
.widget-form .form-control:focus,
.widget-form .form-select:focus {
  outline: none;
  border-color: var(--accent-border-color) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 24%, transparent);
}

.widget-preview-card { padding: 0; overflow: hidden; }
.widget-preview-box { border: 1px solid var(--divider-color); display:flex; align-items:center; justify-content:center; background: var(--surface-1); min-height: 180px; border-radius: 16px; }
:root[data-theme="dark"] .widget-preview-box { background: var(--surface-2); }

.code-area { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; font-size: 13px; border-radius: 12px; }

/* Force override legacy widget-tile styles in this page scope */
.widget-page .widget-type-tile {
  border: 1px dashed var(--divider-color) !important;
  background: transparent !important;
  padding: 10px 12px !important;
  box-shadow: none !important;
  outline: none !important;
  opacity: 1 !important;
}
.widget-page .widget-type-tile:hover,
.widget-page .widget-type-tile:focus { opacity: 1 !important; }
.widget-page .widget-type-tile.active {
  border: 1px solid var(--accent-border-color) !important;
  background: color-mix(in srgb, var(--brand-primary) 4%, var(--surface-1)) !important;
}
:root[data-theme="dark"] .widget-page .widget-type-tile.active {
  background: color-mix(in srgb, var(--brand-primary) 8%, var(--surface-2)) !important;
}
/* Station search suggest list (avoid white bg) */
#station-suggest-list { background: var(--surface-2); border: 1px solid var(--divider-color); border-radius: 12px; }
#station-suggest-list .list-group-item { background: var(--surface-2); color: var(--input-text-color); border-color: var(--divider-color); }
#station-suggest-list .list-group-item:hover { background: var(--row-hover-bg); color: var(--input-text-color); }
