:root {
  --bg-color: #0F3B3E;
  --page-color: #0f172a;
  --text-color: #e2e8f0;
  --muted-text: #94a3b8;
  --input-bg: #111827;
  --border-color: #1f2937;
  --accent-color: #38bdf8;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 60px 16px 40px;
}

form {
  width: clamp(320px, 70vw, 1300px);  /* fix: scales with screen width instead of capping at 1000px */
  padding: 50px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 30px;
  text-align: center;
}

h1 {
  margin: 0 0 24px;
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-align: center;
  color: #F8E7C9;
  font-weight: bold;
  font-size: 6rem;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; /* fix: replaced -webkit-text-stroke, which caused ghosting/doubling at certain zoom levels */
}

h2 {
  margin: 0 0 24px;
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-align: center;
  color: #F8E7C9;
  font-weight: bold;
  font-size: 3rem;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; /* fix: replaced -webkit-text-stroke, which caused ghosting/doubling at certain zoom levels */
}

p {
  margin: 0 0 26px;
  font-size: 1rem;
  color: #cbd5e1;
}

textarea {
  width: 100%;
  min-height: 290px;
  padding: 20px 20px;
  border: 2px solid #F8E7C9;
  border-radius: 14px;
  background: #0F3B3E;
  color: #F8E7C9;
  font-size: 2rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

textarea::placeholder {
  color: var(--muted-text);
}

textarea:focus {
  outline: none;
  border-color: #F8E7C9;
  background: #F8E7C9;
  color: #0F3B3E;
  font-weight: bold;
}

button[type="submit"] {
  width: 100%;
  max-width: 540px;
  min-height: 60px;
  padding: 0 20px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #F8E7C9;
  color: #0F3B3E;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

button[type="submit"]:hover {
  background: #0F3B3E;
  color: #F8E7C9;
  border-color: #F8E7C9;
  transform: translateY(-1px);
  filter: brightness(1.05);
}

button[type="submit"]:active {
  transform: translateY(0);
}

#result {
  margin-top: 10px;
  font-size: 2rem;
  font-weight: bold;
  padding: 14px 28px;
  border-radius: 14px;
  display: inline-block;
  min-width: 160px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

#result.spam {
  background: #b91c1c;         /* fix: pure red was harsh; deeper red reads better against the page */
  color: #ffffff;              /* fix: black text on red had poor contrast/readability */
  border-color: #fca5a5;
}

#result.not-spam {
  background: #15803d;         /* fix: pure green was harsh; deeper green matches theme better */
  color: #ffffff;              /* fix: black text on green had poor contrast/readability */
  border-color: #F8E7C9;
}

#result:empty {
  display: none;
}

#ip-form {
  text-align: center;
}

.fox-icon {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

footer {
  color: #F8E7C9;
  font-weight: bold;
}

@media (max-width: 640px) {
  body {
    padding: 32px 12px 24px;
  }

  .fox-icon {
    width: 60px;               /* fix: 100px was too large relative to phone screens */
    height: 60px;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 3.2rem);  /* fix: 6rem overflowed small screens */
  }

  h2 {
    font-size: clamp(1.1rem, 5vw, 1.6rem); /* fix: 3rem tagline was oversized on phones */
    margin: 0 0 16px;
  }

  form {
    padding: 20px 16px;        /* fix: 50px padding ate most of the width on small screens */
    gap: 16px;
  }

  textarea {
    font-size: 1.1rem;         /* fix: 2rem was oversized on phones */
    min-height: 200px;
    padding: 14px;
  }

  button[type="submit"] {
    min-height: 54px;
    font-size: 0.95rem;
  }

  #result {
    font-size: 1.3rem;         /* fix: 2rem result badge was oversized on phones */
    padding: 10px 20px;
    min-width: 120px;
  }
}