@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
  font-family: poppins;
  text-decoration: none;
}

body {
  margin: 0;
  background: #e8f5e9;
  color: #1b5e20;
}

header {
  height: 35vh;
  background: url("mosque.jpg") center/cover no-repeat;
  color: white;
  padding: 15px;
  text-shadow: 1px 1px 8px black;
}

.header-top {
  display: flex;
  justify-content: space-between;
}

.header-center {
  text-align: center;
}

.next-prayer-box {
  text-align: left;
}

#countdown {
  font-size: 25px;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px;
}

.controls button {
  min-width: 105px;
}

button,
select,
input {
  padding: 10px;
  border-radius: 6px;
  border: none;
}

.dates {
  text-align: right;
}

button {
  background: #2e7d32;
  color: white;
}

.tracker {
  padding: 10px;
}

.prayer {
  margin-bottom: 10px;
}

progress {
  width: 100%;
  height: 14px;
}

.edit {
  background: white;
  border-radius: 10px;
  border: 1px solid #1b5e20;
  margin: 10px;
  padding: 15px;
}

.edit input {
  background-color: #a5d6a7;
  margin-bottom: 8px;
}

.edit p {
  font-size: 12px;
  font-weight: 400;
}

#trackerLabel {
  font-size: 14px;
  margin-bottom: 6px;
}

#dailyProgress {
  width: 100%;
  height: 18px;
}

/* ===== PROGRESS BAR BASE ===== */
progress {
  width: 100%;
  height: 18px;
  appearance: none;
  -webkit-appearance: none;
}

/* ===== CHROME / EDGE / SAFARI ===== */
progress::-webkit-progress-bar {
  background-color: #c8e6c9;
  /* light green background */
  border-radius: 10px;
}

progress::-webkit-progress-value {
  background-color: #2e7d32;
  /* dark green filled part */
  border-radius: 10px;
}

/* ===== FIREFOX ===== */
progress::-moz-progress-bar {
  background-color: #2e7d32;
  border-radius: 10px;
}

/* ===== MODAL BACKGROUND (BLUR) ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  /* 👈 background blur */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* ===== MODAL BOX (GLASS) ===== */
.modal-box {
  width: 90%;
  max-width: 400px;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.15);
  /* transparent glass */
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* ===== HEADING ===== */
.modal-box h2 {
  margin-bottom: 20px;
  color: white;
}

/* ===== INPUT FIELDS ===== */
.modal-box input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 6px;
  border: none;
  outline: none;
}

/* ===== BUTTON ROW ===== */
.button-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.button-row button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* ===== BUTTON COLORS ===== */
.login-btn {
  background: #2e7d32;
  color: white;
}

.cancel-btn {
  background: rgb(196, 2, 2);
  color: white;
}

/* ===== LINKS BELOW ===== */
.modal-links {
  margin-top: 15px;
  font-size: 13px;
  color: white;
}

.link-text {
  margin-top: 6px;
}

.link-text span {
  color: #a5d6a7;
  cursor: pointer;
  font-weight: 600;
}

/* ===== HIDDEN ===== */
.hidden {
  display: none;
}

footer {
  text-align: center;
  font-size: 12px;
  padding-top: 10px;
}

.container {
  background: white;
  margin-left: 10px;
  margin-right: 10px;
  border-radius: 10px;
  border: 1px solid #1b5e20;
}

.tracker {
  padding: 12px;
  text-align: center;
}

.tracker h4 {
  text-align: left;
}

.tracker-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin: 6px 0;
}

.tracker-row span {
  flex: 1;
  text-align: center;
}

#dailyProgress {
  width: 100%;
  height: 18px;
  margin: 8px 0;
}

.juma-info {
  font-size: 13px;
  margin-top: 6px;
  color: #1b5e20;
  font-weight: 600;
}

.icons {
  display: flex;
  width: 100%;
}

.icons a {
  flex: 1;
}

.icon-box {
  flex: 1;
  /* 👈 equal width for all 5 */
  display: flex;
  flex-direction: column;
  /* image above text */
  align-items: center;
  /* horizontal center */
  justify-content: center;
  /* vertical center */
  padding: 10px;
  text-align: center;
  cursor: pointer;
}

.icon-box div {
  font-size: 12px;
  color: black;
}

.icon-box:hover {
  background: #e8f5e9;
  border-radius: 8px;
  text-decoration: underline;
}

.icon-box img {
  width: 45px;
  height: auto;
  margin-bottom: 6px;
}

.dropdown {
  position: relative;
  width: 100%;
}

.dropdown-selected {
  padding: 10px;
  border: 1px solid #1b5e20;
  border-radius: 6px;
  background: white;
  cursor: pointer;
}

.dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #1b5e20;
  border-radius: 6px;
  max-height: calc(6 * 42px);
  /* 👈 6 items */
  overflow-y: auto;
  z-index: 100;
}

.dropdown-item {
  padding: 10px;
  cursor: pointer;
}

.dropdown-item:hover {
  background: #e8f5e9;
}

.hidden {
  display: none;
}

.dropdown-selected {
  position: relative;
  padding-right: 35px; /* space for arrow */
}

/* Arrow */
.dropdown-selected::after {
  content: "▼";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #1b5e20;
  pointer-events: none;
  transition: transform 0.2s ease;
}

/* Rotate arrow when open */
.dropdown-selected.open::after {
  transform: translateY(-50%) rotate(180deg);
}

/* ===== PWA INSTALL BUTTON ===== */
.install-btn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 2000;

  background: #2e7d32;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 12px 18px;

  font-size: 14px;
  font-weight: 600;

  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.install-btn:hover {
  transform: scale(1.05);
}

.install-btn.hidden {
  display: none;
}

/* ===== iOS INSTALL HELPER ===== */
.ios-install {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ios-box {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  padding: 20px;
  width: 90%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  color: #1b5e20;
}

.ios-box strong {
  font-size: 18px;
}

.ios-box p {
  font-size: 14px;
  margin: 12px 0;
}

.ios-icon {
  font-size: 18px;
}

.ios-box button {
  background: #2e7d32;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.ios-install.hidden {
  display: none;
}

/* ===== Taraweeh Timing ===== */
a#taraweeh {
  display: flex;
  justify-content: center;
  margin: 10px;
  padding: 10px 10px;
  background: #2e7d32;
  color: white;
  border-radius: 10px;
  text-decoration: none;
}

a#taraweeh:hover {
  background: #1b5e20;
  text-decoration: underline;
}


/* ===== PREMIUM FASTING CARD ===== */
.fasting-box {
  padding: 0px 18px 18px;
  border-radius: 16px;

  background: linear-gradient(135deg, #1b5e20, #2e7d32, #66bb6a);
  color: white;

  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* soft glow */
.fasting-box::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(255,255,255,0.25), transparent 60%);
  transform: rotate(25deg);
}

/* heading */
.fasting-box .fasting-date {
  margin: 8px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* grid layout */
.fasting-grid {
  display: flex;
  gap: 12px;
}

/* each timing card */
.fasting-item {
  flex: 1;
  background: rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 14px 10px;

  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 12px rgba(255,255,255,0.15);

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fasting-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

/* label */
.fasting-label {
  font-size: 20px;
  opacity: 0.9;
  margin-bottom: 4px;
}

/* time */
.fasting-time {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* remove white box only for fasting section */
.fasting-container {
  background: transparent;
  border: none;
  padding: 0;
}


/* ================= FLIP COUNTDOWN ================= */
.flip-countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  margin-top: 10px;
}

.flip-unit {
  position: relative;
  width: 42px;
  height: 52px;
  background: #1b5e20;
  color: #fff;
  border-radius: 8px;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.flip-separator {
  font-size: 20px;
  font-weight: bold;
}

.flip-animate {
  animation: flipDown 0.5s ease-in-out;
}

@keyframes flipDown {
  0% { transform: rotateX(90deg); opacity: 0; }
  100% { transform: rotateX(0deg); opacity: 1; }
}
