:root {
  --bg: #0f1420;
  --bg-alt: #161d2e;
  --card: #1b2436;
  --card-border: #2a3550;
  --text: #eef1f8;
  --text-dim: #9aa5bd;
  --accent: #5b8cff;
  --accent-soft: #2c3e6b;
  --ad-bg: #10182a;
  --ad-border: #2a3550;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Ad slots (shared) ---------- */
.ad-slot {
  background: var(--ad-bg);
  border: 1px dashed var(--ad-border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ad-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.ad-header {
  min-height: 90px;
  width: 100%;
  max-width: 728px;
}

.ad-footer {
  min-height: 90px;
  width: 100%;
  max-width: 728px;
  margin: 0 auto 16px;
}

.ad-incontent {
  min-height: 100px;
  width: 100%;
  margin: 28px 0;
}

.ad-sidebar {
  min-height: 600px;
  width: 160px;
  position: sticky;
  top: 20px;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--card-border);
  flex-wrap: wrap;
}

.brand-name {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 2px 0 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ---------- Site nav (interlinking) ---------- */
.site-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--card-border);
}

.site-nav a {
  flex: 0 0 auto;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--card);
}

.site-nav a.active {
  color: var(--text);
  background: var(--accent-soft);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0 0 16px;
}

.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* ---------- Intro text ---------- */
.intro-text {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 18px 0 0;
}

/* ---------- Page layout ---------- */
.page-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 16px;
}

.main-content {
  flex: 1 1 auto;
  max-width: 860px;
  width: 100%;
}

/* ---------- Local clock ---------- */
.local-clock-card {
  background: linear-gradient(160deg, var(--card), var(--accent-soft));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
}

.local-label {
  margin: 0 0 8px;
  color: var(--text-dim);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.local-time {
  font-size: clamp(2.6rem, 8vw, 4.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.local-date {
  margin-top: 6px;
  font-size: 1.1rem;
  color: var(--text);
}

.local-tz {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Timezones grid ---------- */
.timezones-section h2 {
  font-size: 1.2rem;
  margin: 0 0 14px;
  color: var(--text);
}

.timezone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.tz-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.tz-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tz-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.tz-abbr {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.tz-offset {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.tz-time {
  font-size: 1.7rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
}

.tz-date {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.tz-city {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 6px;
}

/* ---------- Timezone detail page ---------- */
.tz-compare {
  margin-top: 14px;
  font-size: 0.95rem;
  color: var(--text);
  background: rgba(91, 140, 255, 0.1);
  border: 1px solid var(--accent-soft);
  border-radius: 10px;
  padding: 12px 16px;
}

.about-section {
  margin-top: 28px;
}

.about-section h2 {
  font-size: 1.15rem;
  margin: 0 0 10px;
}

.about-section p {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0 0 12px;
}

.fact-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.fact-list li {
  font-size: 0.88rem;
  color: var(--text-dim);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 14px;
}

.fact-list strong {
  color: var(--text);
}

.other-timezones h2 {
  font-size: 1.15rem;
  margin: 32px 0 14px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--card-border);
  padding: 20px 16px;
  text-align: center;
}

.footer-text {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ad-sidebar { display: none; }
}

@media (max-width: 640px) {
  .site-header { flex-direction: column; align-items: stretch; text-align: center; }
  .ad-header { max-width: 100%; }
  .local-clock-card { padding: 28px 16px; }
}
