/* Radio India Live - Custom CSS - Dark Theme (Reconstructed) */

:root {
  /* Dark Theme Color Palette */
  --primary-color: #4361ee;
  --primary-dark: #3a56d4;
  --primary-light: #4cc9f0;
  --accent-color: #f72585;
  --text-primary: #f1f1f1;
  --text-secondary: #b8c1ec;
  --text-muted: #a5b4fc;
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --bg-card: rgba(30, 30, 46, 0.8);
  --bg-sidebar: rgba(20, 20, 35, 0.95);
  --border-color: rgba(255, 255, 255, 0.1);
  --white: #ffffff;
  --black: #0f0f23;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #4361ee 0%, #4cc9f0 100%);
  --gradient-accent: linear-gradient(90deg, #4cc9f0, #4361ee);
  --gradient-bg: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
  
  /* Transitions */
  --transition: all 0.3s ease;
  
  /* Typography */
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-weight-normal: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
}

/* Light theme overrides (toggle via <html data-theme="light">) */
:root[data-theme="light"] {
  --primary-color: #2f5cff;
  --primary-dark: #2347c7;
  --primary-light: #2f5cff;
  --accent-color: #d81b60;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --bg-primary: #ffffff;
  --bg-secondary: #f5f7fb;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-sidebar: rgba(245, 247, 251, 0.98);
  --border-color: rgba(15, 23, 42, 0.12);

  --white: #ffffff;
  --black: #0f172a;

  --gradient-primary: linear-gradient(135deg, #2f5cff 0%, #4cc9f0 100%);
  --gradient-accent: linear-gradient(90deg, #4cc9f0, #2f5cff);
  --gradient-bg: linear-gradient(135deg, #ffffff 0%, #f5f7fb 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--gradient-bg);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Theme toggle button */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

:root[data-theme="light"] .theme-toggle {
  background: rgba(15, 23, 42, 0.04);
}

:root[data-theme="light"] .theme-toggle:hover {
  background: rgba(15, 23, 42, 0.08);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 0.75rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }
a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-color); }

.text-muted { color: var(--text-muted) !important; }
.text-white { color: var(--white) !important; }
.text-primary { color: var(--primary-light) !important; }
.text-info { color: var(--primary-light) !important; } /* Map info to primary-light */
.text-success { color: #2ecc71 !important; }
.text-warning { color: #f1c40f !important; }
.text-danger { color: #e74c3c !important; }

/* Utilities */
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow-1 { flex-grow: 1; }
.gap-3 { gap: 1rem; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.px-3 { padding-left: 1rem; padding-right: 1rem; }
.me-2 { margin-right: 0.5rem; }
.me-3 { margin-right: 1rem; }
.ms-2 { margin-left: 0.5rem; }
.ms-3 { margin-left: 1rem; }
.mt-3 { margin-top: 1rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.p-3 { padding: 1rem !important; }
.border { border: 1px solid var(--border-color) !important; }
.border-top { border-top: 1px solid var(--border-color) !important; }
.border-white { border-color: #fff !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.position-relative { position: relative !important; }
.position-fixed { position: fixed; }
.fixed-top { position: fixed; top: 0; left: 0; right: 0; z-index: 1030; }
.bottom-0 { bottom: 0; }
.start-0 { left: 0; }
.end-0 { right: 0; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.d-none { display: none !important; }

/* Pagination */
.pagination-nav { margin-top: 1.5rem; }
.pagination-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pagination-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.pagination-link:hover {
  background: rgba(67, 97, 238, 0.15);
  border-color: var(--primary-color);
}
.pagination-info {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Radio page circular play buttons (icon-only) */
#play-btn-top {
  width: 64px;
  height: 64px;
  border-radius: 9999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 1 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: var(--gradient-primary) !important;
  box-shadow: 0 12px 30px rgba(67, 97, 238, 0.25);
  transition: var(--transition);
}

/* Special section (fresh card wrapper; theme-aware) */
.ril-special-section{
  margin: 16px 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--bg-card);
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
  /* Allow injected content shadows and natural height */
  overflow: visible;
}
:root[data-theme="light"] .ril-special-section{
  box-shadow: 0 18px 50px rgba(15,23,42,.10);
}
.ril-special-section__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255,255,255,.03);
}
:root[data-theme="light"] .ril-special-section__head{
  background: rgba(15,23,42,.03);
}
.ril-special-section__title{
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}
.ril-special-section__sub{
  font-size: .85rem;
  color: var(--text-muted);
}
.ril-special-section__body{
  /* Give injected content breathing room + avoid clipping */
  padding: 10px;
  max-width: 100%;
  overflow: visible;
}

@media (min-width: 992px){
  .ril-special-section__body{
    padding: 14px;
  }
}

/* Ensure injected special content always stays within container */
.ril-special-section__body > *{
  max-width: 100%;
}
.ril-special-loading{
  text-align:center;
  color: var(--text-muted);
  padding: 18px 10px;
}

#play-btn-top i {
  font-size: 1.6rem;
  margin: 0 !important;
}

#play-btn-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(76, 201, 240, 0.25);
  filter: saturate(1.08);
}

#play-btn-top:active {
  transform: translateY(0);
  box-shadow: 0 10px 24px rgba(67, 97, 238, 0.22);
}

#play-btn-top:focus-visible {
  outline: 3px solid rgba(76, 201, 240, 0.35);
  outline-offset: 4px;
}

/* Slightly smaller in tight layouts */
@media (max-width: 576px) {
  #play-btn-top {
    width: 56px;
    height: 56px;
  }
  #play-btn-top i {
    font-size: 1.45rem;
  }
}
.d-lg-none { display: none !important; }
.text-center { text-align: center; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-fluid { max-width: 100%; height: auto; }
.rounded { border-radius: 0.25rem; }
.rounded-pill { border-radius: 50rem; }
.small { font-size: 0.875rem; }
.list-unstyled { padding-left: 0; list-style: none; }
.fs-4 { font-size: 1.5rem; }

/* Layout */
#header {
  background: var(--bg-sidebar);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
  height: 70px; /* Fixed height for header */
}

#header .container {
  height: 100%;
}

/* Header icon buttons (mobile) */
.header-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
:root[data-theme="light"] .header-icon-btn {
  background: rgba(15, 23, 42, 0.04);
}
:root[data-theme="light"] .header-icon-btn:hover {
  background: rgba(15, 23, 42, 0.08);
}

.page-layout {
  display: flex;
  margin-top: 70px; /* Match header height */
  min-height: calc(100vh - 70px);
}

.sidebar {
  width: 280px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 70px;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 1020;
  padding: 1.5rem 0;
  transition: transform 0.3s ease;
}

.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 2rem;
  width: calc(100% - 280px);
  padding-bottom: 80px; /* Space for player bar */
}

/* Sidebar Components */
.sidebar-section {
  padding: 0 1.5rem;
  margin-bottom: 2rem;
}

.sidebar-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 700;
}

.category-list, .favorites-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item, .favorite-item {
  margin-bottom: 0.25rem;
}

.category-item a, .favorite-item a {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: var(--transition);
}

.category-item a:hover, .favorite-item a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary-light);
  transform: translateX(4px);
}

.category-item.active a {
  background: rgba(67, 97, 238, 0.15);
  color: var(--primary-light);
  border-left: 3px solid var(--primary-color);
}

.category-item i {
  width: 24px;
  margin-right: 0.5rem;
  text-align: center;
}

/* Sidebar cities dropdown (details/summary) */
.sidebar-details {
  margin: 0;
}
.sidebar-details-summary {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
  transition: var(--transition);
}
.sidebar-details-summary::-webkit-details-marker {
  display: none;
}
.sidebar-details-summary::before {
  content: '\f0d7';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-right: 0.5rem;
  transition: transform 0.2s;
}
.sidebar-details[open] .sidebar-details-summary::before {
  transform: rotate(180deg);
}
.sidebar-details-summary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary-light);
}
.sidebar-details .category-list {
  margin-top: 0.25rem;
  max-height: 200px;
  overflow-y: auto;
}

/* Sidebar states with nested cities - Slide submenu style */
.sidebar-state-item {
  position: relative;
  margin-bottom: 0.35rem;
}

/* State row = clear parent header (always visible, distinct from cities) */
.sidebar-state-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  border-radius: 6px;
  padding: 0 0.25rem 0 0;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid rgba(67, 97, 238, 0.4);
  transition: var(--transition);
  flex-wrap: nowrap;
}

.sidebar-state-wrapper:hover {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--primary-color);
}

.sidebar-state-link {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  min-width: 0;
}

.sidebar-state-link:hover {
  color: var(--primary-light);
}

.sidebar-state-link i {
  width: 24px;
  margin-right: 0.5rem;
  text-align: center;
  color: var(--primary-light);
  flex-shrink: 0;
}

.sidebar-submenu-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border-radius: 4px;
  flex-shrink: 0;
}

.sidebar-submenu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary-light);
}

.sidebar-submenu-toggle i {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.sidebar-state-item.submenu-open .sidebar-submenu-toggle {
  background: rgba(67, 97, 238, 0.2);
  border-color: var(--primary-color);
  color: var(--primary-light);
}

.sidebar-state-item.submenu-open .sidebar-submenu-toggle i {
  transform: rotate(90deg);
}

/* Cities list: indented under state, only visible when open */
.sidebar-cities-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0 1.5rem;
  border-left: 2px solid rgba(67, 97, 238, 0.2);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}

.sidebar-state-item.submenu-open .sidebar-cities-list {
  max-height: 500px;
  opacity: 1;
  margin: 0.2rem 0 0.2rem 1.5rem;
}

/* City rows: smaller, muted, clearly children */
.sidebar-city-item {
  margin-bottom: 0.08rem;
}

.sidebar-city-item a {
  display: flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 400;
  border-radius: 4px;
  transition: var(--transition);
}

.sidebar-city-item a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary-light);
  transform: translateX(4px);
}

.sidebar-city-item.active a {
  color: var(--primary-light);
  background: rgba(67, 97, 238, 0.15);
  font-weight: 600;
}

.sidebar-city-item a i {
  width: 16px;
  margin-right: 0.35rem;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.sidebar-city-item.active a i {
  color: var(--primary-light);
}

/* Active state styling */
.sidebar-state-item.active .sidebar-state-link {
  color: var(--primary-light);
}

.sidebar-state-item.active .sidebar-state-wrapper {
  border-left-color: var(--primary-color);
  background: rgba(67, 97, 238, 0.12);
}

.favorite-info h4 {
  font-size: 0.95rem;
  margin: 0;
  color: var(--text-primary);
}

.favorite-info p {
  font-size: 0.8rem;
  margin: 0;
  color: var(--text-muted);
}

/* Header Components */
.logo img {
  max-height: 40px;
}

/* Light theme: improve logo contrast on light header */
:root[data-theme="light"] .logo img {
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.35));
}

.search-form {
  position: relative;
  max-width: 400px;
  width: 100%;
}

/* Mobile header search dropdown */
@media (max-width: 768px) {
  #header .container {
    position: relative;
  }

  /* Make logo fit better */
  #header .logo img {
    max-height: 32px;
  }

  /* Hide inline search on mobile; open via button */
  #header .search-form {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    max-width: none;
    width: auto;
    padding: 0.75rem 1rem;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    z-index: 1031;
  }

  body.search-open #header .search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }

  body.search-open #header .logo {
    display: none;
  }
}

.form-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  width: 100%;
  transition: var(--transition);
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.search-form .btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
}

.search-form .btn:hover {
  color: var(--primary-light);
}

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 0.5rem;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  box-shadow: 0 4px 6px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(67, 97, 238, 0.4);
  color: var(--white);
}

.btn-outline-primary {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-light);
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: var(--white);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary-light);
  padding: 0;
  text-decoration: none;
}
.btn-link:hover { text-decoration: underline; }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
}
.bg-secondary { background-color: rgba(255, 255, 255, 0.2) !important; }

/* Light theme: make badges readable on light surfaces */
:root[data-theme="light"] .badge {
  color: var(--text-primary);
}
:root[data-theme="light"] .bg-secondary {
  background-color: rgba(15, 23, 42, 0.12) !important;
}

/* Sidebar "Popular Tags" pills */
.sidebar .badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
:root[data-theme="light"] .sidebar .badge {
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid var(--border-color);
}
.sidebar .badge:hover {
  background: rgba(255, 255, 255, 0.18);
}
:root[data-theme="light"] .sidebar .badge:hover {
  background: rgba(15, 23, 42, 0.10);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  border-color: var(--primary-color);
}

.card-img-top {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body {
  padding: 1rem;
}

.card-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
}

/* Home Page Sections */
.hero-section {
  background: var(--gradient-primary);
  border-radius: 15px;
  padding: 3rem 2rem;
  color: var(--white);
  text-align: center;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 30px rgba(67, 97, 238, 0.3);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.1), transparent 60%);
  pointer-events: none;
}

.display-4 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.lead {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.section-title {
  margin: 0;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Grids */
.radio-grid, .category-grid, .genre-grid, .language-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.category-grid, .genre-grid, .language-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* Radio Cards */
.radio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.radio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  border-color: var(--primary-color);
}

.radio-header {
  height: 120px;
  position: relative;
  overflow: hidden;
}

.radio-views-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.radio-views-badge i {
  font-size: 0.75rem;
  opacity: 0.95;
}

.radio-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.8) 100%);
}

.radio-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.radio-card:hover .radio-bg {
  transform: scale(1.1);
}

.radio-logo {
  position: absolute;
  bottom: -20px;
  left: 15px;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  border: 3px solid var(--bg-card);
  z-index: 2;
  background: var(--bg-card);
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.radio-content {
  padding: 30px 15px 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.radio-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.radio-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.radio-title a:hover {
  color: var(--primary-light);
}

.radio-footer {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-light);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.card-play-btn:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.card-play-btn i {
  font-size: 0.8rem;
  background: rgba(67, 97, 238, 0.15);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.card-play-btn:hover i {
  background: var(--primary-color);
  color: var(--white);
}

/* Styled Cards for Categories/Languages */
.category-card, .genre-card, .language-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.category-card:hover, .genre-card:hover, .language-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  border-color: var(--primary-color);
  background: rgba(40, 40, 60, 0.9);
}

.category-link, .genre-link, .language-link {
  display: flex;
  align-items: center;
  padding: 1.25rem;
  color: var(--text-primary);
  gap: 1rem;
}

.category-icon, .genre-icon, .language-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(67, 97, 238, 0.15);
  border-radius: 12px;
  font-size: 1.5rem;
  color: var(--primary-light);
  transition: var(--transition);
}

.category-card:hover .category-icon, 
.language-card:hover .language-icon,
.genre-card:hover .genre-icon {
  background: var(--primary-color);
  color: var(--white);
  transform: scale(1.1);
}

.category-info, .genre-info, .language-info {
  flex: 1;
  overflow: hidden;
}

.category-name, .genre-name, .language-name {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-count, .genre-count, .language-count {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.category-arrow, .language-arrow {
  color: var(--text-muted);
  transition: var(--transition);
}

.category-card:hover .category-arrow,
.language-card:hover .language-arrow {
  color: var(--primary-light);
  transform: translateX(4px);
}

/* Radio Info Card (Single Page) */
.radio-info-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}

.radio-info-header {
  background: var(--gradient-primary);
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.radio-info-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
  display: flex;
  align-items: center;
}

.radio-info-title i {
  margin-right: 0.75rem;
  font-size: 1.5rem;
}

.radio-info-body {
  padding: 2rem;
}

.radio-info-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.radio-info-image {
  flex: 0 0 auto;
  text-align: center;
}

.radio-info-image img {
  max-width: 160px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
}

.radio-info-stats {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.radio-info-actions {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.radio-info-description {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: 1.5rem;
}

.radio-info-description p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* Template: Minimal */
.radio-info-minimal {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.radio-info-minimal:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  border-color: var(--primary-color);
}

.radio-info-minimal h4 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.radio-info-minimal .rounded-circle {
  border-radius: 50% !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.radio-info-minimal .text-secondary {
    color: var(--text-secondary) !important;
}

.radio-info-minimal #play-btn-top {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.radio-info-minimal #play-btn-top:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(67, 97, 238, 0.6) !important;
}

.bg-dark-subtle {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

:root[data-theme="light"] .bg-dark-subtle {
    background-color: rgba(15, 23, 42, 0.06);
    color: var(--text-secondary);
}

/* Make plain .table readable in dark mode (when we remove .table-dark in templates) */
:root:not([data-theme="light"]) .table {
  color: var(--text-secondary);
}
:root:not([data-theme="light"]) .table td {
  color: var(--text-secondary);
}

/* Template: Modern */
.radio-info-modern {
    background: var(--bg-card);
    border: none;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.radio-info-modern-desc {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.radio-info-modern .badge {
    padding: 0.5em 1em;
    font-size: 0.85em;
    font-weight: 600;
}

.radio-info-modern .display-4 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Tabs Template - Material Style */
.radio-info-tabbed {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.radio-info-card.radio-info-tabbed {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  max-width: 980px;
}

.display-5 {
  font-size: 2.4rem;
  line-height: 1.12;
  letter-spacing: -0.4px;
}

.radio-info-tabbed .radio-hero {
  padding: 1.5rem;
  background:
    linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.72)),
    var(--hero-image) center / cover no-repeat;
  color: var(--text-primary);
}
.radio-info-tabbed .radio-hero-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.radio-info-tabbed .radio-hero-media {
  flex: 0 0 auto;
}
.radio-info-tabbed .radio-hero-main {
  flex: 1 1 auto;
  min-width: 0;
}
.radio-info-tabbed .radio-hero-below {
  display: none;
  border-top: 1px solid var(--border-color);
  padding: 0.9rem 1rem;
}
.radio-info-tabbed .radio-hero-below-inner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}
.radio-info-tabbed .radio-hero-img-below {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.20);
  box-shadow: 0 10px 22px rgba(0,0,0,0.25);
}
.radio-info-tabbed .radio-hero-title {
  word-break: break-word;
}

/* Share button + popup: top-right overlay on hero background image */
.radio-hero-share-wrap {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 5;
  padding: 0.5rem;
}

.radio-hero-share-btn {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: #fff;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.radio-hero-share-btn:hover {
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.radio-hero-share-btn[aria-expanded="true"] {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.4);
}

.radio-hero-share-popup {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.35rem;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  padding: 0.35rem 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.radio-hero-share-popup[hidden] {
  display: none !important;
}

.share-popup-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: none;
  border: none;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.share-popup-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--primary-light);
}
.share-popup-item:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.06);
}
.share-popup-item i {
  width: 20px;
  text-align: center;
  opacity: 0.9;
}

.radio-hero-share-status {
  transition: opacity 0.25s ease;
  pointer-events: none;
}

/* Light theme: share button + popup */
:root[data-theme="light"] .radio-hero-share-btn {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  border-color: rgba(15, 23, 42, 0.15);
}
:root[data-theme="light"] .radio-hero-share-btn:hover {
  background: rgba(255, 255, 255, 1);
  color: var(--primary-color);
  border-color: var(--border-color);
}
:root[data-theme="light"] .radio-hero-share-btn[aria-expanded="true"] {
  background: #fff;
  border-color: var(--primary-color);
  color: var(--primary-color);
}
:root[data-theme="light"] .share-popup-item:hover {
  background: rgba(67, 97, 238, 0.08);
  color: var(--primary-color);
}

/* Light theme: use a bright scrim (no dark hero) */
:root[data-theme="light"] .radio-info-tabbed .radio-hero {
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.92) 0%,
      rgba(255, 255, 255, 0.70) 45%,
      rgba(255, 255, 255, 0.18) 100%
    ),
    var(--hero-image) center / cover no-repeat;
  color: var(--text-primary);
}

:root[data-theme="light"] .radio-info-tabbed .radio-hero-img {
  border-color: rgba(15, 23, 42, 0.12) !important;
}

:root[data-theme="light"] .radio-info-tabbed .radio-hero-stats--in-hero {
  color: var(--text-secondary);
}
.radio-info-tabbed .radio-hero-actions #play-btn-top {
  /* Force circle for the hero play button */
  width: 64px !important;
  height: 64px !important;
  min-width: 0 !important;
  border-radius: 9999px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.radio-tabs-container {
    background: var(--bg-card);
    padding: 0;
    overflow-x: auto;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.radio-tabs-container .nav-tabs {
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem 0;
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.radio-tabs-container .nav-link {
    color: var(--text-secondary);
    border: 1px solid transparent !important;
    padding: 0.75rem 1rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.3px;
    background: transparent !important;
    position: relative;
    font-size: 0.95rem;
    border-radius: 10px 10px 0 0;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.radio-tabs-container .nav-link:hover {
    color: var(--text-primary) !important;
    background: rgba(255,255,255,0.06) !important;
    border-color: var(--border-color) !important;
}

.radio-tabs-container .nav-link.active {
    color: var(--text-primary) !important;
    background: var(--bg-card) !important; /* match tab content */
    border-color: var(--border-color) var(--border-color) transparent !important; /* “connect” to content */
    margin-bottom: -1px; /* overlap nav-tabs bottom border */
    box-shadow: inset 0 3px 0 0 var(--primary-color);
}

/* Remove underline effect for connected tabs */
.radio-tabs-container .nav-link::after { display: none; }

.radio-tabs-container .nav-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(76,201,240,0.18);
}

/* Better spacing + readability for tab content */
.radio-info-tabbed .tab-content {
    background: var(--bg-card);
}
.radio-info-tabbed #radioTabsContent {
  padding: 1.25rem !important;
}
.radio-info-tabbed .tab-pane {
    min-height: 180px;
}

/* Tab content animation */
.radio-info-tabbed .tab-pane[hidden] {
    display: none !important;
}
.radio-info-tabbed .tab-pane {
    will-change: opacity, transform;
}
.radio-info-tabbed .tab-pane.tab-anim-enter {
    animation: tabFadeSlideIn 220ms ease both;
}
@keyframes tabFadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .radio-info-card.radio-info-tabbed {
      max-width: 100%;
    }
    .radio-tabs-container .nav-tabs {
        justify-content: flex-start;
        gap: 0.75rem;
        padding: 0 0.5rem;
        flex-wrap: nowrap;
    }
    .radio-tabs-container .nav-link {
        padding: 1rem 0.75rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    .radio-tabs-container .nav-link::after {
      display: none;
    }
    .radio-info-tabbed #radioTabsContent {
      padding: 0.9rem !important;
    }
}

/* Tab content specific overrides */
.table-dark {
    background-color: transparent;
    --bs-table-bg: transparent;
}
.table-dark td {
    color: var(--text-secondary);
}

/* Utilities for templates */
.bg-dark { background-color: #212529 !important; }
.text-white { color: #fff !important; }
.text-dark { color: #212529 !important; }
.bg-white { background-color: #fff !important; }
.bg-info { background-color: #0dcaf0 !important; }
.bg-light { background-color: #f8f9fa !important; }
.overflow-hidden { overflow: hidden !important; }
.shadow-lg { box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important; }
.shadow-sm { box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important; }
.border-0 { border: 0 !important; }
.rounded-circle { border-radius: 50% !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }
.p-md-5 { padding: 3rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.w-auto { width: auto !important; }


/* Player Bar */
.player-bar {
  background: rgba(20, 20, 35, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 10px rgba(0,0,0,0.3);
  z-index: 1040;
}

/* Light theme: footer player should not stay dark */
:root[data-theme="light"] .player-bar {
  background: rgba(245, 247, 251, 0.98);
  color: var(--text-primary);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 10px rgba(15, 23, 42, 0.12);
}
:root[data-theme="light"] .player-bar.text-white {
  color: var(--text-primary) !important;
}
:root[data-theme="light"] .player-bar .btn-link {
  color: var(--text-primary) !important;
}
:root[data-theme="light"] .player-bar .btn-link:hover {
  color: var(--primary-color) !important;
}

.player-status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-left: 1rem;
}

.player-status-indicator.offline { background: #e74c3c; box-shadow: 0 0 5px #e74c3c; }
.player-status-indicator.live { background: #2ecc71; box-shadow: 0 0 5px #2ecc71; animation: pulse 2s infinite; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* Footer */
#footer {
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1rem;
  margin-top: auto;
  color: var(--text-secondary);
  /* Prevent footer from sitting under fixed sidebar */
  margin-left: 280px;
  width: calc(100% - 280px);
}

#footer h5 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

#footer a {
  color: var(--text-secondary);
}
#footer a:hover {
  color: var(--primary-light);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Row/Col Grid System (Simple) */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col-md-3 { width: 25%; padding: 0 15px; }
.col-md-4 { width: 33.333%; padding: 0 15px; }
.col-md-9 { width: 75%; padding: 0 15px; }
.fw-bold { font-weight: 700 !important; }
.text-light { color: #f8f9fa !important; }
.bg-danger { background-color: #dc3545 !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.btn-success { background-color: #198754; color: #fff; border: none; }
.btn-success:hover { background-color: #157347; color: #fff; }
.btn-outline-light { border: 1px solid #f8f9fa; color: #f8f9fa; background: transparent; }
.btn-outline-light:hover { background: #f8f9fa; color: #000; }

@media (min-width: 768px) {
  .text-md-start { text-align: left !important; }
  .mb-md-0 { margin-bottom: 0 !important; }
  .justify-content-md-start { justify-content: flex-start !important; }
}

/* Mobile Responsive */
@media (max-width: 992px) {
  /* Mobile header tightening */
  #header .container {
    gap: 0.75rem;
  }
  .search-form {
    max-width: 260px;
  }

  .sidebar {
    width: min(320px, 86vw);
    transform: translateX(-100%);
  }
  .sidebar.active {
    transform: translateX(0);
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
  }
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
  }
  #footer {
    margin-left: 0;
    width: 100%;
  }
  .d-lg-none {
    display: block !important;
  }
  /* Sidebar toggle button styling (applies up to 992px) */
  #sidebarToggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    padding: 0;
    margin-right: 0.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }
}

@media (max-width: 768px) {
  /* Make "col-md-*" behave like Bootstrap on mobile */
  .col-md-3, .col-md-4, .col-md-6, .col-md-9 {
    width: 100%;
  }
  .col-md-4 {
    width: 100%;
    margin-bottom: 2rem;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .radio-grid, .category-grid, .genre-grid, .language-grid {
    grid-template-columns: 1fr; /* Full width cards on mobile */
  }

  /* Tabs radio hero: tighter + more readable on mobile */
  .radio-info-tabbed .radio-hero {
    padding: 1rem !important;
    min-height: 240px;
    text-align: center;
  }
  /* Mobile layout requirement:
     - title at top of background
     - play button centered over background
     - logo + stats below background (outside hero) */
  .radio-info-tabbed .radio-hero-inner {
    display: block;
    position: relative;
    height: 100%;
    min-height: 240px;
  }
  .radio-info-tabbed .radio-hero-media {
    display: none;
  }
  .radio-info-tabbed .radio-hero-title {
    position: absolute;
    top: 16px;
    left: 12px;
    right: 12px;
    margin: 0 !important;
    font-size: 1.45rem;
    line-height: 1.18;
    text-shadow: 0 10px 30px rgba(0,0,0,0.65);
  }
  .radio-info-tabbed .radio-hero-stats--in-hero {
    display: none !important;
  }
  .radio-info-tabbed .radio-hero-actions {
    position: absolute;
    left: 50%;
    top: 55%;
    transform: translate(-50%, -50%);
    width: min(320px, calc(100% - 24px));
  }
  .radio-info-tabbed .radio-hero-actions #play-btn-top {
    /* Keep circular on mobile too */
    width: 56px !important;
    height: 56px !important;
    min-width: 0 !important;
    border-radius: 9999px !important;
    padding: 0 !important;
  }

  .radio-hero-share-btn {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.8rem !important;
  }
  .radio-hero-share-popup {
    min-width: 160px;
    right: 0;
  }
  .radio-hero-share-status {
    top: 2.5rem !important;
    right: 0.35rem !important;
    font-size: 0.7rem !important;
  }

  .radio-info-tabbed .radio-hero-below {
    display: block;
  }
  .radio-info-tabbed .radio-hero-stats--below {
    justify-content: center !important;
    gap: 0.5rem !important;
  }
  .radio-info-tabbed .radio-hero-stats--below .badge {
    font-size: 0.72rem;
    padding: 0.35em 0.55em;
  }

  /* Playback error card: less bulky on mobile */
  .radio-info-tabbed .alert {
    padding: 0.9rem 0.95rem;
    border-radius: 12px;
  }
  .radio-info-tabbed .alert h5 {
    font-size: 1rem;
    margin: 0 0 0.35rem 0;
  }
}

/* Mobile sidebar backdrop */
.sidebar-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  top: 70px; /* header height */
  bottom: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1015;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
body.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}
body.sidebar-open {
  overflow: hidden;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 1050;
  align-items: center;
  justify-content: center;
}
.modal.active { display: flex; }

.modal-content {
  background: var(--bg-card);
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  padding: 2rem;
  position: relative;
  border: 1px solid var(--border-color);
}

.btn-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Dropdowns */
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  min-width: 200px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  z-index: 1000;
  padding: 0.5rem 0;
}
.dropdown.active .dropdown-menu { display: block; }
.dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
}
.dropdown-item:hover {
  background: rgba(67, 97, 238, 0.15);
  color: var(--primary-light);
}

/* Accordion */
.accordion-item {
  border-bottom: 1px solid var(--border-color);
}
.accordion-button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1rem;
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}
.accordion-collapse {
  display: none;
  padding: 1rem;
  color: var(--text-secondary);
}
.accordion-collapse.show { display: block; }
