: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;
  --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;
}

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;
}

.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: 160px;
  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);
}

.options-row {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1rem;
}

.options-row .mode-select {
  flex: 1 1 220px;
}

.mode-select {
  width: 100%;
  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);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}

.checkbox-label input {
  margin-top: 0.18rem;
  accent-color: var(--accent);
}

.btn-run {
  width: 100%;
  margin-top: 1rem;
  padding: 0.72rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: #0c0f14;
  background: linear-gradient(135deg, #5eead4, #38bdf8);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.btn-run:hover {
  filter: brightness(1.05);
}

.status-line {
  margin: 0.85rem 0 0;
  min-height: 1.2rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.status-line.status-warn {
  color: #fbbf24;
}

.frames-output {
  display: grid;
  gap: 1rem;
}

.frame-block {
  padding: 1rem 1rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-input);
}

.frame-head {
  margin-bottom: 0.55rem;
}

.frame-title {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}

.frame-seq {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

footer.note {
  margin-top: 1.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

@media (max-width: 540px) {
  main {
    padding: 1.35rem 1rem 2.5rem;
  }
}
