:root{
  --bg:#f4f2ee;
  --card:#ffffff;
  --border:rgba(20,30,40,.10);
  --shadow:0 10px 26px rgba(20,30,40,.08);

  --text:#242424;
  --muted:rgba(36,36,36,.70);

  --rowHighlight:#eaf5fb;
  --rule:rgba(20,30,40,.10);

  /* bluish dark labels */
  --labelBlue:#5f7f8a;

  --pill:#dff0f6;
  --accentSoft:#e7f2f3;
}

[data-theme="dark"]{
  --bg:#0b1320;
  --card:#111c2d;
  --border:rgba(255,255,255,.12);
  --shadow:0 10px 26px rgba(0,0,0,.35);

  --text:#eaf1ff;
  --muted:rgba(234,241,255,.70);

  --rowHighlight:rgba(234,245,251,.12);
  --rule:rgba(255,255,255,.14);

  --labelBlue:#8fb7b8;

  --pill:rgba(223,240,246,.16);
  --accentSoft:rgba(143,183,184,.12);
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  background:var(--bg);
  color:var(--text);
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 16px;
  max-width:820px;
  margin:0 auto;
}

.topTitle{
  font-weight:800;       /* bold */
  font-size:22px;        /* slightly reduced to fit one line on mobile */
  letter-spacing:.2px;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.themeToggle{
  border:1px solid var(--border);
  background:var(--card);
  color:var(--text);
  width:44px;
  height:44px;
  border-radius:14px;
  box-shadow:var(--shadow);
  cursor:pointer;
}

.icon{font-size:18px; line-height:1}

.wrap{
  max-width:820px;
  margin:0 auto;
  padding:0 16px 22px;
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  border-radius:18px;
  padding:18px;
  margin-top:14px;
}

/* Date pill: not bold, smaller, and should NOT stretch */
.datePill{
  display:inline-block;
  width:auto;
  max-width:100%;
  padding:7px 12px;
  border-radius:999px;
  background:var(--pill);
  border:1px solid var(--border);
  font-weight:400;     /* non-bold */
  font-size:15px;
  letter-spacing:.1px;
}

/* No outer box around timetable. Keep inner rules. */
.tableWrap{
  margin-top:14px;
  padding:0 10px;      /* so horizontal lines don't touch card edges */
}

.timesTable{
  width:100%;
  border-collapse:collapse;
  background:transparent;
}

.timesTable thead th{
  text-align:left;                /* Prayer stays left */
  padding:10px 4px 12px;
  font-size:13px;
  color:var(--labelBlue);         /* bluish */
  font-weight:600;                /* semi-bold */
  border-bottom:1px solid var(--rule);
}

.timesTable thead th.right{ text-align:right; }

.timesTable tbody td{
  padding:13px 4px;
  border-bottom:1px solid var(--rule);
  font-size:16px;
}

.timesTable tbody tr:last-child td{ border-bottom:none; }

/* Prayer names semi-bold */
.timesTable tbody td:first-child{
  font-weight:600;
}

/* Timings normal */
.timesTable tbody td.right{
  text-align:right;
  font-weight:400;
  letter-spacing:.2px;
}

/* Highlight row background */
.timesTable tbody tr.is-current{
  background:var(--rowHighlight);
}

/* Only highlighted timing semi-bold */
.timesTable tbody tr.is-current td.right{
  font-weight:600;
}

.statusText{
  margin-top:12px;
  color:var(--muted);
  font-size:13px;
  font-weight:400; /* non-bold */
}

/* Makrooh */
.subtitle{
  margin:0 0 12px 0;
  font-size:20px;
  font-weight:600; /* semi-bold */
}

.mkGrid{
  display:grid;
  gap:10px;
}

.mkItem{
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
  background:var(--accentSoft);
}

/* Labels bluish + light-bold */
.mkLabel{
  color:var(--labelBlue);
  font-weight:500; /* light bold */
  font-size:14px;
}

/* Values normal */
.mkValue{
  margin-top:6px;
  font-weight:400;
  font-size:16px;
}

.footer{
  margin-top:14px;
  color:var(--muted);
  font-size:12px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  font-weight:400; /* non-bold */
}

/* Top navigation */
.topNav{
  display:flex;
  gap:10px;
  align-items:center;
  margin-left:auto;
  margin-right:10px; /* space before theme button */
}

.navLink{
  text-decoration:none;
  color:var(--labelBlue);
  padding:8px 10px;
  border-radius:999px;
  font-size:13px;
  font-weight:400;
  border:1px solid transparent;
}

.navLink:hover{
  border:1px solid var(--border);
}

.navLink.is-active{
  background:var(--accentSoft);
  border:1px solid var(--border);
  color:var(--text);
}

/* Downloads page */
.pageTitle{
  font-size:18px;
  font-weight:600;
  margin-bottom:8px;
}

.pageIntro{
  color:var(--muted);
  font-size:13px;
  font-weight:400;
  margin-bottom:14px;
}

.downloadGrid{
  display:grid;
  gap:10px;
  grid-template-columns: 1fr;
}

.downloadBtn{
  display:block;
  text-align:center;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--accentSoft);
  color:var(--text);
  text-decoration:none;
  font-weight:600;
}

.downloadBtn:hover{
  filter:brightness(0.98);
}

.disclaimer{
  color:var(--muted);
  font-size:13px;
  line-height:1.55;
  font-weight:400;
}

.credit{
  color:var(--text);
  font-weight:600;
}

@media (max-width: 480px){
  .topbar{
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
  }

  .topNav{
    order: 1;
    margin-left: 0;
    margin-right: 0;
  }

  .themeToggle{
    order: 1;
    margin-left: auto;
  }

  .topTitle{
    order: 2;
    width: 100%;
    white-space: normal;
    text-overflow: clip;
    overflow: visible;
    font-size: 20px; /* slightly smaller to keep it neat */
  }
}

/* Next prayer countdown card */
.nextCard{
  padding: 14px 18px;
}

.nextLabel{
  color: var(--labelBlue);
  font-weight: 500;   /* same style as mkLabel */
  font-size: 14px;    /* same size as mkLabel */
}

.nextCountdown{
  margin-top: 6px;
  font-size: 18px;
  font-weight: 600;   /* semi-bold numbers */
  letter-spacing: 0.8px;
}
