:root {
  --bg: #0b1220;
  --surface: #0f172a;
  --panel: #111a2c;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --primary: #38bdf8;
  --primary-strong: #0ea5e9;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow: 0 22px 52px rgba(14, 165, 233, 0.22);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(120% 80% at 10% 10%, rgba(56, 189, 248, 0.16), transparent 52%),
    radial-gradient(120% 80% at 90% 0%, rgba(59, 130, 246, 0.16), transparent 56%),
    var(--bg);
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover,
a:focus {
  text-decoration: underline;
}

.container {
  width: min(1140px, 94vw);
  margin: 0 auto;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  gap: 1rem;
}
.brand {
  display: flex;
  flex-direction: column;
}
.brand__name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand__tagline {
  font-size: 0.9rem;
  color: var(--muted);
}

.site-main {
  padding: 2.6rem 0 3.4rem;
}

.intro {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow);
}
.intro h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(2.1rem, 4vw, 2.8rem);
}
.intro p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.6;
}

.seo-content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.8rem;
  box-shadow: var(--shadow);
}
.seo-content__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem 1.4rem;
  margin-bottom: 1.2rem;
}
.seo-content__list {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.6;
  color: var(--text);
}
.seo-content__list--ordered {
  list-style: decimal;
}
.seo-content__faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.02);
}
.seo-content__faq details + details {
  margin-top: 0.7rem;
}
.seo-content__faq summary {
  cursor: pointer;
  font-weight: 600;
}

.tool {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.8rem;
  align-items: start;
  margin-bottom: 1.8rem;
}

.tool-form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem;
  box-shadow: var(--shadow);
}
.tool-form fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin: 0 0 1.1rem;
  background: rgba(255, 255, 255, 0.02);
}
.tool-form legend {
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0 0.5rem;
  color: var(--text);
}
.tool-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem 1.2rem;
}
.tool-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.tool-form__field--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}
.tool-form__label {
  font-size: 0.95rem;
  font-weight: 600;
}
.field-help {
  font-size: 0.82rem;
  color: var(--muted);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #0f172a;
  font: inherit;
  color: var(--text);
}
textarea {
  resize: vertical;
  min-height: 110px;
}
input[type="range"] {
  accent-color: var(--primary);
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
input[type="color"] {
  padding: 0.15rem;
  height: 2.75rem;
  cursor: pointer;
  background: #0f172a;
}

.tool-form__actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.78rem 1.5rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}
.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #0b1220;
  box-shadow: 0 16px 36px rgba(56, 189, 248, 0.35);
}
.btn--primary:hover:not(:disabled),
.btn--primary:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 20px 42px rgba(56, 189, 248, 0.4);
}
.btn--ghost {
  background: transparent;
  color: var(--primary);
  border-color: rgba(56, 189, 248, 0.4);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(56, 189, 248, 0.08);
}

.tool-preview {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 80px;
}
.tool-preview h2 {
  margin-top: 0;
}
.preview-frame {
  padding: 1.2rem;
  background: #0b1220;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 320px;
}
.qr-preview {
  width: 100%;
  max-width: 360px;
  min-height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.qr-preview img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  background: #ffffff;
}
.qr-preview__placeholder {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 0 1rem;
}
.preview-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.preview-help {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}
.preview-status {
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
  transition: color 0.2s ease;
}
.preview-status[data-tone="success"] {
  color: #34d399;
}
.preview-status[data-tone="error"] {
  color: #f87171;
}
.preview-status[data-tone="info"],
.preview-status[data-tone=""] {
  color: var(--muted);
}

.site-footer {
  margin-top: 2rem;
  padding: 1.4rem 0 1.8rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
.site-footer__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
}
.site-footer__contact {
  color: var(--primary);
}

@media (max-width: 960px) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .tool {
    grid-template-columns: 1fr;
  }
  .tool-preview {
    position: static;
  }
  .tool-form__grid {
    grid-template-columns: 1fr;
  }
  .seo-content__grid {
    grid-template-columns: 1fr;
  }
}
