:root {
  --bg: #100d18;
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.13);
  --text: #fff8e8;
  --muted: #d4c6a5;
  --gold: #ffd36a;
  --gold-deep: #b97b12;
  --green: #31d49a;
  --green-dark: #119869;
  --ring: rgba(255, 211, 106, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 211, 106, 0.16), transparent 30rem),
    radial-gradient(circle at top right, rgba(49, 212, 154, 0.12), transparent 28rem),
    linear-gradient(180deg, #16101f 0%, var(--bg) 45%, #07060a 100%);
  min-height: 100vh;
}

a { color: inherit; }

.hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 72px 20px 42px;
  text-align: center;
}

.sparkle {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1a1200;
  background: linear-gradient(135deg, var(--gold), #fff0aa);
  box-shadow: 0 0 40px rgba(255, 211, 106, 0.36);
  font-size: 28px;
}

.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 800;
  font-size: .76rem;
  margin: 0 0 10px;
}

h1 {
  font-size: clamp(2.55rem, 9vw, 5.8rem);
  line-height: .92;
  margin: 0;
  letter-spacing: -0.07em;
}

.subtitle {
  color: var(--muted);
  max-width: 660px;
  margin: 22px auto 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

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

.primary, .secondary, .join {
  text-decoration: none;
  border-radius: 999px;
  font-weight: 800;
  transition: transform .16s ease, filter .16s ease, border-color .16s ease;
}

.primary {
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--gold), #fff0a8);
  color: #1a1200;
}

.secondary {
  padding: 14px 20px;
  border: 1px solid rgba(255,255,255,.18);
  color: var(--text);
  background: rgba(255,255,255,.06);
}

.primary:hover, .secondary:hover, .join:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.notice {
  margin: 28px auto 0;
  max-width: 780px;
  padding: 14px 16px;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  line-height: 1.5;
  font-size: .95rem;
}

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px 20px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

h2 {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  letter-spacing: -0.04em;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

input[type="search"] {
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

input[type="search"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 5px var(--ring);
}

#count {
  white-space: nowrap;
  color: var(--muted);
  font-weight: 700;
}

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

.card {
  position: relative;
  padding: 18px;
  min-height: 145px;
  border-radius: 22px;
  background: linear-gradient(180deg, var(--card-strong), var(--card));
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 18px 42px rgba(0,0,0,.22);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle at top right, rgba(255,211,106,.20), transparent 55%);
  pointer-events: none;
}

.badge {
  display: inline-flex;
  position: relative;
  z-index: 1;
  color: #1a1200;
  background: var(--gold);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: .75rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  font-size: 1.16rem;
  letter-spacing: -0.02em;
}

.join {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 14px;
  color: #031e14;
  background: linear-gradient(135deg, var(--green), #a5ffd9);
}

.empty {
  color: var(--muted);
  padding: 24px;
  border: 1px dashed rgba(255,255,255,.25);
  border-radius: 18px;
}

#topBtn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  color: #1a1200;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 16px 38px rgba(0,0,0,.35);
  cursor: pointer;
  display: none;
}

footer {
  color: var(--muted);
  text-align: center;
  padding: 40px 20px 52px;
}

@media (max-width: 560px) {
  .hero { padding-top: 48px; }
  .section-heading, .toolbar { display: block; }
  #count { display: block; margin-top: 10px; }
}
