@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Tajawal:wght@300;400;500;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #2d6a4f;
  --green-light: #40916c;
  --green-soft: #52b788;
  --green-pale: #d8f3dc;
  --green-bg: #e9f5ee;
  --gold: #b5821a;
  --gold-light: #e9c46a;
  --gold-pale: #fef9ec;
  --cream: #fafaf5;
  --text-dark: #1a2e1a;
  --text-mid: #3a5a3a;
  --text-light: #7a9e7a;
  --border: #c8e6c9;
  --shadow: 0 2px 12px rgba(45,106,79,0.1);
  --shadow-hover: 0 4px 20px rgba(45,106,79,0.18);
  --radius: 14px;
}

html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar { display: none; }
body { font-family: 'Tajawal', sans-serif; background: var(--cream); color: var(--text-dark); min-height: 100vh; line-height: 1.6; overflow-y: scroll; scrollbar-width: none; -ms-overflow-style: none; }
body::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }

.app { max-width: 780px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

/* HEADER */
.header { background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 100%); color: white; padding: 20px 24px 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 20px rgba(45,106,79,0.3); }
.header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.site-title { font-family: 'Amiri', serif; font-size: 1.7rem; font-weight: 700; letter-spacing: 0.5px; display: flex; align-items: center; gap: 10px; }
.time-badge { background: rgba(255,255,255,0.2); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.3); border-radius: 20px; padding: 4px 14px; font-size: 0.95rem; font-weight: 500; letter-spacing: 1px; }
.greeting { font-size: 0.9rem; color: rgba(255,255,255,0.85); margin-bottom: 16px; }

/* TABS */
.main-tabs { display: flex; gap: 4px; background: rgba(0,0,0,0.15); border-radius: 12px 12px 0 0; padding: 4px 4px 0; }
.tab-btn { flex: 1; background: transparent; color: rgba(255,255,255,0.75); border: none; padding: 10px 16px; border-radius: 9px 9px 0 0; font-family: 'Tajawal', sans-serif; font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: all 0.2s ease; }
.tab-btn:hover { background: rgba(255,255,255,0.12); color: white; }
.tab-btn.active { background: var(--cream); color: var(--green); font-weight: 700; box-shadow: 0 -2px 8px rgba(0,0,0,0.1); }

/* MAIN */
.main-content { flex: 1; padding: 24px 16px; background: var(--cream); }
.section-header { margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-header h2 { font-family: 'Amiri', serif; font-size: 1.5rem; color: var(--green); font-weight: 700; }
.section-subtitle { color: var(--text-light); font-size: 0.9rem; width: 100%; }

.back-btn { background: var(--green); border: none; color: white; border-radius: 50px; padding: 8px 18px; font-family: 'Tajawal', sans-serif; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 10px rgba(45,106,79,0.3); white-space: nowrap; flex-shrink: 0; }
.back-btn:hover { background: var(--green-light); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(45,106,79,0.45); }

/* HADITH */
.hadith-box { background: var(--gold-pale); border: 1px solid var(--gold-light); border-right: 4px solid var(--gold); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; display: flex; gap: 12px; align-items: flex-start; }
.hadith-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.hadith-box p { font-family: 'Amiri', serif; font-size: 1rem; line-height: 1.9; color: #5c4a00; }

/* AZKAR */
.azkar-list { display: flex; flex-direction: column; gap: 14px; }

.zikr-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); transition: all 0.3s ease; position: relative; overflow: hidden; animation: fadeIn 0.3s ease forwards; }
.zikr-card::before { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 4px; background: var(--green-soft); border-radius: 0 var(--radius) var(--radius) 0; }
.zikr-card.done { background: var(--green-pale); border-color: var(--green-soft); opacity: 0.85; }
.zikr-card.done::before { background: var(--green); }

.zikr-text { font-family: 'Amiri', serif; font-size: 1.15rem; line-height: 2.1; color: var(--text-dark); margin-bottom: 12px; white-space: pre-line; }
.zikr-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.source, .benefit { font-size: 0.8rem; padding: 3px 10px; border-radius: 20px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.source { background: #e8f4f8; color: #1565c0; border: 1px solid #b3d9ee; }
.benefit { background: var(--green-pale); color: var(--green); border: 1px solid var(--border); }

/* COUNTER */
.counter-area { display: flex; align-items: center; gap: 10px; }
.counter-btn { background: var(--green); color: white; border: none; border-radius: 25px; padding: 8px 22px; font-family: 'Tajawal', sans-serif; font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.2s ease; min-width: 110px; text-align: center; }
.counter-btn:hover:not(:disabled) { background: var(--green-light); transform: scale(1.04); box-shadow: 0 4px 12px rgba(45,106,79,0.35); }
.counter-btn:active:not(:disabled) { transform: scale(0.97); }
.counter-btn.counter-done { background: var(--green-soft); cursor: default; }
.reset-btn { background: transparent; border: 1px solid var(--border); color: var(--text-light); border-radius: 20px; padding: 6px 14px; font-family: 'Tajawal', sans-serif; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; }
.reset-btn:hover { border-color: var(--green-soft); color: var(--green); background: var(--green-pale); }

/* CATEGORIES */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.category-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; transition: all 0.25s ease; box-shadow: var(--shadow); text-align: center; position: relative; font-family: 'Tajawal', sans-serif; animation: fadeIn 0.3s ease forwards; }
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--green-soft); }
.category-card.current-time { border-color: var(--green); background: var(--green-pale); }
.cat-icon { font-size: 2.2rem; }
.cat-name { font-size: 1rem; font-weight: 700; color: var(--text-dark); }
.cat-count { font-size: 0.8rem; color: var(--text-light); }
.current-badge { background: var(--green); color: white; font-size: 0.72rem; padding: 3px 10px; border-radius: 12px; font-weight: 600; }

/* FOOTER */
.footer { background: var(--green); color: rgba(255,255,255,0.9); text-align: center; padding: 20px; font-family: 'Amiri', serif; font-size: 1.1rem; line-height: 1.8; }
.footer-sub { font-size: 0.85rem; color: rgba(255,255,255,0.65); font-family: 'Tajawal', sans-serif; margin-top: 4px; }

/* NAMES */
.names-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; padding: 4px 2px 80px; }
.name-card { background: linear-gradient(145deg, #fff 0%, #f9f5ef 100%); border: 1.5px solid #e8d9b5; border-radius: 14px; padding: 18px 14px 14px; text-align: center; position: relative; box-shadow: 0 2px 8px rgba(45,106,79,0.07); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.name-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(45,106,79,0.13); }
.name-number { position: absolute; top: 8px; left: 10px; font-family: 'Tajawal', sans-serif; font-size: 11px; color: #b5821a; opacity: 0.8; font-weight: 600; }
.name-text { font-family: 'Amiri', serif; font-size: 22px; font-weight: 700; color: #2d6a4f; line-height: 1.4; margin: 6px 0 10px; letter-spacing: 0.5px; }
.name-meaning { font-family: 'Tajawal', sans-serif; font-size: 12px; color: #555; line-height: 1.6; }

/* ANIMATIONS */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* RESPONSIVE */
@media (max-width: 480px) {
  .header { padding: 16px 16px 0; }
  .site-title { font-size: 1.35rem; }
  .main-content { padding: 16px 12px; }
  .zikr-text { font-size: 1.05rem; }
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .section-header { flex-direction: row; align-items: center; flex-wrap: wrap; }
}
