/*
Theme Name: TimeUntill
Description: Free live world clock, stopwatch, countdown timer, alarm clock, time calculator and event countdowns by Alpha Ranks. Everything runs in the browser — no sign-up needed.
Version: 1.0.0
Author: Alpha Ranks
Text Domain: timeuntill
*/
/* TimeUntill — original design by Alpha Ranks */
:root {
  --bg: #0a0f1e;
  --bg-soft: #111936;
  --panel: #151d3a;
  --panel-2: #1a2350;
  --line: #2a3563;
  --text: #eef1ff;
  --muted: #a3adc9;
  --accent: #f5b83d;
  --accent-soft: rgba(245, 184, 61, 0.12);
  --teal: #3ddad7;
  --danger: #ff6b6b;
  --radius: 14px;
  --max: 1120px;
}

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

body {
  background: radial-gradient(1200px 600px at 80% -10%, #1b2450 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 2rem 1.25rem 4rem; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 2.5rem 0 1rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
p { color: var(--muted); margin-bottom: 1rem; }
a { color: var(--accent); }

.accent { color: var(--accent); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo .mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #ff7a3d);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.logo small { font-weight: 500; color: var(--muted); font-size: 0.7rem; display: block; line-height: 1; }

.nav-toggle {
  display: none;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font-size: 1.1rem;
  cursor: pointer;
}
nav ul { display: flex; gap: 0.25rem; list-style: none; flex-wrap: wrap; }
nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
}
nav a:hover, nav a.active { color: var(--text); background: var(--panel); }
nav a.active { color: var(--accent); }

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}
.hero p.lead { font-size: 1.15rem; max-width: 640px; margin: 0 auto 2rem; }
.clock-duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  max-width: 760px;
  margin: 0 auto;
}
.clock-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.clock-card .label { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.clock-card .time {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  line-height: 1.1;
}
.clock-card .date { color: var(--muted); }

/* Cards & grids */
.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
a.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card .icon { font-size: 1.8rem; margin-bottom: 0.6rem; }
.card h3 { color: var(--text); }
.card p { font-size: 0.95rem; margin-bottom: 0; }
.card .city { font-weight: 600; color: var(--text); }
.card .wtime { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--teal); }
.card .wday { color: var(--muted); font-size: 0.85rem; }

/* Tool stage */
.stage {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3rem 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
}
.big-display {
  font-size: clamp(3rem, 12vw, 6.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1;
}
.big-display .ms { font-size: 0.45em; color: var(--muted); }
.sub-display { color: var(--muted); margin-top: 0.75rem; font-size: 1.05rem; }

.btn-row { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.75rem; }
button, .btn {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { border-color: var(--accent); }
button.primary, .btn.primary {
  background: linear-gradient(135deg, var(--accent), #ff7a3d);
  color: #1a1206;
  border: none;
}
button.ghost { background: transparent; }
button.danger { border-color: var(--danger); color: var(--danger); background: transparent; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

input, select, textarea {
  font: inherit;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
label { display: block; text-align: left; color: var(--muted); font-size: 0.9rem; margin-bottom: 0.35rem; }
.field { margin-bottom: 1rem; }
.form-narrow { max-width: 480px; margin: 0 auto; text-align: left; }
.color-scheme { color-scheme: dark; }

/* Timer presets */
.presets { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin: 1.25rem 0; }
.presets button { padding: 0.5rem 0.9rem; font-size: 0.9rem; }
.progress {
  height: 10px;
  background: var(--bg-soft);
  border-radius: 99px;
  overflow: hidden;
  margin: 1.5rem auto 0;
  max-width: 520px;
}
.progress > div {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #ff7a3d);
  border-radius: 99px;
  transition: width 0.3s linear;
}

/* Laps / lists */
.list { list-style: none; max-width: 520px; margin: 1.5rem auto 0; text-align: left; }
.list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  background: var(--bg-soft);
  font-variant-numeric: tabular-nums;
}
.list .tag { color: var(--muted); font-size: 0.85rem; }
.empty-note { color: var(--muted); text-align: center; font-size: 0.95rem; }

/* Prayer times */
.prayer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; margin-top: 1.25rem; }
.prayer-cell {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 0.5rem;
  text-align: center;
}
.prayer-cell .pname { color: var(--muted); font-size: 0.85rem; }
.prayer-cell .ptime { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.prayer-form { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: end; margin-top: 1rem; }
.prayer-form .field { flex: 1; min-width: 160px; margin-bottom: 0; }

/* Countdown units */
.units { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.unit {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 92px;
  padding: 1rem 0.5rem;
}
.unit .num { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); }
.unit .lbl { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* Alert banner */
.banner {
  display: none;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.25rem auto 0;
  max-width: 560px;
  font-weight: 600;
  animation: pulse 1s infinite alternate;
}
.banner.show { display: block; }
@keyframes pulse { from { opacity: 1; } to { opacity: 0.65; } }

/* Team */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.member {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
}
.member .avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--panel-2));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800;
  margin-bottom: 0.75rem;
  color: #062a28;
}
.member h3 { margin-bottom: 0.25rem; }
.member p { font-size: 0.9rem; margin-bottom: 0; }

/* Section spacing */
.section { margin-top: 3rem; }
.center { text-align: center; }
.muted-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #070b18;
  margin-top: auto;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.site-footer h4 { font-size: 0.95rem; margin-bottom: 0.75rem; color: var(--text); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.site-footer a:hover { color: var(--accent); }
.footer-bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-bottom a { color: var(--muted); }

/* Responsive nav */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  nav { display: none; width: 100%; }
  nav.open { display: block; }
  nav ul { flex-direction: column; gap: 0.15rem; padding: 0.75rem 0; }
  nav a { display: block; }
  .header-inner { flex-wrap: wrap; }
}

/* WordPress menu compatibility: mark the current menu item like the static .active link */
nav .current-menu-item > a { color: var(--accent); background: var(--panel); }
