/* ==========================================================================
   Atheer Radio (أثير) - Modern Radio Station Stylesheet
   Glassmorphism, Dark/Light Theme, Responsive (Mobile/Tablet/Desktop), RTL First
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette - Dark Theme (Default) */
  --bg-primary: #0a0d14;
  --bg-secondary: #121722;
  --bg-tertiary: #19202f;
  --bg-card: rgba(22, 29, 44, 0.75);
  --bg-card-hover: rgba(30, 40, 60, 0.9);
  --bg-glass: rgba(15, 20, 30, 0.88);
  --bg-modal: #131926;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(16, 185, 129, 0.4);
  --border-active: #10b981;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;
  
  --accent-primary: #10b981;       /* Emerald */
  --accent-primary-hover: #059669;
  --accent-primary-glow: rgba(16, 185, 129, 0.25);
  --accent-secondary: #3b82f6;     /* Blue */
  --accent-gold: #f59e0b;          /* Amber/Gold for favorites */
  --accent-gold-glow: rgba(245, 158, 11, 0.25);
  --accent-danger: #ef4444;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--accent-primary-glow);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font-arabic: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-latin: 'Outfit', system-ui, sans-serif;
  
  --player-height: 84px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --bg-modal: #ffffff;
  
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(16, 185, 129, 0.45);
  --border-active: #10b981;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #f8fafc;
  
  --accent-primary-glow: rgba(16, 185, 129, 0.2);
  --accent-gold-glow: rgba(245, 158, 11, 0.2);
  
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.12);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

/* Instant Theme Transition Lock: eliminates perceived delay & repaint lag during theme switches */
.theme-switching,
.theme-switching *,
.theme-switching *::before,
.theme-switching *::after {
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -o-transition: none !important;
  -ms-transition: none !important;
  transition: none !important;
}

body {
  font-family: var(--font-latin);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  direction: ltr;
  text-align: left;
  overflow-x: clip;
  line-height: 1.6;
  padding-bottom: 0;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 65%, rgba(59, 130, 246, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

body.has-sticky-player,
body:has(.sticky-player-bar) {
  padding-bottom: var(--player-height);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Typography & Interactive Elements */
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  touch-action: manipulation;
}
input, select, textarea {
  font-family: inherit;
  font-size: 16px; /* Prevents auto-zoom in iOS Safari */
  outline: none;
}

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

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  flex-shrink: 0;
}

.brand-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-primary) 0%, #047857 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-primary-glow);
  flex-shrink: 0;
  overflow: hidden;
}

.brand-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-logo-icon svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  min-width: 0;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 7px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
}

.brand-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Generic Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
  position: relative;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--accent-primary-glow);
}
.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px var(--accent-primary-glow);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.btn-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--accent-primary);
}
.btn-icon svg {
  width: 18px;
  height: 18px;
}

.badge-indicator {
  position: absolute;
  top: -3px;
  right: -3px;
  padding: 1px 5px;
  font-size: 0.65rem;
  font-family: var(--font-latin);
  font-weight: 700;
  background: var(--accent-primary);
  color: #ffffff;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-primary);
}

.badge-indicator.data-saver-indicator {
  background: var(--accent-secondary);
  font-size: 0.62rem;
  padding: 1px 6px;
}

/* ==========================================================================
   Dhikr Banner Section (Pill Banner with Adhkar & Refresh)
   ========================================================================== */
.dhikr-banner-section {
  padding-top: 14px;
  display: flex;
  justify-content: center;
}

.dhikr-pill-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 820px;
  padding: 8px 16px;
  background: #fefce8;
  border: 1.5px solid #eab308;
  border-radius: var(--radius-full);
  box-shadow: 0 3px 12px rgba(234, 179, 8, 0.15);
  gap: 12px;
  transition: all var(--transition-normal);
}

[data-theme="dark"] .dhikr-pill-container {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.1);
}

.dhikr-sparkle {
  color: #ca8a04;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: sparkle-glow 3s infinite ease-in-out;
}

[data-theme="dark"] .dhikr-sparkle {
  color: #fbbf24;
}

@keyframes sparkle-glow {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
  50% { transform: scale(1.15) rotate(15deg); opacity: 1; filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6)); }
}

.dhikr-text-box {
  flex: 1;
  text-align: center;
  overflow: hidden;
  padding: 0 4px;
}

.dhikr-text {
  font-family: var(--font-arabic);
  direction: rtl;
  font-size: 1.05rem;
  font-weight: 700;
  color: #854d0e;
  line-height: 1.5;
  display: inline-block;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

[data-theme="dark"] .dhikr-text {
  color: #fef08a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.dhikr-refresh-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(234, 179, 8, 0.18);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #a16207;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, color 0.2s ease;
}

[data-theme="dark"] .dhikr-refresh-btn {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.dhikr-refresh-btn:hover {
  background: #eab308;
  color: #ffffff;
  transform: rotate(180deg) scale(1.08);
}

.dhikr-refresh-btn.spinning svg {
  animation: spin-once 0.5s ease-in-out;
}

@keyframes spin-once {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Hero & Quick Stats
   ========================================================================== */
.hero-section {
  padding: 20px 0 16px;
}

.hero-card {
  background: linear-gradient(135deg, rgba(22, 29, 44, 0.85) 0%, rgba(16, 185, 129, 0.1) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .hero-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(16, 185, 129, 0.08) 100%);
}

.hero-info {
  flex: 1 1 320px;
}

.hero-info h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
  background: linear-gradient(90deg, var(--text-primary), var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 600px;
}

.stats-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-tertiary);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  flex: 1 1 auto;
}

.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-primary);
  flex-shrink: 0;
}
.stat-icon.gold {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
}
.stat-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-secondary);
}

.stat-number {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-latin);
  line-height: 1.1;
  color: var(--text-primary);
}
.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Search & Filter Bar
   ========================================================================== */
.controls-section {
  padding-bottom: 20px;
}

.search-bar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 14px;
  right: auto;
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 44px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
  background: var(--bg-card-hover);
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  left: auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.search-clear-btn:hover {
  background: var(--accent-danger);
  color: #ffffff;
}

/* Categories Bar (Chips & Smooth Scroll) */
.radio-categories-scroll-wrapper {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
}

.radio-cat-scroll-arrow {
  position: absolute;
  top: calc(50% - 3px);
  transform: translateY(-50%);
  z-index: 15;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card, #131926);
  border: 1.5px solid var(--border-hover, rgba(16, 185, 129, 0.4));
  color: var(--text-primary, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.radio-cat-scroll-arrow.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.radio-cat-scroll-arrow:hover {
  background: var(--accent-primary, #10b981);
  border-color: var(--accent-primary, #10b981);
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 20px var(--accent-primary-glow, rgba(16, 185, 129, 0.4));
}

.radio-cat-scroll-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.radio-cat-scroll-left {
  left: 0;
}

.radio-cat-scroll-right {
  right: 0;
}

/* Gradient edge fades */
.radio-categories-scroll-wrapper::before,
.radio-categories-scroll-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 8px;
  width: 48px;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.radio-categories-scroll-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-primary, #0a0d14) 20%, transparent);
}

.radio-categories-scroll-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-primary, #0a0d14) 20%, transparent);
}

[data-theme="light"] .radio-categories-scroll-wrapper::before {
  background: linear-gradient(to right, var(--bg-primary, #f8fafc) 20%, transparent);
}

[data-theme="light"] .radio-categories-scroll-wrapper::after {
  background: linear-gradient(to left, var(--bg-primary, #f8fafc) 20%, transparent);
}

.radio-categories-scroll-wrapper.has-left-overflow::before {
  opacity: 1;
}

.radio-categories-scroll-wrapper.has-right-overflow::after {
  opacity: 1;
}

.categories-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: 6px 36px 12px 36px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 185, 129, 0.5) rgba(255, 255, 255, 0.08);
}

.categories-wrapper.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.categories-wrapper::-webkit-scrollbar {
  height: 7px;
  display: block;
}

.categories-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  margin: 0 20px;
}

[data-theme="light"] .categories-wrapper::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.08);
}

.categories-wrapper::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.5);
  border-radius: 9999px;
  transition: background 0.2s ease;
}

.categories-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary, #10b981);
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  user-select: none;
  flex-shrink: 0;
}

.category-chip:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
}

.category-chip.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 3px 10px var(--accent-primary-glow);
}

.category-chip.favorites-chip.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  box-shadow: 0 3px 10px var(--accent-gold-glow);
}

.chip-count {
  font-size: 0.72rem;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  font-family: var(--font-latin);
}
.category-chip.active .chip-count {
  background: rgba(0, 0, 0, 0.2);
}

/* Sub-header / Sort Info */
.results-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.84rem;
  flex-wrap: wrap;
  gap: 10px;
}

.results-count b {
  color: var(--text-primary);
}

.sort-select-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-select {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
}

/* ==========================================================================
   Stations Grid & Cards
   ========================================================================== */
.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.station-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  overflow: hidden;
  cursor: pointer;
}

.station-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: transparent;
  transition: background var(--transition-fast);
}

.station-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.station-card.is-playing {
  border-color: var(--accent-primary);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 6px 20px var(--accent-primary-glow);
}

.station-card.is-playing::before {
  background: var(--accent-primary);
}

.station-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.station-category-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-category-tag.custom-tag {
  color: var(--accent-secondary);
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.1);
}

.station-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.card-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.card-icon-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.card-icon-btn.fav-btn.is-fav {
  color: var(--accent-gold);
}
.card-icon-btn.fav-btn.is-fav svg {
  fill: var(--accent-gold);
}

.station-body {
  margin-bottom: 14px;
}

.station-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.station-name-en,
.station-name-ar {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.card-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-subtle);
}

.station-card:hover .card-play-btn {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.station-card.is-playing .card-play-btn {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px var(--accent-primary-glow);
}

.live-badge-mini {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
}

.station-card.is-playing .live-badge-mini {
  color: var(--accent-danger);
}
.station-card.is-playing .pulse-dot {
  background: var(--accent-danger);
  animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-subtle);
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.empty-state-icon svg {
  width: 28px;
  height: 28px;
}

.empty-state h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.empty-state p {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 380px;
  margin: 0 auto 16px;
}

/* ==========================================================================
   Sticky Bottom Audio Player
   ========================================================================== */
.sticky-player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--player-height);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  z-index: 100;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
  transition: all var(--transition-normal);
}

[data-theme="light"] .sticky-player-bar {
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.08);
}

.player-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

/* Player Left: Current Track Info */
.player-track-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 280px;
  min-width: 0;
}

.player-artwork {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.player-artwork.playing svg {
  animation: bounce-icon 2s infinite ease-in-out;
}

@keyframes bounce-icon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.track-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.track-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.track-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-danger);
  font-weight: 800;
  font-size: 0.68rem;
  flex-shrink: 0;
}

.live-tag .dot {
  width: 6px;
  height: 6px;
  background: var(--accent-danger);
  border-radius: 50%;
  animation: pulse-ring 1.5s infinite;
}

/* Sound Wave Animation in Track Info */
.sound-waves {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  flex-shrink: 0;
}
.wave-bar {
  width: 2.5px;
  background: var(--accent-primary);
  border-radius: 2px;
  height: 3px;
  transition: height 0.1s ease;
}
.is-playing .wave-bar:nth-child(1) { animation: wave 1.1s ease-in-out infinite; }
.is-playing .wave-bar:nth-child(2) { animation: wave 0.8s ease-in-out infinite 0.2s; }
.is-playing .wave-bar:nth-child(3) { animation: wave 1.3s ease-in-out infinite 0.4s; }
.is-playing .wave-bar:nth-child(4) { animation: wave 0.9s ease-in-out infinite 0.1s; }

@keyframes wave {
  0%, 100% { height: 3px; }
  50% { height: 12px; }
}

/* Player Center: Controls */
.player-controls-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
}

.player-main-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  direction: ltr; /* Universal audio playback controls order */
  gap: 14px;
}

.player-main-controls .ctrl-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.player-main-controls .ctrl-btn:hover {
  color: var(--accent-primary);
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: scale(1.08);
}

.player-main-controls .ctrl-btn:active {
  transform: scale(0.95);
}

.ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.ctrl-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.play-master-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--accent-primary-glow);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}

.play-master-btn:hover {
  transform: scale(1.08);
  background: var(--accent-primary-hover);
  box-shadow: 0 6px 20px var(--accent-primary-glow);
}

.play-master-btn:active {
  transform: scale(0.94);
}

#play-master-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #ffffff;
}

#player-retry-btn {
  display: none; /* Shown dynamically on error/retry */
}

.player-status-line {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Player Right: Volume & Extras */
.player-extra-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 240px;
}

.volume-control-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

#volume-mute-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

#volume-mute-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

#volume-mute-btn svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
  fill: none !important;
  flex-shrink: 0 !important;
  pointer-events: none !important;
}

.volume-slider {
  -webkit-appearance: none;
  width: 76px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 6px var(--accent-primary-glow);
  transition: transform 0.1s ease;
}
.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg-modal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-bounce), opacity var(--transition-normal);
  overflow: hidden;
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.modal-close-btn:hover {
  background: var(--accent-danger);
  color: #ffffff;
}

.modal-body {
  padding: 20px;
  max-height: calc(85vh - 120px);
  overflow-y: auto;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.form-label span.req {
  color: var(--accent-danger);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.92rem;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.form-helper {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.form-helper.status-playing {
  color: var(--accent-primary);
  font-weight: 700;
}
.form-helper.status-error {
  color: var(--accent-danger);
  font-weight: 700;
}
.form-helper.status-loading {
  color: var(--accent-secondary);
  font-weight: 700;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

/* Sleep Timer Presets */
.timer-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.timer-preset-btn {
  padding: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
  text-align: center;
}

.timer-preset-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.timer-preset-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--accent-primary-glow);
}

.timer-active-display {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  margin-bottom: 16px;
}

.timer-countdown {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-latin);
  color: var(--accent-primary);
  direction: ltr;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: calc(var(--player-height) + 16px);
  left: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-modal);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: auto;
  animation: toast-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all var(--transition-normal);
  max-width: 340px;
}

.toast.toast-success {
  border-left: 4px solid var(--accent-primary);
}
.toast.toast-error {
  border-left: 4px solid var(--accent-danger);
}
.toast.toast-info {
  border-left: 4px solid var(--accent-secondary);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.data-saver-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-latin);
}

/* ==========================================================================
   Site Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  margin-bottom: 0;
  padding: 32px 0 20px;
  border-top: 1px solid var(--border-subtle);
  position: relative;
  transition: border-color var(--transition-normal);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  border-radius: var(--radius-full);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.footer-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 26px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(245, 158, 11, 0.1) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-full);
  color: var(--accent-primary);
  font-size: 1.05rem;
  font-weight: 800;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.12);
  transition: all var(--transition-normal);
  cursor: pointer;
  user-select: none;
}

[data-theme="dark"] .footer-link {
  color: #34d399;
}

.footer-link:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 20px var(--accent-primary-glow);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(245, 158, 11, 0.18) 100%);
}

.footer-link:active {
  transform: scale(0.97);
}

.footer-social-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.social-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.social-icon-btn svg {
  width: 19px;
  height: 19px;
  transition: transform var(--transition-fast);
}

.social-icon-btn:hover svg {
  transform: scale(1.1);
}

.social-icon-btn.facebook:hover {
  background: #1877f2;
  color: #ffffff;
  border-color: #1877f2;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(24, 119, 242, 0.4);
}

.social-icon-btn.youtube:hover {
  background: #ff0000;
  color: #ffffff;
  border-color: #ff0000;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(255, 0, 0, 0.4);
}

.social-icon-btn.github:hover {
  background: #24292f;
  color: #ffffff;
  border-color: #24292f;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.social-icon-btn.linkedin:hover {
  background: #0a66c2;
  color: #ffffff;
  border-color: #0a66c2;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(10, 102, 194, 0.4);
}

.footer-copyright {
  display: flex;
  align-items: center;
  justify-content: center;
}

.copyright-text {
  font-size: 0.84rem;
  color: var(--text-muted);
  letter-spacing: 0.2px;
  margin: 0;
  font-weight: 500;
}

/* ==========================================================================
   Responsive Adaptations (Tablet, Mobile, Ultra-Small)
   ========================================================================== */

/* 1. Medium Tablets (max-width: 992px) */
@media (max-width: 992px) {
  .hero-card {
    padding: 18px 20px;
  }
  .player-track-info {
    flex: 1 1 200px;
  }
  .player-extra-controls {
    flex: 0 0 auto;
  }
  .volume-slider {
    width: 60px;
  }
}

/* 2. Mobile & Small Tablet (max-width: 768px) */
@media (max-width: 768px) {
  :root {
    --player-height: 116px;
  }

  body {
    padding-bottom: 0;
  }

  body.has-sticky-player,
  body:has(.sticky-player-bar) {
    padding-bottom: calc(var(--player-height) + env(safe-area-inset-bottom, 0px));
  }

  .container {
    padding: 0 12px;
  }

  /* Header adjustments */
  .site-header {
    padding: 7px 0;
  }
  .header-inner {
    gap: 6px;
  }
  .brand-logo-icon {
    width: 34px;
    height: 34px;
  }
  .brand-text h1 {
    font-size: 1.1rem;
  }
  .brand-badge {
    display: none; /* Hide badge on mobile to prevent overcrowding */
  }
  .brand-text p {
    display: none; /* Hide tagline on mobile */
  }
  .header-actions {
    gap: 8px;
  }
  .desktop-action-btn {
    display: none !important;
  }
  .mobile-menu-toggle-btn {
    display: inline-flex !important;
  }
  .header-actions .btn-icon,
  .header-actions .mobile-menu-toggle-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
  }
  .header-actions .btn-icon svg,
  .header-actions .mobile-menu-toggle-btn svg {
    width: 18px;
    height: 18px;
  }
  .badge-indicator.data-saver-indicator {
    width: 8px;
    height: 8px;
    min-width: 8px;
    padding: 0;
    font-size: 0;
    top: 2px;
    right: 2px;
    border-radius: 50%;
    border: 1.5px solid var(--bg-secondary);
  }
  #sleep-timer-indicator {
    width: 8px;
    height: 8px;
    min-width: 8px;
    padding: 0;
    font-size: 0;
    top: 2px;
    right: 2px;
    border-radius: 50%;
    border: 1.5px solid var(--bg-secondary);
  }

  /* Dhikr Banner Mobile */
  .dhikr-banner-section {
    padding-top: 8px;
  }
  .dhikr-pill-container {
    padding: 6px 12px;
    gap: 8px;
    border-radius: var(--radius-lg);
  }
  .dhikr-sparkle svg {
    width: 15px;
    height: 15px;
  }
  .dhikr-text {
    font-size: 0.82rem;
    line-height: 1.35;
  }
  .dhikr-refresh-btn {
    width: 28px;
    height: 28px;
  }
  .dhikr-refresh-btn svg {
    width: 14px;
    height: 14px;
  }

  /* Hero Section (Removes the giant empty void!) */
  .hero-section {
    padding: 10px 0 6px;
  }
  .hero-card {
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    border-radius: var(--radius-md);
  }
  .hero-info {
    flex: 0 0 auto;
    width: 100%;
  }
  .hero-info h2 {
    font-size: 1.05rem;
    margin-bottom: 2px;
  }
  .hero-info p {
    font-size: 0.78rem;
    line-height: 1.4;
  }
  .stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
    margin-top: 2px;
  }
  .stat-item {
    padding: 6px 4px;
    gap: 4px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: var(--radius-sm);
  }
  .stat-icon {
    width: 24px;
    height: 24px;
  }
  .stat-icon svg {
    width: 13px;
    height: 13px;
  }
  .stat-number {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.1;
  }
  .stat-label {
    font-size: 0.62rem;
    color: var(--text-muted);
  }

  /* Search & Filters */
  .search-input {
    height: 44px;
    font-size: 0.88rem;
    padding: 0 40px 0 38px;
  }
  .search-icon {
    left: 12px;
    right: auto;
  }
  .search-clear-btn {
    right: 8px;
    left: auto;
  }

  /* Category Chips Bleeding Scroll */
  .categories-wrapper {
    padding: 4px 12px 10px 12px;
    margin: 0 -12px;
  }

  .results-info-bar {
    flex-direction: row;
    font-size: 0.78rem;
  }

  /* Stations Grid */
  .stations-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Sticky Player Bar Mobile (2-Row Grid Layout - Perfectly Balanced) */
  .sticky-player-bar {
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
    height: auto;
    min-height: var(--player-height);
  }

  .player-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 6px 8px;
    align-items: center;
    height: 100%;
  }

  /* Row 1, Column 1: Track Details */
  .player-track-info {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .player-artwork {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
  }
  .player-artwork svg {
    width: 20px;
    height: 20px;
  }

  .track-title {
    font-size: 0.86rem;
    font-weight: 700;
  }
  .track-meta {
    font-size: 0.68rem;
    gap: 6px;
  }

  /* Row 1, Column 2: Volume & Favorite quick controls */
  .player-extra-controls {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    justify-content: flex-end;
    gap: 3px;
    flex: 0 0 auto;
  }

  .player-extra-controls .ctrl-btn {
    width: 32px;
    height: 32px;
  }
  .player-extra-controls .ctrl-btn svg {
    width: 16px;
    height: 16px;
  }

  #player-retry-btn {
    display: none; /* Shown dynamically on error/retry */
  }

  .volume-slider {
    display: none; /* Hide slider on mobile, volume-mute button still works! */
  }

  /* Row 2, Full Width: Main Playback Controls Centered */
  .player-controls-wrapper {
    grid-column: 1 / -1;
    grid-row: 2 / 3;
    width: 100%;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 18px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .player-status-line {
    display: none;
  }

  .player-main-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    direction: ltr; /* Universal audio playback controls order */
    gap: 18px;
  }
  .player-main-controls .ctrl-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
  }
  .player-main-controls .ctrl-btn svg {
    width: 18px;
    height: 18px;
  }
  .play-master-btn {
    width: 46px;
    height: 46px;
  }
  .play-master-btn svg {
    width: 22px;
    height: 22px;
  }

  /* Toast Notification */
  .toast-container {
    left: 12px;
    right: 12px;
    bottom: calc(var(--player-height) + 12px);
  }
  .toast {
    max-width: none;
    width: 100%;
  }
}

/* 3. Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
  :root {
    --player-height: 114px;
  }

  .header-actions {
    gap: 3px;
  }
  .btn, .btn-icon {
    width: 31px;
    height: 31px;
    min-width: 31px;
  }
  .btn svg, .btn-icon svg {
    width: 15px;
    height: 15px;
  }

  .timer-presets {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-card {
    border-radius: var(--radius-md);
  }
  .modal-header {
    padding: 14px 16px;
  }
  .modal-body {
    padding: 16px;
  }
  .modal-footer {
    padding: 12px 16px;
  }
}

/* 4. Ultra-Small Devices (max-width: 360px) */
@media (max-width: 360px) {
  .brand-text h1 {
    font-size: 1rem;
  }
  .brand-badge {
    display: none;
  }
  .stats-container {
    grid-template-columns: repeat(3, 1fr);
  }
  .stat-label {
    display: none; /* Icon and number only on ultra small 320px */
  }
}

/* ==========================================================================
   User Authentication & Profile UI
   ========================================================================== */
.user-auth-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.auth-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  border-radius: var(--radius-full) !important;
  padding: 8px 16px !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
  white-space: nowrap !important;
  transition: all 0.2s ease !important;
  cursor: pointer;
}

.auth-header-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45) !important;
}

.site-header .container {
  max-width: 1480px;
}

@media (min-width: 993px) and (max-width: 1440px) {
  .site-header .container {
    max-width: 100%;
    padding: 0 16px;
  }
  .header-actions {
    gap: 6px;
  }
  .desktop-action-btn {
    padding: 7px 10px;
    font-size: 0.82rem;
  }
  #pwa-install-header-btn .btn-text-hide,
  #data-saver-header-btn .btn-text-hide,
  #sleep-timer-header-btn .btn-text-hide {
    display: none !important;
  }
  #pwa-install-header-btn,
  #data-saver-header-btn,
  #sleep-timer-header-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
  }
}

.user-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-profile-pill:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #047857 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 2px 6px var(--accent-primary-glow);
  text-transform: uppercase;
  flex-shrink: 0;
}

.user-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid var(--accent-primary);
}

.user-display-name {
  max-width: 105px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* User Dropdown Menu */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 270px;
  background: var(--bg-modal, #0e1726);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  padding: 12px;
  z-index: 9999;
  animation: dropdown-in 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="light"] .user-dropdown-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-decoration: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: inherit;
  cursor: pointer;
}

[data-theme="light"] .dropdown-header {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

.dropdown-header-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

[data-theme="light"] .dropdown-header-link:hover {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.35);
}

.dropdown-profile-tap-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  margin-top: 4px;
  transition: gap 0.2s ease;
}

[data-theme="light"] .dropdown-profile-tap-hint {
  color: var(--accent-primary);
}

.dropdown-header-link:hover .dropdown-profile-tap-hint {
  gap: 6px;
  color: #34d399;
}

.dropdown-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.dropdown-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #047857 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--accent-primary-glow);
  text-transform: uppercase;
}

.dropdown-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--accent-primary);
  box-shadow: 0 4px 12px var(--accent-primary-glow);
}

.dropdown-user-info {
  min-width: 0;
  flex: 1;
}

.dropdown-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown-username {
  font-size: 0.78rem;
  color: var(--accent-primary);
  font-weight: 600;
  margin-top: 1px;
}

.dropdown-email, .dropdown-phone {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 10px 0;
}

[data-theme="light"] .dropdown-divider {
  background: rgba(0, 0, 0, 0.06);
}

.dropdown-sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: rgba(16, 185, 129, 0.08);
  border-radius: var(--radius-sm);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary-glow);
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.dropdown-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.dropdown-item.admin-studio-link {
  color: var(--accent-primary);
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.18);
  margin-bottom: 4px;
}

.dropdown-item.admin-studio-link:hover {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.35);
}

.dropdown-item.logout-item {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.dropdown-item.logout-item:hover {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* ==========================================================================
   Auth Modal Components
   ========================================================================== */
.auth-modal-card {
  max-width: 440px;
}

.auth-tabs-nav {
  display: flex;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

.auth-tab-btn {
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-tab-btn:hover {
  color: var(--text-primary);
}

.auth-tab-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-primary-glow);
}

.auth-modal-body {
  padding: 24px;
}

/* Google Auth Button */
.auth-social-box {
  margin-bottom: 16px;
}

.btn-google-auth {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.btn-google-auth:hover {
  background: var(--bg-card-hover);
  border-color: rgba(66, 133, 244, 0.5);
  box-shadow: 0 4px 14px rgba(66, 133, 244, 0.2);
  transform: translateY(-1px);
}

.btn-google-auth:active {
  transform: translateY(0);
}

.google-svg {
  flex-shrink: 0;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 18px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.auth-divider span {
  padding: 0 12px;
  text-transform: lowercase;
}

/* Input with Left Icon */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-icon > svg:first-child {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-with-icon .form-input {
  padding-left: 40px;
  padding-right: 40px;
}

.password-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  z-index: 5;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.password-toggle-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.08);
}

.password-toggle-btn svg {
  pointer-events: none;
  flex-shrink: 0;
}


.form-badge-hint {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.form-row-remember {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 18px 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--accent-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.forgot-password-link {
  font-size: 0.82rem;
  color: var(--accent-primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.forgot-password-link:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}

.auth-submit-btn {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  margin-top: 8px;
  box-shadow: 0 4px 14px var(--accent-primary-glow);
}

.auth-switch-text {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 18px;
}

.auth-switch-text a {
  color: var(--accent-primary);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.auth-switch-text a:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}

/* Password Reset & Multi-Step Auth Flow */
.auth-modal-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-back-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-back-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.auth-steps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 4px;
}

.auth-step-dot {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ==========================================================================
   Ather Live TV Styles (Cinema Player, TV Grid, Live Badges)
   ========================================================================== */
.live-tv-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  position: relative;
  transition: all var(--transition-normal);
}

.live-tv-btn:hover,
.live-tv-btn.active {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 0 16px var(--accent-primary-glow);
  transform: translateY(-1px);
}

.live-tv-chip {
  text-decoration: none;
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.5) !important;
  color: #f87171 !important;
  font-weight: 700 !important;
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-tv-chip:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.live-chip-count {
  background: #ef4444 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 0.68rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  padding: 1px 6px !important;
  border-radius: var(--radius-full);
}

.live-badge-red {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.45);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.live-dot-pulse {
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
  animation: tvDotPulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes tvDotPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.3);
    box-shadow: 0 0 6px 2px rgba(239, 68, 68, 0.4);
  }
}

/* ==========================================================================
   Modern 3-Panel Live TV Dashboard Layout (Matching UI Reference)
   ========================================================================== */

body.tv-page {
  padding-bottom: 0 !important;
  background-color: #090f15;
  background-image: none !important;
  overflow-x: hidden;
}

[data-theme="light"] body.tv-page,
html[data-theme="light"] body.tv-page,
body[data-theme="light"].tv-page {
  background-color: #f1f5f9 !important;
  background-image: none !important;
  color: #0f172a !important;
}

.tv-dashboard {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: #090f15;
  color: #f8fafc;
  overflow-x: hidden;
  font-family: var(--font-latin);
  position: relative;
}

[data-theme="light"] .tv-dashboard,
html[data-theme="light"] .tv-dashboard,
body[data-theme="light"] .tv-dashboard {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

/* LEFT SIDEBAR */
.tv-sidebar-left {
  width: 270px;
  flex-shrink: 0;
  background: #0c141d;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
}

[data-theme="light"] .tv-sidebar-left {
  background: #ffffff;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

@media (min-width: 993px) {
  .tv-sidebar-left {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 270px !important;
    height: 100vh !important;
    overflow-y: auto !important;
    z-index: 95 !important;
    box-sizing: border-box !important;
    padding-bottom: 90px !important;
  }
}

.tv-sidebar-search {
  position: relative;
  width: 100%;
}

.tv-sidebar-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #64748b;
  pointer-events: none;
}

.tv-sidebar-search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: #111a24;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #f8fafc;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

[data-theme="light"] .tv-sidebar-search input {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #0f172a;
}

.tv-sidebar-search input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.tv-sidebar-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-left: 6px;
}

.tv-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tv-nav-item {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
  gap: 12px;
  border: 1px solid transparent;
}

.tv-nav-item:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .tv-nav-item {
  color: #475569;
}

[data-theme="light"] .tv-nav-item:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.05);
}

.tv-nav-item.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-weight: 600;
}

[data-theme="light"] .tv-nav-item.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #059669;
}

.tv-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.tv-nav-icon svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  display: block;
}

.tv-nav-label {
  flex: 1;
}

.tv-nav-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  padding: 2px 6px;
  border-radius: 6px;
}

.tv-nav-item.active .tv-nav-badge {
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
}

.tv-theme-toggle-group {
  display: flex;
  background: #111a24;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 3px;
  gap: 4px;
}

[data-theme="light"] .tv-theme-toggle-group {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.tv-theme-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tv-theme-btn.active {
  background: #0d2822;
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .tv-theme-btn.active {
  background: #ffffff;
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.tv-sidebar-ayah-card {
  margin-top: auto;
  background: linear-gradient(180deg, #091f1c 0%, #061514 100%);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 14px;
  padding: 16px 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .tv-sidebar-ayah-card {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: rgba(16, 185, 129, 0.3);
}

.tv-ayah-bg-illustration {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 60' fill='%2310b981' fill-opacity='0.08'%3E%3Cpath d='M0 60 L0 45 Q15 45 20 30 Q25 45 40 45 L50 45 L50 25 Q60 10 70 25 L70 45 L100 45 Q115 45 120 15 Q125 45 140 45 L170 45 L170 20 Q180 5 190 20 L190 45 L220 45 Q235 45 240 30 Q245 45 260 45 L300 45 L300 60 Z'/%3E%3C/svg%3E") no-repeat bottom center;
  background-size: cover;
  pointer-events: none;
}

.tv-ayah-arabic {
  font-family: var(--font-arabic);
  font-size: 0.95rem;
  color: #e2e8f0;
  direction: rtl;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

[data-theme="light"] .tv-ayah-arabic {
  color: #064e3b;
}

.tv-ayah-english {
  font-size: 0.78rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.45;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

[data-theme="light"] .tv-ayah-english {
  color: #047857;
}

.tv-ayah-ref {
  font-size: 0.72rem;
  color: #10b981;
  text-align: center;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

/* CENTER MAIN STAGE */
.tv-main-stage {
  flex: 1;
  min-width: 0;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  max-height: 100vh;
}

.tv-stage-header {
  background: #0f1922;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(circle at right center, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
}

[data-theme="light"] .tv-stage-header {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.tv-stage-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tv-stage-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
}

.tv-stage-titles h1 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  line-height: 1.2;
}

[data-theme="light"] .tv-stage-titles h1 {
  color: #0f172a;
}

.tv-stage-titles p {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 3px;
}

.tv-stage-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tv-banner-quote {
  text-align: right;
}

.tv-banner-text-primary {
  font-size: 0.82rem;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 0.5px;
}

.tv-banner-text-secondary {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
}

/* CINEMA PLAYER */
.tv-screen-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.tv-video-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tv-iframe-player {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.tv-watermark-overlay {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 34, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 12px;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.tv-watermark-logo {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.tv-watermark-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.tv-wm-arabic {
  font-family: var(--font-arabic);
  font-size: 0.8rem;
  font-weight: 700;
  color: #f8fafc;
}

.tv-wm-title {
  font-size: 0.72rem;
  color: #94a3b8;
}

.tv-live-badge-top {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 10;
  background: #ef4444;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
  pointer-events: none;
}

.tv-live-badge-top.offline {
  background: #475569;
  box-shadow: none;
}

.tv-live-dot-pulse {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: tvDotPulse 1.4s infinite ease-in-out;
}

.tv-player-controls-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(180deg, transparent 0%, rgba(9, 14, 21, 0.85) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
  transition: opacity 0.25s ease;
}

.tv-ctrl-left, .tv-ctrl-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tv-ctrl-btn {
  background: transparent;
  border: none;
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.tv-ctrl-btn:hover {
  color: #10b981;
  transform: scale(1.08);
}

.tv-volume-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tv-volume-slider {
  width: 80px;
  height: 4px;
  accent-color: #10b981;
  cursor: pointer;
}

.tv-hd-badge-btn {
  font-size: 0.72rem;
  font-weight: 800;
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
}

/* CHANNEL META CARD */
.tv-channel-meta-card {
  background: #0f1922;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 18px 20px;
}

[data-theme="light"] .tv-channel-meta-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.tv-meta-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tv-meta-info-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tv-meta-logo {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.tv-meta-title-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tv-meta-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tv-meta-title-line h2 {
  font-size: 1.18rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

[data-theme="light"] .tv-meta-title-line h2 {
  color: #0f172a;
}

.tv-meta-status-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #10b981;
}

.tv-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.tv-status-dot.live {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.tv-status-dot.offline {
  background: #64748b;
}

.tv-meta-status-pill.offline {
  color: #64748b;
}

.tv-meta-category {
  font-size: 0.84rem;
  color: #64748b;
}

.tv-meta-badges-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tv-hd-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
}

.tv-equalizer-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.tv-equalizer-bars span {
  width: 3px;
  background: #10b981;
  border-radius: 2px;
  height: 4px;
}

.tv-equalizer-bars.is-playing span:nth-child(1) {
  animation: eqBar 0.8s ease-in-out infinite alternate;
}

.tv-equalizer-bars.is-playing span:nth-child(2) {
  animation: eqBar 1.1s ease-in-out 0.2s infinite alternate;
}

.tv-equalizer-bars.is-playing span:nth-child(3) {
  animation: eqBar 0.9s ease-in-out 0.4s infinite alternate;
}

@keyframes eqBar {
  0% { height: 4px; }
  100% { height: 16px; }
}

.tv-meta-description {
  margin-top: 12px;
  font-size: 0.86rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* RIGHT SIDEBAR: TV CHANNELS LIST */
.tv-sidebar-right {
  width: 340px;
  flex-shrink: 0;
  background: #0c141d;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}

[data-theme="light"] .tv-sidebar-right {
  background: #ffffff;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.tv-channels-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}

.tv-channels-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tv-channels-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tv-channels-title-wrap h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

[data-theme="light"] .tv-channels-title-wrap h3 {
  color: #0f172a;
}

.tv-channels-count-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  background: #141f2b;
  padding: 2px 8px;
  border-radius: 12px;
}

[data-theme="light"] .tv-channels-count-badge {
  background: #e2e8f0;
  color: #475569;
}

.tv-channels-scroll-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tv-channels-scroll-list::-webkit-scrollbar {
  width: 5px;
}

.tv-channels-scroll-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.tv-channel-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #111a24;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

[data-theme="light"] .tv-channel-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.tv-channel-card:hover {
  background: #14202c;
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

[data-theme="light"] .tv-channel-card:hover {
  background: #f1f5f9;
  border-color: rgba(16, 185, 129, 0.4);
}

.tv-channel-card.active {
  border: 1.5px solid #10b981;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, #111a24 100%);
}

[data-theme="light"] .tv-channel-card.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, #ffffff 100%);
  border-color: #10b981;
}

.tv-card-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.tv-card-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tv-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .tv-card-title {
  color: #0f172a;
}

.tv-card-subtitle {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv-card-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
}

.tv-card-status.live {
  color: #10b981;
}

.tv-card-status.offline {
  color: #64748b;
}

.tv-card-eq {
  margin-left: auto;
}

.tv-fav-btn, .tv-share-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="light"] .tv-fav-btn,
[data-theme="light"] .tv-share-btn {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.tv-fav-btn:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.tv-fav-btn.is-fav {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.15);
}

.tv-share-btn:hover {
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.4);
}

/* FULLSCREEN STYLES */
.tv-screen-frame:fullscreen,
.tv-screen-frame:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  border: none !important;
}

.tv-screen-frame:fullscreen .tv-video-wrapper,
.tv-screen-frame:-webkit-full-screen .tv-video-wrapper {
  width: 100%;
  height: 100%;
}

/* MOBILE TOPBAR & DRAWER */
.tv-mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #0c141d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

[data-theme="light"] .tv-mobile-topbar {
  background: #ffffff;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.tv-mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  text-decoration: none;
}

[data-theme="light"] .tv-mobile-brand {
  color: #0f172a;
}

.tv-mobile-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.tv-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1040;
}

.tv-drawer-overlay.active {
  display: block;
}

/* Mobile Sidebar Drawer Header */
.tv-sidebar-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}

[data-theme="light"] .tv-sidebar-mobile-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.tv-sidebar-mobile-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

[data-theme="light"] .tv-sidebar-mobile-title {
  color: #0f172a;
}

.tv-sidebar-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

[data-theme="light"] .tv-sidebar-close-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #475569;
}

.tv-sidebar-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* RESPONSIVE LAYOUT */
@media (max-width: 1200px) {
  .tv-sidebar-left { width: 230px; }
  .tv-sidebar-right { width: 300px; }
  .tv-main-stage { padding: 18px 20px; }
}

@media (max-width: 992px) {
  .tv-mobile-topbar {
    display: flex;
    z-index: 100;
  }
  .tv-sidebar-mobile-header {
    display: flex;
  }
  .tv-dashboard {
    flex-direction: column;
    height: auto;
    position: static !important;
    z-index: auto !important;
  }
  .tv-sidebar-left {
    position: fixed !important;
    top: 0 !important;
    left: -320px !important;
    width: 285px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 1050 !important;
    background: #0c141d !important;
    box-shadow: 6px 0 32px rgba(0, 0, 0, 0.6) !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  [data-theme="light"] .tv-sidebar-left {
    background: #ffffff !important;
    box-shadow: 6px 0 32px rgba(0, 0, 0, 0.18) !important;
  }
  .tv-sidebar-left.open {
    left: 0 !important;
  }
  .tv-sidebar-right {
    width: 100%;
    height: auto;
    max-height: none;
    position: relative;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px;
  }
  .tv-channels-scroll-list {
    max-height: 480px;
  }
  .tv-main-stage {
    max-height: none;
    padding: 16px;
  }
}

/* ==========================================================================
   Read Quran Header Button & Nav Badges
   ========================================================================== */
.read-quran-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-primary);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.read-quran-btn:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

.quran-badge-emerald {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.4px;
}

.read-quran-chip {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  color: #34d399 !important;
  font-weight: 600 !important;
}

.read-quran-chip:hover {
  background: rgba(16, 185, 129, 0.28) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.3) !important;
}

/* ==========================================================================
   Holy Quran Reader Experience - Aesthetics & Layout
   ========================================================================== */

/* Hero Banner */
.quran-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(22, 29, 44, 0.85) 50%, rgba(59, 130, 246, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin-bottom: 28px;
  text-align: center;
  backdrop-filter: blur(12px);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.quran-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 250px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.quran-hero-arabic-title {
  font-family: var(--font-arabic);
  font-size: 2.2rem;
  font-weight: 800;
  color: #34d399;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-shadow: 0 2px 14px rgba(16, 185, 129, 0.4);
}

.quran-hero-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.quran-hero-subtitle {
  font-size: 0.98rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 24px;
}

/* Bookmark Resume Banner */
.bookmark-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.04) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  margin-bottom: 24px;
}

.bookmark-info {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fbbf24;
  font-size: 0.95rem;
}

.resume-btn {
  background: #f59e0b;
  color: #0f172a;
  border: none;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.resume-btn:hover {
  background: #d97706;
  transform: translateY(-1px);
}

/* Search & Filter Bar */
.quran-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.quran-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quran-filter-pill {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quran-filter-pill:hover,
.quran-filter-pill.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 14px var(--accent-primary-glow);
}

.quran-results-count {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Surah Cards Grid */
.surah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}

.surah-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.surah-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 16px var(--accent-primary-glow);
}

.surah-card.bookmarked-card {
  border-color: rgba(245, 158, 11, 0.45);
}

.surah-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.surah-number-badge {
  width: 36px;
  height: 36px;
  background: rgba(16, 185, 129, 0.12);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #34d399;
  transform: rotate(45deg);
}

.surah-number-badge .number-text {
  transform: rotate(-45deg);
}

.surah-card-arabic {
  font-family: var(--font-arabic);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  direction: rtl;
}

.surah-card-body {
  flex-grow: 1;
  margin-bottom: 14px;
}

.surah-title-en {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.surah-title-bn {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.surah-meaning {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.surah-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.surah-pill {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.surah-pill.rev-meccan {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.surah-pill.rev-medinan {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.surah-verses-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.surah-read-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.surah-card:hover .surah-read-arrow {
  background: var(--accent-primary);
  color: #fff;
  transform: translateX(2px);
}

/* ==========================================================================
   Reader Section & Toolbar
   ========================================================================== */
.surah-reader-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.quran-reader-toolbar {
  position: sticky;
  top: 76px;
  z-index: 90;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.toolbar-group-left,
.toolbar-group-center,
.toolbar-group-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.reader-surah-select {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  max-width: 220px;
}

.btn-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-toggle:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.btn-toggle.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.btn-icon-sm:hover:not(:disabled) {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-icon-sm:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.font-size-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 36px;
  text-align: center;
}

.play-surah-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.play-surah-btn:hover {
  box-shadow: 0 0 16px var(--accent-primary-glow);
  transform: translateY(-1px);
}

.play-surah-btn.playing {
  background: #ef4444;
}

/* Surah Header Card */
.surah-header-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(22, 29, 44, 0.9) 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.surah-banner-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.banner-pill {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.surah-banner-arabic {
  font-family: var(--font-arabic);
  font-size: 2.8rem;
  font-weight: 800;
  color: #34d399;
  direction: rtl;
  margin-bottom: 8px;
  text-shadow: 0 2px 16px rgba(16, 185, 129, 0.4);
}

.surah-banner-titles {
  margin-bottom: 24px;
}

.surah-banner-en {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.surah-banner-bn {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.surah-banner-trans {
  color: var(--text-muted);
  font-weight: 400;
}

.bismillah-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-full);
  margin-top: 10px;
}

.bismillah-arabic {
  font-family: var(--font-arabic);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fbbf24;
  direction: rtl;
}

.bismillah-ornament {
  color: var(--accent-primary);
  font-size: 1.2rem;
}

.bismillah-translation {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Ayah Cards */
.ayahs-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 60px;
}

.ayah-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition-normal);
  position: relative;
}

.ayah-card:hover {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.ayah-card.playing-ayah {
  border-color: var(--accent-primary);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.35);
  transform: scale(1.008);
}

.ayah-card.bookmarked-ayah {
  border-left: 4px solid #f59e0b;
}

.ayah-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ayah-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.ayah-badge-number {
  font-weight: 800;
  font-size: 0.82rem;
  color: #34d399;
}

.ayah-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ayah-action-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ayah-action-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.ayah-action-btn.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #fbbf24;
}

/* Arabic Ayah Text Typography */
.ayah-arabic-wrapper {
  direction: rtl;
  text-align: right;
  line-height: 2.2;
  margin-bottom: 20px;
  font-family: var(--font-arabic);
  color: var(--text-primary);
  word-spacing: 2px;
}

.ayah-arabic-text {
  font-weight: 600;
  letter-spacing: 0;
}

.ayah-end-symbol {
  font-family: var(--font-arabic);
  font-weight: 800;
  color: #34d399;
  margin: 0 4px;
  display: inline-block;
}

/* Translations */
.ayah-translations {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.07);
}

.ayah-translation-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.lang-tag {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  flex-shrink: 0;
  margin-top: 3px;
}

.bn-tag {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.en-tag {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.translation-text {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* Continuous Mushaf View */
.mushaf-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  direction: rtl;
  text-align: justify;
  line-height: 2.5;
  font-family: var(--font-arabic);
}

.mushaf-ayah {
  display: inline;
  color: var(--text-primary);
  font-weight: 600;
}

.mushaf-ayah.playing-ayah {
  background: rgba(16, 185, 129, 0.25);
  border-radius: 4px;
}

/* Audio Player Bottom Bar */
.reader-audio-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--bg-modal);
  border-top: 1px solid var(--accent-primary);
  padding: 12px 24px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.reader-audio-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.reader-audio-progress {
  height: 100%;
  width: 0%;
  background: var(--accent-primary);
  transition: width 0.1s linear;
}

.reader-audio-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reader-audio-reciter-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #34d399;
}

.reader-audio-text-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.reader-audio-text-time {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.reader-audio-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
}

.reader-audio-close-btn:hover {
  color: var(--text-primary);
}

/* Toast Container */
.quran-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quran-toast {
  background: #19202f;
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #f8fafc;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  font-size: 0.88rem;
  font-weight: 600;
  animation: slideInToast 0.25s ease;
}

.quran-toast.fade-out {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

@keyframes slideInToast {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.quran-toast-icon {
  width: 20px;
  height: 20px;
  background: var(--accent-primary);
  color: #0f172a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
}

/* Shimmer Loader */
.quran-shimmer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  height: 140px;
  position: relative;
  overflow: hidden;
}

.quran-shimmer-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  100% { left: 100%; }
}

@media (max-width: 768px) {
  .quran-reader-toolbar {
    top: 60px;
    padding: 8px 12px;
  }
  .surah-banner-arabic {
    font-size: 2.2rem;
  }
  .bismillah-arabic {
    font-size: 1.25rem;
  }
  .ayah-card {
    padding: 16px;
  }
  .toolbar-group-left,
  .toolbar-group-right {
    width: 100%;
    justify-content: space-between;
  }
}

/* ==========================================================================
   Home Page Left Sidebar Dashboard Layout (Matching Live TV)
   ========================================================================== */
.home-dashboard {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

.home-sidebar-left {
  width: 270px;
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  z-index: 90;
}

@media (min-width: 993px) {
  .home-sidebar-left {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 95 !important;
    box-sizing: border-box !important;
    padding-bottom: 90px !important;
  }
  .home-main-stage {
    margin-left: 270px !important;
    width: calc(100% - 270px) !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
}

.home-sidebar-left .tv-nav-item {
  cursor: pointer;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  font-family: inherit;
}

.home-main-stage {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.auth-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px !important;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  border-radius: 9999px !important;
  padding: 8px 18px !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  cursor: pointer;
}

.auth-header-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  transform: translateY(-1px) !important;
}

@media (max-width: 992px) {
  .home-dashboard {
    display: block !important;
  }
  .home-sidebar-left {
    display: none !important;
  }
  .home-main-stage {
    width: 100% !important;
  }
  .desktop-action-btn,
  .header-actions .user-auth-wrapper,
  .header-actions .auth-header-btn {
    display: none !important;
  }
}

/* ==========================================================================
   Header Language Switcher & Selector Dropdown
   ========================================================================== */
.lang-switcher-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 1000;
}

.lang-selector-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 12px;
  background: var(--bg-secondary, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-full, 9999px);
  color: var(--text-primary, #f8fafc);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.lang-selector-btn:hover,
.lang-selector-btn.is-active {
  background: var(--bg-tertiary, rgba(255, 255, 255, 0.09));
  border-color: var(--accent-primary, #10b981);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .lang-selector-btn {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .lang-selector-btn:hover,
[data-theme="light"] .lang-selector-btn.is-active {
  background: #f8fafc;
  border-color: #10b981;
  color: #10b981;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.lang-globe-icon {
  color: var(--accent-primary, #10b981);
  flex-shrink: 0;
}

.lang-current-label {
  display: inline-block;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lang-current-code {
  display: none;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.lang-chevron-icon {
  color: var(--text-muted, #94a3b8);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.lang-selector-btn.is-active .lang-chevron-icon {
  transform: rotate(180deg);
  color: var(--accent-primary, #10b981);
}

/* Dropdown Menu */
.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-modal, #0e1726);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 8px;
  z-index: 10001;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: dropdown-in 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lang-dropdown-menu.is-open {
  display: block;
}

[data-theme="light"] .lang-dropdown-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.lang-dropdown-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 6px 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 4px;
}

[data-theme="light"] .lang-dropdown-header {
  border-bottom-color: rgba(0, 0, 0, 0.06);
  color: #64748b;
}

.lang-dropdown-sub {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: none;
  color: var(--text-muted, #94a3b8);
  opacity: 0.75;
}

.lang-switcher-form {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  padding: 0;
}

.lang-option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-primary, #f8fafc);
  font-family: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

[data-theme="light"] .lang-option-btn {
  color: #0f172a;
}

.lang-option-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

[data-theme="light"] .lang-option-btn:hover {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
}

.lang-option-btn.active {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.35);
  color: #10b981;
  font-weight: 700;
}

.lang-opt-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.lang-opt-native {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
}

.lang-opt-en {
  font-size: 0.73rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.2;
}

[data-theme="light"] .lang-opt-en {
  color: #64748b;
}

.lang-active-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  flex-shrink: 0;
}

/* Mobile & Tablet Responsiveness for Header Switcher */
@media (max-width: 680px) {
  .lang-selector-btn {
    padding: 0 9px;
    gap: 5px;
  }
  .lang-current-label {
    display: none;
  }
  .lang-current-code {
    display: inline-block;
  }
  .lang-dropdown-menu {
    right: 0;
    width: 200px;
  }
}

/* Mobile Drawer Language Chips */
.mobile-drawer-lang-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.mobile-lang-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-primary, #f8fafc);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="light"] .mobile-lang-chip {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}

.mobile-lang-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.mobile-lang-chip.active {
  background: rgba(16, 185, 129, 0.16);
  border-color: var(--accent-primary, #10b981);
  color: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.mobile-lang-chip-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.mobile-lang-chip-code {
  font-size: 0.68rem;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mobile-lang-chip.active .mobile-lang-chip-code {
  color: #10b981;
  font-weight: 700;
}

/* ==========================================================================
   Arabic RTL Support & Compatibility
   ========================================================================== */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .lang-dropdown-menu {
  right: auto;
  left: 0;
}

[dir="rtl"] .lang-option-btn {
  text-align: right;
}

[dir="rtl"] .user-dropdown-menu {
  right: auto;
  left: 0;
}

[dir="rtl"] .user-profile-pill {
  padding: 4px 6px 4px 12px;
}

[dir="rtl"] .mobile-nav-drawer {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}

[dir="rtl"] .mobile-nav-drawer.open {
  transform: translateX(0);
}

[dir="rtl"] .mobile-drawer-header {
  flex-direction: row-reverse;
}

