/* Reset */
* { margin:0; padding:0; box-sizing:border-box; }
html, body, * { font-family:"Segoe UI", Roboto, Arial, sans-serif; line-height:1.6; }

/* Dark theme (space look) */
html.theme-dark {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  color: #fff;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
html.theme-dark::before, 
html.theme-dark::after {
  content: "";
  position: fixed;
  top:0; left:0;
  width:100%; height:100%;
  background: radial-gradient(2px 2px at 20% 30%, #fff, transparent),
              radial-gradient(1px 1px at 70% 80%, #fff, transparent),
              radial-gradient(1.5px 1.5px at 40% 60%, #fff, transparent),
              radial-gradient(2px 2px at 90% 20%, #fff, transparent);
  background-size: cover;
  animation: starsMove 120s linear infinite;
  opacity:0.3;
  pointer-events: none;
  z-index: 0;
}
@keyframes starsMove { 
  from { transform:translate(0,0);} 
  to { transform:translate(-200px,-200px);} 
}

/* Light theme (cream soft) */
html.theme-light { 
  background:#f5f2e8; 
  color:#222; 
  min-height:100vh; 
}

/* Container */
.container {
  max-width:900px;
  margin:auto;
  padding:20px;
  border-radius:12px;
  background:rgba(255,255,255,0.05);
  box-shadow:0 8px 28px rgba(0,0,0,0.5);
  position: relative; 
  z-index: 1;
}
html.theme-light .container {
  background:rgba(255,255,255,0.85);
  box-shadow:0 4px 12px rgba(0,0,0,0.2);
}

/* Navbar */
.navbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:rgba(0,0,0,0.6);
  color:#f0b94a;
  padding:10px 20px;
  border-radius:12px;
  position: relative;
  z-index: 1;
}
html.theme-light .navbar {
  background:rgba(240,240,240,0.9);
  color:#333;
}
.navbar .brand { font-weight:bold; }
.btn-toggle {
  background:none; border:none; cursor:pointer; font-size:18px; color:inherit;
}

/* Ayat */
.chapter {
  position: relative;
  z-index: 1;
}
.chapter p {
  line-height:1.7;
  margin:6px 0;
  text-align:justify;
  padding:10px 14px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.2);
  background:rgba(255,255,255,0.05);
  box-shadow:0 4px 10px rgba(0,0,0,0.3);
}
html.theme-light .chapter p {
  border:1px solid #ccc;
  background:#fffaf0;
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
}

/* FAQ / Senarai Kitab */
.faq-list {
  position: relative;
  z-index: 1;
}
.faq-list details {
  margin: 6px 0;
  padding: 8px;
  border: 1px solid #444;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
}
html.theme-light .faq-list details {
  background: #fff;
  border: 1px solid #ddd;
}
.faq-list summary {
  font-weight: bold;
  cursor: pointer;
}
.faq-list .chapters {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.faq-list .chap-link {
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  background: #333;
  color: #eee;
}
html.theme-light .faq-list .chap-link {
  background: #eee;
  color: #222;
}
.faq-list .chap-link.active {
  background: #f0b94a;
  color: #111;
  font-weight: bold;
}

/* Search Results */
.search-results {
  margin:20px 0;
  overflow-x:auto;
  position: relative;
  z-index: 1;
}
.search-results table {
  border-collapse:collapse; width:100%; font-size:15px; border-radius:8px; overflow:hidden;
}
html.theme-dark .search-results table { background:rgba(0,0,0,0.5); color:#eee; }
html.theme-light .search-results table { background:#fffaf0; color:#222; }
.search-results th, .search-results td { 
  padding:10px 12px; 
  border-bottom:1px solid rgba(255,255,255,0.2); 
  text-align:left; 
}
html.theme-light .search-results th, html.theme-light .search-results td { border-bottom:1px solid #ccc; }
.search-results th { 
  background:linear-gradient(90deg,#00c6ff,#0072ff); 
  color:#fff; 
  font-weight:bold; 
}
.search-results tr:hover td { background:rgba(240,185,74,0.15); }

/* Pagination & links */
.pagination {
  text-align:center; margin-top:10px; position: relative; z-index: 1;
}
.pagination a {
  display:inline-block; margin:4px; padding:6px 12px; border-radius:6px;
  background:#333; color:#eee; text-decoration:none;
}
html.theme-light .pagination a { background:#ddd; color:#222; }
.pagination a.active { background:#f0b94a; color:#111; font-weight:bold; }
/* 📘 Styling untuk Notes / Kamus */
.notes-section {
  margin-top: 20px;
}

.notes-section h3 {
  font-size: 1.6em;
  margin-bottom: 10px;
}

.notes-table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}
.notes-table th,
.notes-table td {
  border: 1px solid #666;
  padding: 8px 12px;
  text-align: left;
}
.notes-table th {
  background: #333;
  color: #fff;
  font-size: 1.3em;
}

/* =======================
   MODAL RESPONSIVE
   ======================= */
.modal {
  position: fixed; 
  top:0; left:0; right:0; bottom:0;
  background: rgba(0,0,0,0.6);
  display:none;
  align-items:center; 
  justify-content:center;
  z-index:1000;
  padding:10px;
}
.modal-content {
  width:80%; 
  max-height:80%;
  overflow-y:auto;
  border-radius:12px;
  padding:20px;
  position:relative;
  transition: all 0.3s ease;
}
html.theme-dark .modal-content {
  background: rgba(40, 40, 40, 0.95);
  border: 1px solid rgba(50, 150, 80, 0.25);
  color: #f0f0f0;
  box-shadow: 0 0 15px rgba(50, 150, 80, 0.4),
              0 0 30px rgba(50, 150, 80, 0.25),
              inset 0 0 6px rgba(50, 150, 80, 0.15);
  backdrop-filter: blur(2px);
}
html.theme-light .modal-content {
  background: rgba(245, 245, 245, 0.95);
  border: 1px solid rgba(0, 100, 0, 0.4);
  color: #111;
  box-shadow: 0 0 15px rgba(0, 100, 0, 0.6),
              0 0 30px rgba(0, 100, 0, 0.35),
              inset 0 0 6px rgba(0, 100, 0, 0.25);
}
.close {
  position:absolute;
  right:15px; top:10px;
  cursor:pointer; 
  font-size:24px; 
  font-weight:bold;
  color:inherit;
}
.close:hover { color:#f0b94a; }
.modal-nav { margin-top:15px; text-align:center; }
.modal-nav button { 
  margin:0 8px; 
  padding:6px 16px; 
  border-radius:6px; 
  border:none; 
  cursor:pointer; 
}
.modal-search { margin: 10px 0; }
.modal-search input {
  width:100%; 
  padding:8px 12px;
  border:1px solid #aaa; 
  border-radius:6px;
}

/* =======================
   HIGHLIGHT STYLE
   ======================= */
.highlight {
  background: yellow;
  font-weight:bold;
  color: inherit;
  padding: 2px 4px;
  border-radius: 3px;
}
html.theme-dark .highlight {
  background: chocolate;
  color: #fff;
}

/* Versi mobile */
@media (max-width: 600px) {
  .modal-content {
    width:95%;
    max-height:90%;
    padding:15px;
    font-size: 15px;
  }
  .modal-nav button {
    padding:5px 12px;
    font-size:14px;
  }
}

/* 🌙🌞 Gaya tambahan untuk .glow-links */
.glow-links {
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-size: 1em;
  color: #ccc;
  margin: 10px 0;
  padding: 10px;
  border-radius: 10px;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
html.theme-dark .glow-links {
  background: linear-gradient(145deg, rgba(0, 40, 20, 0.85), rgba(0, 60, 30, 0.85));
  box-shadow: inset 0 0 10px rgba(0, 255, 100, 0.1),
              0 0 15px rgba(0, 255, 120, 0.25);
  color: #bdfcd3;
}
html.theme-light .glow-links {
  background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
  box-shadow: inset 0 0 8px rgba(255,255,255,0.1),
              0 0 12px rgba(0,0,0,0.25);
  color: #fff;
}
.glow-links a {
  text-decoration: none;
  color: #00ffaa;
  font-weight: 600;
  transition: 0.3s ease;
  padding: 6px 12px;
  border-radius: 6px;
  margin: 0 5px;
}
.glow-links a:hover {
  color: #fff;
  text-shadow: 0 0 8px #00ffaa, 0 0 12px #00ffaa;
  background: rgba(0, 255, 170, 0.1);
}
html.theme-light .glow-links a {
  color: #fff;
}
html.theme-light .glow-links a:hover {
  background: rgba(255,255,255,0.08);
  color: #00ffaa;
  text-shadow: 0 0 8px #00ffaa, 0 0 12px #00ffaa;
}

/* 📖 Penambahbaikan gaya untuk form carian kitab/pasal */
.search-box,
#verseSearchForm {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin: 15px 0;
}
#bookSelect {
  font-size: 1rem;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #444;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-weight: 600;
}
html.theme-light #bookSelect {
  background: #fff;
  color: #222;
  border: 1px solid #aaa;
}

/* ⬇️ Tambah di sini */
#bookSelect option {
  background: #fff;
  color: #000;
}

html.theme-dark #bookSelect option {
  background: #1c1f24;
  color: #fff;
}


#chapInput {
  font-size: 1rem;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #444;
  background: rgba(255,255,255,0.1);
  color: #fff;
  width: 70px;
  font-weight: 600;
  text-align: center;
}
html.theme-light #chapInput {
  background: #fff;
  color: #222;
  border: 1px solid #aaa;
}
#verseSearchForm label {
  font-size: 1rem;
  font-weight: bold;
  color: #aef5c7;
}
html.theme-light #verseSearchForm label {
  color: #333;
}
#verseSearchForm button {
  font-size: 1rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  background: #00ffaa;
  color: #000;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}
#verseSearchForm button:hover {
  background: #00dd99;
  box-shadow: 0 0 10px rgba(0,255,150,0.3);
}
html.theme-dark #verseSearchForm button {
  background: linear-gradient(90deg, #00ffaa, #00cc88);
  color: #000;
  box-shadow: 0 0 10px rgba(0,255,100,0.4), 0 0 20px rgba(0,255,100,0.2);
}
html.theme-dark #verseSearchForm button:hover {
  background: linear-gradient(90deg, #00ffbb, #00ffaa);
  box-shadow: 0 0 15px rgba(0,255,150,0.5), 0 0 25px rgba(0,255,150,0.3);
}

/* 🌊✨ Tambahan efek biru laut lembut untuk keseluruhan kotak carian */
#verseSearchForm {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 15px;
  border-radius: 12px;
  background: rgba(0, 50, 80, 0.25);
  box-shadow: 0 0 15px rgba(0, 150, 255, 0.25), inset 0 0 10px rgba(0, 150, 255, 0.15);
  transition: all 0.3s ease-in-out;
}
html.theme-light #verseSearchForm {
  background: rgba(200, 240, 255, 0.8);
  box-shadow: 0 0 8px rgba(100, 180, 255, 0.25), inset 0 0 6px rgba(120, 200, 255, 0.15);
}
#verseSearchForm:hover {
  box-shadow: 0 0 18px rgba(0, 160, 255, 0.35), 0 0 30px rgba(0, 200, 255, 0.25);
}
#bookSelect:hover, 
#chapInput:hover, 
#verseSearchForm button:hover {
  outline: none;
  box-shadow: 0 0 8px rgba(0, 200, 255, 0.4);
}
#bookSelect:focus, 
#chapInput:focus, 
#verseSearchForm button:focus {
  border-color: rgba(0, 200, 255, 0.5);
  box-shadow: 0 0 10px rgba(0, 200, 255, 0.5);
}
