:root {
  --bg: #08111d;
  --bg-soft: #111b2e;
  --panel: rgba(11, 18, 32, 0.82);
  --panel-strong: rgba(12, 20, 36, 0.96);
  --line: rgba(160, 188, 255, 0.14);
  --text: #ecf3ff;
  --muted: #97abc9;
  --brand: #65d0ff;
  --brand-strong: #1098ff;
  --accent: #9ae9ca;
  --danger: #ff9999;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --sans: "DM Sans", "Segoe UI Variable", "Trebuchet MS", "Segoe UI", sans-serif;
  --mono: "Consolas", "SFMono-Regular", "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(101, 208, 255, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(154, 233, 202, 0.11), transparent 22%),
    linear-gradient(180deg, #08111d 0%, #0a1524 42%, #09111d 100%);
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
textarea {
  font: inherit;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(144, 178, 248, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(144, 178, 248, 0.07) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.18));
  z-index: 0;
}

.shell {
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #0a0f1c;
  border-bottom: 1px solid rgba(128, 146, 184, 0.12);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  display: none;
}

.brand-copy strong {
  display: block;
  font-family: "Syne", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7f95ff;
}

.brand-copy span {
  display: none;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  text-decoration: none;
  color: var(--muted-strong);
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: "DM Sans", sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
  transition: 180ms ease;
}

.top-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.top-nav a.is-active {
  color: var(--text);
  background: rgba(72, 104, 239, 0.18);
  border-color: rgba(101, 132, 255, 0.45);
}

.hero-compact {
  padding: 28px 0 14px;
}

.compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 20px;
  align-items: center;
}

.section-tag,
.result-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d7efff;
  background: rgba(101, 208, 255, 0.09);
  border: 1px solid rgba(101, 208, 255, 0.15);
}

h1 {
  margin: 12px 0 10px;
  font-family: "Outfit", sans-serif;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  max-width: 14ch;
}

h2,
h3,
.section-tag,
.result-tag {
  font-family: "Outfit", sans-serif;
}

.compact-copy p,
.card-head p,
.section-head p,
.feature-card p,
.faq-card p,
.placeholder p,
.summary-card p {
  color: var(--muted);
  line-height: 1.7;
}

.compact-meta {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.status-badge,
.result-status,
.mini-chip,
.token-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-badge,
.token-badge {
  padding: 10px 14px;
  background: rgba(101, 208, 255, 0.08);
  border: 1px solid rgba(101, 208, 255, 0.15);
  color: #dbf3ff;
}

.mini-chip,
.result-status {
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #dcedff;
}

.mini-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mini-stats span {
  padding: 9px 12px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
}

.mini-stats strong {
  color: var(--text);
  font-family: var(--mono);
  margin-left: 6px;
}

.workspace-section {
  padding: 10px 0 24px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 18px;
  align-items: start;
}

.card,
.feature-card,
.faq-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(12, 20, 36, 0.95), rgba(10, 17, 30, 0.92)),
    var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(101, 208, 255, 0.08), transparent 42%),
    linear-gradient(180deg, transparent, rgba(154, 233, 202, 0.03));
}

.card {
  padding: 24px;
}

.card-head,
.section-head,
.result-head,
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.card-head {
  align-items: start;
  margin-bottom: 16px;
}

.card-head h2,
.result-head h2,
.section-head h2 {
  margin: 0 0 8px;
  letter-spacing: -0.04em;
}

.card-head h2,
.result-head h2 {
  font-size: 1.24rem;
}

.quick-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.quick-guide span {
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.85rem;
  color: #d7ebff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.84rem;
  color: #d3e4ff;
}

textarea {
  width: 100%;
  min-height: 230px;
  resize: vertical;
  border-radius: 20px;
  padding: 18px;
  border: 1px solid rgba(160, 188, 255, 0.14);
  background: rgba(2, 9, 17, 0.48);
  color: var(--text);
  line-height: 1.7;
  transition: 180ms ease;
}

textarea::placeholder {
  color: #728ead;
}

textarea:hover,
textarea:focus {
  border-color: rgba(101, 208, 255, 0.34);
  background: rgba(3, 11, 21, 0.68);
  box-shadow: 0 0 0 4px rgba(101, 208, 255, 0.07);
  outline: none;
}

.action-row,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.action-row {
  margin-top: 18px;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 800;
  padding: 14px 18px;
  transition: transform 180ms ease, opacity 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(101, 208, 255, 0.95);
  outline-offset: 2px;
}

.button-primary {
  color: #03111e;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 16px 32px rgba(16, 152, 255, 0.26);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.button-ghost {
  color: #ddecff;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.button.small {
  padding: 10px 14px;
  border-radius: 13px;
  font-size: 0.87rem;
}

.button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.results-stack {
  display: grid;
  gap: 18px;
}

.result-head {
  align-items: center;
}

.toolbar {
  justify-content: flex-end;
  margin-bottom: 14px;
}

.result-body {
  min-height: 330px;
}

.placeholder,
.loading-box,
.error-box {
  min-height: 270px;
  display: grid;
  place-items: center;
  text-align: center;
}

.placeholder strong {
  display: block;
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.loading-box {
  gap: 16px;
  align-content: center;
}

.loading-box h4,
.report h4 {
  margin: 0;
}

.loading-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.loading-fill {
  height: 100%;
  width: 18%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  box-shadow: 0 0 24px rgba(101, 208, 255, 0.34);
  animation: slide-fill 1.25s ease-in-out infinite;
}

.report {
  display: grid;
  gap: 16px;
}

.summary-card,
.prompt-card,
.list-card,
.stats-grid {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.summary-card,
.prompt-card,
.list-card {
  padding: 18px;
}

.summary-card h4,
.prompt-card h4,
.list-card h4 {
  margin: 0 0 10px;
}

.prompt-block {
  white-space: pre-wrap;
  color: #dff0ff;
  line-height: 1.75;
  font-family: var(--mono);
  font-size: 0.93rem;
}

.list-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

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

.stat-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card strong {
  font-family: var(--mono);
  font-size: 1.02rem;
}

.error-box {
  color: var(--danger);
}

.details-section,
.faq-section {
  padding: 30px 0;
}

.section-head {
  align-items: end;
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2.3rem);
}

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

.feature-card,
.faq-card {
  padding: 22px;
}

.feature-card h3,
.faq-card h3 {
  margin: 0 0 10px;
}

.site-footer {
  padding: 24px 0 40px;
}

.footer-row {
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 22px;
}

@keyframes slide-fill {
  0% { transform: translateX(-35%); width: 24%; }
  50% { transform: translateX(120%); width: 42%; }
  100% { transform: translateX(330%); width: 24%; }
}

@media (max-width: 1100px) {
  .workspace-grid,
  .feature-grid,
  .faq-grid,
  .compact-row {
    grid-template-columns: 1fr;
  }

  .compact-meta {
    justify-items: start;
  }

  .mini-stats {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1220px);
  }

  .header-row,
  .card-head,
  .result-head,
  .section-head,
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .hero-compact {
    padding-top: 20px;
  }

  .card,
  .feature-card,
  .faq-card {
    padding: 20px;
  }

  .action-row .button,
  .toolbar .button {
    width: 100%;
  }

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