:root {
  color-scheme: dark;
  --bg: #061018;
  --bg-deep: #030912;
  --surface: rgba(8, 18, 30, 0.74);
  --surface-strong: rgba(10, 22, 35, 0.9);
  --surface-soft: rgba(8, 19, 31, 0.56);
  --text: #edf7ff;
  --muted: #8ea8bc;
  --line: rgba(146, 194, 228, 0.16);
  --line-strong: rgba(126, 243, 255, 0.42);
  --accent: #76efff;
  --accent-strong: #2ef1cf;
  --accent-warm: #ffbe72;
  --accent-glow: rgba(118, 239, 255, 0.24);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.22);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Aptos", "Yu Gothic UI", "Hiragino Sans", sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(46, 241, 207, 0.12), transparent 24%),
    radial-gradient(circle at 82% 6%, rgba(118, 239, 255, 0.16), transparent 28%),
    radial-gradient(circle at 50% 120%, rgba(255, 190, 114, 0.07), transparent 24%),
    linear-gradient(180deg, #091420 0%, var(--bg) 44%, var(--bg-deep) 100%);
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background-image:
    linear-gradient(rgba(118, 239, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(118, 239, 255, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent 92%);
}

body::after {
  background:
    linear-gradient(120deg, transparent 0%, rgba(118, 239, 255, 0.03) 40%, transparent 100%),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.012) 0,
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px,
      transparent 8px
    );
  mix-blend-mode: screen;
}

a {
  color: inherit;
}

.page {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 88px;
}

.tool-page {
  width: min(1160px, calc(100% - 36px));
}

.hero,
.panel,
.card,
.tool-editor,
.tool-sidebar,
.tool-actions,
.tool-output,
.mini-panel,
.tool-note {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(13, 29, 45, 0.78), rgba(6, 15, 25, 0.92)),
    linear-gradient(135deg, rgba(118, 239, 255, 0.03), transparent 44%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(130%);
}

.hero::before,
.panel::before,
.card::before,
.tool-editor::before,
.tool-sidebar::before,
.tool-actions::before,
.tool-output::before,
.mini-panel::before,
.tool-note::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(118, 239, 255, 0.12), transparent 38%, rgba(255, 190, 114, 0.06) 100%);
  opacity: 0.9;
}

.hero::after,
.panel::after,
.card::after,
.tool-editor::after,
.tool-sidebar::after,
.tool-actions::after,
.tool-output::after,
.mini-panel::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(118, 239, 255, 0.08);
  border-radius: calc(var(--radius-lg) - 6px);
  pointer-events: none;
}

.hero,
.panel {
  animation: rise-in 0.7s ease both;
}

.grid .card:nth-child(1) {
  animation: rise-in 0.7s ease 0.06s both;
}

.grid .card:nth-child(2) {
  animation: rise-in 0.7s ease 0.12s both;
}

.grid .card:nth-child(3) {
  animation: rise-in 0.7s ease 0.18s both;
}

.hero {
  padding: 36px;
  border-radius: var(--radius-xl);
}

.hero-top,
.tool-hero-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.eyebrow,
.status-chip,
.info-chip,
.back-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(118, 239, 255, 0.2);
  background: rgba(4, 16, 27, 0.76);
  color: #dcfbff;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.eyebrow::before,
.status-chip::before,
.info-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 0 18px rgba(118, 239, 255, 0.78);
}

.back-link {
  text-decoration: none;
}

.back-link::before {
  content: "<";
  font-size: 0.82rem;
  line-height: 1;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

h1 {
  max-width: 11ch;
  font-family: "Bahnschrift SemiCondensed", "Aptos Display", "Yu Gothic UI", sans-serif;
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  text-wrap: balance;
  background: linear-gradient(180deg, #f4fbff 0%, #b6e9ff 60%, #78d4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 26px rgba(118, 239, 255, 0.08);
}

.lead {
  max-width: 42rem;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.9;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.72fr);
  gap: 24px;
  align-items: end;
}

.hero-side {
  display: grid;
  gap: 14px;
}

.mini-panel {
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.mini-panel-label {
  margin-bottom: 8px;
  color: var(--accent);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mini-panel strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.04rem;
}

.mini-panel p,
.mini-panel li {
  color: var(--muted);
  line-height: 1.75;
}

.mini-panel ul {
  padding-left: 18px;
}

.panel {
  margin-top: 22px;
  padding: 24px;
  border-radius: var(--radius-lg);
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.panel-title {
  font-size: 1.18rem;
}

.panel-copy {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.8;
}

.info-row,
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.info-chip {
  color: var(--text);
}

.info-chip--warm::before {
  background: linear-gradient(180deg, #ffd69b 0%, var(--accent-warm) 100%);
  box-shadow: 0 0 18px rgba(255, 190, 114, 0.58);
}

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

.card {
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card-link {
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.card-link:hover,
.card-link:focus-visible {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(118, 239, 255, 0.12);
}

.card-label {
  margin-bottom: 12px;
  color: var(--accent);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.card h2 {
  margin-bottom: 10px;
  font-size: 1.12rem;
}

.card p {
  color: var(--muted);
  line-height: 1.8;
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(290px, 0.78fr);
  gap: 22px;
  align-items: start;
  margin-top: 22px;
}

.tool-column {
  min-width: 0;
}

.tool-editor,
.tool-sidebar,
.tool-output {
  border-radius: var(--radius-lg);
  padding: 24px;
}

.tool-actions {
  margin-top: 18px;
  border-radius: var(--radius-lg);
  padding: 18px;
}

.tool-section-title {
  margin-bottom: 12px;
  font-size: 1rem;
}

.tool-label {
  display: block;
  margin-bottom: 10px;
  color: #ddfbff;
  font-size: 0.9rem;
  font-weight: 700;
}

.tool-textarea {
  width: 100%;
  min-height: 280px;
  padding: 16px;
  border: 1px solid rgba(118, 239, 255, 0.18);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(2, 10, 17, 0.92), rgba(7, 17, 27, 0.88));
  color: var(--text);
  font: inherit;
  line-height: 1.75;
  resize: vertical;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.01),
    inset 0 -20px 40px rgba(118, 239, 255, 0.02);
}

.tool-textarea::placeholder {
  color: rgba(142, 168, 188, 0.72);
}

.tool-textarea:focus {
  outline: 2px solid rgba(118, 239, 255, 0.22);
  border-color: rgba(118, 239, 255, 0.34);
}

.tool-textarea[readonly] {
  background:
    linear-gradient(180deg, rgba(6, 15, 25, 0.96), rgba(5, 13, 21, 0.9));
}

.tool-option-list {
  display: grid;
  gap: 12px;
}

.tool-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  line-height: 1.65;
}

.tool-option input {
  margin-top: 4px;
  accent-color: var(--accent-strong);
}

.tool-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tool-button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(118, 239, 255, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(47, 239, 205, 0.98), rgba(25, 181, 156, 0.95));
  color: #031019;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(46, 241, 207, 0.18);
  transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.tool-button.secondary {
  background: rgba(8, 20, 32, 0.86);
  color: var(--text);
  box-shadow: none;
}

.tool-button:hover,
.tool-button:focus-visible {
  transform: translateY(-1px);
  opacity: 0.97;
}

.tool-button:hover {
  box-shadow: 0 16px 34px rgba(46, 241, 207, 0.22);
}

.tool-meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.tool-sidebar-grid {
  display: grid;
  gap: 16px;
}

.tool-note {
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.tool-note-label {
  margin-bottom: 8px;
  color: var(--accent);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tool-note h2 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.tool-note p,
.tool-note li {
  color: var(--muted);
  line-height: 1.75;
}

.tool-note ul {
  margin-top: 10px;
  padding-left: 18px;
}

.tool-output {
  margin-top: 18px;
}

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

.checkbox-card {
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: var(--radius-md);
  border: 1px solid rgba(118, 239, 255, 0.12);
  background: rgba(6, 15, 24, 0.62);
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
  color: var(--muted);
  line-height: 1.6;
}

.checkbox-card input {
  accent-color: var(--accent);
}

.tool-textarea--output {
  min-height: 132px;
}

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

.stat-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(118, 239, 255, 0.12);
  background: rgba(6, 15, 24, 0.62);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.stat-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1;
  color: var(--text);
}

.stat-card p {
  color: var(--muted);
  line-height: 1.7;
}

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

.example-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(118, 239, 255, 0.12);
  background: rgba(6, 15, 24, 0.62);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.example-block {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.8;
}

.related-grid {
  margin-top: 18px;
}

.serp-preview-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(118, 239, 255, 0.14);
  background:
    radial-gradient(circle at top right, rgba(118, 239, 255, 0.12), transparent 36%),
    rgba(7, 16, 25, 0.88);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.serp-url {
  margin-bottom: 8px;
  color: #8bd998;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
}

.serp-title {
  margin-bottom: 10px;
  color: #8ab4f8;
  font-size: 1.35rem;
  line-height: 1.4;
  font-weight: 500;
}

.serp-description {
  color: #c4cdd9;
  line-height: 1.75;
  word-break: break-word;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .hero-grid,
  .tool-shell {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 13ch;
  }
}

@media (max-width: 760px) {
  .page,
  .tool-page {
    width: min(100% - 20px, 1120px);
    padding: 22px 0 64px;
  }

  .hero,
  .panel,
  .card,
  .tool-editor,
  .tool-sidebar,
  .tool-actions,
  .tool-output,
  .mini-panel,
  .tool-note {
    border-radius: 20px;
  }

  .hero,
  .panel,
  .card,
  .tool-editor,
  .tool-sidebar,
  .tool-output,
  .mini-panel,
  .tool-note {
    padding: 20px;
  }

  .tool-actions {
    padding: 16px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .example-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .tool-option-grid {
    grid-template-columns: 1fr;
  }

  .tool-textarea {
    min-height: 220px;
  }
}
