/* ============================================================
   آيات MP3 - Quran MP3 Streaming Site
   Comprehensive Stylesheet
   ============================================================ */

/* ── CSS Custom Properties ───────────────────────────────── */

:root {
  /* Dark theme (default) */
  --background: oklch(0.1 0.005 260);
  --foreground: oklch(0.95 0.01 260);
  --muted: oklch(0.2 0.01 260);
  --muted-foreground: oklch(0.6 0.01 260);
  --card: oklch(0.15 0.008 260);
  --border: oklch(0.25 0.01 260);
  --accent: oklch(0.7 0.17 162);
  --accent-foreground: oklch(0.98 0.005 260);
  --primary: oklch(0.62 0.19 155);
  --primary-foreground: oklch(0.11 0.006 155);
  --primary-hover: oklch(0.55 0.18 155);
  --primary-600: oklch(0.55 0.18 155);
  --primary-700: oklch(0.45 0.17 155);
  --primary-400: oklch(0.72 0.19 155);
  --primary-500: oklch(0.62 0.19 155);
  --primary-800: oklch(0.35 0.12 155);
  --primary-900: oklch(0.28 0.10 155);
  --destructive: #ef4444;
  --destructive-hover: #dc2626;
  --ring: oklch(0.7 0.17 162);
  --radius: 0.75rem;
  --sidebar-width: 16rem;
  --header-height: 4rem;
  --player-height: 5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Primary glow */
  --primary-glow: 0 0 20px oklch(0.62 0.19 155 / 30%);
  --primary-glow-sm: 0 0 10px oklch(0.62 0.19 155 / 20%);

  /* Gold accent */
  --gold: oklch(0.82 0.14 85);
  --gold-light: oklch(0.87 0.12 85);
  --gold-dark: oklch(0.72 0.14 85);
  --gold-foreground: oklch(0.25 0.05 85);
}

[data-theme="light"] {
  --background: #ffffff;
  --foreground: oklch(0.15 0.01 260);
  --muted: oklch(0.94 0.01 260);
  --muted-foreground: oklch(0.5 0.01 260);
  --card: oklch(0.97 0.005 260);
  --border: oklch(0.88 0.01 260);
  --accent: oklch(0.55 0.17 162);
  --accent-foreground: oklch(0.15 0.01 260);
  --primary: oklch(0.52 0.16 155);
  --primary-foreground: oklch(0.985 0.005 155);
  --primary-hover: oklch(0.45 0.15 155);
  --ring: oklch(0.55 0.17 162);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.05);
  --primary-glow: 0 0 20px oklch(0.52 0.16 155 / 15%);
  --primary-glow-sm: 0 0 10px oklch(0.52 0.16 155 / 10%);

  /* Gold accent */
  --gold: oklch(0.72 0.14 85);
  --gold-light: oklch(0.82 0.14 85);
  --gold-dark: oklch(0.62 0.12 85);
  --gold-foreground: oklch(0.25 0.05 85);
}

/* ── Base Reset & Styles ─────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ── Custom Scrollbar ────────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: oklch(0.5 0 0 / 25%);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: oklch(0.5 0 0 / 45%);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: oklch(0.5 0 0 / 25%) transparent;
}

/* ── Islamic Pattern Background ─────────────────────────── */
.islamic-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.glow-primary {
  box-shadow: 0 0 20px oklch(0.62 0.19 155 / 15%), 0 0 60px oklch(0.62 0.19 155 / 5%);
}

/* ── Focus Styles ──────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── App Layout ──────────────────────────────────────────── */

.app-wrapper {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.app-body {
  display: flex;
  flex: 1;
  padding-top: var(--header-height);
}

/* ── Header ──────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background-color: color-mix(in oklch, var(--background) 80%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}

.header-logo-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.header-logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  object-fit: cover;
  flex-shrink: 0;
}

.header-site-name {
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--primary-400), var(--primary-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-search {
  flex: 1;
  max-width: 28rem;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border-radius: 9999px;
  background-color: var(--muted);
  background-color: color-mix(in oklch, var(--muted) 50%, transparent);
  border: 1px solid transparent;
  color: var(--foreground);
  outline: none;
  transition: all 200ms ease;
  font-size: 0.9rem;
}

.header-search input::placeholder {
  color: var(--muted-foreground);
}

.header-search input:focus {
  border-color: var(--border);
  background-color: var(--muted);
}

.header-search .search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  pointer-events: none;
  width: 1rem;
  height: 1rem;
}

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

.header-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  color: var(--muted-foreground);
  transition: all 200ms ease;
}

.header-action-btn:hover {
  background-color: var(--muted);
  color: var(--foreground);
}

/* Mobile menu button - hidden on desktop */
#mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  color: var(--muted-foreground);
  transition: all 200ms ease;
}

#mobile-menu-btn:hover {
  background-color: var(--muted);
  color: var(--foreground);
}

@media (min-width: 1024px) {
  #mobile-menu-btn {
    display: none;
  }
}

/* ── Sidebar ─────────────────────────────────────────────── */

#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgb(0 0 0 / 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 35;
  opacity: 0;
  transition: opacity 300ms ease;
}

#sidebar-overlay.active {
  display: block;
  opacity: 1;
}

#sidebar {
  position: fixed;
  top: var(--header-height);
  right: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background-color: color-mix(in oklch, var(--background) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid var(--border);
  z-index: 30;
  overflow-y: auto;
  padding: 1rem 0.75rem;
  transition: transform 300ms ease;
  /* Desktop: visible */
  transform: translateX(0);
}

/* Mobile: hidden off-screen by default */
@media (max-width: 1023px) {
  #sidebar {
    transform: translateX(100%);
  }

  #sidebar.open {
    transform: translateX(0);
  }
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  color: var(--muted-foreground);
  font-size: 0.95rem;
  transition: all 200ms ease;
  white-space: nowrap;
}

.sidebar-link:hover {
  background-color: color-mix(in oklch, var(--muted) 70%, transparent);
}

.sidebar-link.active {
  background-color: color-mix(in oklch, var(--primary-500) 10%, transparent);
  color: var(--primary-500);
  font-weight: 700;
}

.sidebar-link-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-featured {
  margin-top: 0.5rem;
}

.sidebar-featured-title {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  padding: 0.25rem 0.75rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.sidebar-featured-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  transition: all 200ms ease;
  cursor: pointer;
}

.sidebar-featured-link:hover {
  background-color: color-mix(in oklch, var(--muted) 70%, transparent);
  color: var(--foreground);
}

.sidebar-featured-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: color-mix(in oklch, var(--primary-500) 10%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-500);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* ── Main Content ────────────────────────────────────────── */

.main-content {
  flex: 1;
  margin-right: var(--sidebar-width);
  max-width: 80rem;
  width: 100%;
  margin-left: auto;
  padding: 1.5rem 1rem;
}

@media (max-width: 1023px) {
  .main-content {
    margin-right: 0;
  }
}

/* ── View Containers ─────────────────────────────────────── */

.view-container {
  display: none;
}

.view-container.active {
  display: block;
  animation: fadeIn 200ms ease;
}

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

/* ── Hero Section ────────────────────────────────────────── */

.hero-section {
  position: relative;
  border-radius: 1rem;
  background: linear-gradient(135deg, color-mix(in oklch, var(--primary-900) 40%, transparent), color-mix(in oklch, var(--primary-800) 20%, transparent), transparent);
  border: 1px solid color-mix(in oklch, var(--primary-500) 20%, transparent);
  padding: 1.5rem;
  overflow: hidden;
  text-align: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 60%;
  height: 160%;
  background: radial-gradient(ellipse, color-mix(in oklch, var(--primary-500) 8%, transparent), transparent 70%);
  pointer-events: none;
}

@media (min-width: 640px) {
  .hero-section {
    padding: 2rem;
    text-align: right;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .hero-content {
    flex-direction: row;
    align-items: center;
  }
}

.hero-logo {
  width: 5rem;
  height: 5rem;
  border-radius: 1rem;
  object-fit: cover;
  box-shadow: var(--shadow-lg), 0 10px 30px oklch(0.62 0.19 155 / 20%);
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .hero-logo {
    width: 6rem;
    height: 6rem;
  }
}

.hero-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(to left, var(--gold-light), var(--primary-400), var(--primary-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 2rem;
  }
}

.hero-bismillah {
  font-size: 0.8rem;
  color: var(--gold);
  opacity: 0.6;
  font-weight: 300;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.hero-description {
  color: var(--muted-foreground);
  font-size: 0.95rem;
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-500);
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

/* ── Section Headers ─────────────────────────────────────── */

.section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  margin-top: 2rem;
}

.section-header:first-child {
  margin-top: 0;
}

.section-header-bar {
  height: 0.25rem;
  width: 1.5rem;
  border-radius: 9999px;
  background-color: var(--primary-500);
  flex-shrink: 0;
}

.section-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

/* ── Reciter Cards Grid ──────────────────────────────────── */

.reciters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .reciters-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .reciters-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .reciters-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1280px) {
  .reciters-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.reciter-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: all 200ms ease;
}

.reciter-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in oklch, var(--primary-500) 30%, var(--border));
}

.reciter-card-avatar {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background-color: color-mix(in oklch, var(--primary-500) 10%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-500);
  font-size: 1.5rem;
  font-weight: 700;
  border: 1px solid color-mix(in oklch, var(--primary-500) 20%, transparent);
  transition: all 200ms ease;
}

.reciter-card:hover .reciter-card-avatar {
  border-color: color-mix(in oklch, var(--primary-500) 40%, transparent);
  box-shadow: 0 0 15px oklch(0.62 0.19 155 / 15%);
}

.reciter-card-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1.5;
}

.reciter-card-rewaya {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.reciter-card-badge {
  display: inline-block;
  border-radius: 9999px;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  background-color: color-mix(in oklch, var(--primary-500) 10%, transparent);
  color: var(--primary-400);
  border: 1px solid color-mix(in oklch, var(--primary-500) 20%, transparent);
}

/* ── Surah List ──────────────────────────────────────────── */

.surahs-list {
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
}

.surah-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background-color 150ms ease;
  cursor: pointer;
}

.surah-item:last-child {
  border-bottom: none;
}

.surah-item:hover {
  background-color: color-mix(in oklch, var(--muted) 40%, transparent);
}

.surah-item.playing {
  background-color: color-mix(in oklch, var(--primary-500) 8%, transparent);
}

.surah-play-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: color-mix(in oklch, var(--primary-500) 10%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-500);
  flex-shrink: 0;
  transition: all 200ms ease;
}

.surah-play-btn:hover {
  background-color: color-mix(in oklch, var(--primary-500) 20%, transparent);
}

.surah-play-btn svg {
  width: 1rem;
  height: 1rem;
}

.surah-item-number {
  font-size: 0.85rem;
  color: var(--muted-foreground);
  width: 2rem;
  text-align: center;
  flex-shrink: 0;
  font-weight: 600;
}

.surah-item-info {
  flex: 1;
  min-width: 0;
}

.surah-item-name {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.surah-item-meta {
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

.surah-download-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  flex-shrink: 0;
  transition: all 200ms ease;
}

.surah-download-btn:hover {
  background-color: color-mix(in oklch, var(--muted) 70%, transparent);
  color: var(--primary-500);
}

.surah-download-btn svg {
  width: 1rem;
  height: 1rem;
}

/* ── Audio Player ────────────────────────────────────────── */

#audio-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--player-height);
  background-color: color-mix(in oklch, var(--background) 80%, transparent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: none;
  align-items: center;
  padding: 0 1rem;
  gap: 1rem;
}

#audio-player.visible {
  display: flex;
}

.player-play-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: var(--primary-500);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-foreground);
  flex-shrink: 0;
  transition: all 200ms ease;
  box-shadow: 0 4px 15px oklch(0.62 0.19 155 / 25%);
}

.player-play-btn:hover {
  background-color: var(--primary-hover);
  transform: scale(1.05);
}

.player-play-btn:active {
  transform: scale(0.97);
}

.player-play-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.player-track-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.player-track-name {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-reciter-name {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls-center {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.player-skip-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  transition: all 200ms ease;
}

.player-skip-btn:hover {
  color: var(--foreground);
  background-color: var(--muted);
}

.player-skip-btn svg {
  width: 1rem;
  height: 1rem;
}

.player-repeat-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  transition: all 200ms ease;
}

.player-repeat-btn:hover {
  color: var(--foreground);
  background-color: var(--muted);
}

.player-repeat-btn.active {
  color: var(--primary-500);
}

.player-repeat-btn.repeat-one::after {
  content: '١';
  position: absolute;
  font-size: 0.5rem;
  font-weight: 900;
  margin-top: -0.125rem;
}

.player-time-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  direction: ltr;
}

.player-progress-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.player-progress-bar-container {
  width: 100%;
  height: 0.375rem;
  background-color: var(--muted);
  border-radius: 9999px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.player-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-400), var(--primary-600));
  border-radius: 9999px;
  width: 0%;
  transition: width 100ms linear;
  position: relative;
  box-shadow: 0 0 8px oklch(0.62 0.19 155 / 30%);
}

.player-progress-bar-container:hover .player-progress-bar {
  box-shadow: 0 0 12px oklch(0.62 0.19 155 / 50%);
}

.player-volume-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.player-volume-btn {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  transition: color 200ms ease;
}

.player-volume-btn:hover {
  color: var(--foreground);
}

.player-volume-btn svg {
  width: 1rem;
  height: 1rem;
}

.player-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 5rem;
  height: 0.25rem;
  border-radius: 9999px;
  background: var(--muted);
  outline: none;
  direction: ltr;
  cursor: pointer;
}

.player-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--primary-500);
  cursor: pointer;
  box-shadow: 0 0 4px oklch(0.62 0.19 155 / 40%);
  transition: transform 150ms ease;
}

.player-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.player-volume-slider::-moz-range-thumb {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--primary-500);
  border: none;
  cursor: pointer;
  box-shadow: 0 0 4px oklch(0.62 0.19 155 / 40%);
}

/* ── View: Browse Quran ──────────────────────────────────── */

.browse-surah-list {
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
}

.browse-surah-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 150ms ease;
}

.browse-surah-item:last-child {
  border-bottom: none;
}

.browse-surah-item:hover {
  background-color: color-mix(in oklch, var(--muted) 40%, transparent);
}

.browse-surah-item.selected {
  background-color: color-mix(in oklch, var(--primary-500) 8%, transparent);
}

.browse-surah-chevron {
  color: var(--muted-foreground);
  transition: transform 200ms ease;
  flex-shrink: 0;
}

.browse-surah-chevron svg {
  width: 1rem;
  height: 1rem;
}

.browse-surah-item.selected .browse-surah-chevron {
  transform: rotate(-90deg);
  color: var(--primary-500);
}

.browse-surah-number {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background-color: color-mix(in oklch, var(--primary-500) 8%, transparent);
  border: 1px solid color-mix(in oklch, var(--primary-500) 15%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-500);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.browse-surah-info {
  flex: 1;
  min-width: 0;
}

.browse-surah-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.browse-surah-details {
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

.browse-surah-reciters {
  display: none;
  padding: 0.75rem 1rem 1rem;
  border-bottom: 1px solid var(--border);
  background-color: color-mix(in oklch, var(--muted) 20%, transparent);
}

.browse-surah-reciters.visible {
  display: block;
}

.browse-reciter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.5rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.browse-reciter-row:hover {
  background-color: color-mix(in oklch, var(--muted) 50%, transparent);
}

.browse-reciter-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ── View: Radio ─────────────────────────────────────────── */

.radio-reciters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .radio-reciters-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .radio-reciters-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.radio-reciter-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: all 200ms ease;
  position: relative;
  overflow: hidden;
}

.radio-reciter-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in oklch, var(--primary-500) 30%, var(--border));
}

.radio-reciter-card.playing {
  border-color: var(--primary-500);
  box-shadow: 0 0 20px oklch(0.62 0.19 155 / 15%);
}

.radio-equalizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  height: 1.25rem;
  margin-bottom: 0.75rem;
}

.radio-equalizer-bar {
  width: 3px;
  border-radius: 9999px;
  background-color: var(--primary-500);
  animation: equalizer-pulse 1.2s ease-in-out infinite;
}

.radio-equalizer-bar:nth-child(1) { animation-delay: 0s; height: 40%; }
.radio-equalizer-bar:nth-child(2) { animation-delay: 0.2s; height: 70%; }
.radio-equalizer-bar:nth-child(3) { animation-delay: 0.4s; height: 50%; }
.radio-equalizer-bar:nth-child(4) { animation-delay: 0.1s; height: 80%; }
.radio-equalizer-bar:nth-child(5) { animation-delay: 0.3s; height: 60%; }

@keyframes equalizer-pulse {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.radio-progress {
  margin-top: 0.75rem;
  height: 0.25rem;
  background-color: var(--muted);
  border-radius: 9999px;
  overflow: hidden;
}

.radio-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-400), var(--primary-600));
  border-radius: 9999px;
  width: 0%;
  transition: width 200ms linear;
}

/* ── View: Download ──────────────────────────────────────── */

.download-reciters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .download-reciters-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .download-reciters-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.download-reciter-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: all 200ms ease;
}

.download-reciter-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.download-reciter-card.selected {
  border-color: var(--primary-500);
  background-color: color-mix(in oklch, var(--primary-500) 5%, var(--card));
}

.download-surah-list {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
}

.download-surah-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background-color 150ms ease;
}

.download-surah-item:last-child {
  border-bottom: none;
}

.download-surah-item:hover {
  background-color: color-mix(in oklch, var(--muted) 40%, transparent);
}

.download-surah-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
}

.download-single-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  background-color: color-mix(in oklch, var(--primary-500) 10%, transparent);
  color: var(--primary-500);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 200ms ease;
}

.download-single-btn:hover {
  background-color: color-mix(in oklch, var(--primary-500) 20%, transparent);
}

.download-single-btn svg {
  width: 0.875rem;
  height: 0.875rem;
}

.download-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  background-color: var(--primary-600);
  color: var(--primary-foreground);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 200ms ease;
  margin-top: 1rem;
}

.download-all-btn:hover {
  background-color: var(--primary-700);
  box-shadow: 0 4px 15px oklch(0.62 0.19 155 / 30%);
}

.download-all-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* ── View: Admin ─────────────────────────────────────────── */

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.admin-tab {
  padding: 0.625rem 1rem;
  border-radius: 0.5rem 0.5rem 0 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted-foreground);
  transition: all 200ms ease;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.admin-tab:hover {
  color: var(--foreground);
  background-color: color-mix(in oklch, var(--muted) 50%, transparent);
}

.admin-tab.active {
  color: var(--primary-500);
  border-bottom-color: var(--primary-500);
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 32rem;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.admin-form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

.admin-form-input {
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  background-color: color-mix(in oklch, var(--muted) 50%, transparent);
  border: 1px solid transparent;
  color: var(--foreground);
  outline: none;
  transition: all 200ms ease;
  font-size: 0.9rem;
}

.admin-form-input:focus {
  border-color: var(--border);
  background-color: var(--muted);
}

.admin-form-input::placeholder {
  color: var(--muted-foreground);
}

textarea.admin-form-input {
  resize: vertical;
  min-height: 6rem;
}

select.admin-form-input {
  cursor: pointer;
}

.admin-table {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
}

.admin-table-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background-color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-table-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
  transition: background-color 150ms ease;
}

.admin-table-row:last-child {
  border-bottom: none;
}

.admin-table-row:hover {
  background-color: color-mix(in oklch, var(--muted) 30%, transparent);
}

.admin-table-cell {
  font-size: 0.9rem;
}

.admin-actions {
  display: flex;
  gap: 0.375rem;
}

.admin-action-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  transition: all 200ms ease;
}

.admin-action-btn:hover {
  background-color: var(--muted);
  color: var(--foreground);
}

.admin-action-btn.delete:hover {
  background-color: color-mix(in oklch, var(--destructive) 15%, transparent);
  color: var(--destructive);
}

.admin-action-btn svg {
  width: 1rem;
  height: 1rem;
}

/* ── Footer ──────────────────────────────────────────────── */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background-color: color-mix(in oklch, var(--card) 30%, transparent);
  padding: 2.5rem 1rem 1.5rem;
}

.footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-logo {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  object-fit: cover;
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-name {
  font-weight: 700;
  font-size: 1rem;
  background: linear-gradient(to left, var(--gold-light), var(--primary-400), var(--primary-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-description {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  line-height: 1.8;
}

.footer-col-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

.footer-link {
  display: block;
  font-size: 0.8rem;
  color: var(--muted-foreground);
  padding: 0.25rem 0;
  transition: color 0.2s;
  cursor: pointer;
}

.footer-link:hover {
  color: var(--primary-500);
}

.footer-about-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

.footer-about-stats span {
  color: var(--primary-500);
  font-weight: 700;
}

.footer-copyright {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-brand-row {
    justify-content: center;
  }
}

/* ── Loading Skeletons ───────────────────────────────────── */

.skeleton {
  background: var(--muted);
  border-radius: 0.5rem;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.skeleton-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
}

.skeleton-avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
}

.skeleton-text {
  height: 1rem;
  margin: 0.375rem auto;
  border-radius: 0.25rem;
}

.skeleton-text-sm {
  height: 0.75rem;
  width: 60%;
  margin: 0.25rem auto;
  border-radius: 0.25rem;
}

.skeleton-text-xs {
  height: 0.625rem;
  width: 40%;
  margin: 0.25rem auto;
  border-radius: 0.25rem;
}

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.skeleton-circle-sm {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-line {
  flex: 1;
  height: 0.875rem;
  border-radius: 0.25rem;
}

.skeleton-line-short {
  width: 30%;
  height: 0.75rem;
  border-radius: 0.25rem;
}

/* ── Badges ──────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  font-weight: 600;
  line-height: 1.4;
}

.badge-primary {
  background-color: color-mix(in oklch, var(--primary-500) 15%, transparent);
  color: var(--primary-400);
  border: 1px solid color-mix(in oklch, var(--primary-500) 20%, transparent);
}

.badge-muted {
  background-color: color-mix(in oklch, var(--muted) 80%, transparent);
  color: var(--muted-foreground);
}

.badge-destructive {
  background-color: color-mix(in oklch, var(--destructive) 15%, transparent);
  color: var(--destructive);
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: 9999px;
  transition: all 200ms ease;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  font-size: 0.9rem;
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8rem;
}

.btn-md {
  padding: 0.5rem 1.25rem;
}

.btn-lg {
  padding: 0.625rem 1.5rem;
  font-size: 0.95rem;
}

.btn-primary {
  background-color: var(--primary-600);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background-color: var(--primary-700);
  box-shadow: 0 4px 12px oklch(0.62 0.19 155 / 25%);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
}

.btn-ghost:hover {
  background-color: color-mix(in oklch, var(--muted) 70%, transparent);
}

.btn-destructive {
  background-color: var(--destructive);
  color: #ffffff;
}

.btn-destructive:hover {
  background-color: var(--destructive-hover);
}

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

.btn-outline:hover {
  background-color: color-mix(in oklch, var(--muted) 50%, transparent);
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Input Fields ────────────────────────────────────────── */

.input {
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  background-color: color-mix(in oklch, var(--muted) 50%, transparent);
  border: 1px solid transparent;
  color: var(--foreground);
  outline: none;
  transition: all 200ms ease;
  font-size: 0.9rem;
  width: 100%;
}

.input:focus {
  border-color: var(--border);
  background-color: var(--muted);
}

.input::placeholder {
  color: var(--muted-foreground);
}

.input-search {
  border-radius: 9999px;
}

/* ── Breadcrumb ──────────────────────────────────────────── */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--muted-foreground);
  transition: color 200ms ease;
}

.breadcrumb a:hover {
  color: var(--primary-500);
}

.breadcrumb-separator {
  color: var(--muted-foreground);
  opacity: 0.5;
}

.breadcrumb-current {
  color: var(--foreground);
  font-weight: 600;
}

/* ── View Header Card ────────────────────────────────────── */

.view-header-card {
  position: relative;
  border-radius: 1rem;
  background: linear-gradient(135deg, color-mix(in oklch, var(--primary-900) 40%, transparent), color-mix(in oklch, var(--primary-800) 20%, transparent), transparent);
  border: 1px solid color-mix(in oklch, var(--primary-500) 20%, transparent);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.view-header-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 50%;
  height: 160%;
  background: radial-gradient(ellipse, color-mix(in oklch, var(--primary-500) 6%, transparent), transparent 70%);
  pointer-events: none;
}

.view-header-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.view-header-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background-color: color-mix(in oklch, var(--primary-500) 10%, transparent);
  border: 1px solid color-mix(in oklch, var(--primary-500) 20%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-500);
  flex-shrink: 0;
}

.view-header-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.view-header-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.125rem;
}

.view-header-text p {
  font-size: 0.85rem;
  color: var(--muted-foreground);
}

/* ── Pagination ──────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 2rem;
}

.pagination-btn {
  min-width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted-foreground);
  transition: all 200ms ease;
}

.pagination-btn:hover:not(:disabled) {
  background-color: var(--muted);
  color: var(--foreground);
}

.pagination-btn.active {
  background-color: var(--primary-500);
  color: var(--primary-foreground);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Notification Toast ──────────────────────────────────── */

.toast-container {
  position: fixed;
  bottom: calc(var(--player-height) + 1rem);
  right: 1rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  border-radius: 0.75rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  animation: toast-in 300ms ease forwards;
  max-width: 22rem;
}

.toast.toast-exit {
  animation: toast-out 300ms ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(0.5rem) scale(0.95);
  }
}

.toast-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
}

.toast-success .toast-icon { color: var(--primary-500); }
.toast-error .toast-icon { color: var(--destructive); }
.toast-info .toast-icon { color: #3b82f6; }

/* ── Setup / Error Messages ──────────────────────────────── */

.setup-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  gap: 1rem;
}

.setup-message-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: color-mix(in oklch, var(--primary-500) 10%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-500);
  margin-bottom: 0.5rem;
}

.setup-message-icon svg {
  width: 2rem;
  height: 2rem;
}

.setup-message h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.setup-message p {
  color: var(--muted-foreground);
  font-size: 0.95rem;
  max-width: 28rem;
  line-height: 1.8;
}

/* ── Empty State ─────────────────────────────────────────── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted-foreground);
  gap: 0.5rem;
}

.empty-state svg {
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.05rem;
  color: var(--foreground);
}

.empty-state p {
  font-size: 0.85rem;
  max-width: 24rem;
}

/* ── Utility / Misc ──────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-primary { color: var(--primary-500); }
.text-muted { color: var(--muted-foreground); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.hidden { display: none !important; }
.w-full { width: 100%; }

/* Player visible offset for main content */
body.player-visible .main-content {
  padding-bottom: calc(var(--player-height) + 1rem);
}

body.player-visible .site-footer {
  margin-bottom: var(--player-height);
}

body.player-visible .footer {
  margin-bottom: var(--player-height);
}

/* ── Print ───────────────────────────────────────────────── */

@media print {
  .site-header,
  #sidebar,
  #sidebar-overlay,
  #audio-player,
  .toast-container,
  #mobile-menu-btn {
    display: none !important;
  }

  .main-content {
    margin-right: 0 !important;
    padding-bottom: 0 !important;
  }

  body {
    background: white;
    color: black;
  }
}

/* ═══════════ Admin Login Modal ═══════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

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

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-muted, rgba(128, 128, 128, 0.05));
}

/* File input styling */
input[type="file"].form-input {
  cursor: pointer;
  font-size: 0.8rem;
}

input[type="file"].form-input::file-selector-button {
  padding: 0.3rem 0.8rem;
  border-radius: 0.5rem;
  border: 1px solid var(--color-border);
  background: var(--color-card);
  color: var(--color-foreground);
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: 0.5rem;
  transition: background 0.2s;
}

input[type="file"].form-input::file-selector-button:hover {
  background: var(--color-muted, rgba(128, 128, 128, 0.1));
}

/* ═══════════════════════════════════════════════════════════
   Setup / Installation Wizard
   ═══════════════════════════════════════════════════════════ */

.setup-wizard {
  max-width: 560px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.setup-wizard-header {
  text-align: center;
  margin-bottom: 2rem;
}

.setup-wizard-logo {
  margin-bottom: 1rem;
}

.setup-wizard-logo img {
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.setup-wizard-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--color-foreground);
}

.setup-wizard-subtitle {
  color: var(--color-muted-foreground, #888);
  font-size: 0.9rem;
}

.setup-step {
  background: var(--color-card, #fff);
  border: 1px solid var(--color-border, rgba(128,128,128,0.15));
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.setup-step-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.setup-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.setup-step-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  color: var(--color-foreground);
}

.setup-step-desc {
  color: var(--color-muted-foreground, #888);
  font-size: 0.85rem;
}

/* Requirements check list */
.setup-requirements {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.setup-check-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  background: var(--color-muted, rgba(128,128,128,0.05));
  border: 1px solid var(--color-border, rgba(128,128,128,0.1));
  color: var(--color-foreground);
}

.setup-check-item.ok {
  border-color: #22c55e33;
  background: #22c55e08;
}

.setup-check-item.fail {
  border-color: #ef444433;
  background: #ef444408;
}

.setup-check-item.warning {
  border-color: #f59e0b33;
  background: #f59e0b08;
}

.setup-check-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
}

.setup-check-details {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--color-muted-foreground, #888);
}

/* Spinner */
.setup-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--color-border, rgba(128,128,128,0.2));
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: setup-spin 0.6s linear infinite;
}

.setup-spinner-sm {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid var(--color-border, rgba(128,128,128,0.2));
  border-top-color: #fff;
  border-radius: 50%;
  animation: setup-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-left: 0.4rem;
}

@keyframes setup-spin {
  to { transform: rotate(360deg); }
}

/* Form elements */
.setup-form-group {
  margin-bottom: 1rem;
}

.setup-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--color-foreground);
}

.setup-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid var(--color-border, rgba(128,128,128,0.2));
  background: var(--color-background, #fff);
  color: var(--color-foreground);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  direction: rtl;
}

.setup-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.setup-error {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.setup-password-strength {
  margin-top: 0.35rem;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border, rgba(128,128,128,0.15));
  overflow: hidden;
  transition: opacity 0.2s;
  opacity: 0;
}

.setup-password-strength.visible {
  opacity: 1;
}

.setup-password-strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
  width: 0%;
}

/* Buttons */
.setup-btn {
  width: 100%;
  padding: 0.7rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  border: none;
}

.setup-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.setup-btn:not(:disabled):hover {
  opacity: 0.9;
}

.setup-btn:not(:disabled):active {
  transform: scale(0.98);
}

.setup-btns {
  display: flex;
  gap: 0.75rem;
}

.setup-btns .setup-btn {
  flex: 1;
}

.setup-btns .btn-ghost {
  background: var(--color-muted, rgba(128,128,128,0.1));
  color: var(--color-foreground);
  border: 1px solid var(--color-border, rgba(128,128,128,0.2));
}

.setup-btns .btn-ghost:hover {
  background: var(--color-muted, rgba(128,128,128,0.15));
}

.setup-success-btn {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  padding: 0.85rem;
}

/* Progress */
.setup-progress-area {
  text-align: center;
  padding: 1rem 0;
}

.setup-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--color-border, rgba(128,128,128,0.15));
  overflow: hidden;
  margin-bottom: 1rem;
}

.setup-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--color-primary);
  width: 0%;
  transition: width 0.4s ease;
}

.setup-progress-text {
  color: var(--color-muted-foreground, #888);
  font-size: 0.85rem;
}

/* Result card */
.setup-result-card {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: var(--color-muted, rgba(128,128,128,0.05));
  border: 1px solid var(--color-border, rgba(128,128,128,0.1));
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-foreground);
  direction: rtl;
}

.setup-result-card strong {
  color: var(--color-primary);
}

/* ═══════════════════════════════════════════════════════════
   Banner Ads
   ═══════════════════════════════════════════════════════════ */

.banner-slot {
  margin: 1rem 0;
  text-align: center;
}

.banner-slot:empty {
  display: none;
}

.banner-slot .banner-item {
  display: block;
  width: 100%;
  max-width: 728px;
  margin: 0.5rem auto;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.banner-slot .banner-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.banner-slot .banner-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.banner-slot .banner-item.banner-top img {
  max-height: 120px;
  object-fit: cover;
  width: 100%;
}

/* Admin banner table */
.admin-banner-row {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border, rgba(128, 128, 128, 0.1));
  gap: 1rem;
}

.admin-banner-row:last-child {
  border-bottom: none;
}

.admin-banner-img {
  width: 120px;
  height: 50px;
  object-fit: cover;
  border-radius: 0.5rem;
  flex-shrink: 0;
  border: 1px solid var(--color-border, rgba(128, 128, 128, 0.1));
}

.admin-banner-info {
  flex: 1;
  min-width: 0;
}

.admin-banner-info strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-banner-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--color-muted-foreground, #888);
}

.admin-banner-meta .badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
}

.admin-banner-status {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
}

.admin-banner-status.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary);
}

.admin-banner-status.inactive {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Checkbox label for admin forms */
.admin-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--color-foreground);
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid var(--color-border, rgba(128, 128, 128, 0.15));
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}

.admin-checkbox-label:hover {
  background: var(--color-muted, rgba(128, 128, 128, 0.08));
  border-color: var(--color-primary);
}

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

/* Admin banner empty state */
.admin-banner-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--color-muted-foreground, #888);
}

.admin-banner-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
  opacity: 0.4;
}

.admin-banner-empty h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--color-foreground);
}

.admin-banner-empty p {
  font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════
   SEO Pages (About, Privacy, Sitemap)
   ═══════════════════════════════════════════════════════════ */

.seo-page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border, rgba(128, 128, 128, 0.15));
}

.seo-page-header .seo-page-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: rgba(16, 185, 129, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.seo-page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.3;
}

.seo-page-content {
  max-width: 800px;
}

.seo-card {
  overflow: hidden;
}

.seo-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border, rgba(128, 128, 128, 0.1));
  background: rgba(16, 185, 129, 0.03);
}

.seo-card-logo {
  width: 56px;
  height: 56px;
  border-radius: 1rem;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.seo-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seo-card-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
  color: var(--color-foreground);
}

.seo-card-body {
  padding: 1.5rem;
}

.seo-card-body h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
  color: var(--color-foreground);
}

.seo-card-body h2:first-child {
  margin-top: 0;
}

.seo-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: var(--color-foreground);
}

.seo-card-body p {
  line-height: 1.85;
  color: var(--color-foreground);
  opacity: 0.85;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.seo-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem;
}

.seo-list li {
  padding: 0.5rem 0;
  padding-right: 1.25rem;
  position: relative;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--color-foreground);
  opacity: 0.85;
}

.seo-list li::before {
  content: '•';
  position: absolute;
  right: 0;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.seo-features-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem;
  display: grid;
  gap: 0.35rem;
}

.seo-features-list li {
  padding: 0.6rem 1rem;
  background: var(--muted, rgba(128, 128, 128, 0.05));
  border-radius: 0.5rem;
  border-right: 3px solid var(--color-primary);
  font-size: 0.88rem;
  line-height: 1.6;
}

.seo-features-list li::before {
  display: none;
}

.seo-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

@media (max-width: 480px) {
  .seo-page-header h1 {
    font-size: 1.25rem;
  }

  .seo-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.seo-stat-card {
  text-align: center;
  padding: 1.25rem 0.75rem;
  border-radius: 0.75rem;
  background: var(--muted, rgba(128, 128, 128, 0.05));
  border: 1px solid var(--border, rgba(128, 128, 128, 0.1));
}

.seo-stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.2;
}

.seo-stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--color-muted-foreground, #888);
  margin-top: 0.25rem;
}

/* ── Sitemap HTML Page ──────────────────────────────────── */

.sitemap-section {
  overflow: hidden;
}

.sitemap-section-title {
  font-size: 1rem;
  font-weight: 700;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border, rgba(128, 128, 128, 0.1));
  margin: 0;
  color: var(--color-foreground);
}

.sitemap-links {
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
}

.sitemap-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.25rem;
  color: var(--color-foreground);
  text-decoration: none;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-right: 2px solid transparent;
}

.sitemap-link:hover {
  background: var(--muted, rgba(128, 128, 128, 0.05));
  color: var(--color-primary);
  border-right-color: var(--color-primary);
}

.sitemap-link svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.sitemap-link:hover svg {
  opacity: 1;
}

/* ── Enhanced Footer ───────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ── SEO Editor Toolbar ──────────────────────────────── */

.seo-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.5rem;
  background: var(--muted, rgba(128, 128, 128, 0.06));
  border: 1px solid var(--border, rgba(128, 128, 128, 0.15));
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
}

.seo-editor-toolbar button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--foreground, #fff);
  padding: 0.3rem 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s;
}

.seo-editor-toolbar button:hover {
  background: var(--accent, rgba(128, 128, 128, 0.1));
  border-color: var(--border, rgba(128, 128, 128, 0.2));
}

.seo-editor-sep {
  color: var(--muted-foreground, #888);
  font-size: 0.75rem;
  margin: 0 0.15rem;
  user-select: none;
}

.seo-editor-textarea {
  border-radius: 0 0 0.5rem 0.5rem !important;
  border-top: 1px solid var(--border, rgba(128, 128, 128, 0.15));
  font-family: inherit;
  line-height: 1.8;
  resize: vertical;
  min-height: 200px;
}

.seo-editor-textarea[dir="ltr"] {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}