/* Roast My Website 🔥 — styles */

:root {
  --bg: #0b0910;
  --bg-2: #140f1c;
  --panel: #1a1424;
  --panel-2: #221830;
  --line: #2e2340;
  --text: #f4eefb;
  --muted: #a99bc4;
  --faint: #7c6f95;
  --flame-1: #ff8a00;
  --flame-2: #ff3d3d;
  --flame-3: #ff005c;
  --good: #35d29a;
  --mid: #ffb020;
  --bad: #ff4d6d;
  --radius: 18px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255, 61, 61, 0.18), transparent 60%),
    radial-gradient(900px 500px at 85% 10%, rgba(255, 0, 92, 0.12), transparent 55%),
    radial-gradient(700px 500px at 10% 20%, rgba(255, 138, 0, 0.1), transparent 55%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px) clamp(18px, 4vw, 40px) 80px;
}

/* ---------- hero ---------- */

.hero { text-align: center; margin-bottom: clamp(28px, 5vw, 48px); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--flame-1);
  font-weight: 700;
  margin: 0 0 14px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 138, 0, 0.06);
}

h1.title {
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  line-height: 1.02;
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
h1.title .fire {
  background: linear-gradient(100deg, var(--flame-1), var(--flame-2) 45%, var(--flame-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub {
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.22rem);
  max-width: 620px;
  margin: 0 auto;
}
.sub b { color: var(--text); font-weight: 600; }

/* ---------- form ---------- */

.roast-form { margin: clamp(28px, 5vw, 40px) auto 0; max-width: 680px; }

.field {
  display: flex;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field:focus-within {
  border-color: var(--flame-2);
  box-shadow: 0 0 0 4px rgba(255, 61, 61, 0.12), var(--shadow);
}

.field input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1.06rem;
  padding: 14px 8px 14px 16px;
  font-family: inherit;
}
.field input::placeholder { color: var(--faint); }
.field input.invalid { color: var(--bad); }

.btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: 12px;
  transition: transform 0.12s ease, filter 0.2s, background 0.2s, border-color 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn.primary {
  background: linear-gradient(100deg, var(--flame-1), var(--flame-2) 55%, var(--flame-3));
  color: #fff;
  font-size: 1.02rem;
  padding: 14px 22px;
  white-space: nowrap;
  box-shadow: 0 8px 24px -8px rgba(255, 61, 61, 0.6);
}
.btn.primary:hover { filter: brightness(1.08); }

.btn.ghost {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 10px 16px;
  font-size: 0.92rem;
}
.btn.ghost:hover { border-color: var(--flame-2); color: #fff; }

.error {
  color: var(--bad);
  font-size: 0.9rem;
  margin: 10px 4px 0;
  min-height: 1.2em;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
}
.error.show { opacity: 1; transform: none; }

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
.examples span { color: var(--faint); font-size: 0.85rem; align-self: center; }
.chip {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--flame-2); color: var(--text); background: rgba(255, 61, 61, 0.06); }

/* ---------- scanning ---------- */

.scan {
  display: none;
  margin: 44px auto 0;
  max-width: 520px;
  text-align: center;
}
.scan.show { display: block; animation: fade 0.3s ease; }

.flames { font-size: 2.6rem; letter-spacing: 6px; animation: flicker 0.9s infinite alternate; }
@keyframes flicker {
  from { opacity: 0.55; transform: translateY(2px) scale(0.98); filter: hue-rotate(0deg); }
  to { opacity: 1; transform: translateY(-2px) scale(1.03); filter: hue-rotate(-12deg); }
}

.scan-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--panel-2);
  overflow: hidden;
  margin: 20px 0 14px;
}
.scan-bar::after {
  content: "";
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--flame-1), var(--flame-3));
  animation: slide 1.1s ease-in-out infinite;
}
@keyframes slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}
.scan-label { color: var(--muted); font-size: 0.98rem; min-height: 1.4em; }

/* ---------- results ---------- */

.output { margin-top: 8px; }
.output.show { animation: fade 0.4s ease; }

.verdict {
  display: flex;
  gap: clamp(18px, 4vw, 34px);
  align-items: center;
  flex-wrap: wrap;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 34px);
  margin: 36px 0 24px;
  box-shadow: var(--shadow);
}
.verdict.bad { border-color: rgba(255, 77, 109, 0.4); }
.verdict.good { border-color: rgba(53, 210, 154, 0.35); }

.verdict-score { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.ring {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  position: relative;
  background: var(--panel-2);
  border: 3px solid var(--line);
}
.ring::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(var(--flame-1), var(--flame-2), var(--flame-3), var(--flame-1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.9;
}
.ring.bad::before { background: conic-gradient(#ff4d6d, #ff005c, #ff4d6d); }
.ring.mid::before { background: conic-gradient(#ffb020, #ff8a00, #ffb020); }
.ring.good::before { background: conic-gradient(#35d29a, #2fd6c6, #35d29a); }
.ring-num { font-size: 2.7rem; font-weight: 800; line-height: 1; }
.ring-den { font-size: 0.9rem; color: var(--muted); text-align: center; display: block; }
.ring-emoji { font-size: 1.7rem; }

.verdict-copy { flex: 1; min-width: 240px; }
.verdict-host { color: var(--muted); font-size: 0.9rem; margin: 0 0 4px; }
.verdict-host a { color: var(--flame-1); text-decoration: none; }
.verdict-host a:hover { text-decoration: underline; }
.verdict-title { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0 0 8px; font-weight: 800; letter-spacing: -0.01em; }
.verdict-line { color: var(--muted); margin: 0 0 18px; font-size: 1.02rem; }
.verdict-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- category grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(var(--i) * 60ms);
  border-left: 3px solid var(--line);
}
.card.bad { border-left-color: var(--bad); }
.card.mid { border-left-color: var(--mid); }
.card.good { border-left-color: var(--good); }

.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-icon { font-size: 1.4rem; }
.card-title { font-size: 1.12rem; margin: 0; flex: 1; font-weight: 700; }
.card-score { font-size: 1.5rem; font-weight: 800; }
.card-score small { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.card.bad .card-score { color: var(--bad); }
.card.mid .card-score { color: var(--mid); }
.card.good .card-score { color: var(--good); }

.meter { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin-bottom: 14px; }
.meter span { display: block; height: 100%; border-radius: 999px; }
.card.bad .meter span { background: linear-gradient(90deg, #ff8a00, var(--bad)); }
.card.mid .meter span { background: linear-gradient(90deg, #ff8a00, var(--mid)); }
.card.good .meter span { background: linear-gradient(90deg, #2fd6c6, var(--good)); }

.card-blurb { color: var(--faint); font-size: 0.84rem; margin: 0 0 10px; }
.roast {
  font-size: 1.02rem;
  margin: 0 0 16px;
  color: var(--text);
  font-style: italic;
  line-height: 1.5;
}

.fixes { border-top: 1px solid var(--line); padding-top: 12px; }
.fixes summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--good);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fixes summary::-webkit-details-marker { display: none; }
.fixes summary::before { content: "🛠"; }
.pill {
  background: rgba(53, 210, 154, 0.15);
  color: var(--good);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.72rem;
}
.fixes ul { margin: 12px 0 0; padding: 0 0 0 2px; list-style: none; }
.fixes li {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
  padding-left: 22px;
  position: relative;
  line-height: 1.5;
}
.fixes li::before { content: "→"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.fixes li:last-child { margin-bottom: 0; }

.disclaimer {
  margin-top: 26px;
  color: var(--faint);
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.6;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.disclaimer strong { color: var(--muted); }

/* ---------- footer ---------- */

.foot { text-align: center; margin-top: 60px; color: var(--faint); font-size: 0.82rem; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--flame-1); }

/* ---------- animations ---------- */

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 560px) {
  .field { flex-direction: column; }
  .btn.primary { width: 100%; }
  .verdict { flex-direction: column; text-align: center; }
  .verdict-actions { justify-content: center; }
}
