:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #eef3f8;
  --text: #172033;
  --muted: #647086;
  --border: #dce3ec;
  --accent: #1f7a6d;
  --accent-dark: #155c52;
  --accent-soft: #dff3ef;
  --shadow: 0 18px 45px rgba(23, 32, 51, 0.08);
  --radius: 8px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

.site-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner,
.section-inner,
.footer-inner {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: var(--accent);
  border-radius: var(--radius);
  font-size: 0.9rem;
  letter-spacing: 0;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent);
}

.hero {
  background:
    linear-gradient(110deg, rgba(12, 31, 45, 0.9), rgba(31, 122, 109, 0.72)),
    linear-gradient(135deg, #203449 0%, #1f7a6d 100%);
  color: #ffffff;
}

.hero-inner {
  width: min(100% - 32px, var(--max-width));
  min-height: 500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  align-items: center;
  gap: 48px;
  padding: 76px 0;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero p,
.page-hero p {
  max-width: 650px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.1rem;
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.button-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #ffffff;
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.button-light {
  background: #ffffff;
  color: var(--accent-dark);
}

.button-light:hover {
  background: var(--surface-soft);
}

.button-outline {
  background: #ffffff;
  border-color: var(--border);
  color: var(--text);
}

.button-outline:hover {
  background: var(--surface-soft);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

.hero-visual {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.16);
}

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

.tool-preview-item {
  min-height: 84px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

.tool-preview-item strong {
  display: block;
  margin-bottom: 6px;
}

.tool-preview-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--surface);
}

.section-header {
  max-width: 720px;
  margin-bottom: 30px;
}

.section-header h2,
.cta-section h2,
.tool-page-title {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.section-header p,
.cta-section p,
.tool-note,
.tool-description {
  margin: 0;
  color: var(--muted);
}

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

.intro-item,
.why-item {
  padding-top: 18px;
  border-top: 3px solid var(--accent);
}

.intro-item h3,
.why-item h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.intro-item p,
.why-item p {
  margin: 0;
  color: var(--muted);
}

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

.tool-card {
  display: flex;
  min-height: 238px;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.05);
}

.tool-card h2,
.tool-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  line-height: 1.25;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
}

.tool-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.tool-meta,
.status-badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-badge {
  background: #edf6ff;
  color: #215c8a;
}

.status-badge.is-planned {
  background: #f4eefb;
  color: #6a3f91;
}

.text-link {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.category-label {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.monetization-note {
  max-width: 760px;
  margin: -12px 0 28px;
}

.access-note {
  margin-top: 10px;
}

.cta-section {
  background: var(--accent-dark);
  color: #ffffff;
  text-align: center;
}

.cta-section p {
  max-width: 640px;
  margin: 0 auto 24px;
  color: rgba(255, 255, 255, 0.82);
}

.cta-actions {
  justify-content: center;
}

.page-hero {
  background: linear-gradient(135deg, #203449, #1f7a6d);
  color: #ffffff;
}

.page-hero .section-inner {
  padding: 66px 0;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.75fr);
  align-items: start;
  gap: 28px;
}

.tool-ui-card,
.help-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tool-ui-card {
  padding: 26px;
}

.tool-ui-card h2,
.help-panel h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.pricing-status-box {
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 700;
}

.plan-grid,
.comparison-grid,
.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.faq-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plan-card,
.compare-card,
.faq-item {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.05);
}

.plan-card {
  display: flex;
  min-height: 420px;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.plan-card.is-highlighted {
  border-color: rgba(31, 122, 109, 0.45);
  box-shadow: var(--shadow);
}

.plan-card h2,
.compare-card h3,
.faq-item h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
}

.price-text {
  margin: 0;
  color: var(--text);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.1;
}

.plan-description,
.faq-item p {
  margin: 0;
  color: var(--muted);
}

.plan-feature-list,
.compare-card ul {
  margin: 0 0 6px;
  padding-left: 20px;
  color: var(--muted);
}

.plan-feature-list {
  flex: 1;
}

.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.placeholder-box {
  min-height: 220px;
  padding: 18px;
  border: 1px dashed #b7c4d2;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.placeholder-box h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.placeholder-box p {
  margin: 0;
  color: var(--muted);
}

.placeholder-control {
  width: 100%;
  min-height: 110px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  resize: vertical;
}

.resizer-workspace,
.converter-workspace,
.compressor-workspace,
.text-tool-workspace,
.dev-tool-workspace {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.tool-panel {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.tool-panel h3 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.tool-message {
  display: none;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-weight: 700;
}

.tool-message.is-visible {
  display: block;
}

.tool-message.is-success {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.tool-message.is-error {
  background: #fde8e8;
  color: #9f1c1c;
}

.tool-message.is-info {
  background: var(--surface-soft);
  color: var(--text);
}

.file-upload-box {
  display: block;
  padding: 18px;
  border: 1px dashed #9fb0c1;
  border-radius: var(--radius);
  background: var(--surface-soft);
  cursor: pointer;
}

.image-drop-zone {
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.image-drop-zone.is-drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(31, 122, 109, 0.18);
}

.file-upload-title {
  display: block;
  margin-bottom: 5px;
  font-weight: 700;
}

.file-upload-text,
.helper-text {
  color: var(--muted);
  font-size: 0.92rem;
}

.file-input {
  width: 100%;
  margin-top: 12px;
}

.preview-panel {
  min-height: 220px;
  margin-top: 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.preview-panel img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.preview-empty {
  margin: 0;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 0;
}

.info-list div {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.info-list dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.info-list dd {
  margin: 3px 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.resize-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-group {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.form-group input[type="range"] {
  padding: 0;
}

.large-text-input {
  min-height: 320px;
  resize: vertical;
  line-height: 1.55;
}

.code-text-input {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95rem;
  white-space: pre;
}

.slug-input {
  min-height: 190px;
}

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

.option-grid .checkbox-row {
  min-height: 48px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.slug-output-box,
.url-preview {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  overflow-wrap: anywhere;
}

.slug-output-box {
  min-height: 72px;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.slug-empty {
  color: var(--muted);
}

.slug-value {
  color: var(--accent-dark);
  font-size: 1.25rem;
  font-weight: 700;
}

.url-preview {
  margin: 8px 0 16px;
  color: var(--text);
  font-weight: 700;
}

.slug-stats {
  margin-bottom: 16px;
}

.json-stats {
  margin-top: 16px;
}

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

.stat-card {
  min-height: 96px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.stat-label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.stat-value {
  color: var(--text);
  font-size: 1.55rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-weight: 700;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.preset-options,
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preset-button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.preset-button:hover,
.preset-button.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.quality-control[hidden],
.download-button[hidden] {
  display: none;
}

.download-button {
  margin-top: 16px;
}

.help-panel {
  padding: 22px;
}

.help-panel ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.back-link {
  display: inline-flex;
  margin-top: 22px;
}

.site-footer {
  padding: 34px 0;
  background: #101928;
  color: rgba(255, 255, 255, 0.76);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

@media (max-width: 860px) {
  .header-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 0;
  }

  .hero-inner,
  .tool-layout {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    min-height: auto;
    padding: 58px 0;
  }

  .intro-grid,
  .why-grid,
  .card-grid,
  .plan-grid,
  .comparison-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav-list,
  .footer-links,
  .hero-actions,
  .cta-actions {
    width: 100%;
  }

  .nav-list {
    justify-content: space-between;
  }

  .button,
  .hero-actions .button,
  .cta-actions .button {
    width: 100%;
  }

  .tool-preview,
  .placeholder-grid,
  .info-list,
  .resize-input-grid,
  .stats-grid,
  .option-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 52px 0;
  }

  .page-hero .section-inner {
    padding: 48px 0;
  }
}
