/* =========================================================
   Tokens
   ========================================================= */
:root {
  --bg: #0b0e14;
  --bg-alt: #0f131c;
  --surface: #131822;
  --surface-2: #1a2130;
  --border: #262f42;
  --text: #f5f7fa;
  --text-muted: #8a93a6;
  --fire-1: #ff6b35;
  --fire-2: #f72c2c;
  --gold: #ffc145;
  --cyan: #00e5ff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font-display: "Orbitron", sans-serif;
  --font-body: "Rubik", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--fire-1);
  font-weight: 700;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

p {
  color: var(--text-muted);
}

.gradient-text {
  background: linear-gradient(90deg, var(--fire-1), var(--fire-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

::selection {
  background: var(--fire-2);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11, 14, 20, 0.85);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text);
}

.logo .flame {
  font-size: 1.3rem;
}

.main-nav {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}

.main-nav a:hover {
  color: var(--text);
}

@media (max-width: 720px) {
  .main-nav {
    display: none;
  }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 56px;
  background: radial-gradient(ellipse at 50% 0%, #1a1210 0%, var(--bg) 60%);
}

.embers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ember {
  position: absolute;
  bottom: -10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--fire-1);
  box-shadow: 0 0 8px 2px rgba(255, 107, 53, 0.7);
  animation: rise linear infinite;
  opacity: 0.8;
}

@keyframes rise {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(-620px) translateX(20px);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ember {
    animation: none;
    display: none;
  }
  html {
    scroll-behavior: auto;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 14px 0 14px;
}

.hero .lead {
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 32px;
}

.forge {
  max-width: 620px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  gap: 10px;
  box-shadow: var(--shadow);
}

.forge input {
  flex: 1;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
}

.forge input::placeholder {
  color: var(--text-muted);
}

.forge input.shake {
  animation: shake 0.4s;
  border-color: var(--fire-2);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 22px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(90deg, var(--fire-1), var(--fire-2));
  color: #fff;
  box-shadow: 0 6px 20px rgba(247, 44, 44, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 8px 26px rgba(247, 44, 44, 0.5);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
}

.stat span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* =========================================================
   Section shell
   ========================================================= */
.section {
  padding: 64px 0;
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 36px;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* =========================================================
   Filter chips
   ========================================================= */
.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
}

.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.15s;
}

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

.chip.active {
  background: linear-gradient(90deg, var(--fire-1), var(--fire-2));
  color: #fff;
  border-color: transparent;
}

/* =========================================================
   Results grid
   ========================================================= */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.name-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.name-card:hover {
  border-color: var(--fire-1);
  transform: translateY(-2px);
}

.name-card-text {
  font-size: 1.05rem;
  word-break: break-word;
  margin-bottom: 12px;
  min-height: 28px;
}

.name-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 3px 9px;
  border-radius: 999px;
}

.card-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s;
}

.icon-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.empty-state {
  display: none;
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
}

/* =========================================================
   Popular list
   ========================================================= */
.popular-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 760px;
  margin: 0 auto;
}

.popular-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.popular-name {
  font-size: 1rem;
  word-break: break-word;
}

.vote-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.vote-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  gap: 5px;
  align-items: center;
}

.vote-btn.up:hover,
.vote-btn.up.active {
  color: #3ddc84;
  border-color: #3ddc84;
}

.vote-btn.down:hover,
.vote-btn.down.active {
  color: var(--fire-2);
  border-color: var(--fire-2);
}

/* =========================================================
   Favorites
   ========================================================= */
.fav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 900px;
  margin: 0 auto;
}

.fav-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 8px 8px 16px;
  font-size: 0.92rem;
}

/* =========================================================
   Steps / Guide
   ========================================================= */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.step .num {
  font-family: var(--font-display);
  color: var(--fire-1);
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.step h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

/* =========================================================
   Article (SEO copy)
   ========================================================= */
.article {
  max-width: 760px;
  margin: 0 auto;
}

.article h2 {
  margin-bottom: 14px;
}

.article h3 {
  font-size: 1.15rem;
  margin: 28px 0 10px;
}

.article p {
  margin: 0 0 14px;
}

.article ul {
  color: var(--text-muted);
  padding-left: 20px;
}

.article li {
  margin-bottom: 6px;
}

/* =========================================================
   FAQ
   ========================================================= */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 18px 4px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: "+";
  font-family: var(--font-display);
  color: var(--fire-1);
  font-size: 1.2rem;
  transition: transform 0.2s;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  color: var(--text-muted);
  font-size: 0.94rem;
  padding: 0 4px;
}

.faq-item.open .faq-answer {
  max-height: 240px;
  padding-bottom: 18px;
}

/* =========================================================
   CTA banner
   ========================================================= */
.cta-banner {
  text-align: center;
  background: linear-gradient(120deg, #1a1210, #1c1010);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
}

.cta-banner h2 {
  margin-bottom: 10px;
}

.cta-banner .btn {
  margin-top: 18px;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 28px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 22px;
}

.footer-links {
  display: flex;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

.disclaimer {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  font-size: 0.78rem;
}

/* =========================================================
   Toast
   ========================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 100;
  box-shadow: var(--shadow);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 560px) {
  .forge {
    flex-direction: column;
  }
  .footer-grid {
    flex-direction: column;
  }
}
