:root {
  color-scheme: dark;
  --bg: #0f1117;
  --bg-soft: #151922;
  --panel: #1b202b;
  --panel-strong: #222938;
  --border: #303849;
  --border-strong: #485267;
  --text: #f4f7fb;
  --muted: #a8b3c7;
  --muted-strong: #c6cfdd;
  --accent: #2ed3b7;
  --accent-strong: #63e6ce;
  --accent-dark: #0a6c61;
  --blue: #65a8ff;
  --danger: #ff7d7d;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius: 8px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(46, 211, 183, 0.14), transparent 28rem),
    linear-gradient(180deg, #11141c 0%, var(--bg) 34rem);
  font-family: var(--sans);
  line-height: 1.5;
}

button,
input,
select,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  padding: 48px 20px 28px;
}

.header-inner,
.app-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 790px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.header-copy {
  max-width: 730px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.header-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(27, 32, 43, 0.78);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(0, 1fr);
  gap: 20px;
  padding-bottom: 44px;
}

.config-panel,
.output-panel,
.vps-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(27, 32, 43, 0.88);
  box-shadow: var(--shadow);
}

.config-panel,
.output-panel {
  min-width: 0;
}

.config-panel {
  padding: 20px;
}

.output-panel {
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.output-heading {
  padding: 20px 20px 0;
}

.generator-form {
  display: grid;
  gap: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 0.92rem;
  font-weight: 650;
}

.field input,
.field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 11px;
  color: var(--text);
  background: var(--bg-soft);
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46, 211, 183, 0.16);
}

.switch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.switch-grid legend {
  padding: 0 6px;
  color: var(--muted-strong);
  font-weight: 750;
}

.switch {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  color: var(--muted-strong);
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.slider {
  position: relative;
  width: 42px;
  height: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #10141d;
  transition: 160ms ease;
}

.slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: 160ms ease;
}

.switch input:checked + .slider {
  border-color: rgba(46, 211, 183, 0.72);
  background: rgba(46, 211, 183, 0.22);
}

.switch input:checked + .slider::after {
  transform: translateX(18px);
  background: var(--accent);
}

.switch input:focus-visible + .slider {
  box-shadow: 0 0 0 3px rgba(46, 211, 183, 0.18);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: var(--radius);
  padding: 8px 13px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: 150ms ease;
  white-space: nowrap;
}

.primary-button {
  color: #061513;
  background: var(--accent);
  font-weight: 800;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--panel-strong);
}

.secondary-button:hover,
.ghost-button:hover {
  border-color: var(--accent);
}

.ghost-button {
  color: var(--muted-strong);
  border-color: var(--border);
  background: transparent;
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 0 20px 14px;
  overflow-x: auto;
  scrollbar-color: var(--border-strong) transparent;
}

.tab-button {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--muted-strong);
  background: var(--bg-soft);
  cursor: pointer;
}

.tab-button[aria-selected="true"] {
  color: #061513;
  border-color: var(--accent);
  background: var(--accent);
  font-weight: 800;
}

.code-frame {
  border-top: 1px solid var(--border);
  background: #0b0e14;
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 18px;
  border-bottom: 1px solid #202635;
  color: var(--muted-strong);
  font-family: var(--mono);
  font-size: 0.84rem;
}

#copy-feedback {
  color: var(--accent-strong);
  font-family: var(--sans);
}

pre {
  min-height: 560px;
  max-height: 680px;
  margin: 0;
  overflow: auto;
  padding: 18px;
  scrollbar-color: var(--border-strong) transparent;
}

code {
  color: #d8e1ef;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.58;
  white-space: pre;
}

.vps-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
  padding: 20px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.resource-box {
  display: grid;
  gap: 4px;
  min-height: 90px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.resource-box span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
}

.resource-box strong {
  font-size: 1.45rem;
  line-height: 1.15;
}

.vps-note {
  color: var(--muted);
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(46, 211, 183, 0.28);
  border-radius: var(--radius);
  background: rgba(46, 211, 183, 0.08);
}

.cta-panel p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 940px) {
  .header-inner,
  .app-shell {
    width: min(100% - 28px, 760px);
  }

  .header-inner,
  .app-shell,
  .cta-panel {
    grid-template-columns: 1fr;
  }

  .header-inner,
  .cta-panel {
    display: grid;
  }

  .header-status,
  .button-row {
    justify-content: flex-start;
  }

  .output-heading {
    display: grid;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding-top: 32px;
  }

  .switch-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    display: grid;
  }

  .button-row,
  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100%;
  }

  .tabs {
    padding-inline: 14px;
  }

  .output-heading {
    padding-inline: 14px;
  }

  pre {
    min-height: 440px;
    max-height: 600px;
    padding: 14px;
  }
}
