:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1a2233;
  --text-muted: #5b6779;
  --brand: #2b62ff;
  --brand-dark: #1a46c9;
  --accent: #0fb894;
  --danger: #e0483e;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20,30,50,.04), 0 8px 24px rgba(20,30,50,.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 0.95rem;
}

.main-nav {
  display: flex;
  gap: 18px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
}
.main-nav a { color: var(--text-muted); }
.main-nav a:hover { color: var(--brand); text-decoration: none; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.tool-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.breadcrumbs a { color: var(--text-muted); }

h1 {
  font-size: 1.9rem;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
h2 { font-size: 1.3rem; margin: 28px 0 10px; }
.subtitle {
  color: var(--text-muted);
  font-size: 1.02rem;
  margin: 0 0 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}

.dropzone {
  border: 2px dashed #c3ccdb;
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  background: #fbfcfe;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--brand);
  background: #f0f5ff;
}
.dropzone-icon { font-size: 2.2rem; margin-bottom: 8px; }
.dropzone-main { font-weight: 700; }
.dropzone-sub { color: var(--text-muted); font-size: 0.88rem; margin-top: 4px; }

input[type="file"] { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 9px;
  padding: 12px 22px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #f1f4f9; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.file-list { margin: 16px 0; padding: 0; list-style: none; }
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #f7f9fc;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.92rem;
}
.file-item .file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .file-remove { color: var(--danger); cursor: pointer; font-weight: 700; background:none; border:none; font-size:1rem; }

.progress-wrap { margin: 16px 0; display: none; }
.progress-wrap.active { display: block; }
.progress-bar-track {
  background: var(--border);
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
}
.progress-bar-fill {
  background: var(--brand);
  height: 100%;
  width: 0%;
  transition: width .2s;
}
.progress-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 6px; }

.result-box {
  display: none;
  margin-top: 20px;
  padding: 18px;
  background: #eefaf5;
  border: 1px solid #bfe9d9;
  border-radius: var(--radius);
}
.result-box.active { display: block; }

label.field-label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
select, input[type="text"], input[type="number"], textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
textarea { resize: vertical; min-height: 160px; }
input[type="range"] { width: 100%; }

.field-group { margin-bottom: 18px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .two-col { grid-template-columns: 1fr; } }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.stat-tile {
  background: #f7f9fc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.stat-tile .stat-num { font-size: 1.5rem; font-weight: 800; color: var(--brand); }
.stat-tile .stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

.info-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-top: 8px;
}
.info-block p { color: var(--text-muted); }

.privacy-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #f0f5ff;
  border: 1px solid #d3e0ff;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: #2c4a8c;
  margin-bottom: 20px;
}

.related-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.related-tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}
.related-tool-card:hover { border-color: var(--brand); text-decoration: none; }
.related-tool-card .rt-desc { font-weight: 400; color: var(--text-muted); font-size: 0.8rem; margin-top: 4px; }

.category-section { margin-bottom: 40px; }
.category-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  color: var(--text);
}
.tool-card:hover { border-color: var(--brand); text-decoration: none; }
.tool-card .tc-icon { font-size: 1.1rem; margin-bottom: 6px; }
.tool-card .tc-name { font-weight: 700; font-size: 0.98rem; }
.tool-card .tc-desc { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
.tool-card.coming-soon { opacity: 0.55; cursor: default; }
.badge-soon {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  background: #eef1f6;
  border-radius: 5px;
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.hero {
  text-align: center;
  padding: 48px 20px 36px;
}
.hero h1 { font-size: 2.4rem; }
.hero p { font-size: 1.1rem; color: var(--text-muted); max-width: 640px; margin: 0 auto; }
.hero-search {
  max-width: 520px;
  margin: 24px auto 0;
}
.hero-search input {
  padding: 14px 16px;
  font-size: 1rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 40px;
}
.site-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); }

.error-msg {
  color: var(--danger);
  font-size: 0.88rem;
  margin-top: 10px;
  display: none;
}
.error-msg.active { display: block; }

@media (max-width: 640px) {
  .main-nav { display: none; }
  .hero h1 { font-size: 1.8rem; }
}

.mini-clocks-bar {
  background: #101830;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  overflow-x: auto;
}
.mini-clocks-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  gap: 22px;
  align-items: center;
  min-width: max-content;
}
.mini-clock-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #eef1fa;
  font-size: 0.85rem;
  white-space: nowrap;
}
.mini-clock-select {
  background: transparent;
  border: none;
  color: #9fb0d8;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 0;
  cursor: pointer;
  max-width: 120px;
}
.mini-clock-select option { color: #1a1a2e; }
.mini-clock-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  font-size: 0.92rem;
}
.mini-clock-sep {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.12);
}
@media (max-width: 640px) {
  .mini-clocks-inner { gap: 16px; padding: 10px 16px; }
  .mini-clock-item { font-size: 0.78rem; }
}

.home-countdown-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
}
.home-countdown-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}
.home-countdown-config {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.home-countdown-config input[type="text"] {
  width: 170px;
  padding: 7px 10px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.home-countdown-config input[type="datetime-local"] {
  padding: 7px 10px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.home-countdown-config select {
  padding: 7px 10px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  max-width: 220px;
}
.home-countdown-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}
.home-countdown-numbers {
  display: flex;
  gap: 16px;
}
.home-countdown-num-tile { text-align: center; min-width: 46px; }
.home-countdown-num-tile .num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.home-countdown-num-tile .lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 3px;
}
.home-countdown-status {
  max-width: 1100px;
  margin: 8px auto 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}
@media (max-width: 640px) {
  .home-countdown-inner { gap: 14px; }
  .home-countdown-config input[type="text"] { width: 130px; }
  .home-countdown-numbers { gap: 10px; }
}

/* Time Zone Meeting Planner (World-Time-Buddy-style board) */
.wtp-section { max-width: 1100px; margin: 0 auto; padding: 22px 20px 8px; }
.wtp-section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.wtp-section-head h2 { font-size: 1.15rem; margin: 0; }
.wtp-section-head a { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; }
.wtp-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.wtp-add-wrap { position: relative; }
.wtp-add-wrap::before { content: '+'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-weight: 700; pointer-events: none; }
.wtp-add-select { padding: 9px 12px 9px 26px; font-size: 0.85rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; min-width: 200px; }
.wtp-days { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.wtp-day-btn { border: none; background: none; padding: 6px 9px; border-radius: 7px; font-size: 0.82rem; color: var(--text-muted); cursor: pointer; font-variant-numeric: tabular-nums; }
.wtp-day-btn:hover { background: #f0f2f9; }
.wtp-day-btn.active { background: var(--brand); color: #fff; font-weight: 700; }
.wtp-now-link { border: none; background: none; color: var(--brand); font-size: 0.8rem; font-weight: 700; cursor: pointer; text-decoration: underline; white-space: nowrap; }

.wtp-board { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.wtp-row { display: flex; border-bottom: 1px solid var(--border); }
.wtp-row:last-child { border-bottom: none; }
.wtp-row-info { flex: 0 0 168px; padding: 8px 10px; display: flex; flex-direction: column; justify-content: center; gap: 1px; border-right: 1px solid var(--border); background: #fbfbfe; position: relative; }
.wtp-row-top { display: flex; align-items: center; gap: 5px; }
.wtp-pin, .wtp-remove { border: none; background: none; font-size: 0.85rem; cursor: pointer; line-height: 1; padding: 1px; color: var(--text-muted); flex: 0 0 auto; }
.wtp-remove:hover { color: var(--danger); }
.wtp-city-name { font-weight: 700; font-size: 0.82rem; border: none; background: none; padding: 0; cursor: pointer; color: var(--text); appearance: none; -webkit-appearance: none; max-width: 78px; text-overflow: ellipsis; }
.wtp-tz-badge { font-size: 0.56rem; font-weight: 700; color: var(--text-muted); background: #eef0f7; border-radius: 4px; padding: 1px 4px; }
.wtp-offset-badge { font-size: 0.6rem; font-weight: 700; color: #fff; background: #9aa4bd; border-radius: 4px; padding: 1px 5px; margin-left: auto; }
.wtp-big-time { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.1; }
.wtp-big-time sup { font-size: 0.7rem; font-weight: 700; margin-left: 1px; }
.wtp-region { font-size: 0.66rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wtp-scroll { flex: 1; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.wtp-cells { display: flex; height: 100%; position: relative; }
.wtp-cell { flex: 0 0 38px; width: 38px; box-sizing: border-box; text-align: center; font-size: 0.62rem; padding: 8px 0 7px; cursor: pointer; user-select: none; position: relative; }
.wtp-cell .wtp-cell-hr { font-weight: 700; line-height: 1.1; }
.wtp-cell .wtp-cell-ap { font-size: 0.53rem; opacity: 0.75; }
.wtp-date-chip { position: absolute; top: 1px; left: 2px; right: 2px; font-size: 0.5rem; font-weight: 700; text-align: center; background: rgba(255,255,255,0.85); color: #2a2a2a; border-radius: 4px; padding: 1px 0; line-height: 1.2; box-shadow: 0 0 0 1px rgba(0,0,0,0.08); }
.wtp-band-night { background: #1c2745; color: #cdd7f2; }
.wtp-band-dawn { background: #bcd6f2; color: #223; }
.wtp-band-day { background: #fdf6df; color: #2a2a2a; }
.wtp-band-dusk { background: #6f8fc4; color: #fff; }
.wtp-cell.wtp-active { box-shadow: inset 0 0 0 2px #ffb703; z-index: 2; }
.wtp-cell.wtp-active::after { content: ''; position: absolute; inset: 0; border-left: 2px dashed #ffb703; border-right: 2px dashed #ffb703; pointer-events: none; }

.wtp-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.75rem; color: var(--text-muted); margin-top: 12px; }
.wtp-legend span { display: inline-flex; align-items: center; gap: 5px; }
.wtp-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.wtp-hint { margin-top: 10px; font-size: 0.8rem; color: var(--text-muted); }

@media (max-width: 640px) {
  .wtp-row-info { flex-basis: 128px; padding: 7px 8px; }
  .wtp-big-time { font-size: 1rem; }
  .wtp-days { margin-left: 0; }
}

/* Ad slots — reserved placeholder space for Google AdSense.
   Swap the placeholder box's contents for a real <ins class="adsbygoogle">
   unit once your AdSense account and ad units are approved. */
.ad-slot { max-width: 1100px; margin: 30px auto; padding: 0 20px; text-align: center; box-sizing: border-box; }
.ad-slot-label { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.ad-slot-box { display: flex; align-items: center; justify-content: center; margin: 0 auto; background: #f4f6fb; border: 1px dashed var(--border); border-radius: 8px; color: var(--text-muted); font-size: 0.75rem; }
.ad-leaderboard .ad-slot-box { width: 100%; max-width: 728px; height: 90px; }
.ad-rectangle .ad-slot-box { width: 300px; max-width: 100%; height: 250px; }
@media (max-width: 480px) {
  .ad-leaderboard .ad-slot-box { max-width: 320px; height: 50px; }
}

/* Side ad rails — reserved 160×600 skyscraper slots that float in the page
   margin. Hidden until the viewport is wide enough that they won't crowd or
   shrink the main content column. */
.ad-rail { display: none; }
@media (min-width: 1440px) {
  .ad-rail {
    display: block;
    position: fixed;
    top: 88px;
    width: 160px;
    z-index: 10;
  }
  .ad-rail-left { left: 20px; }
  .ad-rail-right { right: 20px; }
  .ad-rail .ad-slot-box { width: 160px; height: 600px; margin: 0; }
}
