/* =============================================
   MASJIDTIME BD — Main Stylesheet
   Theme: Islamic Elegant Dark Gold
   ============================================= */

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

/* ── CSS Variables ─────────────────────────── */
:root {
  --bg-primary:    #0a0e1a;
  --bg-secondary:  #111827;
  --bg-card:       #161d2e;
  --bg-card-hover: #1c2540;
  --gold:          #c9a84c;
  --gold-light:    #e8c97a;
  --gold-dark:     #8a6d2f;
  --teal:          #1a9b8a;
  --teal-light:    #22c5b0;
  --text-primary:  #f0ebe0;
  --text-secondary:#a09880;
  --text-muted:    #5a5445;
  --border:        rgba(201,168,76,0.2);
  --border-hover:  rgba(201,168,76,0.5);
  --shadow:        0 4px 24px rgba(0,0,0,0.5);
  --shadow-gold:   0 0 30px rgba(201,168,76,0.15);
  --radius:        12px;
  --radius-lg:     20px;
  --transition:    all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset & Base ──────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Hind Siliguri', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(201,168,76,0.03) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(26,155,138,0.03) 0%, transparent 60%);
}

a { color: var(--gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); }

img { max-width: 100%; display: block; }

/* ── Scrollbar ─────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

/* ── Header / Navbar ───────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(10,14,26,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}

.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
}

.navbar-brand .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

.navbar-nav {
  display: flex; align-items: center; gap: 8px;
  list-style: none;
}

.navbar-nav a {
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}
.navbar-nav a:hover, .navbar-nav a.active {
  color: var(--gold);
  background: rgba(201,168,76,0.1);
}

.nav-btn {
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0e1a !important;
  border-radius: 8px;
  font-weight: 600;
}
.nav-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(201,168,76,0.3); }

/* ── Hero / Bismillah Banner ───────────────── */
.hero-bismillah {
  text-align: center;
  padding: 40px 20px 20px;
  font-family: 'Amiri', serif;
  font-size: 2.2rem;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(201,168,76,0.3);
  line-height: 1.8;
}

/* ── Prayer Time Hero Card ─────────────────── */
.prayer-hero {
  max-width: 900px;
  margin: 0 auto 40px;
  padding: 0 20px;
}

.prayer-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-gold);
  position: relative;
  overflow: hidden;
}

.prayer-hero-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.05), transparent);
  pointer-events: none;
}

.prayer-hero-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap; gap: 16px;
}

.masjid-name-hero { font-size: 1.1rem; color: var(--gold); font-weight: 600; }
.date-hero { color: var(--text-secondary); font-size: 0.9rem; }

.current-time-display {
  font-family: 'Cinzel', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: 2px;
}
.current-time-display span { color: var(--gold); font-size: 1.5rem; }

.next-prayer-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(26,155,138,0.15);
  border: 1px solid rgba(26,155,138,0.3);
  color: var(--teal-light);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 12px;
}
.next-prayer-badge::before { content: '🕐'; }

/* ── Prayer Times Grid ─────────────────────── */
.prayer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 24px;
}

@media (max-width: 640px) {
  .prayer-grid { grid-template-columns: repeat(2, 1fr); }
  .prayer-grid .prayer-card:last-child { grid-column: 1 / -1; }
}

.prayer-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  transition: var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.prayer-card.active {
  border-color: var(--gold);
  background: rgba(201,168,76,0.08);
  box-shadow: 0 0 20px rgba(201,168,76,0.1);
}
.prayer-card.active::after {
  content: '▼';
  position: absolute; top: 4px; right: 8px;
  font-size: 8px; color: var(--gold);
}

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

.prayer-name-bn {
  font-size: 1rem; font-weight: 600;
  color: var(--text-primary); margin-bottom: 6px;
}
.prayer-name-en {
  font-size: 0.7rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 10px;
}
.adhan-time {
  font-size: 0.8rem; color: var(--text-secondary);
  margin-bottom: 2px;
}
.adhan-time span { color: var(--text-primary); font-weight: 600; }
.jamaat-time {
  font-size: 0.9rem; color: var(--gold); font-weight: 700;
}
.jamaat-label {
  font-size: 0.65rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* ── Jumma Special Card ────────────────────── */
.jumma-card {
  background: linear-gradient(135deg, rgba(201,168,76,0.1), rgba(26,155,138,0.05));
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
  display: flex; align-items: center; gap: 16px;
}
.jumma-icon { font-size: 2rem; }
.jumma-info h3 { color: var(--gold); font-size: 1rem; margin-bottom: 4px; }
.jumma-times { display: flex; gap: 12px; flex-wrap: wrap; }
.jumma-time-badge {
  background: rgba(201,168,76,0.15);
  border: 1px solid var(--border);
  color: var(--gold-light);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ── Section Titles ────────────────────────── */
.section-title {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 8px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 32px;
}
.section-divider {
  width: 60px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 12px auto 32px;
}

/* ── Masjid Cards ──────────────────────────── */
.masjid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.masjid-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.masjid-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}

.masjid-card-header {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 16px;
}
.masjid-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.2), rgba(201,168,76,0.05));
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.masjid-card-name { font-size: 1rem; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.masjid-card-addr { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.masjid-distance {
  margin-left: auto;
  background: rgba(26,155,138,0.1);
  border: 1px solid rgba(26,155,138,0.2);
  color: var(--teal-light);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.masjid-mini-times {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 16px;
}
.mini-time-item {
  text-align: center;
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 8px 4px;
}
.mini-time-name { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 4px; }
.mini-time-val { font-size: 0.85rem; color: var(--gold); font-weight: 700; }

.btn-view-masjid {
  display: block; width: 100%;
  text-align: center;
  padding: 10px;
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}
.btn-view-masjid:hover {
  background: rgba(201,168,76,0.2);
  color: var(--gold-light);
}

/* ── Location Search Bar ───────────────────── */
.location-search {
  max-width: 600px; margin: 0 auto 40px;
  padding: 0 20px;
}
.location-bar {
  display: flex; gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 6px 6px 20px;
  align-items: center;
  transition: var(--transition);
}
.location-bar:focus-within { border-color: var(--gold); box-shadow: 0 0 20px rgba(201,168,76,0.1); }
.location-bar input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary); font-family: 'Hind Siliguri', sans-serif;
  font-size: 0.95rem;
}
.location-bar input::placeholder { color: var(--text-muted); }
.btn-locate {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0e1a;
  border: none; border-radius: 50px;
  font-family: 'Hind Siliguri', sans-serif;
  font-size: 0.85rem; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.btn-locate:hover { transform: scale(1.02); box-shadow: 0 4px 12px rgba(201,168,76,0.3); }

/* ── Tracker Widget ────────────────────────── */
.tracker-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 500px;
  margin: 0 auto 40px;
}
.tracker-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.tracker-header h3 { font-size: 1rem; color: var(--gold); }
.tracker-date { font-size: 0.8rem; color: var(--text-muted); }

.tracker-prayers {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 8px; margin-bottom: 16px;
}
.tracker-prayer {
  text-align: center; cursor: pointer;
  padding: 12px 6px;
  background: var(--bg-secondary);
  border: 2px solid transparent;
  border-radius: 10px;
  transition: var(--transition);
  user-select: none;
}
.tracker-prayer.done {
  background: rgba(201,168,76,0.12);
  border-color: var(--gold);
}
.tracker-prayer .tp-icon { font-size: 1.3rem; margin-bottom: 4px; }
.tracker-prayer .tp-name { font-size: 0.7rem; color: var(--text-secondary); }
.tracker-prayer.done .tp-name { color: var(--gold); }

.tracker-progress {
  background: var(--bg-secondary);
  border-radius: 50px; height: 6px;
  overflow: hidden; margin-bottom: 8px;
}
.tracker-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 50px;
  transition: width 0.5s ease;
}
.tracker-count { font-size: 0.8rem; color: var(--text-muted); text-align: right; }

/* ── Forms ─────────────────────────────────── */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow);
}
.form-title {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem; color: var(--gold);
  text-align: center; margin-bottom: 6px;
}
.form-subtitle {
  text-align: center; color: var(--text-muted);
  font-size: 0.85rem; margin-bottom: 28px;
}

.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
}
.form-control {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text-primary);
  font-family: 'Hind Siliguri', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}
.form-control::placeholder { color: var(--text-muted); }

select.form-control { cursor: pointer; }
select.form-control option { background: var(--bg-secondary); }

.btn-primary {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0e1a;
  border: none; border-radius: 8px;
  font-family: 'Hind Siliguri', sans-serif;
  font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  letter-spacing: 0.5px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201,168,76,0.3); }

.form-footer {
  text-align: center; margin-top: 20px;
  font-size: 0.85rem; color: var(--text-muted);
}

/* ── Dashboard Layout ──────────────────────── */
.dashboard-layout {
  display: flex; min-height: 100vh;
}

.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  position: sticky; top: 0;
  height: 100vh; overflow-y: auto;
}

.sidebar-logo {
  font-family: 'Cinzel', serif;
  color: var(--gold); font-size: 1rem;
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.sidebar-section {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  margin-bottom: 4px;
}

.sidebar-nav { list-style: none; margin-bottom: 20px; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
}
.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  color: var(--gold);
  background: rgba(201,168,76,0.1);
}
.sidebar-nav li a .icon { font-size: 1rem; width: 20px; text-align: center; }

.dashboard-main {
  flex: 1; padding: 32px;
  overflow-x: hidden;
}

.dashboard-header {
  margin-bottom: 32px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.dashboard-title {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem; color: var(--text-primary);
}

/* ── Stat Cards ────────────────────────────── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.stat-card .stat-icon { font-size: 1.5rem; }
.stat-card .stat-num {
  font-family: 'Cinzel', serif;
  font-size: 2rem; font-weight: 700;
  color: var(--gold); line-height: 1;
}
.stat-card .stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* ── Tables ────────────────────────────────── */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.table-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.table-card-header h3 { font-size: 1rem; color: var(--gold); }

.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 14px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(201,168,76,0.05);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(201,168,76,0.03); }

/* ── Badges ────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-success { background: rgba(26,155,138,0.15); color: var(--teal-light); border: 1px solid rgba(26,155,138,0.2); }
.badge-warning { background: rgba(201,168,76,0.15); color: var(--gold-light); border: 1px solid rgba(201,168,76,0.2); }
.badge-danger  { background: rgba(220,50,50,0.15);  color: #f87171; border: 1px solid rgba(220,50,50,0.2); }

/* ── Alert Messages ────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.alert-success { background: rgba(26,155,138,0.1); border: 1px solid rgba(26,155,138,0.3); color: var(--teal-light); }
.alert-error   { background: rgba(220,50,50,0.1);  border: 1px solid rgba(220,50,50,0.3);  color: #f87171; }
.alert-info    { background: rgba(201,168,76,0.1);  border: 1px solid var(--border); color: var(--gold-light); }

/* ── Buttons ───────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: 'Hind Siliguri', sans-serif;
  font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  border: none; text-decoration: none;
}
.btn-gold    { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #0a0e1a; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger  { background: rgba(220,50,50,0.15); border: 1px solid rgba(220,50,50,0.3); color: #f87171; }
.btn-sm      { padding: 6px 12px; font-size: 0.78rem; }
.btn:hover   { transform: translateY(-1px); }

/* ── Loading Spinner ───────────────────────── */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ────────────────────────────────── */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 40px 24px 24px;
  margin-top: 80px;
  text-align: center;
}
footer .footer-brand {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem; color: var(--gold);
  margin-bottom: 8px;
}
footer p { font-size: 0.85rem; color: var(--text-muted); }

/* ── Utility ───────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-gold  { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }   .mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }  .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }.mb-4 { margin-bottom: 32px; }
.d-flex { display: flex; } .gap-2 { gap: 16px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ── Mobile Responsive ─────────────────────── */
@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .sidebar { display: none; }
  .dashboard-main { padding: 20px 16px; }
  .prayer-grid { grid-template-columns: repeat(3, 1fr); }
  .current-time-display { font-size: 2rem; }
  .hero-bismillah { font-size: 1.6rem; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ── Animations ────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp 0.5s ease forwards; }
.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }
.delay-5 { animation-delay: 0.5s; opacity: 0; }

/* ── Islamic decorative pattern ────────────── */
.pattern-divider {
  text-align: center;
  color: var(--gold-dark);
  font-size: 1.2rem;
  letter-spacing: 8px;
  margin: 40px 0;
  opacity: 0.5;
}
