﻿:root {
  --bg: #0b0f14;
  --panel: #0f141a;
  --text: #e6f1ff;
  --muted: #7a8b9a;
  --accent: #64ffda;
  --error: #ff6b6b;
  --warn: #ffd166;
  --ok: #80ffea;
  --shadow: 0 0 30px rgba(100, 255, 218, 0.05), 0 0 2px rgba(100,255,218,0.15);
  --border: rgba(100,255,218,0.25);
  --font-sans: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

[data-theme="light"] {
  --bg: #f7fafc;
  --panel: #ffffff;
  --text: #0b0f14;
  --muted: #61707e;
  --accent: #00796b;
  --error: #c62828;
  --warn: #ef6c00;
  --ok: #00695c;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  --border: rgba(0,121,107,0.35);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed rgba(100,255,218,0.35);
  transition: border-color 0.2s ease;
}

a:hover {
  border-bottom-style: solid;
}

.wrap,
.page-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.page-shell.narrow {
  max-width: 720px;
}

.panel {
  background: var(--panel);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel + .panel {
  margin-top: 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  border-bottom: none;
  margin-bottom: 16px;
}

.back-link:hover {
  color: var(--text);
}

.tagline,
.lead,
.muted {
  color: var(--muted);
}

.tagline {
  margin-top: 8px;
  font-size: 1rem;
}

.page-title {
  margin: 0;
  font-size: 2.5rem;
}

.section-title {
  margin: 0 0 12px;
  font-size: 1.4rem;
}

.lead {
  font-size: 1.05rem;
  margin-bottom: 28px;
}

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

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(100,255,218,0.08);
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn:hover,
button.btn:hover {
  background: rgba(100,255,218,0.2);
}

.btn.secondary,
button.btn.secondary {
  background: transparent;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #111821;
  background-color: #111821;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-sans);
  box-sizing: border-box;
  color-scheme: dark;
}

input[type="color"] {
  padding: 0;
  height: 44px;
}

input[type="number"],
input[type="date"] {
  background: #111821;
  background-color: #111821;
  color: var(--text);
  border: 1px solid var(--border);
  appearance: none;
  color-scheme: dark;
}

input[type="number"]:focus,
input[type="date"]:focus {
  outline: none;
  border-color: var(--accent);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(75%);
}

input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
  background-color: transparent;
  color: var(--text);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #111821 inset;
  border: 1px solid var(--border);
  transition: background-color 9999s ease-out 0s;
  caret-color: var(--text);
}

label {
  font-weight: 600;
  margin-bottom: 6px;
  display: inline-block;
}

.result-field {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.result-field input {
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

code {
  background: rgba(255,255,255,0.05);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

footer.page-footer {
  margin-top: 48px;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .wrap,
  .page-shell {
    padding: 32px 18px 48px;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}
