:root {
  color-scheme: dark;
  --bg: #000000;
  --card: #0b0b0c;
  --card-2: #121212;
  --red: #ff3b30;
  --red-deep: rgba(127, 29, 29, 0.42);
  --red-line: rgba(255, 59, 48, 0.52);
  --text: #ffffff;
  --muted: #8e8e93;
  --line: #242426;
  --mono: "Fira Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Space Grotesk", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--sans);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 0 clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--red-deep);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(14px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--text);
  font-weight: 950;
  font-size: 1.28rem;
  line-height: 1;
  text-decoration: none;
}

.logo-cut {
  display: inline-block;
  border: 1px solid var(--red);
  border-radius: 3px;
  color: var(--red);
  padding: 3px 5px 4px;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--red);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--red);
}

.report-button {
  border: 1px solid var(--red-line);
  border-radius: 6px;
  padding: 9px 12px;
  color: var(--text);
}

.report-button:hover {
  box-shadow: 0 0 24px rgba(255, 59, 48, 0.2);
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 66px 0 42px;
}

.hero {
  position: relative;
  display: grid;
  gap: 24px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40px -80px auto auto;
  width: min(620px, 80vw);
  height: 280px;
  pointer-events: none;
  background: url("/assets/xpatlama-burst.png") center / cover no-repeat;
  opacity: 0.16;
  filter: saturate(1.1);
  mask-image: linear-gradient(90deg, transparent, #000 28%, #000 70%, transparent);
}

.hero-copy {
  position: relative;
  max-width: 820px;
}

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

h1 {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 760px;
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.62;
}

.input-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(127, 29, 29, 0.5);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.terminal-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(127, 29, 29, 0.36);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.77rem;
}

.terminal-dots {
  display: flex;
  gap: 7px;
}

.terminal-dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--red);
  opacity: 0.85;
}

textarea {
  width: 100%;
  min-height: 310px;
  resize: vertical;
  display: block;
  border: 0;
  outline: none;
  background: var(--card);
  color: var(--text);
  padding: 20px;
  font-size: 1rem;
  line-height: 1.6;
}

textarea:focus {
  box-shadow: inset 0 0 0 1px rgba(255, 59, 48, 0.55);
}

textarea::placeholder {
  color: #69696f;
}

.input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(127, 29, 29, 0.36);
}

.utility-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.counter,
.status-line,
.panel-label,
.sample-label {
  font-family: var(--mono);
}

.counter,
.status-line {
  color: var(--muted);
  font-size: 0.82rem;
}

.text-button,
.copy-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #080808;
  color: var(--text);
  padding: 9px 12px;
  font-size: 0.86rem;
  font-weight: 800;
}

.text-button:hover,
.copy-button:hover:not(:disabled) {
  border-color: var(--red-line);
  color: var(--red);
}

.blast-button {
  min-height: 48px;
  min-width: 164px;
  border-radius: 7px;
  background: var(--red);
  color: #000000;
  padding: 0 22px;
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 950;
  box-shadow: 0 0 0 rgba(255, 59, 48, 0);
}

.blast-button:hover:not(:disabled) {
  box-shadow: 0 0 34px rgba(255, 59, 48, 0.42);
}

.blast-button.loading {
  color: #000000;
  animation: pulse-red 0.9s ease-in-out infinite alternate;
}

.output-panel {
  border-left: 4px solid var(--red);
  border-radius: 0 12px 12px 0;
  background: var(--card-2);
  padding: 22px 24px;
  animation: reveal 220ms ease-out;
}

.output-panel[hidden] {
  display: none;
}

.panel-label {
  display: inline-block;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 850;
}

.result-text {
  margin-top: 12px;
}

.result-text p {
  color: var(--text);
  font-size: clamp(1.08rem, 2vw, 1.38rem);
  line-height: 1.55;
  font-weight: 700;
}

.output-panel.error {
  border-left-color: var(--red);
  box-shadow: inset 0 0 0 1px rgba(255, 59, 48, 0.16);
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

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

.sample-card {
  min-height: 210px;
  border: 1px solid rgba(127, 29, 29, 0.46);
  border-radius: 10px;
  background: var(--card);
  padding: 20px;
}

.sample-label {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 900;
}

.sample-card p {
  line-height: 1.65;
}

.sample-card.inflated p {
  color: #74747a;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 59, 48, 0.36);
}

.sample-card.clean {
  border-color: var(--red-line);
  background:
    linear-gradient(180deg, rgba(255, 59, 48, 0.08), rgba(255, 59, 48, 0)),
    var(--card);
}

.sample-card.clean p {
  color: var(--text);
  font-weight: 730;
}

.feature-section {
  margin-top: 54px;
}

.feature-section h2 {
  font-size: clamp(1.65rem, 4vw, 2.4rem);
  line-height: 1;
  font-weight: 950;
}

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

.feature-card {
  border: 1px solid rgba(127, 29, 29, 0.44);
  border-radius: 10px;
  background: var(--card);
  padding: 20px;
}

.feature-card h3 {
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 900;
}

.feature-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.58;
  font-size: 0.96rem;
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  padding: 28px 0 36px;
  border-top: 1px solid rgba(127, 29, 29, 0.3);
  color: #5d5d63;
  font-size: 0.82rem;
}

.site-footer p {
  margin: 0;
}

.credit-note {
  margin-top: 10px;
  color: #4d4d52;
  font-family: var(--mono);
  font-size: 0.76rem;
}

.credit-note a {
  color: #77777d;
}

.site-footer a {
  color: #77777d;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--red);
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

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

@keyframes pulse-red {
  from {
    box-shadow: 0 0 0 rgba(255, 59, 48, 0.1);
  }

  to {
    box-shadow: 0 0 34px rgba(255, 59, 48, 0.46);
  }
}

@media (max-width: 820px) {
  .site-header {
    min-height: 62px;
    padding-inline: 14px;
  }

  .nav-links {
    gap: 10px;
    font-size: 0.86rem;
  }

  .report-button {
    padding: 8px 10px;
  }

  .app-shell {
    width: min(100% - 24px, 1120px);
    padding-top: 42px;
  }

  .hero::before {
    inset: -24px -28px auto auto;
    width: 90vw;
    height: 190px;
    opacity: 0.11;
  }

  .input-footer,
  .result-actions,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .blast-button,
  .copy-button {
    width: 100%;
  }

  textarea {
    min-height: 280px;
    padding: 16px;
  }

  .comparison-section,
  .feature-grid {
    grid-template-columns: 1fr;
  }
}
