﻿/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #e2e8f0;
  background: radial-gradient(circle at top left, rgba(59,130,246,0.16), transparent 28%),
              linear-gradient(180deg, #020617 0%, #0b1220 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 25% 20%, rgba(56,189,248,0.14), transparent 22%),
                    radial-gradient(circle at 80% 12%, rgba(14,165,233,0.10), transparent 18%);
  pointer-events: none;
  z-index: -1;
  animation: ambientGlow 14s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 16% 12%, rgba(255,255,255,0.04), transparent 12%),
                    radial-gradient(circle at 86% 84%, rgba(99,102,241,0.03), transparent 14%),
                    radial-gradient(circle at 50% 88%, rgba(255,255,255,0.025), transparent 18%),
                    linear-gradient(90deg, transparent 32%, rgba(255,255,255,0.02) 32%, rgba(255,255,255,0.02) 68%, transparent 68%);
  pointer-events: none;
  opacity: 0.85;
  z-index: -1;
  animation: drift 32s linear infinite;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.topbar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 1px;
  background: linear-gradient(90deg, rgba(125,211,252,0.18), rgba(148,163,184,0.06));
}

.info-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.info-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148,163,184,0.10);
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.info-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(96,165,250,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 6px 18px rgba(0,0,0,0.08);
}

.info-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 10px;
}

.info-value {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #7dd3fc;
  opacity: 0.9;
  margin-bottom: 6px;
}

h1 {
  font-size: clamp(2rem, 2.5vw, 3rem);
  line-height: 1.05;
  max-width: 760px;
}

.subline {
  color: #94a3b8;
  font-size: 0.95rem;
  max-width: 720px;
  opacity: 0.93;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(260px, 1fr);
  gap: 24px;
}

.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148,163,184,0.10);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  backdrop-filter: blur(18px);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 50px rgba(0,0,0,0.18);
  border-color: rgba(96,165,250,0.18);
}

.side-card {
  box-shadow: 0 14px 38px rgba(0,0,0,0.14);
}

.hero-card {
  --status-border: rgba(148,163,184,0.12);
  --pill-rgb: 56,189,248;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 420px;
  padding: 36px;
  animation: softPulse 10s ease-in-out infinite;
  border: 1px solid var(--status-border);
  box-shadow: 0 30px 90px rgba(0,0,0,0.24);
}

.hero-card.status-fajr {
  --status-border: rgba(56,189,248,0.22);
  --pill-rgb: 56,189,248;
}

.hero-card.status-maghrib {
  --status-border: rgba(249,115,22,0.22);
  --pill-rgb: 249,115,22;
}

.hero-card.status-isha {
  --status-border: rgba(79,70,229,0.22);
  --pill-rgb: 79,70,229;
}

.hero-card.status-default {
  --status-border: rgba(148,163,184,0.12);
  --pill-rgb: 56,189,248;
}

.hero-header,
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.hero-header h2,
.card-header h2 {
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.hero-body {
  display: grid;
  gap: 14px;
}

.current-prayer-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.prayer-pill {
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #cbd5e1;
  font-size: 0.87rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.25s ease;
}

.prayer-pill.active {
  background: rgba(56,189,248,0.18);
  color: #f8fafc;
  box-shadow: 0 0 20px rgba(56,189,248,0.18);
  animation: highlightPulse 1.1s ease;
}

.hero-label {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.82rem;
  color: #94a3b8;
}

#nextPrayer {
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 6px;
}

#countdown {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.last-updated {
  color: #94a3b8;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--pill-rgb), 0.14);
  color: rgb(var(--pill-rgb));
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.progress-block {
  display: grid;
  gap: 12px;
}

.progress-meta {
  color: #94a3b8;
  font-size: 0.95rem;
}

.schedule-card {
  display: grid;
  gap: 18px;
  background: rgba(15,23,42,0.88);
  border: 1px solid rgba(148,163,184,0.10);
  box-shadow: 0 24px 60px rgba(15,23,42,0.28);
  border-radius: 28px;
  padding: 28px;
}

.schedule-header,
.schedule-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.schedule-header {
  color: #94a3b8;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.schedule-row {
  color: #e2e8f0;
  font-size: 0.96rem;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148,163,184,0.08);
  transition: background 0.9s ease, color 0.9s ease, border-color 0.9s ease, padding-left 0.9s ease;
}

.schedule-row.active {
  background: rgba(56,189,248,0.14);
  border-left: 3px solid rgba(56,189,248,0.85);
  padding-left: 14px;
  color: #f8fafc;
  animation: highlightPulse 1.1s ease;
}

.schedule-row:last-child {
  border-bottom: none;
}

.schedule-row.active {
  background: rgba(56,189,248,0.14);
  border-left: 3px solid rgba(56,189,248,0.85);
  padding-left: 14px;
  color: #f8fafc;
}

.page-shell {
  width: min(1180px, calc(100% - 48px));
  display: grid;
  gap: 28px;
  animation: ambientGlow 22s ease-in-out infinite;
}

.progress {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

#progressBar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #60a5fa);
  transition: width 1s linear, background 0.35s ease;
}

.side-card p {
  color: #cbd5e1;
  line-height: 1.8;
}

@media (max-width: 900px) {
  .dashboard {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .topbar {
    gap: 12px;
  }

  .info-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-card {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100%, calc(100% - 24px));
  }

  .card {
    padding: 20px;
  }

  .hero-card {
    min-height: auto;
  }

  .hero-body {
    gap: 10px;
  }

  #nextPrayer {
    font-size: 1.4rem;
  }

  #countdown {
    font-size: 1.8rem;
  }

  .current-prayer-list {
    gap: 8px;
  }

  .schedule-card {
    padding: 24px;
  }
}

@keyframes ambientGlow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.92;
  }

  50% {
    transform: scale(1.01);
    opacity: 1;
  }
}

@keyframes drift {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-16px, 10px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes softPulse {
  0%, 100% {
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  }

  50% {
    box-shadow: 0 22px 72px rgba(56,189,248,0.16);
  }
}

@keyframes highlightPulse {
  0% {
    box-shadow: 0 0 0 rgba(56,189,248,0);
  }

  50% {
    box-shadow: 0 0 24px rgba(56,189,248,0.12);
  }

  100% {
    box-shadow: 0 0 0 rgba(56,189,248,0);
  }
}
