/* =============================================
   SALAH TIMES — GLOBAL ISLAMIC HUB
   styles.css
   ============================================= */

:root {
  --bg: #0b1a1a;
  --bg-alt: #0f2222;
  --surface: #152d2d;
  --surface-2: #1d3a3a;
  --border: rgba(255,255,255,0.07);
  --border-g: rgba(46,196,158,0.3);
  --text: #dff0ec;
  --text-muted: #7ab5ad;
  --text-dim: #4d8880;
  --green: #2ec49e;
  --green-glow: rgba(46,196,158,0.15);
  --gold: #f4c142;
  --gold-glow: rgba(244,193,66,0.15);
  --gold-dim: rgba(244,193,66,0.6);
  --red: #e05c5c;
  --radius: 14px;
  --radius-sm: 8px;
  --nav-h: 58px;
  --section-px: clamp(14px, 4vw, 28px);
  --trans: all 0.28s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--nav-h);
}

a { color: var(--green); text-decoration: none; }
a:hover { color: #50dbb8; }
button { cursor: pointer; font-family: inherit; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 3px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.islamic-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: var(--nav-h);
  background: rgba(11, 26, 26, 0.88);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--section-px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-back {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 1rem;
  flex-shrink: 0;
  transition: var(--trans);
}
.nav-back:hover { color: var(--green); border-color: var(--border-g); background: var(--green-glow); }

.nav-brand {
  display: flex; align-items: center; gap: 8px;
  flex: 1;
  justify-content: center;
}
.brand-symbol { font-size: 1.4rem; color: var(--gold); }
.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
}

.nav-actions { display: flex; gap: 8px; }
.nav-icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 1rem;
  transition: var(--trans);
}
.nav-icon-btn:hover { color: var(--green); border-color: var(--border-g); background: var(--green-glow); }

/* ============================================================
   SIDE DRAWER (Settings)
   ============================================================ */
.side-drawer {
  position: fixed;
  top: 0; right: -340px;
  width: 320px;
  max-width: 92vw;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 1000;
  transition: right 0.35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
}
.side-drawer.open { right: 0; }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-header h3 { font-size: 1rem; font-weight: 700; color: var(--text); }

.drawer-close {
  width: 32px; height: 32px;
  background: none; border: none;
  color: var(--text-muted); font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  transition: var(--trans);
}
.drawer-close:hover { background: rgba(255,255,255,0.08); color: var(--text); }

.drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.setting-group { margin-bottom: 20px; }
.setting-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.setting-select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 10px 12px;
  outline: none;
  transition: var(--trans);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%237ab5ad' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.setting-select:focus { border-color: var(--green); }
.setting-select-sm { width: auto; min-width: 120px; flex-shrink: 0; }

.apply-settings-btn {
  width: 100%;
  padding: 12px;
  background: var(--green);
  color: #0b1a1a;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 8px;
  transition: var(--trans);
}
.apply-settings-btn:hover { background: #3ddbb0; }

/* ============================================================
   OVERLAY BACKDROP
   ============================================================ */
.overlay-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 950;
  backdrop-filter: blur(2px);
  transition: opacity 0.3s ease;
}
.overlay-backdrop.hidden { display: none; }

/* ============================================================
   LOCATION MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 1001;
  padding: 16px;
}
.modal-overlay.hidden { display: none; }

.location-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.lm-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.lm-head h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); }

.lm-search-row {
  display: flex; gap: 10px;
  margin-bottom: 12px;
}
.city-input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 11px 14px;
  outline: none;
  transition: var(--trans);
}
.city-input:focus { border-color: var(--green); }
.city-input::placeholder { color: var(--text-dim); }

.city-search-btn {
  width: 44px; height: 44px;
  background: var(--green);
  border: none;
  border-radius: var(--radius-sm);
  color: #0b1a1a;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--trans);
}
.city-search-btn:hover { background: #3ddbb0; }

.city-results {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 8px;
}
.city-result-item {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--trans);
  border: 1px solid transparent;
}
.city-result-item:hover { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.city-result-item .city-name { font-weight: 600; color: var(--text); display: block; }
.city-result-item .city-country { font-size: 0.78rem; color: var(--text-dim); }

.lm-divider {
  text-align: center;
  position: relative;
  margin: 16px 0;
  color: var(--text-dim);
  font-size: 0.8rem;
}
.lm-divider::before, .lm-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border);
}
.lm-divider::before { left: 0; }
.lm-divider::after { right: 0; }

.gps-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border-g);
  border-radius: var(--radius-sm);
  color: var(--green);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  transition: var(--trans);
}
.gps-btn:hover { background: var(--green-glow); }

.lm-note {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 14px;
  text-align: center;
}

/* ============================================================
   MAIN / LAYOUT
   ============================================================ */
.app-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 0 80px;
}

.px-section { padding-left: var(--section-px); padding-right: var(--section-px); }

/* ============================================================
   HERO: CLOCK + COUNTDOWN
   ============================================================ */
.time-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px var(--section-px) 28px;
  background: linear-gradient(135deg, #0f2828 0%, #0b1a1a 100%);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.clock-block { flex: 1; min-width: 180px; }

.clock-digits {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 10px;
}

.date-line {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.hijri-line {
  font-size: 0.85rem;
  color: var(--gold-dim);
  font-style: italic;
}

/* Countdown Ring */
.countdown-block {
  position: relative;
  width: clamp(140px, 25vw, 180px);
  height: clamp(140px, 25vw, 180px);
  flex-shrink: 0;
}

.ring-svg {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 6;
}

.ring-arc {
  fill: none;
  stroke: var(--green);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 339.3;
  stroke-dashoffset: 339.3;
  transition: stroke-dashoffset 1s linear;
}

.ring-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
}

.ring-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.ring-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
}

.ring-at {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.ring-countdown {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   LOCATION BAR
   ============================================================ */
.location-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--section-px);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.loc-left {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.loc-pin { color: var(--green); font-size: 1rem; }

.change-loc-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 5px 12px;
  display: flex; align-items: center;
  gap: 4px;
  transition: var(--trans);
}
.change-loc-btn:hover { border-color: var(--border-g); color: var(--green); background: var(--green-glow); }

/* ============================================================
   PRAYER GRID
   ============================================================ */
.prayer-section { padding: 24px var(--section-px); }

.prayer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.prayer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  transition: var(--trans);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.prayer-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--card-color, transparent);
  opacity: 0.06;
  pointer-events: none;
}

.prayer-card:hover { border-color: var(--border-g); transform: translateY(-2px); }

.prayer-card.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(244,193,66,0.12) 0%, var(--surface) 70%);
  box-shadow: 0 0 24px rgba(244,193,66,0.15);
}

.prayer-card.next {
  border-color: var(--green);
  background: linear-gradient(135deg, rgba(46,196,158,0.10) 0%, var(--surface) 70%);
}

.prayer-card.past { opacity: 0.55; }

.prayer-icon {
  font-size: 1.3rem;
  margin-bottom: 8px;
  display: block;
}

.prayer-name {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  margin-bottom: 4px;
  display: block;
}

.prayer-name-ar {
  font-size: 0.95rem;
  color: var(--gold);
  margin-bottom: 8px;
  display: block;
  font-weight: 500;
}

.prayer-time {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  display: block;
}

.prayer-status {
  margin-top: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
}
.status-active { background: rgba(244,193,66,0.15); color: var(--gold); }
.status-next   { background: rgba(46,196,158,0.15); color: var(--green); }
.status-past   { background: rgba(255,255,255,0.05); color: var(--text-dim); }

/* Extra info row */
.extra-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.extra-info-item {
  flex: 1;
  min-width: 110px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.extra-info-item > i { font-size: 1.1rem; color: var(--green); flex-shrink: 0; }
.ei-label { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); margin-bottom: 2px; }
.ei-val { display: block; font-size: 0.9rem; font-weight: 700; color: var(--text); }

.prayer-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
}

.loading-spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(46,196,158,0.2);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

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

/* ============================================================
   CARD SECTION (shared)
   ============================================================ */
.card-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px var(--section-px);
  margin: 0 var(--section-px) 16px;
  transition: var(--trans);
}

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.collapsible-bar { cursor: pointer; }
.collapsible-bar:hover .section-heading { color: var(--green); }

.collapse-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--trans);
}
.collapse-btn:hover { border-color: var(--border-g); color: var(--green); }

/* ============================================================
   MAP
   ============================================================ */
.map-body { border-radius: var(--radius-sm); overflow: hidden; transition: max-height 0.4s ease; }
.map-body.collapsed { max-height: 0; overflow: hidden; }
#leafletMap { height: 280px; width: 100%; }
.leaflet-container { background: var(--surface-2) !important; }

/* ============================================================
   AZAN PLAYER
   ============================================================ */
.azan-btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.azan-play-btn {
  flex: 1;
  padding: 11px 18px;
  background: var(--green);
  border: none;
  border-radius: var(--radius-sm);
  color: #0b1a1a;
  font-weight: 700;
  font-size: 0.875rem;
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  transition: var(--trans);
}
.azan-play-btn:hover { background: #3ddbb0; transform: translateY(-1px); }

.azan-stop-btn {
  flex: 1;
  padding: 11px 18px;
  background: rgba(224,92,92,0.12);
  border: 1px solid rgba(224,92,92,0.3);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-weight: 700;
  font-size: 0.875rem;
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  transition: var(--trans);
}
.azan-stop-btn:hover { background: rgba(224,92,92,0.2); }

.vol-row {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.vol-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-2);
  outline: none;
  cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--green);
  cursor: pointer;
}

.azan-status-msg {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-dim);
  min-height: 18px;
}

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.notif-banner p { font-size: 0.875rem; color: var(--text-muted); }

.enable-notif-btn {
  padding: 11px 20px;
  background: linear-gradient(135deg, var(--green), #1e9e7e);
  border: none;
  border-radius: var(--radius-sm);
  color: #0b1a1a;
  font-weight: 700;
  font-size: 0.875rem;
  display: flex; align-items: center; gap: 6px;
  transition: var(--trans);
}
.enable-notif-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(46,196,158,0.3); }

.notif-active-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem;
  color: var(--green);
  margin-bottom: 14px;
}
.active-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 0 rgba(46,196,158,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(46,196,158,0); }
}

.notif-toggles { display: flex; flex-direction: column; gap: 6px; }

.notif-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  gap: 8px;
}

.toggle-wrap { position: relative; flex-shrink: 0; }
.toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  display: block;
  width: 36px; height: 20px;
  background: var(--surface-2);
  border-radius: 10px;
  border: 1px solid var(--border);
  position: relative;
  transition: var(--trans);
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: var(--trans);
}
.toggle-input:checked + .toggle-track { background: rgba(46,196,158,0.2); border-color: var(--green); }
.toggle-input:checked + .toggle-track::after { left: 18px; background: var(--green); }

/* ============================================================
   QURAN SECTION
   ============================================================ */
.quran-section { overflow: hidden; }

.quran-ar-heading {
  font-size: 1.4rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 2px;
  direction: rtl;
}

.reciter-chip {
  background: var(--gold-glow);
  border: 1px solid rgba(244,193,66,0.2);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-dim);
  white-space: nowrap;
}

/* Quran Player */
.quran-player-wrap {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}

.qp-surah-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.qp-num {
  min-width: 32px; height: 32px;
  background: var(--surface-2);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  padding: 0 6px;
}
.qp-names { flex: 1; }
.qp-en-name { display: block; font-weight: 700; font-size: 0.92rem; color: var(--text); }
.qp-detail { display: block; font-size: 0.73rem; color: var(--text-dim); }
.qp-ar-name { font-size: 1.1rem; color: var(--gold); direction: rtl; }

.qp-main-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
}
.qp-btn {
  width: 38px; height: 38px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--trans);
}
.qp-btn:hover { border-color: var(--border-g); color: var(--green); }

.qp-play-btn {
  width: 52px; height: 52px;
  background: var(--green);
  border: none;
  border-radius: 50%;
  color: #0b1a1a;
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--trans);
  box-shadow: 0 4px 16px rgba(46,196,158,0.3);
}
.qp-play-btn:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(46,196,158,0.45); }

.qp-progress-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.qp-time { font-size: 0.73rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.qp-seek {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-2);
  outline: none;
  cursor: pointer;
}
.qp-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--green);
}
.qp-seek::-webkit-slider-runnable-track { border-radius: 2px; }

.qp-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.repeat-toggle {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
}
.repeat-toggle input { accent-color: var(--green); }

/* Surah Controls */
.surah-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.surah-search-wrap {
  flex: 1;
  position: relative;
  min-width: 180px;
}
.search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.9rem;
}
.surah-search-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  padding: 10px 12px 10px 36px;
  outline: none;
  transition: var(--trans);
}
.surah-search-input:focus { border-color: var(--green); }
.surah-search-input::placeholder { color: var(--text-dim); }

/* Surah List */
.surah-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.surah-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--trans);
}
.surah-item:hover { border-color: var(--border-g); background: var(--surface-2); transform: translateY(-1px); }
.surah-item.playing { border-color: var(--green); background: var(--green-glow); }

.surah-num {
  min-width: 28px; height: 28px;
  background: var(--surface-2);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}
.surah-item.playing .surah-num { background: var(--green); color: #0b1a1a; }

.surah-info { flex: 1; min-width: 0; }
.surah-en { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.surah-trans { display: block; font-size: 0.7rem; color: var(--text-dim); }

.surah-ar { font-size: 0.95rem; color: var(--gold); direction: rtl; flex-shrink: 0; }

.surah-type-badge {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  flex-shrink: 0;
}
.badge-meccan { background: rgba(244,193,66,0.12); color: var(--gold-dim); }
.badge-medinan { background: rgba(46,196,158,0.12); color: var(--green); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.islamic-back-top {
  position: fixed;
  right: 20px; bottom: 24px;
  width: 40px; height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  transition: var(--trans);
}
.islamic-back-top:hover { border-color: var(--border-g); color: var(--green); }
.islamic-back-top.hidden { opacity: 0; pointer-events: none; transform: translateY(10px); }

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden { display: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .time-hero { flex-direction: column; align-items: flex-start; }
  .countdown-block { width: 150px; height: 150px; align-self: center; }
  .prayer-grid { grid-template-columns: repeat(3, 1fr); }
  .surah-list { grid-template-columns: 1fr; max-height: 340px; }
  .card-section { margin-left: 12px; margin-right: 12px; }
  .location-bar { padding: 10px 14px; }
  .prayer-section { padding: 18px 14px; }
  .row.g-4.px-section { padding-left: 12px; padding-right: 12px; }
}

@media (max-width: 400px) {
  .prayer-grid { grid-template-columns: repeat(2, 1fr); }
  .clock-digits { font-size: 2rem; }
}
