:root {
  --ramadan-green: #0f3d2e;
  --ramadan-dark: #0b261d;
  --ramadan-gold: #d7b06a;
  --ramadan-cream: #f6efe4;
  --ramadan-rose: #9c6b55;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Source Sans 3", sans-serif;
  background: #f4efe4;
  color: #3d2b1f;
  min-height: 100vh;
}

.toast-bar {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(61, 43, 31, 0.9);
  color: #fff7e6;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.toast-bar.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-bar.success {
  background: rgba(31, 79, 138, 0.9);
}

.toast-bar.error {
  background: rgba(176, 59, 46, 0.9);
}

.hero-bg {
  position: fixed;
  inset: 0;
  background: transparent;
  pointer-events: none;
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
}

.display-title {
  font-family: "Cinzel", serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 0;
  color: #2f1f14;
}

.kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(61, 43, 31, 0.7);
}

.muted {
  color: rgba(61, 43, 31, 0.75);
}

.panel {
  background: #fffaf1;
  border: 1px solid rgba(61, 43, 31, 0.1);
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(61, 43, 31, 0.12);
}

.btn-gold {
  background: var(--ramadan-gold);
  color: #2b1b0e;
  border: none;
}

.btn-gold:hover {
  background: #e5c07b;
  color: #2b1b0e;
}

.btn-gold.btn-azan-on {
  background: #8f6a2b;
  color: #fff6e6;
}

.btn-gold.btn-azan-on:hover {
  background: #7f5d26;
  color: #fff6e6;
}

.text-bg-light-soft {
  background: rgba(215, 176, 106, 0.2);
  color: #3d2b1f;
  border: 1px solid rgba(215, 176, 106, 0.4);
}

.times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.time-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(61, 43, 31, 0.04);
  border: 1px solid rgba(61, 43, 31, 0.08);
}

.time-item .label {
  font-size: 0.8rem;
  color: rgba(61, 43, 31, 0.7);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sun-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  background: rgba(61, 43, 31, 0.55);
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"black\"><path d=\"M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.8 1.42-1.42zM1 13h3v-2H1v2zm10-9h2V1h-2v3zm8.66 1.46-1.41-1.41-1.8 1.79 1.42 1.42 1.79-1.8zM17.24 19.16l1.8 1.79 1.41-1.41-1.79-1.8-1.42 1.42zM20 13h3v-2h-3v2zM11 23h2v-3h-2v3zm-7.66-2.46 1.41 1.41 1.8-1.79-1.42-1.42-1.79 1.8zM12 6a6 6 0 1 0 0 12 6 6 0 0 0 0-12z\"/></svg>');
  mask-size: cover;
  mask-repeat: no-repeat;
  mask-position: center;
}

.sunset-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  background: rgba(61, 43, 31, 0.55);
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"black\"><path d=\"M3 18h18v2H3v-2zm9-12a7 7 0 0 0-7 7h2a5 5 0 0 1 10 0h2a7 7 0 0 0-7-7zm-7.78 3.22-1.42-1.42-1.41 1.41 1.42 1.42 1.41-1.41zM1 13h3v2H1v-2zm19 0h3v2h-3v-2zm-1.64-4.19 1.42-1.42 1.41 1.41-1.42 1.42-1.41-1.41z\"/></svg>');
  mask-size: cover;
  mask-repeat: no-repeat;
  mask-position: center;
}

.time-item .value {
  font-family: "Cinzel", serif;
  font-size: 1.25rem;
  margin-top: 4px;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(215, 176, 106, 0.6), transparent);
  margin: 24px 0 20px;
}

.fasting-length {
  font-size: 0.95rem;
  color: rgba(61, 43, 31, 0.8);
  margin-bottom: 18px;
  font-weight: 600;
}

.next-event {
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
}

.countdown {
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(215, 176, 106, 0.18);
  border: 1px solid rgba(215, 176, 106, 0.45);
  min-width: 200px;
}

.countdown-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(61, 43, 31, 0.7);
}

.countdown-value {
  font-family: "Cinzel", serif;
  font-size: 1.6rem;
  margin-top: 2px;
}

.times-table {
  color: #3d2b1f;
  background: #efe6d8;
  border-radius: 12px;
  overflow: hidden;
}

.times-table th,
.times-table td {
  background: #efe6d8;
}

.times-table .today-row td {
  background: #e2d4bd;
  font-weight: 600;
}

.times-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(61, 43, 31, 0.7);
  border-bottom: 1px solid rgba(61, 43, 31, 0.15);
  white-space: nowrap;
}

.times-table td {
  border-color: rgba(61, 43, 31, 0.08);
  white-space: nowrap;
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(61, 43, 31, 0.06);
  border: 1px solid rgba(61, 43, 31, 0.12);
  font-size: 0.8rem;
}

.toggle-group {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(61, 43, 31, 0.2);
  overflow: hidden;
  background: #f4efe4;
}

.toggle-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  font-size: 0.8rem;
  color: rgba(61, 43, 31, 0.8);
  cursor: pointer;
}

.toggle-btn.active {
  background: #d7b06a;
  color: #2b1b0e;
}

.loading-pill {
  display: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(215, 176, 106, 0.2);
  border: 1px solid rgba(215, 176, 106, 0.35);
  font-size: 0.75rem;
  color: rgba(61, 43, 31, 0.75);
}

.loading-pill.show {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.loading-pill.show::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(61, 43, 31, 0.2);
  border-top-color: rgba(61, 43, 31, 0.7);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.note {
  font-size: 0.9rem;
  color: rgba(61, 43, 31, 0.75);
}

@media (max-width: 768px) {
  .countdown {
    width: 100%;
  }
}
.azan-toggle {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.azan-toggle .bell {
  width: 14px;
  height: 14px;
  display: inline-block;
  background: rgba(61, 43, 31, 0.5);
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"black\"><path d=\"M12 22a2.5 2.5 0 0 0 2.45-2h-4.9A2.5 2.5 0 0 0 12 22zm6-6V11a6 6 0 0 0-5-5.91V4a1 1 0 1 0-2 0v1.09A6 6 0 0 0 6 11v5l-2 2v1h16v-1l-2-2z\"/></svg>');
  mask-size: cover;
  mask-repeat: no-repeat;
  mask-position: center;
}

.azan-toggle.active {
  background: transparent;
}

.azan-toggle.active .bell {
  background: #d7b06a;
}
