:root {
  --bg: #0f1115;
  --panel: #171a21;
  --text: #f4f6fb;
  --muted: #a8b0bf;
  --line: #2b3242;
  --brand: #5c8dff;
  --brand-strong: #3d74ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(circle at top, #181d2a, var(--bg) 45%);
  color: var(--text);
  min-height: 100vh;
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 36px 16px 56px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.hero-copy {
  min-width: 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
}

.hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

.card {
  margin-top: 22px;
  background: color-mix(in srgb, var(--panel) 90%, #fff 10%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

label {
  font-size: 14px;
  color: #d2d8e4;
  margin-bottom: 8px;
  display: block;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: #0d1018;
  color: var(--text);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--brand);
}

.row {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.two-col > * {
  flex: 1;
}

.options {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.language-box {
  width: 190px;
}

.language-box label {
  margin-bottom: 6px;
}

.editor-wrap {
  position: relative;
}

#codeEditor {
  width: 100%;
  min-height: 380px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

#codeEditor:focus-within {
  border-color: var(--brand);
}

.code-fallback {
  width: 100%;
  min-height: 380px;
  border: 1px solid var(--line);
  background: #0d1018;
  color: var(--text);
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.55;
  outline: none;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.code-fallback:focus {
  border-color: var(--brand);
}

.checkbox-wrap {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.checkbox-wrap input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

button {
  border: none;
  border-radius: 10px;
  padding: 11px 14px;
  cursor: pointer;
  font-weight: 600;
}

button.primary {
  background: var(--brand);
  color: #fff;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.icon-btn i {
  width: 16px;
  height: 16px;
}

.action-buttons {
  margin-top: 14px;
}

.action-buttons button {
  flex: 1;
}

.action-buttons .primary {
  margin-top: 0;
  background: var(--brand);
  color: #fff;
}

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

button.secondary {
  background: #242b3a;
  color: #e4eaf8;
}

.status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.seo-copy {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 82%, #fff 18%);
}

.seo-copy h2 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 26px);
}

.seo-copy p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-language {
    width: 100%;
    max-width: 200px;
  }

  .two-col {
    flex-direction: column;
  }
}
