/* ═══════════════════════════════════════════
   TimezoneSpot — Global Styles
   ═══════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --c-bg: #f8fafc;
  --c-surface: #ffffff;
  --c-primary: #1e3a8a;
  --c-accent: #3b82f6;
  --c-accent-hover: #2563eb;
  --c-accent-bg: #eff6ff;
  --c-accent-border: #dbeafe;
  --c-text: #1e293b;
  --c-text-secondary: #64748b;
  --c-text-muted: #6b7280;
  --c-border: #e2e8f0;
  --c-border-light: #f1f5f9;
  --c-green-bg: #dcfce7;
  --c-green-text: #166534;
  --c-red: #ef4444;
  --c-overlay: rgba(15, 23, 42, 0.5);
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px -5px rgba(59,130,246,0.1), 0 8px 10px -6px rgba(59,130,246,0.08);
  --font-display: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --max-w: 1200px;
  --nav-h: 64px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font: inherit; }
a { color: var(--c-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
ul, ol { list-style: none; }

/* ── Skip Link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--c-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus { top: 0.5rem; }

/* ── Layout ── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
main { flex: 1; }

/* ── Navigation ── */
.nav {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
}
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--c-primary);
}
.nav__logo {
  width: 2rem;
  height: 2rem;
  background: var(--c-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.nav__logo svg { width: 1.25rem; height: 1.25rem; }
.nav__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.nav__link:hover { color: var(--c-accent); text-decoration: none; }
.nav__link--active { color: var(--c-accent); font-weight: 600; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--c-accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--c-accent-hover); box-shadow: var(--shadow-md); }
.btn--ghost {
  color: var(--c-text-secondary);
  padding: 0.5rem 0.75rem;
}
.btn--ghost:hover { color: var(--c-accent); background: var(--c-accent-bg); }
.btn svg { width: 1.125rem; height: 1.125rem; }

/* ── Ad Slots (CLS-safe) ── */
.ad-slot {
  background: var(--c-border-light);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  overflow: hidden;
  contain: layout size;
}
.ad-slot--leaderboard {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  margin: 0 auto 2rem;
}
.ad-slot--rectangle {
  width: 300px;
  min-height: 250px;
  margin: 1.5rem auto;
}
.ad-slot--mobile {
  display: none;
  width: 100%;
  max-width: 320px;
  min-height: 50px;
  margin: 1rem auto;
}
@media (max-width: 767px) {
  .ad-slot--leaderboard { display: none; }
  .ad-slot--mobile { display: flex; }
}

/* ── Hero Section (Dashboard) ── */
.hero {
  background: var(--c-surface);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--c-accent-border);
  margin-bottom: 3rem;
}
.hero__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--c-accent);
  margin-bottom: 0.5rem;
}
.hero__city {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-text-secondary);
  margin-bottom: 0.75rem;
}
.hero__clock {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--c-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.hero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--c-text-muted);
  font-size: 1rem;
}
.hero__meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c-text-muted);
}

/* ── Section Headers ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.section-header__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}
.section-header__sub {
  font-size: 0.875rem;
  color: var(--c-text-secondary);
}

/* ── City Cards Grid ── */
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.city-card {
  background: var(--c-surface);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}
.city-card:hover {
  border-color: var(--c-accent);
  box-shadow: var(--shadow-md);
}
.city-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.city-card__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}
.city-card__country {
  font-size: 0.875rem;
  color: var(--c-text-secondary);
  margin-top: 0.125rem;
}
.city-card__offset {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-accent);
  background: var(--c-accent-bg);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.city-card__time {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--c-primary);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.25rem;
}
.city-card__tz {
  font-size: 0.75rem;
  color: var(--c-text-muted);
  font-weight: 500;
}
.city-card__remove {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  color: var(--c-text-muted);
}
.city-card:hover .city-card__remove { opacity: 1; }
.city-card__remove:hover { background: #fef2f2; color: var(--c-red); }
.city-card__remove svg { width: 0.875rem; height: 0.875rem; }

/* ── Add City Card ── */
.add-card {
  border: 2px dashed var(--c-border);
  background: var(--c-border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 1.5rem;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.add-card:hover {
  border-color: var(--c-accent);
  background: var(--c-surface);
}
.add-card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--c-border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  transition: background 0.2s;
  color: var(--c-text-muted);
}
.add-card:hover .add-card__icon { background: var(--c-accent-bg); color: var(--c-accent); }
.add-card__icon svg { width: 1.5rem; height: 1.5rem; }
.add-card__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-text-secondary);
  transition: color 0.2s;
}
.add-card:hover .add-card__label { color: var(--c-accent); }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--c-overlay);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 1rem 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }
.modal {
  background: var(--c-surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  transform: translateY(-10px);
  transition: transform 0.2s;
}
.modal-overlay.is-open .modal { transform: translateY(0); }
.modal__header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}
.modal__close {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  color: var(--c-text-muted);
}
.modal__close:hover { background: var(--c-border-light); color: var(--c-text); }
.modal__close svg { width: 1.25rem; height: 1.25rem; }
.modal__search {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
}
.modal__input {
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.modal__input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.modal__input::placeholder { color: var(--c-text-muted); }
.modal__list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}
.modal__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.1s;
  width: 100%;
  text-align: left;
}
.modal__item:hover { background: var(--c-accent-bg); }
.modal__item-name { font-weight: 600; font-size: 0.9375rem; }
.modal__item-detail {
  font-size: 0.8125rem;
  color: var(--c-text-secondary);
  margin-top: 0.125rem;
}
.modal__item-tz {
  font-size: 0.75rem;
  color: var(--c-text-muted);
  font-weight: 500;
  text-align: right;
}
.modal__empty {
  padding: 2rem;
  text-align: center;
  color: var(--c-text-muted);
  font-size: 0.875rem;
}

/* ── Converter: Controls ── */
.converter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.converter-controls__date-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 0.5rem;
}
.converter-controls__date-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  outline: none;
  background: var(--c-surface);
  transition: border-color 0.15s;
}
.converter-controls__date-input:focus { border-color: var(--c-accent); }
.date-nav {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.date-nav__btn {
  padding: 0.625rem 0.75rem;
  transition: background 0.1s;
  color: var(--c-text-secondary);
  display: flex;
  align-items: center;
}
.date-nav__btn:hover { background: var(--c-border-light); }
.date-nav__btn svg { width: 1.25rem; height: 1.25rem; }
.date-nav__label {
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
}

/* ── Converter: City Rows ── */
.converter-rows { display: flex; flex-direction: column; gap: 1rem; }
.converter-row {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) {
  .converter-row { flex-direction: row; }
}
.converter-row__info {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--c-border-light);
  background: rgba(248,250,252,0.5);
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .converter-row__info {
    width: 220px;
    border-bottom: none;
    border-right: 1px solid var(--c-border-light);
  }
}
.converter-row__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.converter-row__badge {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}
.converter-row__badge--local {
  background: var(--c-accent-bg);
  color: var(--c-accent);
}
.converter-row__badge--offset {
  color: var(--c-text-muted);
}
.converter-row__remove {
  color: var(--c-text-muted);
  transition: color 0.15s;
  display: flex;
  padding: 0.125rem;
}
.converter-row__remove:hover { color: var(--c-red); }
.converter-row__remove svg { width: 1rem; height: 1rem; }
.converter-row__city {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}
.converter-row__tz-info {
  font-size: 0.8125rem;
  color: var(--c-text-secondary);
  margin-bottom: 1rem;
}
.converter-row__time {
  font-family: var(--font-body);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--c-accent);
  font-variant-numeric: tabular-nums;
}
.converter-row__time--secondary { color: var(--c-text); }
.converter-row__period {
  font-size: 1rem;
  font-weight: 500;
  color: var(--c-accent);
  margin-left: 0.25rem;
}
.converter-row__strip-area {
  flex: 1;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  overflow: hidden;
}

/* ── Time Strip ── */
.time-strip {
  display: flex;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--c-border) transparent;
}
.time-strip::-webkit-scrollbar { height: 4px; }
.time-strip::-webkit-scrollbar-track { background: transparent; }
.time-strip::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 2px; }
.hour-block {
  min-width: 52px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  border-right: 1px solid var(--c-border);
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  user-select: none;
  cursor: pointer;
}
.hour-block:last-child { border-right: none; }
.hour-block--business { background: var(--c-green-bg); color: var(--c-green-text); }
.hour-block--night { background: var(--c-border-light); color: var(--c-text-secondary); }
.hour-block--selected {
  background: var(--c-accent) !important;
  color: #fff !important;
  font-weight: 700;
}

/* ── Time Slider ── */
.time-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--c-border);
  outline: none;
  cursor: pointer;
}
.time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--c-accent);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(59,130,246,0.3);
  cursor: pointer;
}
.time-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--c-accent);
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(59,130,246,0.3);
  cursor: pointer;
}

/* ── Add Row (Converter) ── */
.add-row {
  border: 2px dashed var(--c-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--c-text-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.add-row:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: var(--c-accent-bg);
}
.add-row__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--c-border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.add-row:hover .add-row__icon { background: var(--c-accent-border); }
.add-row__icon svg { width: 1.25rem; height: 1.25rem; }
.add-row__label { font-weight: 600; font-size: 0.9375rem; }

/* ── Overlap Summary ── */
.overlap-box {
  background: var(--c-accent-bg);
  border: 1px solid var(--c-accent-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.overlap-box__icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--c-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.overlap-box__icon svg { width: 1.25rem; height: 1.25rem; }
.overlap-box__title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 0.25rem;
}
.overlap-box__text {
  font-size: 0.875rem;
  color: var(--c-accent-hover);
  line-height: 1.6;
}
.overlap-box__text strong { font-weight: 700; color: var(--c-primary); }

/* ── Footer ── */
.footer {
  margin-top: auto;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--c-text-muted);
  font-size: 0.8125rem;
  border-top: 1px solid var(--c-border);
}
.footer a { color: #475569; text-decoration: underline; text-underline-offset: 2px; }
.footer a:hover { color: var(--c-accent); }
.footer__links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

/* ── Responsive ── */
@media (max-width: 767px) {
  .hero { padding: 2rem 1.25rem; }
  .hero__clock { font-size: clamp(2.25rem, 10vw, 3rem); }
  .hero__city { font-size: 1.25rem; }
  .hero__meta { flex-direction: column; gap: 0.25rem; }
  .hero__meta-dot { display: none; }
  .city-grid { grid-template-columns: 1fr; gap: 1rem; }
  .nav__inner { padding: 0 1rem; }
  .nav__title { font-size: 1rem; }
  .nav__links { gap: 0.75rem; }
  .nav__links .nav__link { display: none; }
  .btn { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
  .btn svg { width: 0.875rem; height: 0.875rem; }
  .btn--ghost svg { display: none; }
  .converter-controls { flex-direction: column; align-items: stretch; }
  .container { padding: 0 1rem; }
  .btn { min-height: 44px; min-width: 44px; }
  .city-card__remove { width: 2.75rem; height: 2.75rem; opacity: 1; }
  .modal__close { width: 2.75rem; height: 2.75rem; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .city-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease-out forwards; }

/* ── Utilities ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.tabular-nums { font-variant-numeric: tabular-nums; }

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
ortant;
  }
}

  }
}
on: 0.01ms !important;
  }
}
