/* ==========================================================================
   AL-QUR'AN AL-KARIM - MODERN WEB APPLICATION
   Design System & Styling
   ========================================================================== */


@font-face {
  font-family: 'LPMQ';
  src: url('../fonts/lpmq.otf') format('opentype');
  font-display: swap;
}

:root {
  /* Color Palette - Dark Theme (Default) - Noor Illumination */
  --bg-base: #070c18;
  --bg-surface: #0e1726;
  --bg-card: rgba(19, 31, 51, 0.78);
  --bg-card-hover: rgba(25, 40, 66, 0.88);
  --bg-glass: rgba(14, 23, 38, 0.85);
  --bg-input: #17243b;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-emerald: rgba(16, 185, 129, 0.32);
  --border-gold: rgba(245, 158, 11, 0.32);
  --border-gold-subtle: rgba(245, 158, 11, 0.18);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #070c18;

  --accent-emerald: #10b981;
  --accent-emerald-hover: #34d399;
  --accent-emerald-dark: #059669;
  --accent-emerald-soft: rgba(16, 185, 129, 0.14);
  --accent-emerald-glow: rgba(16, 185, 129, 0.38);
  --accent-secondary-mint: #4edea3;

  --accent-gold: #f59e0b;
  --accent-gold-light: #ffc174;
  --accent-gold-pale: #fef08a;
  --accent-gold-soft: rgba(245, 158, 11, 0.14);
  --accent-gold-glow: rgba(245, 158, 11, 0.35);

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 28px var(--accent-emerald-glow);
  --shadow-gold-glow: 0 0 28px var(--accent-gold-glow);

  /* Typography */
  --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-arabic: 'LPMQ', 'Amiri Quran', serif;
  --font-arabic-title: 'Amiri', serif;

  /* Font Scale Variables - Relative Units */
  --arabic-size: clamp(1.75rem, 5vw, 2.25rem);
  --latin-size: 1rem;
  --trans-size: 1rem;

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

  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

  --bg-elevated: #131f33;
  --bg-modal: var(--bg-surface);
  --bg-megamenu: rgba(11, 19, 39, 0.95);
  --bg-audio-dock: rgba(14, 23, 38, 0.92);
  --bg-bottom-nav: rgba(9, 14, 26, 0.94);

  --border-color: rgba(255, 255, 255, 0.1);

  --accent-mint: #4edea3;
  --accent-mint-soft: rgba(78, 222, 163, 0.16);

  --accent-teal: #0d9488;
  --accent-teal-soft: rgba(13, 148, 136, 0.16);
  --accent-crimson: #f43f5e;
  --accent-crimson-soft: rgba(244, 63, 94, 0.16);

  --accent-rose: #f43f5e;
  --accent-rose-soft: rgba(244, 63, 94, 0.14);
  --border-rose: rgba(244, 63, 94, 0.32);

  --radius-xl: 28px;
}

[data-theme="light"] {
  --bg-base: #f4f6fb;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-input: #f1f5f9;
  --bg-elevated: #e2e8f0;
  --bg-modal: #ffffff;
  --bg-megamenu: rgba(255, 255, 255, 0.96);
  --bg-audio-dock: rgba(255, 255, 255, 0.95);
  --bg-bottom-nav: rgba(255, 255, 255, 0.96);

  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-card: rgba(0, 0, 0, 0.08);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-emerald: rgba(5, 150, 105, 0.22);
  --border-gold: rgba(217, 119, 6, 0.25);
  --border-gold-subtle: rgba(217, 119, 6, 0.2);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --accent-emerald: #059669;
  --accent-emerald-hover: #047857;
  --accent-emerald-dark: #065f46;
  --accent-emerald-soft: rgba(5, 150, 105, 0.08);
  --accent-emerald-glow: rgba(5, 150, 105, 0.2);
  --accent-secondary-mint: #059669;
  --accent-mint: #059669;
  --accent-mint-soft: rgba(5, 150, 105, 0.1);

  --accent-gold: #d97706;
  --accent-gold-light: #b45309; /* Deep amber with high contrast for text in light mode */
  --accent-gold-pale: #92400e;
  --accent-gold-soft: rgba(217, 119, 6, 0.1);
  --accent-gold-glow: rgba(217, 119, 6, 0.2);

  --accent-teal: #0f766e;
  --accent-teal-soft: rgba(15, 118, 110, 0.1);
  --accent-crimson: #e11d48;
  --accent-crimson-soft: rgba(225, 29, 72, 0.1);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 20px rgba(5, 150, 105, 0.15);
  --shadow-gold-glow: 0 0 20px rgba(217, 119, 6, 0.15);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark light;
}

body {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(245, 158, 11, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(5, 150, 105, 0.06) 0%, transparent 55%);
  background-attachment: fixed;
  padding-bottom: 80px; /* Mobile-first base: room for mobile bottom nav (68px) */
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

body:has(.audio-dock.visible) {
  padding-bottom: 165px; /* Mobile-first base: room for both mobile bottom nav & audio dock */
}

/* Responsive Media & Images */
img, picture, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

svg {
  max-width: 100%;
}

/* Accessible typography for inputs to ensure readability and prevent iOS zoom */
input, select, textarea, button {
  font-family: inherit;
  font-size: 1rem;
}

[data-theme="light"] body {
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(5, 150, 105, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(217, 119, 6, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(5, 150, 105, 0.03) 0%, transparent 55%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-card-hover);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-emerald-dark);
}

/* Container - Mobile-First Fluid Grid/Flex Layout */
.container {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Navbar / Header */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 0.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  flex-shrink: 0;
}

/* Screen Reader Only Utility for Accessible & SEO H1 */
.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;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 2px solid var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  padding: 0;
  transition: all var(--transition-normal);
}

.brand:hover .brand-icon {
  border-color: var(--accent-gold);
  transform: scale(1.06);
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.5);
}

.brand-icon::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: rotate(30deg);
  animation: shine 6s infinite ease-in-out;
  pointer-events: none;
}

.brand-logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: var(--radius-full);
  display: block;
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-emerald) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

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

/* Touch Targets: minimum 44x44px for icon buttons */
.icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  flex-shrink: 0;
}

/* Hide secondary header buttons on mobile < 640px to ensure 44x44 touch targets without overflow */
#nav-jadwal-btn,
#nav-kiblat-btn {
  display: none;
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  color: var(--accent-emerald);
  border-color: var(--border-emerald);
  transform: translateY(-1px);
}

.icon-btn.active {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  border-color: var(--accent-emerald);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.moon-icon {
  display: none !important;
}
.sun-icon {
  display: block !important;
}

[data-theme="light"] .sun-icon {
  display: none !important;
}
[data-theme="light"] .moon-icon {
  display: block !important;
}

.btn-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-gold);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero Section */
.hero-section {
  padding: 2.2rem 0 1.5rem;
}

.hero-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(14, 23, 38, 0.7) 50%, rgba(245, 158, 11, 0.1) 100%);
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

[data-theme="light"] .hero-banner {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.12) 0%, #ffffff 50%, rgba(217, 119, 6, 0.08) 100%);
}

.hero-banner::before {
  content: '﷽';
  font-family: var(--font-arabic-title);
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8rem;
  opacity: 0.07;
  color: var(--accent-emerald);
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.hero-title-group h1,
.hero-title-group h2 {
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
  background: linear-gradient(to right, var(--text-primary), var(--accent-emerald-hover));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title-group p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 580px;
}

/* Last Read Quick Card */
.last-read-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  max-width: 380px;
  width: 100%;
}

.last-read-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold-glow);
}

.last-read-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.last-read-info h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-gold);
  font-weight: 700;
}

.last-read-info p {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.last-read-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Search & Tabs Toolbar */
.search-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.search-input-wrap {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 52px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0 3.2rem 0 3.2rem;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

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

.search-clear-btn {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  padding: 4px;
  border-radius: var(--radius-full);
}

.search-clear-btn:hover {
  color: var(--text-primary);
}

.search-clear-btn.visible {
  display: flex;
}

/* Tabs Navigation Wrapper & Scroll Assistance Buttons */
.tabs-nav-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.tabs-scroll-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  z-index: 2;
  -webkit-user-select: none;
  user-select: none;
}

.tabs-scroll-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  color: var(--accent-emerald);
  border-color: var(--accent-emerald);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.tabs-scroll-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.95);
}

.tabs-scroll-btn:disabled,
.tabs-scroll-btn[aria-disabled="true"] {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  border-color: transparent;
}

.tabs-scroll-btn svg {
  pointer-events: none;
  transition: transform var(--transition-fast);
}

.tabs-scroll-btn.prev:hover:not(:disabled) svg {
  transform: translateX(-2px);
}

.tabs-scroll-btn.next:hover:not(:disabled) svg {
  transform: translateX(2px);
}

[data-theme="light"] .tabs-scroll-btn {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .tabs-scroll-btn:hover:not(:disabled) {
  background: #f8fafc;
  border-color: var(--accent-emerald);
}

.tabs-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  flex: 1;
  min-width: 0;
  padding: 4px 2px;
  -ms-overflow-style: none;
}

@supports (scrollbar-width: none) {
  .tabs-nav {
    scrollbar-width: none;
  }
}

.tabs-nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.tab-btn {
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  box-sizing: border-box;
}

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

.tab-btn.active {
  background: var(--accent-emerald);
  color: white;
  box-shadow: 0 4px 14px var(--accent-emerald-glow);
}

.tab-btn .count-badge {
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.tab-btn.active .count-badge {
  background: rgba(255, 255, 255, 0.25);
}

/* Tab Contents */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Helper Utilities */
.hidden {
  display: none !important;
}

.info-modal-content {
  line-height: 1.8;
}

/* Grid Layout for Surah & Juz Cards - Mobile First Base (< 640px) */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

/* Surah Card */
.surah-card {
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-gold-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.surah-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px -8px rgba(0, 0, 0, 0.55), 0 0 22px -3px rgba(16, 185, 129, 0.22);
}

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

.surah-number-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-emerald);
  transition: all var(--transition-fast);
}

.surah-card:hover .surah-number-badge {
  background: var(--accent-emerald);
  color: white;
}

.surah-name-arabic {
  font-family: var(--font-arabic-title);
  font-size: 1.6rem;
  color: var(--accent-gold-light);
  line-height: 1;
}

.surah-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.surah-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.surah-name-latin {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.surah-translation {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.surah-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.revelation-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.revelation-tag.makkiyyah {
  color: #38bdf8;
}

.revelation-tag.madaniyyah {
  color: #a78bfa;
}

.surah-quick-play {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.surah-quick-play:hover {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
}

/* Juz Card */
.juz-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.juz-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), var(--shadow-gold-glow);
}

.juz-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.juz-badge {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.juz-total-verses {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.juz-range-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.88rem;
}

.juz-range-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.juz-range-item strong {
  color: var(--text-primary);
}

.juz-card-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 0.85rem;
  gap: 0.35rem;
}

/* ==========================================================================
   READER VIEW (SURAH & JUZ DETAILS)
   ========================================================================== */
.view-section {
  display: none;
}

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

#home-view {
  display: block;
}

#home-view:not(.active) {
  display: none !important;
}

.reader-view, #reader-view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.reader-view.active, #reader-view.active {
  display: block !important;
}

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

/* Sticky Surah Header - Mobile First Base (< 640px) */
.reader-header {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, var(--bg-surface) 60%, rgba(245, 158, 11, 0.1) 100%);
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.reader-header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  transition: all var(--transition-fast);
}

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

.reader-header-arabic {
  font-family: var(--font-arabic-title);
  font-size: clamp(2rem, 7vw, 2.8rem);
  color: var(--accent-gold-light);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.reader-header-title {
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.reader-header-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.reader-meta-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.meta-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.meta-chip strong {
  color: var(--text-primary);
}

.reader-action-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-emerald-dark));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  box-shadow: 0 4px 14px var(--accent-emerald-glow);
  transition: all var(--transition-fast);
}

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

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.15rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-emerald);
}

/* Quick Navigation / Jump to Ayah Toolbar */
.reader-quick-nav {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.jump-select-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.custom-select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
}

.custom-select:focus {
  border-color: var(--accent-emerald);
}

.surah-nav-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-arrow-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.nav-arrow-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--border-emerald);
  color: var(--accent-emerald);
}

.nav-arrow-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Bismillah Ornament */
.bismillah-card {
  text-align: center;
  padding: 2.2rem 1.5rem;
  margin: 1.5rem 0;
  background: radial-gradient(circle, var(--accent-emerald-soft) 0%, transparent 70%);
  border-radius: var(--radius-lg);
}

.bismillah-text {
  font-family: var(--font-arabic-title);
  font-size: 2.5rem;
  color: var(--accent-gold-light);
  line-height: 1.4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.bismillah-meaning {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Ayah Card - Mobile First Base (< 640px) */
.ayah-card {
  background: var(--bg-surface);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all var(--transition-normal);
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: 250px;
  overflow: hidden;
}

.ayah-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
}

.ayah-card.playing {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 32px -4px rgba(16, 185, 129, 0.35), 0 0 0 1px rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(245, 158, 11, 0.06) 50%, var(--bg-surface) 100%);
}

.ayah-card.playing::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22), transparent 70%);
  pointer-events: none;
}

.ayah-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.ayah-badge-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ayah-number-pill {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ayah-juz-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

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

.ayah-action-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ayah-action-btn:hover {
  background: var(--bg-card-hover);
  color: var(--accent-emerald);
  border-color: var(--border-emerald);
}

.ayah-action-btn.active-bookmark {
  color: var(--accent-emerald);
  background: var(--accent-emerald-soft);
  border-color: var(--accent-emerald);
}

.ayah-action-btn.active-favorite {
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
}

.ayah-action-btn.play-btn.playing {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

/* Arabic Text */
.ayah-text-arabic {
  font-family: var(--font-arabic);
  font-size: var(--arabic-size);
  color: var(--text-primary);
  line-height: 2.2;
  text-align: right;
  direction: rtl;
  word-spacing: 4px;
  padding: 0.75rem 0;
  transition: font-size var(--transition-fast);
}

/* Ornate Arabic End of Ayah marker */
.ayah-end-marker {
  display: inline-block;
  font-family: var(--font-arabic-title);
  color: var(--accent-gold);
  margin: 0 0.4rem;
  font-size: 0.85em;
  -webkit-user-select: none;
  user-select: none;
}

/* Transliterasi & Translation */
.ayah-transliteration {
  font-size: var(--latin-size);
  color: var(--accent-emerald-hover);
  font-style: italic;
  line-height: 1.6;
  transition: font-size var(--transition-fast);
}

[data-theme="light"] .ayah-transliteration {
  color: var(--accent-emerald-dark);
}

.ayah-translation-id {
  font-size: var(--trans-size);
  color: var(--text-primary);
  line-height: 1.7;
  transition: font-size var(--transition-fast);
}

.ayah-translation-en {
  font-size: calc(var(--trans-size) * 0.95);
  color: var(--text-secondary);
  line-height: 1.6;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 0.5rem;
}

/* Surah Break in Juz View */
.surah-break-divider {
  background: linear-gradient(135deg, var(--bg-card), var(--accent-emerald-soft));
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.surah-break-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.surah-break-arabic {
  font-family: var(--font-arabic-title);
  font-size: 1.6rem;
  color: var(--accent-gold-light);
}

/* ==========================================================================
   STICKY AUDIO PLAYER DOCK (BOTTOM) - Mobile First Base (< 640px)
   ========================================================================== */
.audio-dock {
  position: fixed;
  bottom: calc(68px + 0.6rem);
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  width: calc(100% - 1.25rem);
  max-width: 960px;
  background: var(--bg-audio-dock, rgba(14, 23, 38, 0.88));
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 30px rgba(16, 185, 129, 0.22), inset 0 1px 0 rgba(254, 240, 138, 0.22);
  padding: 0.85rem 1.25rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform var(--transition-bounce), opacity var(--transition-normal);
  opacity: 0;
}

.audio-dock.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Animated Audio Equalizer Visualizer */
.audio-eq-bars {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 20px;
  padding: 0 0.5rem;
}

.audio-eq-bars .eq-bar {
  width: 3.5px;
  height: 4px;
  background: var(--accent-secondary-mint, #4edea3);
  border-radius: var(--radius-full);
  transition: height 0.2s ease;
}

.audio-eq-bars .eq-bar:nth-child(even) {
  background: var(--accent-gold-light, #ffc174);
}

@keyframes eq-pulse {
  0%, 100% { height: 4px; }
  50% { height: 18px; }
}

.audio-dock.playing .audio-eq-bars .eq-bar-1,
.audio-track-avatar.playing ~ * .eq-bar-1 { animation: eq-pulse 0.8s ease-in-out infinite 0.1s; }

.audio-dock.playing .audio-eq-bars .eq-bar-2,
.audio-track-avatar.playing ~ * .eq-bar-2 { animation: eq-pulse 0.9s ease-in-out infinite 0.3s; }

.audio-dock.playing .audio-eq-bars .eq-bar-3,
.audio-track-avatar.playing ~ * .eq-bar-3 { animation: eq-pulse 0.7s ease-in-out infinite 0.2s; }

.audio-dock.playing .audio-eq-bars .eq-bar-4,
.audio-track-avatar.playing ~ * .eq-bar-4 { animation: eq-pulse 1.1s ease-in-out infinite 0.4s; }

.audio-dock.playing .audio-eq-bars .eq-bar-5,
.audio-track-avatar.playing ~ * .eq-bar-5 { animation: eq-pulse 0.75s ease-in-out infinite 0.05s; }

.audio-dock-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.audio-track-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}

.audio-track-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-emerald-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.audio-track-avatar.playing::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: var(--radius-md);
  border: 2px solid var(--accent-gold);
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.12); opacity: 0.2; }
  100% { transform: scale(1); opacity: 0.8; }
}

.audio-track-details {
  min-width: 0;
}

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

.audio-track-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.audio-ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.audio-play-main-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-emerald-dark));
  color: white;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-emerald-glow);
  transition: all var(--transition-fast);
}

.audio-play-main-btn:hover {
  transform: scale(1.06);
}

.audio-dock-options {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.audio-mode-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  transition: all var(--transition-fast);
}

.audio-mode-btn.active {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  border-color: var(--border-emerald);
}

.audio-progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.audio-time-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 38px;
}

.audio-slider {
  flex: 1;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-card-hover);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
}

.audio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: var(--accent-emerald);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-emerald-glow);
}

/* ==========================================================================
   MODAL DIALOGS (<dialog>)
   ========================================================================== */
dialog {
  margin: auto;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  max-width: 680px;
  width: calc(100% - 2rem);
  max-height: 85vh;
  outline: none;
  overflow: hidden;
  padding: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: calc(85vh - 75px);
  line-height: 1.8;
}

/* Tafsir Modal Content */
.tafsir-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.tafsir-tab-btn {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tafsir-tab-btn.active {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  border-color: var(--border-emerald);
}

.tafsir-text {
  font-size: 0.98rem;
  color: var(--text-primary);
  white-space: pre-line;
  line-height: 1.85;
}

/* Settings Modal */
.settings-group {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.setting-label h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.setting-label p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Modern Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-toggle {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--bg-input);
  border: 1px solid var(--border-card);
  transition: 0.3s;
  border-radius: 34px;
}

.slider-toggle::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider-toggle {
  background-color: var(--accent-emerald);
  border-color: var(--accent-emerald);
}

input:checked + .slider-toggle::before {
  transform: translateX(22px);
  background-color: white;
}

/* Font Zoom Controls */
.font-scale-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.font-scale-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.font-scale-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-emerald);
}

.font-scale-indicator {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 45px;
  text-align: center;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
  animation: slideInRight 0.3s ease;
  min-width: 240px;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--text-muted);
}

.empty-state svg {
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

/* Floating Back to Top Button */
.btt-btn {
  position: fixed;
  bottom: 78px;
  right: 25px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 997;
}

.btt-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.btt-btn:hover {
  background: var(--accent-emerald);
  color: white;
  border-color: var(--accent-emerald);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  transform: translateY(-2px) scale(1.05);
}

/* ==========================================================================
   ISLAMIC MODULES: NAVIGATION, SHORTCUTS, TAHLIL, WIRID & MAULID
   ========================================================================== */

/* Main Desktop Navigation - Hidden on Mobile Base */
.main-nav {
  display: none;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface);
  padding: 0.3rem 0.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.nav-tab-btn.active {
  background: var(--accent-emerald);
  color: white;
  box-shadow: 0 2px 10px var(--accent-emerald-glow);
}

/* ==========================================================================
   MEGAMENU DROPDOWN & 4-PILLAR NAVIGATION (STITCH LUXURY SYSTEM)
   ========================================================================== */
.nav-dropdown-wrapper {
  position: relative;
  display: inline-flex;
}

.nav-dropdown-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-dropdown-wrapper {
  position: relative;
}

/* Invisible hover bridge connecting trigger button and mega menu panel */
.nav-dropdown-wrapper::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 1rem;
  background: transparent;
  pointer-events: auto;
  z-index: 999;
}

.dropdown-chevron {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.75;
  margin-left: 0.2rem;
}

.nav-dropdown-wrapper:hover .dropdown-chevron,
.nav-dropdown-wrapper.open .dropdown-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown-trigger.active {
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent-mint);
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.nav-megamenu-panel {
  position: absolute;
  top: calc(100% + 0.65rem);
  left: 50%;
  transform: translateX(-50%) translateY(8px) scale(0.975);
  transform-origin: top center;
  background: var(--bg-megamenu, rgba(14, 19, 31, 0.96));
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 1.25rem;
  padding: 1.15rem;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.85), 
              0 0 28px rgba(245, 158, 11, 0.12),
              inset 0 1px 0 rgba(254, 240, 138, 0.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.26s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.26s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
  z-index: 1000;
}

.nav-megamenu-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #F59E0B, #10B981, transparent);
  border-radius: 9999px;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

#dropdown-ibadah-panel {
  width: 450px;
}

#dropdown-khazanah-panel {
  width: 640px;
  max-width: min(640px, calc(100vw - 32px));
}

.nav-dropdown-wrapper:hover .nav-megamenu-panel,
.nav-dropdown-wrapper.open .nav-megamenu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.megamenu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border-subtle);
}

.megamenu-header-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.megamenu-header-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.12);
  color: #FFC174;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.megamenu-grid {
  display: grid;
  gap: 0.65rem;
}

.megamenu-grid-ibadah {
  grid-template-columns: 1fr;
}

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

.megamenu-grid-khazanah .megamenu-item:nth-child(5) {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(244, 63, 94, 0.05) 100%);
  border-color: rgba(244, 63, 94, 0.25);
}

.megamenu-grid-khazanah .megamenu-item:nth-child(5):hover {
  border-color: var(--accent-rose);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.45), 0 0 18px rgba(244, 63, 94, 0.15);
}

.megamenu-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.95rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
              background 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.22s ease;
  width: 100%;
  color: inherit;
  font-family: var(--font-ui);
  position: relative;
  overflow: hidden;
}

.megamenu-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.45), 0 0 16px rgba(245, 158, 11, 0.12);
}

.megamenu-item.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.5);
}

.megamenu-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.25s ease;
}

.megamenu-item:hover .megamenu-item-icon {
  transform: scale(1.1);
  box-shadow: 0 0 14px currentColor;
}

.megamenu-item-icon.emerald {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-mint);
}

.megamenu-item-icon.gold {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #FFC174;
}

.megamenu-item-icon.amber {
  background: rgba(217, 119, 6, 0.15);
  border: 1px solid rgba(217, 119, 6, 0.35);
  color: #FBBF24;
}

.megamenu-item-icon.cyan {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38BDF8;
}

.megamenu-item-icon.rose {
  background: var(--accent-rose-soft);
  border: 1px solid var(--border-rose);
  color: #fb7185;
}

.megamenu-item-text {
  flex: 1;
  min-width: 0;
}

.megamenu-item-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  transition: color 0.18s ease;
}

.megamenu-item:hover .megamenu-item-title > span:first-child {
  color: var(--accent-mint);
}

.megamenu-item-title::after {
  content: '→';
  font-size: 0.85rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  color: var(--accent-mint);
  margin-left: auto;
  margin-right: 0.25rem;
}

.megamenu-item:hover .megamenu-item-title::after {
  opacity: 1;
  transform: translateX(0);
}

.megamenu-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.55rem;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
}

.megamenu-tag.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-mint);
}

.megamenu-tag.gold {
  background: rgba(245, 158, 11, 0.15);
  color: #FFC174;
}

.megamenu-tag.amber {
  background: rgba(217, 119, 6, 0.15);
  color: #FBBF24;
}

.megamenu-tag.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #38BDF8;
}

.megamenu-tag.rose {
  background: var(--accent-rose-soft);
  color: #fb7185;
}

.megamenu-item-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* Megamenu Footer */
.megamenu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.megamenu-footer-quote {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.megamenu-footer-quote span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.megamenu-quote-icon {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.megamenu-footer-quote cite {
  font-style: normal;
  color: var(--accent-gold);
  font-weight: 600;
}

.megamenu-footer-esc kbd {
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .megamenu-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .megamenu-footer-esc kbd {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Hero Category Shortcuts - Mobile First Base (< 640px) */
.hero-categories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.category-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border-emerald);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.category-card.category-card-ai {
  border-color: rgba(16, 185, 129, 0.32);
  background: linear-gradient(160deg, var(--bg-card) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.category-card.category-card-ai:hover {
  border-color: var(--accent-emerald);
  box-shadow: var(--shadow-md), 0 0 20px rgba(16, 185, 129, 0.18);
}

.category-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  align-self: center;
  transition: all var(--transition-fast);
}

.category-card-icon.emerald {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  border: 1px solid var(--border-emerald);
}

.category-card-icon.teal {
  background: rgba(20, 184, 166, 0.14);
  color: #14b8a6;
  border: 1px solid rgba(20, 184, 166, 0.3);
}

.category-card-icon.gold {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid var(--border-gold);
}

.category-card-icon.blue {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.category-card-icon.purple {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.28);
}

.category-card-icon.rose {
  background: var(--accent-rose-soft);
  color: var(--accent-rose);
  border: 1px solid var(--border-rose);
}

.category-card:hover .category-card-icon {
  transform: scale(1.1);
}

.category-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-emerald);
  margin-bottom: 0.25rem;
  text-align: center;
  width: 100%;
}

.category-badge.teal {
  color: #14b8a6;
}

.category-badge.gold {
  color: var(--accent-gold);
}

.category-badge.blue {
  color: #3b82f6;
}

.category-badge.purple {
  color: #a855f7;
}

.category-badge.rose {
  color: var(--accent-rose);
}

.category-card-text h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  text-align: center;
  line-height: 1.35;
}

.category-card-text p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  text-align: left;
}


/* Content Views (Tahlil, Wirid, Maulid) */
.content-view {
  animation: fadeIn 0.3s ease;
}

.content-header-card {
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem;
  margin-bottom: 1.75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.content-header-card.sholat-header {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.16) 0%, var(--bg-surface) 60%, rgba(16, 185, 129, 0.12) 100%);
  border: 1px solid rgba(20, 184, 166, 0.35);
}

.content-header-card.tahlil-header {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, var(--bg-surface) 60%, rgba(16, 185, 129, 0.1) 100%);
  border: 1px solid var(--border-gold);
}

.content-header-card.wirid-header {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16) 0%, var(--bg-surface) 60%, rgba(16, 185, 129, 0.1) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.content-header-card.maulid-header {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18) 0%, var(--bg-surface) 60%, rgba(245, 158, 11, 0.12) 100%);
  border: 1px solid rgba(168, 85, 247, 0.32);
}

.header-badge-tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
}

.header-badge-tag.teal {
  background: rgba(20, 184, 166, 0.12);
  color: #14b8a6;
  border: 1px solid rgba(20, 184, 166, 0.3);
}

.header-badge-tag.gold {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid var(--border-gold);
}

.header-badge-tag.blue {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.header-badge-tag.purple {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.header-badge-tag.rose {
  background: var(--accent-rose-soft);
  color: var(--accent-rose);
  border: 1px solid var(--border-rose);
}

/* Niat Role Toggle */
.niat-role-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 1.25rem auto 0 auto;
  background: var(--bg-card);
  padding: 0.35rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-card);
  max-width: 440px;
}

.niat-role-btn {
  flex: 1;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.niat-role-btn:hover {
  color: var(--text-primary);
}

.niat-role-btn.active {
  background: var(--accent-emerald);
  color: white;
  box-shadow: 0 2px 10px var(--accent-emerald-glow);
}

/* Fiqih Cards Layout */
.fiqih-section {
  margin-bottom: 2.25rem;
}

.fiqih-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

/* Fiqih Grid - Mobile First Base (< 640px) */
.fiqih-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.fiqih-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition-normal);
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.fiqih-card:hover {
  border-color: var(--border-emerald);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
}

.fiqih-card-danger {
  border-left: 3px solid rgba(239, 68, 68, 0.6);
}

.fiqih-card-danger:hover {
  border-color: rgba(239, 68, 68, 0.4);
  border-left: 3px solid #ef4444;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.08);
}

.fiqih-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}

.fiqih-num {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: var(--radius-full);
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.fiqih-num-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.fiqih-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.fiqih-card-title,
.fiqih-card h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin: 0;
  word-break: normal;
  overflow-wrap: break-word;
}

.fiqih-card-desc,
.fiqih-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.sholat-step-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0d9488;
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(13, 148, 136, 0.25);
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-full);
  line-height: 1.25;
  white-space: nowrap;
}


/* Subtabs Nav */
.subtabs-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.subtab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  transition: all var(--transition-fast);
}

.subtab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-emerald);
}

.subtab-btn.active {
  background: var(--accent-emerald);
  color: white;
  border-color: var(--accent-emerald);
  box-shadow: 0 4px 14px var(--accent-emerald-glow);
}

/* Kitab Selector Grid - Mobile First Base (< 640px) */
.kitab-selector-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.kitab-select-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: inherit;
  color: inherit;
}

.kitab-select-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-2px);
}

.kitab-select-card.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), var(--bg-card));
  border-color: #a855f7;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
}

.kitab-card-arabic {
  font-family: var(--font-arabic-title);
  font-size: 1.35rem;
  color: var(--accent-gold);
  line-height: 1.3;
}

.kitab-select-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.kitab-select-card span {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Islamic Cards Container */
.islamic-cards-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.islamic-card {
  background: var(--bg-surface);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-gold-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all var(--transition-normal);
  position: relative;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.islamic-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.45), 0 0 20px -2px rgba(16, 185, 129, 0.18);
  transform: translateY(-2px);
}

.islamic-card.completed {
  border-color: rgba(16, 185, 129, 0.6);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(245, 158, 11, 0.04) 50%, var(--bg-surface) 100%);
  box-shadow: 0 0 25px -4px rgba(16, 185, 129, 0.3);
}

.islamic-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.islamic-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.islamic-num-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.islamic-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.islamic-repeat-tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid var(--border-gold);
}

.islamic-arabic-text {
  font-family: var(--font-arabic);
  font-size: var(--arabic-size);
  color: var(--text-primary);
  line-height: 2.3;
  text-align: right;
  direction: rtl;
  word-spacing: 4px;
  padding: 0.5rem 0;
  white-space: pre-line;
}

.islamic-latin-text {
  font-size: var(--latin-size);
  color: var(--accent-gold-light);
  line-height: 1.7;
  font-style: italic;
  white-space: pre-line;
}

.islamic-translation-text {
  font-size: var(--trans-size);
  color: var(--text-secondary);
  line-height: 1.7;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 0.85rem;
  white-space: pre-line;
}

.islamic-after-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.islamic-after-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Interactive Digital Tasbih Counter */
.counter-widget {
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-gold-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
  transition: all var(--transition-normal);
}

.counter-widget.completed {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 20px -2px rgba(245, 158, 11, 0.2);
}

.counter-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.counter-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.counter-value-badge {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-emerald);
  font-variant-numeric: tabular-nums;
  background: var(--accent-emerald-soft);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-emerald);
  transition: all var(--transition-fast);
}

.counter-widget.completed .counter-value-badge {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border-color: var(--border-gold);
  box-shadow: 0 0 14px var(--accent-gold-glow);
}

.counter-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.counter-tap-btn {
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-emerald-dark));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  padding: 0.55rem 1.35rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px var(--accent-emerald-glow);
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
}

.counter-tap-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 18px var(--accent-emerald-glow);
}

.counter-tap-btn:active {
  transform: scale(0.92);
}

.counter-reset-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.counter-reset-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-emerald);
}

/* Mahallul Qiyam Banner */
.mahallul-qiyam-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(16, 185, 129, 0.15));
  border: 2px dashed var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.4rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.mahallul-qiyam-banner h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.mahallul-qiyam-banner p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Quick Action Copy Button */
.islamic-copy-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.islamic-copy-btn:hover {
  color: var(--accent-emerald);
  border-color: var(--border-emerald);
  background: var(--bg-card-hover);
}

/* Mobile Bottom Navigation - Mobile First Base (< 640px) */
.mobile-bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: var(--bg-bottom-nav, rgba(9, 14, 26, 0.9));
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-top: 1px solid rgba(245, 158, 11, 0.22);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(254, 240, 138, 0.15);
  z-index: 990;
  align-items: center;
  justify-content: space-around;
  padding: 0.35rem 0.5rem;
}

.mobile-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.2rem;
  min-height: 44px;
  min-width: 44px;
  transition: all var(--transition-fast);
}

.mobile-nav-btn:hover {
  color: var(--accent-gold-light);
}

.mobile-nav-btn.active {
  color: var(--accent-secondary-mint, #4edea3);
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(78, 222, 163, 0.32);
  box-shadow: 0 0 14px rgba(78, 222, 163, 0.25);
}

.mobile-nav-btn.active svg {
  transform: translateY(-1px) scale(1.08);
  color: var(--accent-secondary-mint, #4edea3);
  filter: drop-shadow(0 0 6px rgba(78, 222, 163, 0.4));
}

/* ==================== KOMPAS ARAH KIBLAT OTOMATIS ==================== */
.qibla-wrapper {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Top Location & Settings Card */
.qibla-location-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.qibla-location-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.qibla-location-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qibla-location-text h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.qibla-location-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.qibla-location-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.qibla-city-select {
  padding: 0.55rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

.qibla-city-select:focus {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.btn-qibla-gps {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  background: var(--accent-emerald);
  color: #ffffff;
  border: none;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
  transition: all var(--transition-normal);
}

.btn-qibla-gps:hover {
  background: var(--accent-emerald-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-qibla-gps.loading svg {
  animation: spin 1s infinite linear;
}

/* Metric HUD Grid - Mobile First Base (< 640px) */
.qibla-hud-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.qibla-hud-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.qibla-hud-card:hover {
  border-color: var(--accent-emerald);
  transform: translateY(-2px);
}

.qibla-hud-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.qibla-hud-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.qibla-hud-value.highlight-gold {
  color: var(--accent-gold);
}

.qibla-hud-value.highlight-emerald {
  color: var(--accent-emerald);
}

.qibla-hud-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Direction Alignment Guidance Banner */
.qibla-guidance-banner {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.qibla-guidance-banner.is-aligned {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(245, 158, 11, 0.12));
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.3);
  animation: qiblaGlowPulse 2s infinite ease-in-out;
}

@keyframes qiblaGlowPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(16, 185, 129, 0.25); }
  50% { box-shadow: 0 0 32px rgba(16, 185, 129, 0.55); }
}

/* Central Interactive Compass Display */
.qibla-compass-display {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1rem 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Forward Header Heading Needle Indicator (12 o'clock top arrow) */
.compass-forward-pointer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin-bottom: 0.75rem;
  z-index: 5;
}

.forward-triangle {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 14px solid var(--accent-gold);
  filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.5));
}

.forward-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* The Dial Container - Mobile First Base (< 640px) */
.compass-bezel-outer {
  width: min(270px, 80vw);
  height: min(270px, 80vw);
  border-radius: 50%;
  padding: 10px;
  background: conic-gradient(from 180deg, #d97706, #f59e0b, #fbbf24, #b45309, #d97706);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), 0 0 25px rgba(245, 158, 11, 0.25);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow var(--transition-normal);
}

.compass-bezel-outer.is-aligned {
  box-shadow: 0 12px 40px rgba(16, 185, 129, 0.4), 0 0 36px rgba(16, 185, 129, 0.6);
  background: conic-gradient(from 180deg, #059669, #10b981, #34d399, #047857, #059669);
}

.compass-dial-surface {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--bg-surface) 0%, var(--bg-card) 75%, var(--bg-elevated) 100%);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.45);
}

/* Rotating Dial with Cardinal Points & Degrees */
.compass-rotating-dial {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(0deg);
  transition: transform 0.15s cubic-bezier(0.1, 0.9, 0.2, 1);
  will-change: transform;
}

/* SVG Degree Ring */
.compass-svg-ring {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

/* Cardinal Directions (U, T, S, B) */
.compass-cardinal {
  position: absolute;
  font-weight: 800;
  font-size: 1rem;
  transform: translate(-50%, -50%);
  -webkit-user-select: none;
  user-select: none;
}

.compass-cardinal.north {
  top: 22px;
  left: 50%;
  color: #ef4444;
  font-size: 1.15rem;
}

.compass-cardinal.east {
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.compass-cardinal.south {
  bottom: 12px;
  left: 50%;
  color: var(--text-secondary);
}

.compass-cardinal.west {
  top: 50%;
  left: 22px;
  color: var(--text-secondary);
}

/* Kaaba Marker Pinned on Dial Rim */
.compass-kaaba-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  margin-left: -19px;
  margin-top: -19px;
  pointer-events: none;
  transform-origin: center center;
  transition: transform var(--transition-normal);
}

.kaaba-icon-bubble {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #000000;
  border: 2px solid var(--accent-gold);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.7);
  animation: kaabaPulse 2.5s infinite ease-in-out;
}

@keyframes kaabaPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.1); box-shadow: 0 0 20px rgba(245, 158, 11, 0.95); }
}

.kaaba-pointer-arrow {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--accent-gold);
}

/* Central Star / Compass Pivot */
.compass-center-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--bg-card) 30%, var(--bg-elevated) 100%);
  border: 3px solid var(--accent-gold);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(245, 158, 11, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 6;
  pointer-events: none;
}

.compass-hub-degree {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.compass-hub-heading {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-top: 2px;
}

/* Needle (Points North/South) */
.compass-needle-element {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 200px;
  margin-top: -100px;
  margin-left: -7px;
  pointer-events: none;
  z-index: 4;
}

.needle-north {
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 90px solid #ef4444;
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.6));
}

.needle-south {
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 90px solid #94a3b8;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.3));
}

/* Simulation Slider Controls for Non-Magnetic Devices / Desktop */
.qibla-sim-controls {
  width: 100%;
  max-width: 440px;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
}

.qibla-sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.qibla-sim-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-elevated);
  outline: none;
  cursor: pointer;
}

.qibla-sim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-gold);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.qibla-sim-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.qibla-sim-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* Info & Dalil Cards */
.qibla-dalil-card {
  background: linear-gradient(135deg, var(--bg-card), var(--accent-emerald-soft));
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.qibla-dalil-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-emerald);
  margin-bottom: 0.75rem;
}

.qibla-dalil-arabic {
  font-family: var(--font-arabic);
  font-size: 1.55rem;
  text-align: right;
  line-height: 2.2;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  direction: rtl;
}

.qibla-dalil-trans {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-style: italic;
}

.qibla-calibration-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}

.qibla-calibration-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qibla-calibration-text h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.qibla-calibration-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Sensor Permission Banner for iOS */
.qibla-permission-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--accent-gold);
  color: #ffffff;
  border: none;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
  min-height: 44px;
  min-width: 44px;
}

/* ==========================================================================
   JADWAL WAKTU SHOLAT & JAM ADZAN OTOMATIS (WIB, WITA, WIT)
   ========================================================================== */

/* 1. Home View Live Prayer Strip */
.home-prayer-strip {
  margin: 1.25rem 0 2rem 0;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.home-prayer-strip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-gold), var(--accent-teal));
}

.home-prayer-strip:hover {
  border-color: var(--border-emerald);
  box-shadow: var(--shadow-md);
}

.prayer-strip-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-card);
}

.prayer-strip-location {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.prayer-strip-loc-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prayer-strip-city-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tz-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--accent-emerald);
  color: #ffffff;
  letter-spacing: 0.5px;
}

.tz-badge.wita {
  background: var(--accent-gold);
  color: #1a1a1a;
}

.tz-badge.wit {
  background: #3b82f6;
  color: #ffffff;
}

.prayer-strip-date {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.prayer-strip-clock-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.prayer-strip-clock {
  font-family: monospace;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  letter-spacing: 1px;
}

.prayer-strip-countdown-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-live 1.6s infinite;
}

@keyframes pulse-live {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px var(--accent-emerald); }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* Live Prayer Strip - Mobile First Base (< 640px) */
.prayer-strip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
}

.prayer-strip-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.4rem;
  text-align: center;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.prayer-strip-pill:hover {
  border-color: var(--border-emerald);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.prayer-strip-pill.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(245, 158, 11, 0.12));
  border-color: var(--accent-emerald);
  box-shadow: 0 4px 12px var(--accent-emerald-glow);
}

.prayer-strip-pill.next {
  border-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.1);
}

.prayer-strip-pill-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.prayer-strip-pill.active .prayer-strip-pill-name {
  color: var(--accent-emerald);
  font-weight: 700;
}

.prayer-strip-pill-time {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: inherit;
}

.prayer-strip-pill.active .prayer-strip-pill-time {
  color: var(--accent-emerald);
}

.prayer-strip-pill.next .prayer-strip-pill-time {
  color: var(--accent-gold);
}

.prayer-strip-bottom-cta {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.85rem;
}

.prayer-strip-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.prayer-strip-cta-btn:hover {
  color: var(--accent-emerald-dark);
  text-decoration: underline;
  transform: translateX(3px);
}

/* 2. Jadwal & Jam Adzan Full Subtab View */
.jadwal-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Location and Timezone Controls Bar */
.jadwal-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

.jadwal-loc-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.jadwal-loc-badge-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.jadwal-loc-text h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.jadwal-loc-text p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Hybrid API Status Indicator & Sync Button */
.jadwal-source-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.prayer-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.prayer-source-pill.online {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #059669;
}
[data-theme="dark"] .prayer-source-pill.online {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.prayer-source-pill.cached {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.35);
  color: #0284c7;
}
[data-theme="dark"] .prayer-source-pill.cached {
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(14, 165, 233, 0.45);
  color: #38bdf8;
}

.prayer-source-pill.offline {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #d97706;
}
[data-theme="dark"] .prayer-source-pill.offline {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.prayer-source-pill.syncing {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
  color: #7c3aed;
}

.source-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.prayer-source-pill.online .source-status-dot,
.prayer-source-pill.cached .source-status-dot {
  box-shadow: 0 0 6px currentColor;
  animation: pulseApiDot 2s infinite ease-in-out;
}

.prayer-source-pill.syncing .source-status-dot {
  animation: spinDot 1s linear infinite;
}

@keyframes pulseApiDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.btn-sync-api {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-sync-api:hover {
  background: var(--bg-surface);
  color: var(--accent-emerald);
  border-color: var(--accent-emerald);
}

.btn-sync-api.loading svg {
  animation: spin 1s linear infinite;
}

.jadwal-coords-info {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.jadwal-actions-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Timezone Switcher Pills */
.timezone-pills-wrap {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.tz-pill-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.tz-pill-btn:hover {
  color: var(--text-primary);
}

.tz-pill-btn.active {
  background: var(--accent-emerald);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-emerald-glow);
}

.tz-pill-btn.wita.active {
  background: var(--accent-gold);
  color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.tz-pill-btn.wit.active {
  background: #3b82f6;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* 3. Hero Jam Adzan Card - Mobile First Base (< 640px) */
.adhan-clock-hero {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(245, 158, 11, 0.08)), var(--bg-card);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.adhan-clock-hero::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.adhan-clock-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.adhan-clock-date-masehi {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.adhan-clock-date-hijri {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent-gold);
}

.adhan-big-digital-clock {
  font-family: 'Consolas', 'Roboto Mono', 'SF Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: clamp(2.4rem, 8vw, 4rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
  margin: 0.75rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-shadow: 0 4px 20px rgba(16, 185, 129, 0.25);
}

.adhan-big-digital-clock span[id^="adhan-clock-val-"] {
  display: inline-block;
  min-width: 1.8ch;
  text-align: center;
}

.adhan-clock-colon {
  animation: blink-colon 1s infinite;
  color: var(--accent-emerald);
}

@keyframes blink-colon {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.adhan-clock-tz-label {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.55rem;
  margin-left: 0.6rem;
  letter-spacing: 0.05em;
  align-self: center;
}

/* Next Prayer Countdown Bar */
.adhan-next-countdown-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.5rem;
  margin: 0.75rem 0 1.5rem 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-emerald);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

.adhan-next-countdown-box strong {
  color: var(--text-primary);
  font-family: monospace;
  font-size: 1.2rem;
  background: var(--bg-input);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

/* Adhan Interactive Audio Controls */
.adhan-player-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.adhan-audio-selector-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.adhan-audio-select {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}

.adhan-audio-select:focus {
  outline: none;
  border-color: var(--border-emerald);
}

.adhan-audio-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-test-adhan {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-teal));
  color: #ffffff;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px var(--accent-emerald-glow);
}

.btn-test-adhan:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px var(--accent-emerald-glow);
}

.btn-test-adhan.playing {
  background: linear-gradient(135deg, var(--accent-gold), #ea580c);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.adhan-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

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

.btn-notif-req {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
}

.btn-notif-req:hover {
  border-color: var(--border-emerald);
  background: var(--bg-card-hover);
}

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

/* 4. Full 8 Prayer Cards Grid - Mobile First Base (< 640px) */
.prayer-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.prayer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.prayer-card.current {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), var(--bg-card));
  border-color: var(--accent-emerald);
  box-shadow: 0 6px 20px var(--accent-emerald-glow);
}

.prayer-card.current::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-emerald);
}

.prayer-card.next {
  border-color: var(--accent-gold);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.prayer-card.next::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gold);
}

.prayer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.prayer-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.prayer-card.current .prayer-card-icon {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
}

.prayer-card.next .prayer-card-icon {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
}

.prayer-card-arabic-name {
  font-family: var(--font-arabic-title);
  font-size: 1.45rem;
  color: var(--accent-gold);
  line-height: 1;
}

.prayer-card-title-group h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.prayer-card-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.prayer-card-time-row {
  margin-top: 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.prayer-card-time {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text-primary);
  font-family: monospace;
}

.prayer-card.current .prayer-card-time {
  color: var(--accent-emerald);
}

.prayer-card.next .prayer-card-time {
  color: var(--accent-gold);
}

.prayer-card-tz-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-left: 0.35rem;
}

.prayer-card-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  display: inline-block;
}

.prayer-card-status-badge.active-now {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  border: 1px solid var(--accent-emerald);
}

.prayer-card-status-badge.next-soon {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

/* 5. Doa Sesudah Adzan Card */
.doa-adhan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.doa-adhan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-card);
}

.doa-adhan-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.doa-adhan-title-group h3 {
  font-size: 1.15rem;
  color: var(--text-primary);
  font-weight: 700;
}

.doa-adhan-arabic {
  font-family: var(--font-arabic);
  font-size: 1.65rem;
  line-height: 2.2;
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border-right: 4px solid var(--accent-emerald);
}

.doa-adhan-latin {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--accent-gold);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.doa-adhan-trans {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.doa-adhan-fadhilah {
  margin-top: 1.25rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.08);
  border-left: 3px solid var(--accent-emerald);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.doa-adhan-fadhilah strong {
  color: var(--accent-emerald);
}



/* ==========================================================================
   DZIKIR & DOA MODERN MODULE STYLING
   ========================================================================== */

/* Zikir Search Box */
.zikir-search-container {
  margin: 1.25rem auto 1rem auto;
  max-width: 640px;
  width: 100%;
}

.content-header-card .zikir-search-container {
  margin-top: 1.5rem;
}

.zikir-search-wrapper,
.zikir-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.zikir-search-icon {
  position: absolute;
  left: 1.15rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
}

.zikir-search-input {
  width: 100%;
  padding: 0.85rem 2.8rem 0.85rem 3rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.zikir-search-input:focus {
  border-color: var(--accent-emerald);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--accent-emerald-soft);
}

.zikir-search-input:focus ~ .zikir-search-icon {
  color: var(--accent-emerald);
}

.zikir-search-clear {
  position: absolute;
  right: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: none;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.zikir-search-clear:hover {
  color: var(--text-primary);
  border-color: var(--border-emerald);
}

/* Category Grid */
.zikir-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.15rem;
  margin-top: 1rem;
}

.zikir-cat-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: left;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.zikir-cat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-emerald);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.zikir-cat-card:hover {
  border-color: var(--border-emerald);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--bg-surface), var(--accent-emerald-soft));
}

.zikir-cat-card:hover::before {
  opacity: 1;
}

.zikir-cat-card.active {
  border-color: var(--accent-emerald);
  background: linear-gradient(135deg, var(--bg-surface), var(--accent-emerald-soft));
  box-shadow: 0 0 16px var(--accent-emerald-soft);
}

.zikir-cat-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 8px;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.zikir-cat-card:hover .zikir-cat-icon-wrap {
  background: var(--accent-emerald-soft);
  border-color: var(--border-emerald);
  transform: scale(1.08);
}

.zikir-cat-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.zikir-cat-body {
  flex: 1;
  min-width: 0;
}

.zikir-cat-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zikir-cat-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.zikir-cat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.zikir-cat-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  border: 1px solid var(--border-emerald);
}

.zikir-cat-arrow {
  color: var(--text-muted);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.zikir-cat-card:hover .zikir-cat-arrow {
  color: var(--accent-emerald);
  transform: translateX(3px);
}

/* Fawaid & Riwayat Styling */
.islamic-fawaid-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(245, 158, 11, 0.05));
  border: 1px solid var(--border-emerald);
  border-left: 4px solid var(--accent-emerald);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.islamic-fawaid-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-emerald);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.islamic-fawaid-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.islamic-source-box {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-card);
  align-self: flex-start;
  margin-top: 0.35rem;
}

.islamic-category-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: var(--accent-emerald-soft);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-emerald);
  display: inline-block;
}

.zikir-breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.zikir-breadcrumb-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.zikir-breadcrumb-btn:hover {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  border-color: var(--border-emerald);
}

.zikir-filter-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.doa-group-filter-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.doa-group-select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  max-width: 280px;
  text-overflow: ellipsis;
  transition: all var(--transition-fast);
}

.doa-group-select:focus {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.doa-group-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* ==========================================================================
   ILUSTRASI GERAKAN SHOLAT
   ========================================================================== */
.sholat-step-illustration-box {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(13, 148, 136, 0.22);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  margin: 1.15rem auto !important;
  max-width: 520px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.sholat-step-illustration-img {
  max-height: 230px;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  display: block;
  border-radius: var(--radius-md);
  transition: transform var(--transition-normal);
}

.sholat-step-illustration-box:hover .sholat-step-illustration-img {
  transform: scale(1.02);
}

@media (max-width: 640px) {
  .sholat-step-illustration-box {
    max-width: 100%;
    margin: 0.85rem 0;
    padding: 0.35rem;
  }
  .sholat-step-illustration-img {
    max-height: 175px;
  }
}

/* ==========================================================================
   MODUL ASMAUL HUSNA
   ========================================================================== */
/* Modul Asmaul Husna - Mobile First Base (< 640px) */
.asmaul-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.asmaul-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  position: relative;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.asmaul-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.12);
}

.asmaul-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.asmaul-card-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.asmaul-card-arabic {
  font-family: 'Amiri Quran', 'Amiri', serif;
  font-size: 2.1rem;
  line-height: 1.6;
  color: var(--accent-gold);
  margin: 0.25rem 0 0.5rem 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.asmaul-card-latin {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.asmaul-card-trans {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 0.75rem;
  flex-grow: 1;
}

.asmaul-card-trans-en {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.asmaul-card-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

/* ==========================================================================
   MODUL BELAJAR IQRA 1 - 6
   ========================================================================== */
.iqra-container {
  margin-top: 1.5rem;
}

.iqra-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.iqra-info-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.iqra-info-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
  max-width: 600px;
}

.iqra-actions-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.iqra-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.iqra-btn-primary {
  background: var(--accent-emerald);
  color: white;
  border: 1px solid var(--accent-emerald);
}

.iqra-btn-primary:hover {
  background: var(--accent-emerald-dark);
  box-shadow: 0 4px 14px var(--accent-emerald-glow);
}

.iqra-btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
}

.iqra-btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-emerald);
}

.iqra-viewer-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
  min-height: 650px;
}

.iqra-pdf-frame {
  width: 100%;
  height: 750px;
  border: none;
  background: #2b2b2b;
}

/* ==========================================================================
   MODUL HADITS SHAHIH
   ========================================================================== */
.hadits-meta-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.hadits-kitab-badge {
  display: inline-block;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid var(--border-gold);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.hadits-tema-badge {
  display: inline-block;
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  border: 1px solid var(--border-emerald);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.hadits-perawi-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* ==========================================================================
   MODUL KISAH 25 NABI & RASUL
   ========================================================================== */
/* Modul Kisah 25 Nabi & Rasul - Mobile First Base (< 640px) */
.kisah-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.kisah-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

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

.kisah-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.kisah-num-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid var(--border-gold);
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kisah-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.kisah-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}

.kisah-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.kisah-meta-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.kisah-meta-pill.gold {
  color: var(--accent-gold);
  border-color: var(--border-gold);
  background: var(--accent-gold-soft);
}

.kisah-snippet {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.25rem;
}

.kisah-read-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.kisah-read-btn:hover {
  background: var(--accent-emerald);
  color: #ffffff;
}

/* Kisah Modal Story Text */
#kisah-modal {
  max-width: 760px;
  width: 92%;
}

.kisah-modal-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.kisah-modal-story-text {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-primary);
  text-align: justify;
  white-space: pre-line;
}

.kisah-modal-story-text p {
  margin-bottom: 1rem;
}

/* ==========================================================================
   12 FITUR UNGGULAN QURAN GEMILANG — COMPLETE STYLESHEET
   ========================================================================== */

/* ---------- 1. FONTS & KALIGRAFI ARAB (Fitur 11) ---------- */

@font-face {
  font-family: 'Uthmanic';
  src: url('https://cdn.jsdelivr.net/gh/AhmdNasr/Media@main/HafsUthmanicV14.woff2') format('woff2');
  font-display: swap;
}

.ayah-text-arabic[data-font="uthmanic"],
.reader-header-arabic[data-font="uthmanic"],
[data-font="uthmanic"] {
  font-family: 'Uthmanic', 'Amiri Quran', 'Traditional Arabic', serif !important;
}

.ayah-text-arabic[data-font="amiri"],
.reader-header-arabic[data-font="amiri"],
[data-font="amiri"] {
  font-family: 'Amiri Quran', 'Amiri', serif !important;
}

.ayah-text-arabic[data-font="LPMQ"],
.reader-header-arabic[data-font="LPMQ"],
[data-font="LPMQ"] {
  font-family: 'LPMQ', 'Traditional Arabic', serif !important;
}

/* ---------- 2. SEARCH SCOPE & SORT CONTROL (Fitur 4 & Fitur 6) - Mobile First Base (< 640px) ---------- */
.search-sort-control-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.search-scope-toggle {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.25rem;
  gap: 0.25rem;
}

.scope-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  transition: all var(--transition-fast);
}

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

.scope-btn.active {
  background: var(--accent-emerald);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.surah-sort-control {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.6rem 0.25rem 0.8rem;
}

.surah-sort-control .sort-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sort-btn {
  padding: 0.35rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.sort-btn.active {
  background: var(--accent-gold);
  color: #1a1a1a;
  font-weight: 700;
}

/* Nuzul Badge on Surah Card */
.surah-nuzul-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-full);
  padding: 0.15rem 0.5rem;
  margin-top: 0.25rem;
}

/* Ayah Full-Text Search Results Panel */
.ayah-search-results-panel {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
  max-height: 520px;
  overflow-y: auto;
}

.ayah-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.ayah-search-status-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ayah-search-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.close-search-results-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.close-search-results-btn:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.ayah-search-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ayah-search-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ayah-search-item:hover {
  border-color: var(--accent-emerald);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.ayah-search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.ayah-search-pill {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: var(--accent-emerald-soft);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.ayah-search-jump-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ayah-search-arabic {
  font-family: 'LPMQ', 'Traditional Arabic', serif;
  font-size: 1.25rem;
  text-align: right;
  direction: rtl;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.8;
}

.ayah-search-trans {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ayah-search-trans mark {
  background: rgba(245, 158, 11, 0.35);
  color: var(--text-primary);
  padding: 0.1rem 0.25rem;
  border-radius: 3px;
  font-weight: 600;
}

/* ---------- 3. AYAT SAJDAH & SUJUD TILAWAH (Fitur 5) ---------- */
.sajdah-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3));
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.sajdah-badge:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1a1a1a;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.sajdah-badge.obligatory {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.3));
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.45);
}

.sajdah-badge.obligatory:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
}

.sajdah-icon {
  font-size: 1rem;
  line-height: 1;
}

/* Sajdah Modal */
#sajdah-modal {
  max-width: 680px;
  width: 92%;
}

.sajdah-title-icon {
  font-size: 1.35rem;
  color: var(--accent-gold);
}

.sajdah-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sajdah-guide-banner {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.sajdah-guide-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.15);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.4rem;
}

.sajdah-guide-banner p {
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
}

.sajdah-dua-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}

.sajdah-dua-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-emerald);
  margin-bottom: 0.75rem;
}

.sajdah-arabic-prayer {
  font-family: 'LPMQ', 'Traditional Arabic', serif;
  font-size: 1.55rem;
  line-height: 2.2;
  color: var(--text-primary);
  direction: rtl;
  margin-bottom: 0.75rem;
}

.sajdah-latin-prayer {
  font-size: 0.92rem;
  font-style: italic;
  color: var(--accent-gold);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.sajdah-meaning-prayer {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.sajdah-steps-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.sajdah-steps-card h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.sajdah-steps-card ol {
  padding-left: 1.25rem;
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ---------- 4. AUDIO PLAYBACK SPEED (Fitur 7) ---------- */
.audio-speed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--accent-emerald);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: monospace, sans-serif;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.audio-speed-btn:hover {
  background: var(--accent-emerald-soft);
  border-color: var(--accent-emerald);
  transform: scale(1.05);
}

/* ---------- 5. TAHFIDZ LOOPING PANEL (Fitur 8) ---------- */
.tahfidz-panel {
  display: none;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 78, 59, 0.15));
  border: 2px dashed rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin: 1rem 0;
  animation: fadeInDown 0.25s ease-out;
}

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

.tahfidz-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--accent-emerald);
}

.tahfidz-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

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

/* Tahfidz Controls - Mobile First Base (< 640px) */
.tahfidz-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tahfidz-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tahfidz-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.tahfidz-input {
  width: 70px;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
}

.tahfidz-select {
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
}

.tahfidz-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

#btn-stop-tahfidz,
#tahfidz-status-badge {
  display: none;
}

.tahfidz-status {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  animation: pulseSlow 2s infinite;
}

/* ---------- 6. BLIND TEST / UJI HAFALAN (Fitur 9) ---------- */
.blind-test-panel {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  margin: 1rem 0;
  box-shadow: var(--shadow-sm);
  animation: fadeInDown 0.25s ease-out;
}

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

.blind-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.blind-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

.blind-close-btn {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
}

.blind-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

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

.blind-btn-group {
  display: inline-flex;
  gap: 0.5rem;
  margin-left: auto;
}

.blind-action-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.blind-action-btn:hover {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  border-color: var(--border-emerald);
}

/* Blind Blur Effects on Ayah Card */
.blind-test-mode .ayah-text-arabic.blind-blurred,
.blind-test-mode .ayah-transliteration.blind-blurred,
.blind-test-mode .ayah-translation-id.blind-blurred {
  filter: blur(8px);
  cursor: pointer;
  user-select: none;
  transition: filter 0.25s ease;
  position: relative;
}

.blind-test-mode .ayah-text-arabic.blind-blurred:hover,
.blind-test-mode .ayah-transliteration.blind-blurred:hover,
.blind-test-mode .ayah-translation-id.blind-blurred:hover {
  filter: blur(4px);
}

.blind-test-mode .blind-revealed,
.blind-test-mode .blind-blurred:active {
  filter: blur(0) !important;
}

/* ---------- 7. KUTUBUT TIS'AH HADITS EXPLORER (Fitur 1) ---------- */
.hadits-kitab-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

/* Hadits Kitab Chip - Mobile First Base (< 640px) */
.hadits-kitab-chip {
  flex: 1 1 calc(50% - 0.5rem);
  min-width: auto;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.65rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.hadits-kitab-chip:hover {
  border-color: var(--accent-emerald);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.hadits-kitab-chip.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 78, 59, 0.25));
  border-color: var(--accent-emerald);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.hadits-kitab-chip .chip-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.hadits-kitab-chip .chip-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-emerald);
}

.hadits-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.hadits-select-wrap,
.hadits-jump-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hadits-select-wrap label,
.hadits-jump-wrap label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.hadits-select {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  min-width: 220px;
}

.hadits-jump-box {
  display: flex;
  gap: 0.35rem;
}

.hadits-number-input {
  width: 90px;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.85rem;
}

.hadits-jump-btn {
  padding: 0.4rem 0.75rem;
  background: var(--accent-emerald);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hadits-jump-btn:hover {
  filter: brightness(1.1);
}

.hadits-badge-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.hadits-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.hadits-pagination-bar:empty {
  display: none;
}

.hadits-page-btn {
  padding: 0.45rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hadits-page-btn:hover:not(:disabled) {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.hadits-page-btn.active {
  background: var(--accent-emerald);
  color: #ffffff;
  border-color: var(--accent-emerald);
}

.hadits-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hadits-page-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0 0.5rem;
}

/* ---------- 8. MULTI-TAFSIR TABS (Fitur 2) ---------- */
.tafsir-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  scrollbar-width: thin;
}

.tafsir-tab-btn[data-tafsir-type="jalalain"].active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1a1a1a;
  border-color: #f59e0b;
}

.tafsir-tab-btn[data-tafsir-type="quraish"].active {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  border-color: #3b82f6;
}

/* ---------- 9. REGIONAL TRANSLATION (Fitur 3) ---------- */
.ayah-translation-regional {
  margin-top: 0.65rem;
  padding: 0.65rem 0.9rem;
  background: rgba(245, 158, 11, 0.06);
  border-left: 3px solid rgba(245, 158, 11, 0.5);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-primary);
}

.regional-lang-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.25rem;
}

/* ---------- 10. CLOUD SYNC & BACKUP (Fitur 10) ---------- */
.sync-setting-item {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
}

.sync-actions-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.sync-create-row,
.sync-restore-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
}

.sync-code-output {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--accent-emerald);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
}

.sync-code-text {
  font-family: monospace;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-emerald);
}

.copy-sync-code-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.sync-input {
  flex: 1;
  min-width: 180px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.sync-file-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.sync-link-btn {
  background: transparent;
  border: 1px dashed var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sync-link-btn input[type="file"] {
  display: none;
}

.sync-link-btn:hover {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

/* ---------- 11. WEB SHARE BUTTON (Fitur 12) ---------- */
.ayah-action-btn.share-btn {
  color: var(--text-secondary);
}

.ayah-action-btn.share-btn:hover {
  color: var(--accent-gold);
  border-color: var(--border-gold);
  background: var(--accent-gold-soft);
  transform: translateY(-2px);
}

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

@keyframes pulseSlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}



/* Ayah search result card & search highlight (Fitur 4) */
.ayah-search-result-card {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ayah-search-result-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.ayah-search-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}
.ayah-search-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: var(--accent-gold-soft);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}
.ayah-search-action {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.ayah-search-arabic {
  font-family: var(--font-arabic);
  font-size: 1.3rem;
  line-height: 2.2;
  text-align: right;
  direction: rtl;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.ayah-search-translation {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.search-highlight, mark.search-highlight {
  background: rgba(234, 179, 8, 0.35);
  color: inherit;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-weight: 600;
}

/* Sajdah Dialog / Modal (Fitur 5) */
.sajdah-dialog {
  border: none;
  border-radius: var(--radius-lg);
  background: var(--bg-modal);
  color: var(--text-primary);
  padding: 1.5rem;
  max-width: 600px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

/* Tahfidz status badge (Fitur 8) */
.tahfidz-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
}

/* Regional ayah box (Fitur 3) */
.regional-ayah-box {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.06);
  border-left: 3px solid var(--accent-emerald);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
}

/* Sync code display (Fitur 10) */
.sync-code-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px dashed var(--accent-gold);
  margin-top: 0.75rem;
}

/* Highlight target scroll animation */
.highlight-target {
  animation: pulseTarget 1.5s ease-in-out 2;
}
@keyframes pulseTarget {
  0% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.7); }
  50% { box-shadow: 0 0 0 10px rgba(234, 179, 8, 0); }
  100% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0); }
}

/* ==========================================================================
   STITCH NOOR ILLUMINATION - TAJWEED HIGHLIGHTING TOKENS
   ========================================================================== */
.tajwid-ghunnah {
  color: #4edea3 !important;
  font-weight: 600;
  text-shadow: 0 0 12px rgba(78, 222, 163, 0.35);
}
.tajwid-mad {
  color: #ffc174 !important;
  font-weight: 600;
  text-shadow: 0 0 12px rgba(255, 193, 116, 0.35);
}
.tajwid-qalqalah {
  color: #6ffbbe !important;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(111, 251, 190, 0.3);
}
.tajwid-ikhfa {
  color: #dccf6d !important;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(220, 207, 109, 0.3);
}
.tajwid-idgham {
  color: #93c5fd !important;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(147, 197, 253, 0.3);
}
.tajwid-iqlab {
  color: #f472b6 !important;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(244, 114, 182, 0.3);
}







/* ==========================================================================
   LIGHT THEME COMPONENT ADAPTATIONS & REFINEMENTS
   Ensures 100% Visual Consistency across Light & Dark Modes
   ========================================================================== */
[data-theme="light"] .nav-megamenu-panel {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.16), 0 0 16px rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(217, 119, 6, 0.22);
}

[data-theme="light"] .megamenu-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .megamenu-header-badge {
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.25);
}

[data-theme="light"] .megamenu-item {
  background: #f8fafc !important;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .megamenu-item:hover {
  background: #ffffff !important;
  border-color: var(--border-emerald);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .megamenu-item.active {
  background: rgba(5, 150, 105, 0.12) !important;
  border-color: var(--accent-emerald);
}

[data-theme="light"] .megamenu-item-icon.emerald {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  color: #059669;
}

[data-theme="light"] .megamenu-item-icon.gold {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.25);
  color: #b45309;
}

[data-theme="light"] .megamenu-item-icon.amber {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.25);
  color: #b45309;
}

[data-theme="light"] .megamenu-item-icon.cyan {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.25);
  color: #0284c7;
}

[data-theme="light"] .megamenu-tag.emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

[data-theme="light"] .megamenu-tag.gold {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

[data-theme="light"] .megamenu-tag.amber {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

[data-theme="light"] .megamenu-tag.cyan {
  background: rgba(6, 182, 212, 0.12);
  color: #0284c7;
}

[data-theme="light"] .audio-dock {
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12), 0 0 20px rgba(5, 150, 105, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.25);
}

[data-theme="light"] .audio-slider {
  background: #e2e8f0;
}

[data-theme="light"] .counter-widget {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
}

[data-theme="light"] .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .sholat-step-illustration-box {
  background: #ffffff;
  border-color: rgba(13, 148, 136, 0.2);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .sholat-step-illustration-img {
  filter: none;
}

[data-theme="light"] .islamic-latin-text {
  color: var(--accent-gold-light);
}

[data-theme="light"] .islamic-after-box {
  background: var(--bg-card-hover);
  border-color: var(--border-subtle);
}

[data-theme="light"] .islamic-card.completed {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.06) 0%, rgba(217, 119, 6, 0.03) 50%, #ffffff 100%);
}

[data-theme="light"] .surah-card:hover {
  box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.12), 0 0 18px -3px rgba(5, 150, 105, 0.15);
}

[data-theme="light"] .ayah-card.playing {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.08) 0%, rgba(217, 119, 6, 0.06) 50%, #ffffff 100%);
}

[data-theme="light"] .hadits-kitab-chip.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.16));
  border-color: var(--accent-emerald);
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.15);
}

[data-theme="light"] dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

[data-theme="light"] .tajwid-ghunnah {
  color: #059669 !important;
  text-shadow: none;
}
[data-theme="light"] .tajwid-mad {
  color: #b45309 !important;
  text-shadow: none;
}
[data-theme="light"] .tajwid-qalqalah {
  color: #0f766e !important;
  text-shadow: none;
}
[data-theme="light"] .tajwid-ikhfa {
  color: #a16207 !important;
  text-shadow: none;
}
[data-theme="light"] .tajwid-idgham {
  color: #2563eb !important;
  text-shadow: none;
}
[data-theme="light"] .tajwid-iqlab {
  color: #db2777 !important;
  text-shadow: none;
}

/* ==========================================================================
   SITE FOOTER - CREDIT, COPYRIGHT & TRAKTIR KOPI
   Responsive & Centered on Desktop, Tablet, and Mobile
   ========================================================================== */
.site-footer {
  margin-top: 2.75rem;
  padding: 2rem 1.5rem 2rem;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.footer-divider {
  width: 100%;
  max-width: 720px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.35), rgba(245, 158, 11, 0.4), transparent);
  margin: 0 auto 1.75rem auto;
}

[data-theme="light"] .footer-divider {
  background: linear-gradient(90deg, transparent, rgba(5, 150, 105, 0.25), rgba(217, 119, 6, 0.3), transparent);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  width: 100%;
}

.footer-copyright {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  text-align: center;
}

.footer-copyright strong {
  color: var(--text-primary);
  font-weight: 700;
}

.footer-sep {
  color: var(--border-gold, rgba(245, 158, 11, 0.4));
  user-select: none;
  font-weight: 300;
  margin: 0 0.15rem;
}

.footer-author-link {
  color: var(--accent-gold-light);
  text-decoration: none;
  font-weight: 700;
  position: relative;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
  padding: 0.1rem 0.25rem;
  border-radius: var(--radius-sm);
}

.footer-author-link:hover {
  color: #fef08a;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  text-decoration: underline;
  text-underline-offset: 3px;
}

[data-theme="light"] .footer-author-link {
  color: #b45309;
}

[data-theme="light"] .footer-author-link:hover {
  color: #d97706;
  text-shadow: none;
  text-decoration: underline;
}

/* Traktir Kopi Button */
.footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.25rem;
}

.btn-traktir-kopi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem 1.45rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff !important;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.35);
  border: 1px solid rgba(254, 240, 138, 0.25);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn-traktir-kopi::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-traktir-kopi:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.5), 0 0 15px rgba(245, 158, 11, 0.4);
  color: #ffffff !important;
}

.btn-traktir-kopi:hover::before {
  opacity: 1;
}

.btn-traktir-kopi:active {
  transform: translateY(0) scale(0.98);
}

.btn-traktir-kopi .coffee-icon {
  width: 18px;
  height: 18px;
  color: #fef08a;
  transition: transform var(--transition-bounce);
}

.btn-traktir-kopi:hover .coffee-icon {
  transform: rotate(-10deg) scale(1.15);
}

[data-theme="light"] .btn-traktir-kopi {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   TASBIH DIGITAL MANDIRI (FREE & TARGET COUNTER)
   Interactive Haptic, Sound & Progress Ring Device
   ========================================================================== */
.tasbih-main-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: 840px;
  margin: 0 auto;
  width: 100%;
}

/* 1. Dzikir Selector Card */
.tasbih-dzikir-selector-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.tasbih-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.tasbih-dzikir-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tasbih-dzikir-chip {
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-body);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
}

.tasbih-dzikir-chip:hover {
  border-color: var(--border-emerald);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.tasbih-dzikir-chip.active {
  background: var(--accent-emerald);
  color: #ffffff;
  border-color: var(--accent-emerald);
  box-shadow: 0 4px 12px var(--accent-emerald-glow);
}

.tasbih-active-lafal-box {
  background: var(--bg-body);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all var(--transition-normal);
}

.tasbih-active-arabic {
  font-family: var(--font-arabic);
  font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  color: var(--accent-gold);
  line-height: 1.6;
  direction: rtl;
  margin-bottom: 0.25rem;
}

.tasbih-active-latin {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tasbih-active-meaning {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-style: italic;
  max-width: 600px;
  margin: 0 auto;
}

/* 2. Gadget Counter Device */
.tasbih-gadget-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  position: relative;
  overflow: hidden;
}

.tasbih-gadget-card::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  height: 150px;
  background: radial-gradient(circle, var(--accent-emerald-glow) 0%, transparent 70%);
  opacity: 0.15;
  pointer-events: none;
}

.tasbih-gadget-topbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.tasbih-target-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tasbih-ctrl-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tasbih-target-pills {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.target-pill-btn {
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--border-card);
  background: var(--bg-body);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.target-pill-btn:hover {
  border-color: var(--border-emerald);
  color: var(--text-primary);
}

.target-pill-btn.active {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  border-color: var(--accent-emerald);
}

.tasbih-gadget-toggles {
  display: flex;
  gap: 0.5rem;
}

.gadget-toggle-btn {
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-card);
  background: var(--bg-body);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.gadget-toggle-btn.active {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.tasbih-device-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  width: 100%;
}

.tasbih-counter-ring-wrap {
  position: relative;
  width: 270px;
  height: 270px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tasbih-progress-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.tasbih-progress-bg {
  fill: none;
  stroke: var(--bg-body);
  stroke-width: 10;
}

.tasbih-progress-bar {
  fill: none;
  stroke: var(--accent-emerald);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 722.56;
  stroke-dashoffset: 722.56;
  transition: stroke-dashoffset 0.25s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s ease;
}

.tasbih-counter-ring-wrap.target-reached .tasbih-progress-bar {
  stroke: var(--accent-gold);
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.6));
}

.tasbih-tap-center-btn {
  width: 205px;
  height: 205px;
  border-radius: var(--radius-full);
  background: linear-gradient(145deg, var(--bg-card), var(--bg-body));
  border: 3px solid var(--border-card);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), inset 0 2px 6px rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease, border-color 0.2s ease;
  position: relative;
  z-index: 2;
  outline: none;
}

.tasbih-tap-center-btn:active {
  transform: scale(0.94);
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.3);
  border-color: var(--accent-emerald);
}

.tasbih-tap-center-btn.tapped {
  animation: tasbihPulse 0.15s ease-out;
}

@keyframes tasbihPulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.93); }
  100% { transform: scale(1); }
}

.tasbih-counter-ring-wrap.target-reached .tasbih-tap-center-btn {
  border-color: var(--accent-gold);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.3);
}

.tasbih-tap-hint {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent-emerald);
  text-transform: uppercase;
  opacity: 0.85;
}

.tasbih-digital-number {
  font-size: clamp(3.2rem, 11vw, 4.4rem);
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.04em;
}

.tasbih-target-subtext {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.tasbih-stats-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  background: var(--bg-body);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.75rem;
  width: 100%;
  max-width: 440px;
}

.tasbih-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.tasbih-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tasbih-stat-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-emerald);
}

.tasbih-stat-divider {
  width: 1px;
  height: 28px;
  background: var(--border-card);
}

.tasbih-action-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.tasbih-sub-btn {
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.tasbih-sub-btn.undo {
  background: var(--bg-body);
  border-color: var(--border-card);
  color: var(--text-secondary);
}

.tasbih-sub-btn.undo:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.tasbih-sub-btn.reset {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.tasbih-sub-btn.reset:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
}

.tasbih-sub-btn.next-round {
  background: var(--accent-emerald-soft);
  border-color: var(--border-emerald);
  color: var(--accent-emerald);
}

.tasbih-sub-btn.next-round:hover {
  background: var(--accent-emerald);
  color: #ffffff;
}

.tasbih-keyboard-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

.tasbih-keyboard-hint kbd {
  background: var(--bg-body);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.4rem;
  font-size: 0.72rem;
  font-family: inherit;
  color: var(--text-primary);
  font-weight: 700;
}

/* 3. Fadhilah Card */
.tasbih-fadhilah-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  box-shadow: var(--shadow-sm);
}

.tasbih-fadhilah-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.tasbih-fadhilah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.tasbih-fadhilah-item {
  background: var(--bg-body);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.tasbih-fadhilah-item h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-emerald);
  margin: 0;
}

.tasbih-fadhilah-item p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   MOBILE-FIRST RESPONSIVE MEDIA QUERIES
   Standard Breakpoints:
   - Mobile: < 640px (Default Base Styles)
   - Tablet: 640px - 1024px (@media (min-width: 640px))
   - Desktop: > 1024px (@media (min-width: 1025px))
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TABLET STYLES (640px - 1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .container {
    max-width: 960px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* Show header action buttons that were hidden on small screens */
  #nav-jadwal-btn,
  #nav-kiblat-btn {
    display: inline-flex;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  /* 2-Column Responsive Layouts for Tablet */
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
    margin-bottom: 2.75rem;
  }

  .hero-categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.75rem;
  }

  .kitab-selector-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

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

  .hadits-kitab-chip {
    flex: 1 1 calc(33.333% - 0.6rem);
  }

  .search-sort-control-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .search-scope-toggle {
    width: auto;
  }

  .scope-btn {
    flex: initial;
  }

  .tahfidz-controls {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  /* Prayer & Compass */
  .prayer-strip-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }

  .prayer-strip-pill {
    padding: 0.6rem 0.4rem;
  }

  .prayer-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .qibla-hud-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  /* Asmaul Husna & Kisah Nabi */
  .asmaul-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .kisah-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
  }

  /* Reader View & Audio */
  .reader-header {
    padding: 2rem 1.5rem;
  }

  .ayah-card {
    padding: 1.5rem;
  }

  .audio-dock {
    width: calc(100% - 2rem);
  }

  .audio-track-subtitle {
    display: block;
  }

  /* Footer */
  .footer-copyright {
    flex-direction: row;
    gap: 0.5rem;
    font-size: 0.92rem;
  }

  .footer-sep {
    display: inline;
  }
}

/* --------------------------------------------------------------------------
   2. DESKTOP STYLES (> 1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) {
  body {
    padding-bottom: 0;
  }

  body:has(.audio-dock.visible) {
    padding-bottom: 95px;
  }

  .container {
    max-width: 1240px;
    padding-left: 2rem;
    padding-right: 2rem;
  }

  /* Navigation: Show Desktop Nav & Hide Mobile Bottom Nav */
  .main-nav {
    display: flex;
  }

  .mobile-bottom-nav {
    display: none;
  }

  /* Tabs scroll buttons not needed on wide desktop */
  .tabs-scroll-btn {
    display: none;
  }

  /* Grids & Cards Layout on Desktop */
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
  }

  .hero-categories-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.15rem;
    margin-top: 1.8rem;
  }

  .kitab-selector-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }

  .fiqih-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.15rem;
  }

  .hadits-kitab-chip {
    flex: 1 1 calc(20% - 0.6rem);
    min-width: 140px;
  }

  /* Prayer Schedules - Full 8 Columns */
  .prayer-strip-grid {
    grid-template-columns: repeat(8, 1fr);
    gap: 0.6rem;
  }

  .prayer-cards-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.15rem;
  }

  .adhan-clock-hero {
    padding: 2rem;
  }

  /* Compass & Kiblat */
  .qibla-hud-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }

  .compass-bezel-outer {
    width: 320px;
    height: 320px;
  }

  .compass-center-hub {
    width: 80px;
    height: 80px;
  }

  /* Asmaul Husna & Kisah */
  .asmaul-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.15rem;
  }

  .kisah-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
  }

  /* Reader & Desktop Audio Dock */
  .reader-header {
    padding: 2.2rem 1.8rem;
  }

  .ayah-card {
    padding: 1.75rem;
  }

  .audio-dock {
    bottom: 1.25rem;
    width: calc(100% - 2.5rem);
    max-width: 960px;
  }

  /* Footer */
  .site-footer {
    padding: 3rem 1.5rem 2.5rem;
  }
}

/* ==========================================================================
   TANYA QURANI AI - SEMANTIC VECTOR SEARCH & CHATBOT
   ========================================================================== */

/* Navbar AI Tag */
.nav-tab-ai {
  position: relative;
}
.nav-badge-ai {
  display: inline-block;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-full);
  margin-left: 0.35rem;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

/* Floating AI Chat Button */
.chat-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #0d9488, #059669);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  padding: 0;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease,
              background 0.25s ease;
  outline: none;
}
.chat-floating-btn:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 10px 25px rgba(13, 148, 136, 0.55), 0 0 16px rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, #0f766e, #047857);
}
.chat-floating-btn:active {
  transform: translateY(-1px) scale(0.96);
}
.chat-floating-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.chat-floating-pulse {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  background: #fbbf24;
  border: 2px solid #ffffff;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(251, 191, 36, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}
.chat-floating-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: rgba(14, 19, 31, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: #ffffff;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.02em;
}
.chat-floating-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: rgba(14, 19, 31, 0.94);
}
.chat-floating-btn:hover .chat-floating-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
[data-theme="light"] .chat-floating-tooltip {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  border: 1px solid rgba(217, 119, 6, 0.25);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
}
[data-theme="light"] .chat-floating-tooltip::after {
  border-left-color: rgba(255, 255, 255, 0.95);
}

/* Floating Chat Panel Widget */
.chat-floating-widget {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 410px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100vh - 120px);
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  z-index: 999;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
}
.chat-floating-widget.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Chat Widget Header */
.chat-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.95), rgba(5, 150, 105, 0.95));
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.chat-widget-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.chat-widget-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-widget-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.chat-widget-status {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.chat-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
}
.chat-widget-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.chat-widget-ctrl-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.chat-widget-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Chat Messages Container */
.chat-messages-container {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
  background: var(--bg-body);
}

/* Chat Bubbles */
.chat-msg {
  display: flex;
  gap: 0.65rem;
  max-width: 90%;
  animation: fadeInMsg 0.25s ease-out;
}
@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-msg.bot {
  align-self: flex-start;
  max-width: 96%;
}
.chat-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.chat-msg.user .chat-msg-avatar {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
}
.chat-msg.bot .chat-msg-avatar {
  background: linear-gradient(135deg, #0d9488, #059669);
  color: #ffffff;
}
.chat-msg-bubble {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  line-height: 1.55;
  position: relative;
}
.chat-msg.user .chat-msg-bubble {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: #ffffff;
  border-bottom-right-radius: 2px;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}
.chat-msg.bot .chat-msg-bubble {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  border-bottom-left-radius: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  width: 100%;
}
.chat-msg-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  display: block;
  text-align: right;
}
.chat-msg.user .chat-msg-time {
  color: rgba(255, 255, 255, 0.75);
}

/* Chat Islamic Entity Cards */
.chat-results-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.65rem;
}
.chat-entity-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  transition: all var(--transition-fast);
}
.chat-entity-card:hover {
  border-color: var(--border-emerald);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}
.chat-entity-card.ayat {
  border-left: 3.5px solid var(--accent-emerald);
}
.chat-entity-card.tafsir {
  border-left: 3.5px solid var(--accent-gold);
}
.chat-entity-card.doa {
  border-left: 3.5px solid var(--accent-blue);
}
.chat-entity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.chat-entity-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.chat-entity-badge.ayat { background: var(--accent-emerald-soft); color: var(--accent-emerald); }
.chat-entity-badge.tafsir { background: var(--accent-gold-soft); color: var(--accent-gold); }
.chat-entity-badge.doa { background: var(--accent-blue-soft); color: var(--accent-blue); }
.chat-entity-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.chat-entity-arabic {
  font-family: var(--font-arabic);
  font-size: 1.25rem;
  direction: rtl;
  text-align: right;
  line-height: 1.8;
  color: var(--text-arabic);
  margin: 0.45rem 0;
}
.chat-entity-latin {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  line-height: 1.4;
}
.chat-entity-translation {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.5;
}
.chat-entity-source {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.chat-entity-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-card);
  flex-wrap: wrap;
}
.chat-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.chat-action-btn:hover {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  border-color: var(--border-emerald);
}

/* Quick Prompt Suggestions */
.chat-prompts-tray {
  padding: 0.55rem 0.85rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-card);
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.chat-prompts-tray::-webkit-scrollbar { display: none; }
.chat-prompt-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.chat-prompt-chip:hover {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  border-color: var(--border-emerald);
}

/* Chat Input Bar */
.chat-input-bar {
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.chat-input-field {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
}
.chat-input-field:focus {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.chat-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4);
}
.chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Typing Indicator Animation */
.chat-typing-bubble {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0.9rem;
}
.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  opacity: 0.6;
  animation: typingBounce 1.4s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* Full View Page Layout (#tanya-view) */
.tanya-full-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .tanya-full-grid {
    grid-template-columns: 1fr;
  }
}
.tanya-sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.tanya-main-chat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  height: 720px;
  max-height: calc(100vh - 180px);
  overflow: hidden;
}
#tanya-view .reader-header {
  margin-bottom: 1.5rem;
}
.tanya-sidebar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.tanya-sidebar-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.tanya-topics-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.tanya-topics-list .chat-prompt-chip {
  text-align: left;
  width: 100%;
}
.tanya-sidebar-info {
  border-top: 1px dashed var(--border-card);
  padding-top: 0.85rem;
}
.tanya-info-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-emerald);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.tanya-info-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.tanya-sidebar-card #btn-clear-chat-full {
  width: 100%;
  justify-content: center;
  color: var(--text-muted);
}

/* Mobile responsive adjustments */
@media (max-width: 600px) {
  .btt-btn {
    bottom: 136px;
    right: 17px;
  }
  .chat-floating-btn {
    bottom: 80px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
  .chat-floating-tooltip {
    display: none;
  }
  .chat-floating-widget {
    bottom: 78px;
    right: 12px;
    left: 12px;
    width: auto;
    height: 75vh;
  }
}

/* ==========================================================================
   GAME CENTER AL-QUR'AN - STYLES
   ========================================================================== */

/* Game Header */
#game-view .reader-header {
  margin-bottom: 1.5rem;
}

/* Game Hub Stats Bar */
.game-hub-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.game-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1rem;
  text-align: center;
  transition: all var(--transition-fast);
}
.game-stat-card:hover {
  border-color: var(--border-rose);
  transform: translateY(-2px);
}
.game-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.6rem;
}
.game-stat-icon.rose { background: var(--accent-rose-soft); color: var(--accent-rose); }
.game-stat-icon.gold { background: var(--accent-gold-soft); color: var(--accent-gold); }
.game-stat-icon.emerald { background: var(--accent-emerald-soft); color: var(--accent-emerald); }
.game-stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.game-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Game Modes Grid */
.game-modes-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}
.game-modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.game-mode-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}
.game-mode-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-rose), var(--accent-gold));
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.game-mode-card:hover {
  border-color: var(--border-rose);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(244, 63, 94, 0.12);
}
.game-mode-card:hover::before {
  opacity: 1;
}
.game-mode-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.game-mode-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.game-mode-icon.rose { background: var(--accent-rose-soft); color: #fb7185; border: 1px solid var(--border-rose); }
.game-mode-icon.gold { background: var(--accent-gold-soft); color: #ffc174; border: 1px solid var(--border-gold); }
.game-mode-icon.emerald { background: var(--accent-emerald-soft); color: var(--accent-mint); border: 1px solid var(--border-emerald); }
.game-mode-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.game-mode-difficulty {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-top: 0.2rem;
}
.game-mode-difficulty.sedang { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.game-mode-difficulty.mudah { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.game-mode-difficulty.baru { background: var(--accent-rose-soft); color: #fb7185; }
.game-mode-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}
.game-mode-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.game-mode-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.game-mode-meta svg { flex-shrink: 0; }
.game-mode-meta span { display: flex; align-items: center; gap: 0.3rem; }
.game-mode-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  border: none;
  background: linear-gradient(135deg, var(--accent-rose), #e11d48);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-ui);
}
.game-mode-play-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 20px rgba(244, 63, 94, 0.35);
}

/* ===== QUIZ PLAY UI ===== */
.game-quiz-wrapper {
  max-width: 720px;
  margin: 0 auto;
}

/* Quiz Header Bar */
.quiz-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1.15rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
}
.quiz-progress-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.quiz-progress-num {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}
.quiz-progress-bar-wrap {
  width: 120px;
  height: 6px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.quiz-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-rose), var(--accent-gold));
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}
.quiz-score-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-gold);
}
.quiz-timer-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: color 0.3s, background 0.3s;
}
.quiz-timer-badge.warning {
  color: var(--accent-rose);
  background: var(--accent-rose-soft);
}
.quiz-streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.quiz-header-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}
.quiz-header-nav-btn:hover {
  background: var(--bg-card);
  color: var(--accent-rose);
}
.quiz-audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  background: var(--accent-rose-soft);
  border: 1px solid var(--border-rose);
  color: var(--accent-rose);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin: 0.6rem 0;
  font-family: var(--font-ui);
}
.quiz-audio-btn:hover {
  transform: scale(1.05);
  background: var(--accent-rose);
  color: #fff;
}
.quiz-audio-btn.playing {
  background: var(--accent-rose);
  color: #fff;
}
.quiz-question-source {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}
.quiz-feedback-detail {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
  line-height: 1.4;
  font-weight: 400;
}

/* Quiz Question Card */
.quiz-question-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  margin-bottom: 1.25rem;
  text-align: center;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeInUp 0.35s ease;
}
.quiz-question-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-rose);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}
.quiz-question-text {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.65;
}
.quiz-question-arabic {
  font-family: var(--font-arabic);
  font-size: 1.85rem;
  line-height: 2.2;
  color: var(--text-primary);
  direction: rtl;
  margin-bottom: 0.5rem;
}

/* Quiz Options */
.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.quiz-option-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  background: var(--bg-surface);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: var(--text-primary);
}
.quiz-option-btn:hover:not(.disabled) {
  border-color: var(--accent-rose);
  background: var(--accent-rose-soft);
}
.quiz-option-key {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.quiz-option-text {
  flex: 1;
  line-height: 1.4;
}
.quiz-option-arabic {
  font-family: var(--font-arabic);
  font-size: 1.35rem;
  direction: rtl;
  line-height: 1.8;
}

/* Option states */
.quiz-option-btn.correct {
  border-color: var(--accent-emerald) !important;
  background: var(--accent-emerald-soft) !important;
  animation: correctPulse 0.5s ease;
}
.quiz-option-btn.correct .quiz-option-key {
  background: var(--accent-emerald);
  color: #fff;
}
.quiz-option-btn.wrong {
  border-color: var(--accent-rose) !important;
  background: var(--accent-rose-soft) !important;
  animation: wrongShake 0.5s ease;
}
.quiz-option-btn.wrong .quiz-option-key {
  background: var(--accent-rose);
  color: #fff;
}
.quiz-option-btn.disabled {
  pointer-events: none;
  opacity: 0.5;
}
.quiz-option-btn.correct.disabled,
.quiz-option-btn.wrong.disabled {
  opacity: 1;
}

/* Quiz Feedback & Next */
.quiz-feedback-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  animation: fadeInUp 0.3s ease;
}
.quiz-feedback-bar.correct {
  background: var(--accent-emerald-soft);
  border: 1px solid var(--border-emerald);
  color: var(--accent-emerald);
}
.quiz-feedback-bar.wrong {
  background: var(--accent-rose-soft);
  border: 1px solid var(--border-rose);
  color: var(--accent-rose);
}
.quiz-feedback-text {
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.quiz-next-btn {
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-full);
  border: none;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-ui);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.quiz-next-btn:hover {
  background: var(--accent-rose);
  color: #fff;
}

/* ===== RESULT SCREEN ===== */
.game-result-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  animation: fadeInUp 0.5s ease;
}
.result-emoji {
  font-size: 3.5rem;
  margin-bottom: 0.85rem;
  animation: resultBounce 0.6s ease;
}
.result-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}
.result-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.result-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
.result-stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.5rem;
}
.result-stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.result-stat-val.emerald { color: var(--accent-emerald); }
.result-stat-val.rose { color: var(--accent-rose); }
.result-stat-val.gold { color: var(--accent-gold); }
.result-stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.result-review-section {
  margin: 1.5rem 0;
  text-align: left;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.35rem;
  border-top: 1px solid var(--border-card);
  padding-top: 1rem;
}
.result-review-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.result-review-item {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
}
.result-review-item.is-correct {
  border-left: 3px solid var(--accent-emerald);
}
.result-review-item.is-wrong {
  border-left: 3px solid var(--accent-rose);
}
.result-review-q {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}
.result-review-ans {
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
}
.result-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.result-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-full);
  border: none;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-ui);
}
.result-btn.primary {
  background: linear-gradient(135deg, var(--accent-rose), #e11d48);
  color: #fff;
}
.result-btn.primary:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(244, 63, 94, 0.35);
}
.result-btn.secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
}
.result-btn.secondary:hover {
  border-color: var(--border-rose);
  color: var(--text-primary);
}

/* Best Score Badge */
.result-best-score {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--accent-gold-soft);
  border: 1px solid var(--border-gold);
  color: var(--accent-gold);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes correctPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-4px); }
  30%, 60%, 90% { transform: translateX(4px); }
}
@keyframes resultBounce {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 640px) {
  .game-hub-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  .game-stat-card { padding: 0.85rem 0.5rem; }
  .game-stat-value { font-size: 1.1rem; }
  .game-modes-grid {
    grid-template-columns: 1fr;
  }
  .quiz-options-grid {
    grid-template-columns: 1fr;
  }
  .quiz-question-card {
    padding: 1.5rem 1rem;
  }
  .quiz-header-bar {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .quiz-progress-bar-wrap { width: 80px; }
  .result-stats-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
}
