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

body {
  background: #F5F2EC;
  color: #1C1C1C;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  width: 1080px;
  height: 1920px;
  overflow: hidden;
  user-select: none;
}

#app {
  display: flex;
  flex-direction: column;
  width: 1080px;
  height: 1920px;
  overflow: hidden;
}

/* ── HEADER ── */
#header {
  flex-shrink: 0;
  text-align: center;
  padding: 48px 40px 44px;
  background: #1C1C1C;
  color: #F5F2EC;
  position: relative;
}
#header-accent-line {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: #C8A84E;
}
#mosque-name {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0.22em;
}
#mosque-address {
  font-size: 1.1rem;
  font-weight: 300;
  color: #8A8A8A;
  letter-spacing: 0.12em;
  margin-top: 10px;
}

/* ── MAIN ── */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 48px 80px;
  width: 100%;
  overflow: hidden;
}

/* BISMILLAH */
#bismillah {
  font-family: 'Amiri', 'Traditional Arabic', 'Times New Roman', serif;
  font-size: 2.4rem;
  color: #999;
  text-align: center;
}

/* CLOCK */
#clock-block { text-align: center; }
#clock {
  font-size: 9rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
#date-gregorian {
  font-size: 1.5rem;
  font-weight: 300;
  color: #666;
  margin-top: 16px;
  letter-spacing: 0.04em;
}
#date-hijri {
  font-family: 'Amiri', serif;
  font-size: 1.4rem;
  color: #AAA;
  margin-top: 8px;
}

/* DIVIDER */
.divider {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  margin: 4px 0;
}
.divider svg { width: 20px; height: 20px; flex-shrink: 0; }
.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #D0CCC4, transparent);
}

/* NEXT PANEL */
#next-panel {
  width: 100%;
  border-radius: 24px;
  padding: 40px 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1C1C1C;
  color: #F5F2EC;
  box-shadow: 0 12px 48px rgba(0,0,0,0.14);
}
#next-label {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: #C8A84E;
}
#next-name {
  font-size: 5rem;
  font-weight: 900;
  margin-top: 6px;
  line-height: 1.05;
}
#next-arabic {
  font-family: 'Amiri', serif;
  font-size: 2rem;
  color: #BBB;
  margin-top: 4px;
}
#next-jamaah-row {
  font-size: 1.3rem;
  font-weight: 300;
  color: #999;
  margin-top: 18px;
}
#next-jamaah-time {
  font-weight: 700;
  font-size: 1.5rem;
  color: #C8A84E;
}
#next-right { text-align: right; padding-left: 24px; }
#countdown-label {
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #666;
  margin-bottom: 12px;
}
#countdown {
  font-size: 4.2rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #C8A84E;
  letter-spacing: -0.01em;
}

/* SUN ROW */
#sun-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
}
.sun-item { text-align: center; flex: 1; }
.sun-label {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #AAA;
}
.sun-ar {
  font-family: 'Amiri', serif;
  font-size: 0.9rem;
  color: #CCC;
  margin-top: 2px;
}
.sun-time {
  font-size: 1.7rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}
.t-suffix { font-size: 0.9rem; font-weight: 300; color: #999; }

/* TILES */
#tiles-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.tile {
  border-radius: 18px;
  text-align: center;
  padding: 28px 16px;
  background: #FFFFFF;
  color: #1C1C1C;
  border: 1px solid #E5E1DA;
  transition: all 0.5s ease;
}
.tile.is-next {
  background: #1C1C1C;
  color: #F5F2EC;
  border: 2px solid #C8A84E;
  box-shadow: 0 6px 28px rgba(200,168,78,0.18);
}
.tile.is-passed { opacity: 0.4; }
.tile.is-friday-jumuah {
  background: #1C1C1C;
  color: #F5F2EC;
  border: 2px solid #C8A84E;
  box-shadow: 0 6px 28px rgba(200,168,78,0.18);
}
.tile.not-friday { opacity: 0.5; }

.tile-name {
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.tile.is-next .tile-name,
.tile.is-friday-jumuah .tile-name { color: #C8A84E; }

/* Dual Jumu'ah Layout Styles */
.jumuah-split-container {
  display: flex;
  margin-top: 12px;
  gap: 12px;
}

.jumuah-service {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Border on the second service serves as a centered separating line */
.jumuah-split-container .jumuah-service + .jumuah-service {
  border-left: 1px solid #777; /* Subtle matching tone line */
  padding-left: 12px;
}

.jumuah-service-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #C8A84E; /* Accent color text */
  margin-bottom: 4px;
}

.tile-arabic {
  font-family: 'Amiri', serif;
  font-size: 1.1rem;
  color: #AAA;
  margin-top: 2px;
}
.tile.is-next .tile-arabic,
.tile.is-friday-jumuah .tile-arabic { color: #BBB; }

.tile-time-block { margin-top: 14px; }
.tile-row-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #BBB;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tile.is-next .tile-row-label,
.tile.is-friday-jumuah .tile-row-label { color: #777; }

.tile-adhan {
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.tile-iqamah {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.tile.is-next .tile-iqamah,
.tile.is-friday-jumuah .tile-iqamah { color: #C8A84E; }

.t-suffix { font-size: 0.85rem; font-weight: 300; color: #BBB; }
.tile.is-next .t-suffix,
.tile.is-friday-jumuah .t-suffix { color: #888; }

/* Keeps long prayer names scaled neatly onto a single line */
#next-name.long-name {
  font-size: 3.2rem;
}

/* ── FOOTER ── */
#footer {
  flex-shrink: 0;
  text-align: center;
  padding: 22px 40px;
  background: #1C1C1C;
  color: #777;
  position: relative;
}
#footer-accent-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: #C8A84E;
}
#footer-msg {
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: 0.08em;
}