html {
  height: 100%;
  background-color: #121212;
}
body {
  font-family: "Inter", system-ui, sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 0;
  background-color: #121212;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.container {
  flex: 1;
  margin-top: 1rem;
}
form {
  display: grid;
  gap: 1rem;
}
label {
  display: flex;
  flex-direction: column;
  font-weight: bold;
}
input,
select,
button {
  padding: 0.5rem;
  font-size: 1rem;
  background-color: #1e1e1e;
  color: #e0e0e0;
  border: 1px solid #444;
}
form button[type="submit"] {
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
/* De-Epochify — purple */
.inline-form button[type="submit"] {
  background-color: #7c3aed;
}
.inline-form button[type="submit"]:hover {
  background-color: #5b21b6;
}
/* Epochify — purple (same as De-Epochify) */
.date-inputs button[type="submit"] {
  background-color: #7c3aed;
}
.date-inputs button[type="submit"]:hover {
  background-color: #5b21b6;
}
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0 1rem 0;
  border-bottom: 1px solid #2a2a2a;
  margin-bottom: 1.5rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
}
.nav-icon {
  line-height: 1;
  display: flex;
  align-items: center;
}
.clock-svg {
  width: 1.5rem;
  height: 1.5rem;
  color: #e0e0e0;
}
.nav-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
}
.nav-version {
  font-size: 0.7rem;
  color: #555;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  margin-left: 0.2rem;
  align-self: flex-end;
  margin-bottom: 0.15rem;
}
nav button {
  background: transparent !important;
  color: #a78bfa;
  border: 1px solid #7c3aed !important;
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
nav button:hover {
  background-color: #7c3aed !important;
  color: white;
}
.converters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}
@media (max-width: 768px) {
  .converters-grid {
    grid-template-columns: 1fr;
  }
  body {
    padding: 1rem;
  }
  .static-grid {
    grid-template-columns: 1fr;
  }
  .static-hero {
    padding: 1rem;
  }
}

/* Live epoch bar */
.live-epoch-bar {
  text-align: center;
  font-size: 0.95rem;
  color: #888;
  margin-bottom: 1.5rem;
}
.clock-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #1a1a2e;
  border: 1px solid #2e2e4a;
  border-left: 3px solid #7c3aed;
  border-radius: 6px;
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
  color: #888;
  letter-spacing: 0.01em;
}
.clock-note svg {
  flex-shrink: 0;
  color: #7c3aed;
}
.epoch-value {
  display: inline-block;
  background: #1e1e1e;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 0.25rem 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #e0e0e0;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  cursor: text;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
  user-select: all;
}
.epoch-value:hover {
  border-color: #007bff;
  background-color: #1a2535;
}

/* Page & section titles */
.page-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #e0e0e0;
  text-align: center;
}
.converter-section {
  padding: 1.2rem;
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
}
.section-title {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
  margin: 0 0 0.85rem 0;
  font-weight: 500;
}

/* Epoch → Date inline form */
.inline-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.inline-form .value-input {
  border-radius: 6px;
}
.inline-form select {
  border-radius: 6px;
}
.inline-form button[type="submit"] {
  grid-column: span 2;
  margin-top: 0.75rem;
  padding: 0.6rem 1.4rem;
  justify-self: start;
  border-top: 1px solid #2a2a2a;
  padding-top: 1rem;
  width: 100%;
}

/* Date → Epoch form */
.date-form {
  display: block;
}
.date-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: flex-end;
}
.date-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.date-label {
  font-size: 0.72rem;
  color: #aaa;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.date-part {
  background-color: #1e1e1e;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 0.45rem 0.4rem;
  font-size: 0.95rem;
  text-align: center;
}
.date-part.yr {
  width: 70px;
}
.date-part.sm {
  width: 52px;
}
.date-inputs .sep {
  color: #555;
  font-size: 1.1rem;
  padding-bottom: 0.45rem;
  user-select: none;
}
.date-inputs select {
  border-radius: 6px;
  align-self: flex-end;
}
.date-inputs button[type="submit"] {
  align-self: flex-end;
  background-color: #7c3aed;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 0.5rem 1rem;
}
.date-inputs button[type="submit"]:hover {
  background-color: #5b21b6;
}
.form-action-btn {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.6rem 1.4rem;
  background-color: #7c3aed;
  color: white;
  border: none;
  border-top: 1px solid #2a2a2a;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding-top: 1rem;
}
.form-action-btn:hover {
  background-color: #5b21b6;
}

/* Result box */
.result {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #1e1e1e;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-top: 0.85rem;
  font-size: 1.05rem;
  flex-wrap: wrap;
}
.result strong {
  flex: 1;
}
.result button {
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 6px;
  color: #aaa;
  font-size: 0.82rem;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.result button:hover {
  background: #333;
  color: #e0e0e0;
}
.result-error {
  color: #ff6b6b;
}

/* Contact card */
.contact-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 1.4rem 1.8rem;
  margin-top: 1.5rem;
  max-width: 420px;
}

.contact-icon {
  color: #555;
  flex-shrink: 0;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.contact-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #555;
}

.contact-email {
  font-size: 0.95rem;
  color: #e0e0e0;
  text-decoration: none;
  font-weight: 500;
}

.contact-email:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Content section */
.content-section {
  margin-top: 3rem;
  margin-bottom: 2rem;
}

/* Static pages (About / Privacy / Contact) */
.static-page-shell {
  max-width: 880px;
  margin: 0 auto;
}

.static-hero {
  margin-bottom: 1.4rem;
  padding: 1.2rem 1.3rem;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  background: linear-gradient(145deg, #17171f 0%, #121212 100%);
}

.static-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #7d7d7d;
  font-weight: 600;
}

.static-title-left {
  text-align: left;
  margin: 0 0 0.5rem;
}

.static-lead {
  margin: 0;
  color: #b8b8b8;
  font-size: 0.95rem;
  line-height: 1.7;
}

.static-meta-pill {
  display: inline-block;
  margin: 0.15rem 0 0.7rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #383838;
  color: #9d9d9d;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.static-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.static-surface {
  background: #171717;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 1rem 1.05rem;
}

.static-page .static-section {
  margin-top: 1rem;
  margin-bottom: 0;
}

.static-page .static-section h3 {
  margin-top: 0;
}

.feature-list {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
}

.feature-list li {
  margin-bottom: 0.35rem;
}

.static-page a {
  color: #a78bfa;
  text-decoration-color: #6d4fd6;
  text-underline-offset: 2px;
}

.static-page a:hover,
.static-page a:focus-visible {
  color: #cab8ff;
}

.content-section h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #e0e0e0;
  margin-bottom: 0.5rem;
  margin-top: 2rem;
}

.content-section h3 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
}

.content-section p,
.content-section li {
  font-size: 0.92rem;
  color: #aaa;
  line-height: 1.7;
}

.content-section ul {
  padding-left: 1.4rem;
  margin-top: 0.4rem;
}

.content-section pre {
  border-radius: 6px;
  padding: 0.9rem 1.1rem;
  font-family: "Fira Code", "Consolas", monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  overflow-x: auto;
  margin: 0.5rem 0 1rem;
  border-left: 3px solid;
}

.content-section pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.content-section code {
  font-family: "Fira Code", "Consolas", monospace;
  font-size: 0.82rem;
  background: #1e1e1e;
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: #ce9178;
}

/* Python: blue tint */
pre.code-python {
  background: #0d1b2a;
  border-color: #4a90d9;
  color: #a8d8ff;
}

/* JavaScript: yellow tint */
pre.code-js {
  background: #1a1800;
  border-color: #f0d000;
  color: #fff0a0;
}

/* SQL: green tint */
pre.code-sql {
  background: #0d1f0f;
  border-color: #4caf50;
  color: #a5d6a7;
}

/* Epoch bar link */
.epoch-bar-link {
  color: #888;
  text-decoration: underline;
  text-decoration-color: #444;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.epoch-bar-link:hover {
  color: #a78bfa;
  text-decoration-color: #7c3aed;
}

/* Epoch clock page */
.clock-page-header {
  text-align: center;
  margin-bottom: 2rem;
}
.clock-page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #e0e0e0;
  margin-bottom: 0.5rem;
}
.clock-page-subtitle {
  font-size: 0.88rem;
  color: #555;
  margin: 0;
}
.clock-card {
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 2.5rem 2rem;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.clock-local-time {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 1rem;
}
.clock-epoch {
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 800;
  color: #7c3aed;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-bottom: 2rem;
  text-shadow: 0 0 40px rgba(124, 58, 237, 0.3);
}
.clock-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid #2a2a2a;
  padding-top: 1.2rem;
}
.clock-meta-row {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: #aaa;
  font-variant-numeric: tabular-nums;
}
.clock-meta-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #555;
}
.clock-meta-muted {
  color: #555;
}
.clock-meta-muted span {
  color: #555;
}

footer {
  margin-top: 2rem;
  padding: 1.2rem 0;
  border-top: 1px solid #2a2a2a;
  text-align: center;
  font-size: 0.78rem;
  color: #555;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
}

.footer-links {
  display: inline-flex;
  gap: 0.8rem;
  margin-left: 0.5rem;
}

.footer-links a,
.footer-links a:visited {
  color: #8b8b8b;
  text-decoration: underline;
  text-decoration-color: #3a3a3a;
  text-underline-offset: 3px;
  transition:
    color 0.2s ease,
    text-decoration-color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #a78bfa;
  text-decoration-color: #7c3aed;
}

/* ─── Nav links ─── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.nav-links a {
  color: #888;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}
.nav-links a:hover {
  color: #e0e0e0;
  background-color: #1e1e1e;
}
.nav-links a.active {
  color: #a78bfa;
  background-color: #1a1a2e;
}

/* Page title bar (title + reset) */
.page-title-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 1.5rem;
}
.page-title-bar .page-title {
  margin-bottom: 0;
}
.page-title-bar .reset-btn {
  position: absolute;
  right: 0;
  margin-top: 1.5rem;
  margin-right: 20px;
}

.reset-btn {
  background: transparent;
  color: #a78bfa;
  border: 1px solid #7c3aed;
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
.reset-btn:hover {
  background-color: #7c3aed;
  color: white;
}

/* Fix dark calendar/clock icon in datetime-local inputs */
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
  cursor: pointer;
}

/* Page subtitle */
.page-subtitle {
  text-align: center;
  color: #777;
  font-size: 0.9rem;
  margin: -0.8rem 0 1.5rem;
}

/* Result sub-line & UTC line */
.result-sub {
  font-size: 0.82rem;
  color: #888;
}
.result-utc {
  font-size: 0.82rem;
  color: #7c9aed;
  margin-top: 0.3rem;
  padding-top: 0.3rem;
  border-top: 1px solid #2a2a2a;
}

/* ─── Duration Calculator ─── */
.duration-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.duration-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.duration-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  width: 3rem;
  flex-shrink: 0;
  font-weight: 600;
}

/* ─── Common Events ─── */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 550px) {
  .events-grid {
    grid-template-columns: 1fr;
  }
}
.event-card {
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.event-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #777;
  font-weight: 600;
}
.event-ts {
  font-size: 1.3rem;
  font-weight: 700;
  color: #e0e0e0;
  font-variant-numeric: tabular-nums;
}
.event-ts-live {
  color: #7c3aed;
}
.event-readable {
  font-size: 0.78rem;
  color: #888;
}
.event-copy {
  align-self: flex-start;
  margin-top: 0.3rem;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 6px;
  color: #aaa;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.event-copy:hover {
  background: #333;
  color: #e0e0e0;
}
.events-tz-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #777;
  background: #1a1a2e;
  border: 1px solid #2e2e4a;
  border-left: 3px solid #7c3aed;
  border-radius: 6px;
  padding: 0.55rem 1rem;
}
.events-tz-note svg {
  flex-shrink: 0;
  color: #7c3aed;
}

/* ─── API Playground ─── */
.api-section {
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 1.2rem;
}
.api-endpoint {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.api-method {
  background: #1a2e1a;
  color: #4caf50;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.api-url {
  font-family: "Fira Code", "Consolas", monospace;
  font-size: 0.95rem;
  color: #e0e0e0;
  background: none;
  padding: 0;
}
.api-rate {
  font-size: 0.72rem;
  color: #888;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}
.api-form {
  margin-top: 1rem;
}
.api-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
@media (max-width: 550px) {
  .api-form-grid {
    grid-template-columns: 1fr;
  }
}
.api-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* --- Timestamp examples table --- */
.ts-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 0.5rem;
  font-size: 0.88rem;
}
.ts-table th,
.ts-table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #2a2a2a;
}
.ts-table th {
  color: #8ab4f8;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ts-table td:first-child {
  font-family: "Fira Code", "Consolas", monospace;
  color: #ce9178;
}
@media (max-width: 600px) {
  .ts-table th,
  .ts-table td {
    padding: 0.4rem 0.45rem;
    font-size: 0.8rem;
  }
}

/* --- FAQ items --- */
.faq-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #222;
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-item h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e0e0e0;
}
.faq-item p {
  margin: 0;
  color: #aaa;
  line-height: 1.65;
}
.api-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  font-weight: 600;
}
.api-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}
@media (max-width: 768px) {
  .api-panels {
    grid-template-columns: 1fr;
  }
}
.api-panel {
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 1rem;
}
.api-panel-title {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #777;
  font-weight: 600;
}
.api-code {
  background: #0d1b2a;
  border: 1px solid #1a2e4a;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  font-family: "Fira Code", "Consolas", monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #a8d8ff;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.api-code-response {
  background: #0d1f0f;
  border-color: #1a3a1a;
  color: #a5d6a7;
}
