/* ==========================================================================
   tvQuran.com Modern Interface Design System & Styles
   Themes: Velvet Dark (Default), Royal Emerald & Gold, Pure Noor (Light)
   ========================================================================== */

:root {
  /* Fonts */
  --font-arabic: 'Cairo', 'Readex Pro', 'Amiri', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-english: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-quran: 'Amiri', 'Scheherazade New', 'Traditional Arabic', serif;

  /* Theme: Velvet Dark (Default) */
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-tertiary: #1f293d;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 61, 0.9);
  --bg-glass: rgba(15, 23, 42, 0.72);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(16, 185, 129, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  --accent-emerald: #10b981;
  --accent-emerald-light: #34d399;
  --accent-emerald-dark: #059669;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);

  --accent-gold: #f59e0b;
  --accent-gold-light: #fbbf24;
  --accent-gold-glow: rgba(245, 158, 11, 0.2);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px var(--accent-emerald-glow);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --player-height: 88px;
  --header-height: 76px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Theme: Royal Emerald & Gold */
[data-theme="emerald"] {
  --bg-primary: #061e18;
  --bg-secondary: #0a2d24;
  --bg-tertiary: #0f3d32;
  --bg-card: rgba(10, 45, 36, 0.8);
  --bg-card-hover: rgba(15, 61, 50, 0.95);
  --bg-glass: rgba(8, 38, 30, 0.8);
  --border-glass: rgba(212, 175, 55, 0.18);
  --border-glass-hover: rgba(245, 158, 11, 0.4);

  --text-primary: #fefce8;
  --text-secondary: #cbd5e1;
  --text-muted: #86a397;

  --accent-emerald: #10b981;
  --accent-gold: #eab308;
  --accent-gold-light: #fde047;
  --accent-gold-glow: rgba(234, 179, 8, 0.35);
  --shadow-glow: 0 0 25px rgba(234, 179, 8, 0.25);
}

/* Theme: Pure Noor (Light) */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-glass-hover: rgba(16, 185, 129, 0.4);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  --accent-emerald: #059669;
  --accent-emerald-light: #10b981;
  --accent-emerald-dark: #047857;
  --accent-emerald-glow: rgba(5, 150, 105, 0.15);

  --accent-gold: #d97706;
  --accent-gold-light: #f59e0b;
  --accent-gold-glow: rgba(217, 119, 6, 0.15);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-english);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: var(--player-height);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

body[dir="rtl"] {
  font-family: var(--font-arabic);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-emerald-dark);
}

/* Typography Helpers */
.font-quran {
  font-family: var(--font-quran);
}

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

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

/* Islamic Geometric Subtle Background Mesh */
.bg-mesh-decor {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background: 
    radial-gradient(circle at 15% 20%, var(--accent-emerald-glow) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, var(--accent-gold-glow) 0%, transparent 45%);
}

/* App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  transition: all var(--transition-normal);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
}

.brand-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--accent-emerald-glow);
  transition: transform var(--transition-fast);
}

.brand-logo-icon:hover {
  transform: scale(1.05) rotate(2deg);
}

.brand-text h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-emerald) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: -3px;
}

/* Nav Tabs */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-secondary);
  padding: 0.3rem 0.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
}

.nav-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.nav-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab-btn.active {
  background: linear-gradient(135deg, var(--accent-emerald) 0%, var(--accent-emerald-dark) 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-emerald-glow);
}

.nav-tab-btn i {
  font-size: 0.95rem;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quick-search-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quick-search-bar:hover {
  border-color: var(--accent-emerald);
  color: var(--text-primary);
}

.search-kbd {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-family: monospace;
}

.action-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.action-icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-emerald);
  background: var(--bg-tertiary);
  transform: translateY(-2px);
}

.btn-support-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.15));
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-support-pill:hover {
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

/* App Main Container */
.app-main {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* View Containers (Single Page Switcher) */
.view-section {
  display: none;
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-section.active {
  display: block;
}

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

/* Hero Section */
.hero-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.22) 0%, rgba(15, 23, 42, 0.88) 100%),
              url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=1600&auto=format&fit=crop&q=80') center/cover;
  border: 1px solid var(--border-glass);
  padding: 3rem 2.5rem;
  margin-bottom: 2.5rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
  box-shadow: var(--shadow-lg);
}

.hero-content h2 {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.8rem;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--accent-emerald) 0%, var(--accent-emerald-dark) 100%);
  color: #ffffff;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 6px 20px var(--accent-emerald-glow);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-emerald-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  border-color: var(--accent-emerald);
  background: var(--bg-tertiary);
  transform: translateY(-2px);
}

/* Daily Ayah Card in Hero */
.hero-daily-ayah {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  position: relative;
}

.daily-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.ayah-arabic-text {
  font-family: var(--font-quran);
  font-size: 1.45rem;
  line-height: 2;
  color: #ffffff;
  text-align: center;
  margin-bottom: 0.8rem;
}

.ayah-reference {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.ayah-play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-emerald);
  color: #ffffff;
  font-size: 0.75rem;
  margin-inline-start: 0.5rem;
  transition: transform var(--transition-fast);
}

.ayah-play-btn:hover {
  transform: scale(1.1);
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.05));
  border: 1px solid var(--border-glass-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-emerald);
  font-size: 1.1rem;
}

.section-title h3 {
  font-size: 1.35rem;
  font-weight: 700;
}

.section-more-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-emerald);
  font-size: 0.88rem;
  font-weight: 600;
  transition: gap var(--transition-fast);
}

.section-more-link:hover {
  text-decoration: underline;
  gap: 0.6rem;
}

/* Category Filter Pills */
.category-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
  scrollbar-width: none;
}

.category-filter-pills::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

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

.pill-btn.active {
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-emerald-dark));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px var(--accent-emerald-glow);
}

/* Grid Layouts */
.reciters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.35rem;
  margin-bottom: 3rem;
}

.surahs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.15rem;
  margin-bottom: 3rem;
}

.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.live-streams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* Cards Design System */
.reciter-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  cursor: pointer;
}

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

.reciter-card-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.reciter-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
  background: var(--bg-tertiary);
}

.reciter-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.reciter-riwayah {
  font-size: 0.78rem;
  color: var(--accent-emerald);
  display: inline-block;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.reciter-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-glass);
  padding-top: 0.75rem;
  margin-top: auto;
}

.reciter-stats span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Surah Card */
.surah-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

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

.surah-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.surah-number-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-emerald);
}

.surah-title-meta h4 {
  font-size: 1rem;
  font-weight: 700;
}

.surah-title-meta p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.surah-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.surah-arabic-title {
  font-family: var(--font-quran);
  font-size: 1.4rem;
  color: var(--text-primary);
}

.surah-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.btn-icon-sm:hover {
  background: var(--accent-emerald);
  color: #ffffff;
  border-color: transparent;
}

/* Track Card (Collection Item) */
.track-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all var(--transition-normal);
}

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

.track-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.track-play-trigger {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-emerald-dark));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--accent-emerald-glow);
  transition: transform var(--transition-fast);
}

.track-play-trigger:hover {
  transform: scale(1.08);
}

.track-details h4 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.track-reciter {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.track-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-glass);
  padding-top: 0.65rem;
}

.track-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Live Stream Video/Radio Card */
.live-stream-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.live-stream-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-4px);
}

.live-media-wrapper {
  position: relative;
  width: 100%;
  height: 190px;
  background: #000;
}

.live-media-wrapper img, .live-media-wrapper iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}

.live-badge-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #ef4444;
  color: #ffffff;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
}

.live-badge-dot {
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

.live-card-body {
  padding: 1.25rem;
}

.live-card-body h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.live-card-body p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Modals & Dialogs (<dialog>) */
dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 90vw;
  margin: auto;
  outline: none;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dialog-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 580px;
  max-width: 100%;
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  position: relative;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.dialog-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.dialog-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.dialog-close-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Global Search Modal Input */
.search-dialog-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  margin-bottom: 1.5rem;
}

.search-dialog-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
}

.search-results-list {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-item:hover {
  border-color: var(--accent-emerald);
  background: var(--bg-card-hover);
}

/* App Footer */
.app-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-glass);
  padding: 3.5rem 2rem 2rem;
  margin-top: 4rem;
  position: relative;
  z-index: 1;
}

.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand h4 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--accent-emerald);
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-column h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-column li a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.footer-column li a:hover {
  color: var(--accent-emerald);
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  border-top: 1px solid var(--border-glass);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-rights {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer Version Badge (Project Rule) */
.footer-version-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--accent-emerald);
  font-family: monospace;
  font-weight: 600;
}
