@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Inter:wght@300;400;500;600;700&display=swap');
    
    :root {
      --primary-color: #1e40af;
      --secondary-color: #059669;
      --accent-color: #f59e0b;
      --text-primary: #1f2937;
      --text-secondary: #6b7280;
      --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }

    /* Font Definitions */

    @font-face {
      font-family: 'LPMQ IsepMisbah';
      src: url('source/fonts/LPMQ IsepMisbah.ttf') format('truetype');
      font-weight: normal;
      font-style: normal;
    }
    
    @font-face {
      font-family: 'Uthmanic';
      src: url('source/fonts/uthmanic.ttf') format('truetype');
      font-weight: normal;
      font-style: normal;
    }
    
    @font-face {
      font-family: 'KFGQPC';
      src: url('source/fonts/KFGQPC.ttf') format('truetype');
      font-weight: normal;
      font-style: normal;
    }

    /* Font preview section */
    .font-option {
      display: flex;
      align-items: center;
      padding: 10px;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s;
      border: 2px solid transparent;
    }
    
    .font-option:hover {
      background-color: rgba(59, 130, 246, 0.1);
    }
    
    .font-option.active {
      border-color: #3b82f6;
      background-color: rgba(59, 130, 246, 0.15);
    }
    
    .font-preview {
      font-size: 1.5rem;
      margin-right: 10px;
      min-width: 80px;
      text-align: center;
      direction: rtl;
    }
    
    .font-name {
      font-size: 0.9rem;
      color: #4b5563;
    }

    .arabic { 
      font-family: 'LPMQ IsepMisbah', 'Amiri', serif; 
      font-size: 1.75rem; 
      line-height: 2.2; 
      text-align: right; 
      direction: rtl;
      letter-spacing: 0.05em;
    }

    .translation {
      font-family: 'Inter', sans-serif;
      font-size: 1rem;
      line-height: 1.7;
      color: var(--text-primary);
    }

    .tajweed-rule {
    cursor: help;
    transition: all 0.2s ease;
    position: relative;
    display: inline-block;
  }
  
  .tajweed-rule:hover::after {
    content: attr(data-title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 10;
  }

  /* Tambahkan class Tajweed dari file tajweed_rules.css */
  .ghunnah { color: #bb4343; }
  .hamzat_wasl { color: #4343bb; }
  .idghaam_ghunnah { color: #43bb43; }
  .idghaam_mutajanisayn { color: #bb8843; }
  .idghaam_mutaqaribayn { color: #8843bb; }
  .idghaam_no_ghunnah { color: #43bb88; }
  .idghaam_shafawi { color: #bb4388; }
  .ikhfa { color: #88bb43; }
  .ikhfa_shafawi { color: #4388bb; }
  .iqlab { color: #bb8844; }
  .lam_shamsiyyah { color: #44bb88; }
  .madd_2 { color: #8844bb; }
  .madd_246 { color: #bb4444; }
  .madd_6 { color: #4444bb; }
  .madd_munfasil { color: #44bb44; }
  .madd_muttasil { color: #cc5555; }
  .qalqalah { color: #5555cc; }
  .silent { color: #55cc55; }

  /* Tajweed rules adjustments for dark mode */
  .dark-mode .ghunnah { color: #ff8a8a; }
  .dark-mode .hamzat_wasl { color: #8a8aff; }
  .dark-mode .idghaam_ghunnah { color: #8aff8a; }
  .dark-mode .idghaam_mutajanisayn { color: #ffd58a; }
  .dark-mode .idghaam_mutaqaribayn { color: #d58aff; }
  .dark-mode .idghaam_no_ghunnah { color: #8affd5; }
  .dark-mode .idghaam_shafawi { color: #ff8ad5; }
  .dark-mode .ikhfa { color: #d5ff8a; }
  .dark-mode .ikhfa_shafawi { color: #8ad5ff; }
  .dark-mode .iqlab { color: #ffd58a; }
  .dark-mode .lam_shamsiyyah { color: #8affd5; }
  .dark-mode .madd_2 { color: #d58aff; }
  .dark-mode .madd_246 { color: #ff8a8a; }
  .dark-mode .madd_6 { color: #8a8aff; }
  .dark-mode .madd_munfasil { color: #8aff8a; }
  .dark-mode .madd_muttasil { color: #ff8a8a; }
  .dark-mode .qalqalah { color: #8a8aff; }
  .dark-mode .silent { color: #8aff8a; }

  .dark-mode .tajweed-rule:hover::after {
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
    
    .tajweed-rule:hover {
      background: linear-gradient(135deg, rgba(251, 191, 36, 0.5), rgba(245, 158, 11, 0.5));
      transform: scale(1.02);
    }

    .verse-container {
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.2);
      box-shadow: var(--card-shadow);
      transition: all 0.3s ease;
    }

    .verse-container:hover {
      transform: translateY(-2px);
      box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }

    .header-gradient {
      background: var(--bg-gradient);
      background-size: 200% 200%;
      animation: gradientShift 8s ease infinite;
    }

    @keyframes gradientShift {
      0%, 100% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
    }

    .control-card {
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.2);
      box-shadow: var(--card-shadow);
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--primary-color), #3b82f6);
      transition: all 0.3s ease;
    }

    .btn-primary:hover {
      transform: translateY(-1px);
      box-shadow: 0 10px 20px rgba(30, 64, 175, 0.3);
    }

    .loading-spinner {
      border: 3px solid #f3f3f3;
      border-top: 3px solid var(--primary-color);
      border-radius: 50%;
      width: 40px;
      height: 40px;
      animation: spin 1s linear infinite;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    .fade-in {
      animation: fadeIn 0.5s ease-in;
    }

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

    .verse-number {
    /* Hapus properti yang tidak perlu */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: relative;
}

    .verse-number::before {
    content: "۝";
    font-size: 2rem;
    position: absolute;
    color: rgba(0, 0, 0, 0.425);
    z-index: 1;
    font-family: 'Uthmanic', 'Amiri', serif;
    }

    .verse-number span {
    position: relative;
    z-index: 2;
    font-size: 0.875rem;
    }


/* PERBAIKAN UNTUK VERSE NUMBER */
.dark-mode .verse-number {
    color: rgba(255, 255, 255, 0.85);
}

.dark-mode .verse-number::before {
    color: rgba(255, 255, 255, 0.4); /* Warna khusus untuk mode gelap */
}

/* Tambahkan juga untuk mode kontinu */
.dark-mode .verse-number.inline-flex {
    color: rgba(255, 255, 255, 0.85);
}

.dark-mode .verse-number.inline-flex::before {
    color: rgba(255, 255, 255, 0.4);
}


/* Hilangkan simbol ۝ di continuous translation */
.translation .verse-number::before {
  content: none !important;
}

/* Pastikan angka tetap terlihat jelas */
.translation .verse-number {
  font-family: 'Inter', sans-serif !important;
  color: #4b5563;
  position: relative;
}

.dark-mode .translation .verse-number {
  color: #e2e8f0;
}

/* Untuk mode khusus translation */
.verse-marker-translation {
  font-family: 'Inter', sans-serif;
  font-weight: bold;
  font-size: 0.8em;
  vertical-align: super;
  color: #4b5563;
  margin: 0 2px;
}

.dark-mode .verse-marker-translation {
  color: #cbd5e1;
}

    .search-box {
      background: rgba(255, 255, 255, 0.9);
      border: 2px solid transparent;
      transition: all 0.3s ease;
    }

    .search-box:focus {
      background: white;
      border-color: var(--primary-color);
      box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    }

    .mode-toggle {
      background: linear-gradient(135deg, var(--secondary-color), #10b981);
      transform: scale(1.2);
    }

    .dark-mode {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #e2e8f0;
  }

  .dark-mode .verse-container {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.9));
    color: #e2e8f0;
  }

  .dark-mode .arabic {
    color: #e2e8f0;
    background-color: rgba(15, 23, 42, 0.7);
  }

  .dark-mode .translation {
    color: #cbd5e1;
    background-color: rgba(15, 23, 42, 0.7);
  }

  .dark-mode .verse-number {
    color: #e2e8f0;
  }

  .dark-mode .control-card,
  .dark-mode .drawer {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
    color: #e2e8f0;
  }

  .dark-mode .drawer input,
  .dark-mode .drawer select {
    background: rgba(30, 41, 59, 0.7);
    color: #e2e8f0;
    border-color: #334155;
  }

  .dark-mode .drawer input::placeholder {
    color: #94a3b8;
  }

  .dark-mode .drawer label {
    color: #cbd5e1;
  }

  .dark-mode .drawer .text-gray-700 {
    color: #cbd5e1 !important;
  }

  .dark-mode .drawer .text-gray-800 {
    color: #e2e8f0 !important;
  }

  .dark-mode .drawer .text-gray-600 {
    color: #94a3b8 !important;
  }

    .progress-bar {
      background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
      height: 4px;
      border-radius: 2px;
      transition: width 0.3s ease;
    }

    /* Drawer Styles */
    .drawer {
      position: fixed;
      top: 0;
      left: -100%;
      width: 320px;
      height: 100vh;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
      backdrop-filter: blur(20px);
      border-right: 1px solid rgba(255, 255, 255, 0.3);
      box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
      transition: left 0.3s ease;
      z-index: 1000;
      overflow-y: auto;
    }

    .drawer.open {
      left: 0;
    }

    .drawer-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
      z-index: 999;
    }

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

    .hamburger {
      display: flex;
      flex-direction: column;
      cursor: pointer;
      padding: 8px;
      border-radius: 8px;
      transition: all 0.3s ease;
    }

    .hamburger:hover {
      background: rgba(255, 255, 255, 0.2);
    }

    .hamburger span {
      width: 25px;
      height: 3px;
      background: white;
      margin: 2px 0;
      transition: 0.3s;
      border-radius: 2px;
    }

    .hamburger.active span:nth-child(1) {
      transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
      opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
      transform: rotate(45deg) translate(-5px, -6px);
    }

    /* Stats Bar Container */
.stats-bar {
  background: linear-gradient(135deg, #e0f2fe 0%, #dcfce7 100%);
  border: 1px solid #dbeafe;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.dark-mode .stats-bar {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-color: #334155;
}

/* Stats Container */
.stats-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

/* Individual Stat Item */
.stat-item {
  text-align: center;
}

/* Stat Value Styles */
.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-surah {
  color: #2563eb;
}

.stat-verse {
  color: #16a34a;
}

.stat-juz {
  color: #9333ea;
}

/* Dark Mode Stat Values */
.dark-mode .stat-surah {
  color: #60a5fa;
}

.dark-mode .stat-verse {
  color: #4ade80;
}

.dark-mode .stat-juz {
  color: #a78bfa;
}

/* Stat Label */
.stat-label {
  font-size: 0.875rem;
  color: #4b5563;
}

.dark-mode .stat-label {
  color: #94a3b8;
}



    @media (max-width: 768px) {
      .arabic { font-size: 1.5rem; line-height: 2; }
      .translation { font-size: 0.9rem; }
      .drawer { width: 280px; }
    }

    @media (max-width: 480px) {
      .drawer { width: 100%; }
    }

/* Tambahkan selector yang lebih spesifik untuk mode kontinu */
.arabic .tajweed-rule {
  cursor: help;
  transition: all 0.2s ease;
  position: relative;
  display: inline-block;
}

/* Pastikan aturan hover berlaku di semua konteks */
.arabic .tajweed-rule:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.5), rgba(245, 158, 11, 0.5));
  transform: scale(1.02);
}

.arabic .tajweed-rule:hover::after {
  content: attr(data-title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  z-index: 10;
}

/* Dark mode adjustments */
.dark-mode .arabic .tajweed-rule:hover::after {
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Tambahkan !important untuk memastikan override */
.dark-mode .arabic .ghunnah { color: #ff8a8a !important; }
.dark-mode .arabic .hamzat_wasl { color: #8a8aff !important; }
.dark-mode .arabic .idghaam_ghunnah { color: #8aff8a !important; }
.dark-mode .arabic .idghaam_mutajanisayn { color: #ffd58a !important; }
.dark-mode .arabic .idghaam_mutaqaribayn { color: #d58aff !important; }
.dark-mode .arabic .idghaam_no_ghunnah { color: #8affd5 !important; }
.dark-mode .arabic .idghaam_shafawi { color: #ff8ad5 !important; }
.dark-mode .arabic .ikhfa { color: #d5ff8a !important; }
.dark-mode .arabic .ikhfa_shafawi { color: #8ad5ff !important; }
.dark-mode .arabic .iqlab { color: #ffd58a !important; }
.dark-mode .arabic .lam_shamsiyyah { color: #8affd5 !important; }
.dark-mode .arabic .madd_2 { color: #d58aff !important; }
.dark-mode .arabic .madd_246 { color: #ff8a8a !important; }
.dark-mode .arabic .madd_6 { color: #8a8aff !important; }
.dark-mode .arabic .madd_munfasil { color: #8aff8a !important; }
.dark-mode .arabic .madd_muttasil { color: #ff8a8a !important; }
.dark-mode .arabic .qalqalah { color: #8a8aff !important; }
.dark-mode .arabic .silent { color: #8aff8a !important; }


/* Audio Player */
#audio-player {
  transition: transform 0.3s ease;
  z-index: 1000;
}

#audio-player.hidden {
  transform: translateY(100%);
}

#audio-element {
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  outline: none;
}

.dark-mode #audio-element {
  background: rgba(255, 255, 255, 0.1);
}

/* Play button in stats bar */
#play-surah-button {
  display: block;
  margin: 1rem auto 0;
}