/* ===== CSS VARIABLES ===== */
:root {
  --primary: #1a6b3c;
  --primary-light: #2d9e5f;
  --primary-dark: #0f4526;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --gold-dark: #a07830;
  --bg: #f8f6f0;
  --bg-card: #ffffff;
  --bg-secondary: #f0ede4;
  --text: #1a1a1a;
  --text-secondary: #5a5a5a;
  --text-muted: #9a9a9a;
  --border: #e0dbd0;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-secondary: #1c2128;
  --text: #e6edf3;
  --text-secondary: #b1bac4;
  --text-muted: #6e7681;
  --border: #30363d;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.6);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
  overflow-x: hidden;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* ===== DECORATIVE PATTERN ===== */
body::before {
  content: '';
  position: fixed;
  top: 0; right: 0;
  width: 400px; height: 400px;
  background: radial-gradient(ellipse, rgba(201,168,76,0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  right: 0; top: 0;
  width: 260px; height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition), background var(--transition);
  box-shadow: -4px 0 30px rgba(0,0,0,0.06);
  overflow-y: auto;
}

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}

.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(26,107,60,0.3);
}

.logo-text {
  font-family: 'Amiri', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
}

.logo-tagline {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* NAV */
.nav-list {
  list-style: none;
  padding: 16px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
  text-align: right;
}

.nav-item button:hover {
  background: var(--bg-secondary);
  color: var(--primary);
}

.nav-item.active button {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 14px rgba(26,107,60,0.35);
}

.nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

/* THEME TOGGLE */
.theme-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.toggle-switch {
  width: 44px; height: 24px;
  background: var(--border);
  border-radius: 12px;
  position: relative;
  transition: background var(--transition);
  cursor: pointer;
}

.toggle-switch.active { background: var(--primary); }

.toggle-knob {
  position: absolute;
  top: 3px; right: 3px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch.active .toggle-knob { transform: translateX(-20px); }

/* ===== MAIN CONTENT ===== */
.main {
  margin-right: 260px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.page { display: none; animation: fadeIn 0.4s ease; }
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  padding: 32px 40px 0;
  margin-bottom: 32px;
}

.page-title {
  font-family: 'Amiri', serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.page-content { padding: 0 40px 40px; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

/* ===== GRID ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ===== MOBILE MENU ===== */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: var(--shadow);
}

.mobile-logo {
  font-family: 'Amiri', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

.overlay.active { display: block; }

/* ===== HOME PAGE ===== */
.home-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  border-radius: var(--radius);
  padding: 48px 40px;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 32px;
}

.home-hero::before {
  content: '☽';
  position: absolute;
  font-size: 160px;
  opacity: 0.05;
  top: -20px; left: -20px;
  line-height: 1;
}

.home-hero::after {
  content: '✦';
  position: absolute;
  font-size: 120px;
  opacity: 0.04;
  bottom: -20px; right: 20px;
  line-height: 1;
}

.home-hero .bismillah {
  font-family: 'Amiri', serif;
  font-size: 32px;
  margin-bottom: 12px;
  color: var(--gold-light);
}

.home-hero h1 {
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 8px;
}

.home-hero p {
  font-size: 16px;
  opacity: 0.85;
  max-width: 400px;
  margin: 0 auto;
}

.home-time {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: 2px;
  margin: 16px 0 4px;
}

.home-date {
  font-size: 14px;
  opacity: 0.75;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.quick-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.quick-card .icon {
  font-size: 32px;
  margin-bottom: 10px;
  display: block;
}

.quick-card .title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.ayah-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ayah-card::before {
  content: '"';
  font-size: 200px;
  color: var(--gold);
  opacity: 0.05;
  position: absolute;
  top: -40px; right: 20px;
  font-family: 'Amiri', serif;
  line-height: 1;
}

.ayah-text {
  font-family: 'Amiri', serif;
  font-size: 28px;
  line-height: 2;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

[data-theme="dark"] .ayah-text { color: var(--gold-light); }

.ayah-ref {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ===== QURAN PAGE ===== */
.surah-search {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.search-input {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-size: 14px;
  font-family: 'Cairo', sans-serif;
  transition: all var(--transition);
  outline: none;
}

.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,107,60,0.1); }

.surah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 4px;
}

.surah-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
}

.surah-item:hover {
  border-color: var(--primary);
  background: var(--bg-secondary);
  transform: translateX(-3px);
}

.surah-num {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.surah-info .name-ar {
  font-family: 'Amiri', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.surah-info .name-en {
  font-size: 11px;
  color: var(--text-muted);
}

/* QURAN READER */
.quran-reader {
  display: none;
}

.quran-reader.active { display: block; }

.reader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.reader-title {
  font-family: 'Amiri', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.reader-nav {
  display: flex;
  gap: 8px;
}

.btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(26,107,60,0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26,107,60,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover { background: var(--primary); color: white; }

.btn-ghost {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover { background: var(--border); }

.verses-container {
  max-height: 600px;
  overflow-y: auto;
  padding-right: 4px;
}

.verse {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.verse:last-child { border-bottom: none; }

.verse-text {
  font-family: 'Amiri', serif;
  font-size: 26px;
  line-height: 2.2;
  color: var(--text);
  text-align: right;
  direction: rtl;
  margin-bottom: 8px;
}

.verse-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: var(--gold);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ===== AZKAR PAGE ===== */
.azkar-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding: 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.azkar-tab {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
}

.azkar-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 2px 8px rgba(26,107,60,0.3);
}

.azkar-list { display: flex; flex-direction: column; gap: 16px; }

.zikr-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.zikr-card.done {
  border-color: var(--gold);
  background: linear-gradient(135deg, var(--bg-card), rgba(201,168,76,0.05));
}

.zikr-text {
  font-family: 'Amiri', serif;
  font-size: 24px;
  line-height: 2;
  color: var(--text);
  margin-bottom: 8px;
  text-align: right;
}

.zikr-meaning {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

.zikr-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zikr-counter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.counter-btn {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  box-shadow: 0 4px 12px rgba(26,107,60,0.3);
}

.counter-btn:hover { transform: scale(1.1); box-shadow: 0 6px 18px rgba(26,107,60,0.4); }
.counter-btn:active { transform: scale(0.95); }

.counter-display {
  font-size: 26px;
  font-weight: 900;
  color: var(--primary);
  min-width: 50px;
  text-align: center;
}

.done-badge {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--gold);
  color: white;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

.zikr-card.done .done-badge { display: flex; }
.zikr-card.done .zikr-counter { display: none; }

.reset-btn {
  padding: 6px 14px;
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition);
}

.reset-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ===== TASBIH PAGE ===== */
.tasbih-container {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

.tasbih-count {
  font-size: 96px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin: 20px 0;
  transition: all 0.1s;
}

.tasbih-label {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.tasbih-btn {
  width: 180px; height: 180px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
  color: white;
  border-radius: 50%;
  font-size: 56px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 32px;
  box-shadow: 0 8px 40px rgba(26,107,60,0.4), inset 0 2px 4px rgba(255,255,255,0.15);
  transition: all 0.15s;
  cursor: pointer;
  user-select: none;
}

.tasbih-btn:active {
  transform: scale(0.92);
  box-shadow: 0 4px 20px rgba(26,107,60,0.3);
}

.tasbih-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.tasbih-progress {
  margin: 20px auto;
  width: 200px; height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.tasbih-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 3px;
  transition: width 0.3s;
}

.tasbih-milestones {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.milestone {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
}

.milestone.reached {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,168,76,0.1);
}

/* ===== CUSTOM AZKAR PAGE ===== */
.add-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.form-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.form-input {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 14px;
  font-family: 'Cairo', sans-serif;
  outline: none;
  transition: all var(--transition);
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,107,60,0.1); background: var(--bg-card); }
textarea.form-input { min-height: 80px; resize: vertical; line-height: 1.7; }

.form-footer { display: flex; justify-content: flex-end; gap: 10px; }

/* ===== PRAYER TIMES ===== */
.prayer-times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.prayer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.prayer-card.next {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 6px 24px rgba(26,107,60,0.35);
}

.prayer-card.next::before {
  content: 'التالية';
  position: absolute;
  top: 8px; left: 8px;
  background: var(--gold);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.prayer-icon { font-size: 28px; margin-bottom: 8px; }
.prayer-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.prayer-time { font-size: 22px; font-weight: 900; color: var(--primary); }
.prayer-card.next .prayer-time { color: white; }

.location-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== ASMA PAGE ===== */
.asma-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.asma-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.asma-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(201,168,76,0.2);
}

.asma-num {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.asma-ar {
  font-family: 'Amiri', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.asma-meaning {
  font-size: 12px;
  color: var(--text-muted);
}

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 500;
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalIn 0.3s ease;
  text-align: center;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  float: left;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
}

.modal-close:hover { color: var(--text); }

.modal-asma-ar {
  font-family: 'Amiri', serif;
  font-size: 52px;
  color: var(--primary);
  margin: 16px 0 8px;
}

.modal-asma-meaning {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 16px;
}

.modal-asma-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.9;
}

/* ===== VIDEOS PAGE ===== */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
  overflow: hidden;
}

.video-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.video-card:hover .video-thumb img { transform: scale(1.05); }

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity var(--transition);
}

.video-card:hover .play-overlay { opacity: 1; }

.play-btn {
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.video-info { padding: 16px; }
.video-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.5; }
.video-channel { font-size: 12px; color: var(--text-muted); }

/* VIDEO MODAL */
.video-modal-content { padding: 0; overflow: hidden; }
.video-modal-content .modal { padding: 0; max-width: 720px; }
.video-embed { aspect-ratio: 16/9; }
.video-embed iframe { width: 100%; height: 100%; border: none; }
.video-modal-info { padding: 20px 24px; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 30px rgba(26,107,60,0.4);
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== LOADING ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--text-muted);
  flex-direction: column;
  gap: 16px;
}

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== CLICK EFFECT ===== */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .sidebar { transform: translateX(260px); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-right: 0; }
  .mobile-header { display: flex; }
  .page-header, .page-content { padding-right: 20px; padding-left: 20px; }
  .page-header { padding-top: 80px; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .prayer-times-grid { grid-template-columns: repeat(2, 1fr); }
  .asma-grid { grid-template-columns: repeat(2, 1fr); }
  .home-time { font-size: 38px; }
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 56px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; color: var(--text-secondary); margin-bottom: 8px; }

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.badge-gold { background: rgba(201,168,76,0.15); color: var(--gold-dark); }
.badge-green { background: rgba(26,107,60,0.12); color: var(--primary); }