/* ─── TOKENS ─────────────────────────────────────────────────── */
:root {
  --bg:       #0a0a0f;
  --surface:  #111118;
  --surface2: #18181f;
  --border:   #2a2a35;
  --accent:   #00968a;
  --accent2:  #7c6aff;
  --accent3:  #ff6a3d;
  --text:     #e8e8f0;
  --muted:    #6b6b80;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Syne', sans-serif;
}

[data-theme="light"] {
  --bg:       #f5f5f7;
  --surface:  #ffffff;
  --surface2: #efefef;
  --border:   #d0d0da;
  --text:     #111118;
  --muted:    #888899;
}

/* ─── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.2s, color 0.2s;
}

/* ─── BACKGROUND GRID ────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] body::before { opacity: 0.15; }

body::after {
  content: '';
  position: fixed;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,229,160,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ─── LAYOUT ─────────────────────────────────────────────────── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ─── HEADER ─────────────────────────────────────────────────── */
header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.logo {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--mono);
  margin-bottom: 10px;
}

h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
}

h1 span { color: var(--accent); }

/* ─── LIVE BADGE ─────────────────────────────────────────────── */
.live-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 13px;
  flex-shrink: 0;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

.live-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 2px;
}

#live-ts {
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: opacity 0.15s;
  border: none;
  background: none;
  font-family: var(--mono);
  padding: 0;
}

#live-ts:hover { opacity: 0.7; }

/* ─── THEME TOGGLE ───────────────────────────────────────────── */
.theme-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 999;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: border-color 0.15s, box-shadow 0.15s;
  color: var(--text);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.theme-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 16px rgba(0,229,160,0.15);
}

/* ─── BREADCRUMB ─────────────────────────────────────────────── */
.breadcrumb {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

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

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb span { margin: 0 6px; }


.ad-slot {
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  text-align: center;
  padding: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 24px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── SECTIONS ───────────────────────────────────────────────── */
.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.4s ease both;
}

.section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.6;
}

.section.purple::before { background: linear-gradient(90deg, var(--accent2), transparent); }
.section.orange::before  { background: linear-gradient(90deg, var(--accent3), transparent); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section:nth-child(2) { animation-delay: 0.05s; }
.section:nth-child(3) { animation-delay: 0.10s; }
.section:nth-child(4) { animation-delay: 0.15s; }
.section:nth-child(5) { animation-delay: 0.20s; }
.section:nth-child(6) { animation-delay: 0.25s; }

.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--mono);
  margin-bottom: 20px;
}

.section.purple .section-title { color: var(--accent2); }
.section.orange  .section-title { color: var(--accent3); }

/* ─── INPUTS ─────────────────────────────────────────────────── */
.input-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

input[type="text"], select, textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

input[type="text"]:focus, select:focus, textarea:focus {
  border-color: var(--accent);
}

.input-group { flex: 1; min-width: 200px; }

.input-group label {
  display: block;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 22px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-primary  { background: var(--accent);  color: #0a0a0f; }
.btn-purple   { background: var(--accent2); color: #fff; }
.btn-orange   { background: var(--accent3); color: #fff; }
.btn-primary:hover, .btn-purple:hover, .btn-orange:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ─── RESULT CARD ────────────────────────────────────────────── */
.result-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 16px;
  display: none;
}

.result-card.visible { display: block; }

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.result-item label {
  display: block;
  font-size: 10px;
  font-family: var(--mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.result-value {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s;
  font-family: var(--mono);
}

.copy-btn:hover { color: var(--accent); }

/* ─── DATE GRID ──────────────────────────────────────────────── */
.date-grid {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  width: 100%;
}

.date-grid .input-group {
  flex: 1 1 0;
  min-width: 0;
}

.date-grid .input-group--tz {
  flex: 2 1 0;
}

.date-grid .btn {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .date-grid { flex-wrap: wrap; }
  .date-grid .input-group { flex: 1 1 calc(33% - 8px); }
  .date-grid .btn { width: 100%; }
}


/* ─── RANGE ──────────────────────────────────────────────────── */
.range-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.range-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.range-item label {
  display: block;
  font-size: 10px;
  font-family: var(--mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.range-item .val {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent2);
  font-weight: 500;
}

/* ─── DURATION ───────────────────────────────────────────────── */
textarea {
  resize: vertical;
  min-height: 100px;
  font-size: 13px;
  line-height: 1.6;
}

.duration-display {
  font-family: var(--mono);
  font-size: 22px;
  color: var(--accent3);
  font-weight: 700;
  margin-top: 12px;
  display: none;
}

.duration-display.visible { display: block; }

.duration-parts span { opacity: 0.5; font-size: 14px; }

/* ─── BATCH ──────────────────────────────────────────────────── */
.batch-output {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  margin-top: 12px;
  display: none;
  white-space: pre-wrap;
  word-break: break-all;
}

.batch-output.visible { display: block; }

/* ─── SELECT ─────────────────────────────────────────────────── */
select {
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6b80' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

/* ─── INFO / FAQ ─────────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.info-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.info-box h3 {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.info-box p {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

.info-box code {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 12px;
  background: var(--bg);
  padding: 2px 5px;
  border-radius: 3px;
}

/* ─── PROSE SECTIONS ─────────────────────────────────────────── */
.prose-section {
  margin-bottom: 40px;
}

.prose-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.prose-section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ─── FAQ ────────────────────────────────────────────────────── */
.faq-list { list-style: none; }

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.faq-item:first-child { border-top: 1px solid var(--border); }

.faq-q {
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text);
  user-select: none;
}

.faq-q::after {
  content: '+';
  font-family: var(--mono);
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item.open .faq-q::after { transform: rotate(45deg); }

.faq-a {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 10px;
  display: none;
}

.faq-item.open .faq-a { display: block; }

/* ─── ERROR ──────────────────────────────────────────────────── */
.error {
  color: var(--accent3);
  font-family: var(--mono);
  font-size: 13px;
  margin-top: 10px;
  display: none;
}

.error.visible { display: block; }

/* ─── HINT ───────────────────────────────────────────────────── */
.hint {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
  margin-top: 8px;
}

/* ─── UTILS ──────────────────────────────────────────────────── */
.mt8  { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.flex-wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

@media (max-width: 580px) { .two-col { grid-template-columns: 1fr; } }

/* ─── FOOTER ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 32px 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  position: relative;
  z-index: 1;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover { text-decoration: underline; }

.footer-links {
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* ─── TOAST ──────────────────────────────────────────────────── */
.copied-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--accent);
  color: #0a0a0f;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s;
  pointer-events: none;
  z-index: 1000;
}

.copied-toast.show { opacity: 1; transform: translateY(0); }

/* ─── STATIC PAGES (about/privacy) ──────────────────────────── */
.page-static main {
  padding: 60px 0;
  max-width: 680px;
}

.page-static h1 {
  font-size: 32px;
  margin-bottom: 30px;
}

.page-static h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.page-static p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 12px;
}

.page-static ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.page-static li {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 6px;
}
