:root {
  --bg: #0c0f14;
  --bg-elevated: #141a24;
  --bg-input: #0e131c;
  --border: rgba(94, 234, 212, 0.12);
  --accent: #5eead4;
  --accent-dim: rgba(94, 234, 212, 0.55);
  --text: #e8edf5;
  --text-muted: #8b98ab;
  --danger: #f87171;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --radius: 12px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(94, 234, 212, 0.08), transparent),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(56, 189, 248, 0.06), transparent),
    var(--bg);
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

/* Keeps layout identical while grouping controls for native reset(). */
.dna-tool-form {
  display: contents;
}

header.hero {
  text-align: center;
  margin-bottom: 2rem;
}

header.hero h1 {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: clamp(1.65rem, 4vw, 2.05rem);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #f0fdfa 0%, var(--accent) 55%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

header.hero .hero-guide {
  max-width: 42rem;
  margin: 0.75rem auto 0;
  text-align: left;
}

header.hero .hero-guide p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.58;
}

header.hero .hero-guide p + p {
  margin-top: 0.85rem;
}

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.15rem;
  box-shadow: var(--shadow);
}

.panel + .panel {
  margin-top: 1.25rem;
}

.field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin-bottom: 0.45rem;
}

.field-label-spaced {
  margin-top: 1.1rem;
}

.seq-input {
  width: 100%;
  min-height: 140px;
  padding: 0.75rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  resize: vertical;
}

.seq-input:focus {
  outline: none;
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
}

.reset-row {
  margin-top: 0.55rem;
  display: flex;
  justify-content: flex-end;
}

.btn-reset {
  padding: 0.48rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.btn-reset:hover {
  color: var(--text);
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.06);
}

.btn-reset:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.2);
}

.file-row {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.file-row input[type="file"] {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.mode-row {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1rem;
}

.mode-row .mode-select {
  flex: 1 1 220px;
}

.mode-select {
  width: 100%;
  margin-top: 0;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.mode-select:focus {
  outline: none;
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
}

.btn-run {
  padding: 0.62rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: #0c0f14;
  background: linear-gradient(135deg, #5eead4, #38bdf8);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-run:hover {
  filter: brightness(1.06);
}

.btn-run:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.35);
}

.btn-copy {
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(94, 234, 212, 0.1);
  border: 1px solid rgba(94, 234, 212, 0.35);
  border-radius: 8px;
  cursor: pointer;
}

.btn-copy:hover {
  background: rgba(94, 234, 212, 0.16);
}

.output-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.output-head .field-label {
  margin-bottom: 0;
}

.status-line {
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  min-height: 1.35rem;
}

.status-line.status-warn {
  color: #fcd34d;
}

footer.note {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
}
