:root {
  --p: #5b32b4;
  --p-gradient: linear-gradient(135deg, #6c3ce9 0%, #462299 100%);
  --pd: #1f143d;
  --lav: #f0ebfd;
  --bg: #f8f6fc;
  --card: #ffffff;
  --text: #1d1829;
  --muted: #79718a;
  --border: #e8e2f3;
  --gold: #f59e0b;
  --shadow: 0 10px 30px -5px rgba(91, 50, 180, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
  overscroll-behavior-y: none;
}

body.dark {
  --bg: #0f0b18;
  --card: #191326;
  --text: #f5f2fa;
  --muted: #9b91ad;
  --border: #2c233c;
  --lav: #271d3d;
  --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
}

/* SPLASH SCREEN */
#splash {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--p-gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: opacity .4s ease, visibility .4s ease;
}
#splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-logo {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 28px;
  font-size: 50px;
  font-family: 'Amiri', serif;
  margin-bottom: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
#splash b { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
#splash span { opacity: 0.8; margin-top: 6px; font-size: 13px; }

/* APP SHELL */
.app-shell {
  max-width: 640px;
  margin: 0 auto;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
header .logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--p-gradient);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-family: 'Amiri', serif;
  margin-right: 12px;
  box-shadow: 0 4px 12px rgba(91,50,180,0.25);
}
.header-titles b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -0.3px; }
.header-titles small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; margin-top: 1px; }

.icon {
  margin-left: auto;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .15s ease;
}
.icon:active { transform: scale(0.92); }

/* SCREENS */
.screen { display: none; padding: 16px 16px 24px; }
.screen.active { display: block; animation: fadeIn .25s ease; }

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

/* HERO CARD */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 190px;
  padding: 22px;
  background: linear-gradient(135deg, #24144b 0%, #5b32b4 100%);
  border-radius: 24px;
  color: #fff;
  box-shadow: 0 16px 36px -10px rgba(91,50,180,0.35);
}
.hero-content { position: relative; z-index: 2; width: 75%; }
.hero-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 1.2px;
  font-weight: 800;
  color: #ffd166;
  margin-bottom: 6px;
}
.hero h1 { font-size: 22px; line-height: 1.25; margin: 0 0 6px; font-weight: 800; letter-spacing: -0.4px; }
.hero p { font-size: 12px; line-height: 1.5; color: rgba(255,255,255,0.8); margin: 0 0 14px; }
.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 12px;
  background: #ffd166;
  color: #2e1654;
  padding: 9px 15px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: transform .15s ease;
}
.btn-hero:active { transform: scale(0.95); }
.book-bg {
  position: absolute;
  right: -10px;
  bottom: -20px;
  font-size: 130px;
  opacity: 0.14;
  font-family: 'Amiri', serif;
  pointer-events: none;
}

/* SECTION TITLES */
.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 22px 2px 12px;
}
.section-title small { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.section-title h2 { margin: 2px 0 0; font-size: 19px; font-weight: 800; letter-spacing: -0.3px; }
.count-badge { background: var(--lav); color: var(--p); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }

/* GÜNÜN DUASI - TEK KART */
.single-prayer-card { margin-bottom: 16px; }
.today-single {
  background: linear-gradient(135deg, #1b1233 0%, #4c2899 100%);
  border-radius: 22px;
  padding: 20px;
  color: #fff;
  box-shadow: 0 12px 30px -8px rgba(76,40,153,0.3);
  border: 1px solid rgba(255,255,255,0.1);
}
.prayer-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffd166;
  background: rgba(255,209,102,0.15);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.today-single h3 { font-size: 18px; margin: 0 0 10px; font-weight: 800; }
.today-single .arabic-text {
  text-align: right;
  font-size: 21px;
  line-height: 1.8;
  margin: 12px 0;
  font-family: 'Amiri', serif;
  direction: rtl;
  color: #ffffff;
  padding: 10px 0;
  border-top: 1px dashed rgba(255,255,255,0.15);
  border-bottom: 1px dashed rgba(255,255,255,0.15);
}
.today-single .translation { font-size: 13px; line-height: 1.55; color: rgba(255,255,255,0.85); margin: 0 0 10px; }
.today-single .source { font-size: 11px; color: #ffd166; font-weight: 600; opacity: 0.9; }

/* ARAMA KUTUSU */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0 14px;
  border-radius: 16px;
  color: var(--muted);
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  width: 100%;
  padding: 13px 0;
}

/* SURE LİSTESİ VE DİNLE BOX BUTONU */
.surah-list { display: grid; gap: 10px; }
.surah-card {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.surah-card:active { transform: scale(0.99); }

.btn-listen-box {
  border: 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--p);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(91,50,180,0.25);
  transition: transform .12s ease, opacity .12s ease;
}
.btn-listen-box:active { transform: scale(0.94); }
.surah-card.playing .btn-listen-box { background: #059669; box-shadow: 0 4px 12px rgba(5,150,105,0.3); }
.surah-card.playing .btn-listen-box .btn-text::after { content: ' Çalıyor'; }

.surah-details { flex: 1; padding: 0 12px; min-width: 0; cursor: pointer; }
.surah-title-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.surah-title-row b { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arabic-name { font-family: 'Amiri', serif; font-size: 16px; color: var(--p); flex-shrink: 0; }
.surah-details small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.surah-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.btn-read-action {
  border: 1px solid var(--border);
  background: var(--lav);
  color: var(--p);
  font-weight: 700;
  font-size: 11px;
  padding: 7px 11px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: background .12s ease;
}
.btn-read-action:active { background: var(--p); color: #fff; }

.btn-fav {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 5px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.btn-fav.on svg { fill: #e45176; stroke: #e45176; }

/* SURE OKUMA EKRANI & REKLAM / KAPAK BANNERI */
.reader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.btn-back {
  border: 0;
  background: var(--lav);
  color: var(--p);
  padding: 7px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.reader-title { text-align: center; }
.reader-title h2 { margin: 0; font-size: 16px; font-weight: 800; }
.reader-title span { color: var(--muted); font-size: 12px; font-family: 'Amiri', serif; }

.btn-play-header {
  border: 0;
  background: var(--p);
  color: #fff;
  padding: 7px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

/* SURE ANLAMLI KAPAK GÖRSELİ */
.surah-cover-box {
  width: 100%;
  height: 150px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.surah-cover-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* SURE İÇİ REKLAM BANNERI */
.surah-detail-ad-banner {
  margin-bottom: 14px;
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
}
.ad-placeholder-banner {
  background: linear-gradient(135deg, #1f143d 0%, #371e70 100%);
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: 14px;
  padding: 12px 16px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ad-tag { font-size: 9px; font-weight: 900; background: #ffd166; color: #231244; padding: 3px 6px; border-radius: 6px; }
.ad-placeholder-banner small { font-size: 11px; opacity: 0.8; }

.reader-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab-btn {
  flex: 1;
  padding: 9px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  border-radius: 12px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s ease;
}
.tab-btn.active { background: var(--p); color: #fff; border-color: var(--p); }

.tab-pane { display: none; }
.tab-pane.active { display: block; }

.bismillah { text-align: center; font-size: 28px; font-family: 'Amiri', serif; margin: 12px 0 20px; color: var(--p); }
.arabic-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  font-size: 23px;
  line-height: 2.2;
  font-family: 'Amiri', serif;
  direction: rtl;
  text-align: justify;
  box-shadow: var(--shadow);
}
.turkish-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-line;
  color: var(--text);
  box-shadow: var(--shadow);
}
.empty-notice { text-align: center; color: var(--muted); padding: 40px 15px; font-size: 13px; }

/* BİLGİ & GİZLİLİK EKRANI */
.info-grid { display: grid; gap: 12px; }
.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.card-icon-title { display: flex; align-items: center; gap: 8px; color: var(--p); margin-bottom: 8px; }
.card-icon-title h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--text); }
.info-card p { margin: 0 0 8px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.info-card p:last-child { margin-bottom: 0; }

.highlight-card { border-color: rgba(91,50,180,0.3); background: linear-gradient(180deg, var(--card) 0%, var(--lav) 100%); }
.contact-links { display: grid; gap: 8px; margin-top: 10px; }
.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-size: 12px;
}
.contact-item .label { color: var(--muted); }
.contact-item b { color: var(--p); }

/* MİNİ SES OYNATICI BAR */
.mini-player {
  display: none;
  position: fixed;
  z-index: 100;
  left: 10px;
  right: 10px;
  bottom: calc(54px + env(safe-area-inset-bottom));
  max-width: 620px;
  margin: 0 auto;
  align-items: center;
  background: #1b1233;
  color: #fff;
  border-radius: 15px;
  padding: 6px 10px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
}
.mini-player.show { display: flex; }
.mini-player #closePlayer {
  position: absolute;
  right: -2px;
  top: -8px;
  border: 0;
  background: #fff;
  color: #111;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}
.disc {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--p);
  display: grid;
  place-items: center;
  margin-right: 10px;
  flex-shrink: 0;
}
.player-info { flex: 1; min-width: 0; }
.player-info b { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-info small { display: block; font-size: 10px; color: rgba(255,255,255,0.7); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mainPlay {
  border: 0;
  background: var(--p);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* KOMPAKT ALT NAVİGASYON BAR (5 SEKMELİ) */
nav {
  position: fixed;
  z-index: 90;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(52px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: color-mix(in srgb, var(--card) 96%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}
.nav-btn {
  flex: 1;
  max-width: 90px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 2px 0;
  cursor: pointer;
  transition: color .15s ease;
}
.nav-btn span { font-size: 9.5px; font-weight: 700; letter-spacing: -0.2px; white-space: nowrap; }
.nav-btn.active { color: var(--p); }

.page-head { padding: 8px 0 16px; text-align: center; }
.app-info-logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--p-gradient);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-family: 'Amiri', serif;
  margin: 0 auto 10px;
  box-shadow: 0 10px 25px rgba(91,50,180,0.3);
}
.page-head h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.4px; }
.page-head p { color: var(--muted); font-size: 12px; margin: 3px 0 0; }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; font-size: 13px; }

@media(min-width: 660px) {
  body { background: #e6e0f2; }
  .app-shell { background: var(--bg); min-height: 100vh; box-shadow: 0 0 50px rgba(44,23,75,0.12); }
  .mini-player { left: calc(50% - 310px); right: calc(50% - 310px); }
}
