@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&family=Syne:wght@600;700;800&display=swap');

:root {
  --bg: #0a0c10;
  --bg-elevated: #11151c;
  --surface: #161b24;
  --surface-2: #1c2330;
  --border: rgba(232, 220, 190, 0.08);
  --border-strong: rgba(232, 220, 190, 0.16);
  --text: #efe9df;
  --muted: #9a9488;
  --faint: #6b655c;
  --amber: #e2a84a;
  --amber-hot: #f0c56d;
  --ember: #c45c26;
  --copper: #b87333;
  --online: #6fbf8a;
  --danger: #d66a5e;
  --rank-gold: #e2a84a;
  --rank-silver: #c0c6d0;
  --rank-bronze: #c48a52;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --radius-sm: 10px;
  --max: 1180px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'Figtree', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(1000px 520px at 12% -10%, rgba(196, 92, 38, 0.22), transparent 55%),
    radial-gradient(900px 480px at 88% 0%, rgba(226, 168, 74, 0.12), transparent 50%),
    radial-gradient(700px 420px at 50% 100%, rgba(184, 115, 51, 0.08), transparent 55%),
    linear-gradient(180deg, #0d1016 0%, #0a0c10 40%, #080a0e 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(10, 12, 16, 0.78);
  border-bottom: 1px solid var(--border);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--amber-hot), var(--ember));
  color: #1a1208;
  box-shadow: 0 0 24px rgba(226, 168, 74, 0.35);
}

.brand__mark svg {
  width: 18px;
  height: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.05rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--ember));
  color: #1a1208;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 8px 24px rgba(196, 92, 38, 0.28);
  transition: transform 0.2s, filter 0.2s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-auth a:not(.nav-cta) {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}

.nav-auth a:not(.nav-cta):hover,
.nav-links__user {
  color: var(--text);
}

.nav-links__user {
  font-weight: 700;
}

.nav-admin {
  color: var(--amber-hot) !important;
  font-weight: 800 !important;
  font-size: 0.92rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.admin-stats .stat {
  background: rgba(17, 21, 28, 0.92);
  padding: 1.1rem 1.2rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.admin-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 21, 28, 0.9);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.admin-table th,
.admin-table td {
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

.admin-table th {
  color: var(--faint);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.02);
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

@media (max-width: 1100px) {
  .trending-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .admin-stats,
  .admin-grid {
    grid-template-columns: 1fr 1fr;
  }

  .trending-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .admin-stats,
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

.auth-panel {
  max-width: 480px;
}

.auth-switch {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-switch a {
  color: var(--amber-hot);
  font-weight: 700;
}

.auth-note,
.field-hint {
  display: block;
  margin-top: 0.45rem;
  color: var(--faint);
  font-size: 0.82rem;
  line-height: 1.45;
}

.field-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.tag-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.tag-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(10, 12, 16, 0.45);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  user-select: none;
}

.tag-check:hover {
  border-color: rgba(226, 168, 74, 0.35);
  color: var(--text);
}

.tag-check:has(input:checked) {
  border-color: rgba(226, 168, 74, 0.55);
  background: rgba(226, 168, 74, 0.1);
  color: var(--amber-hot);
}

.tag-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--amber);
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .tag-checks {
    grid-template-columns: 1fr;
  }
}

.field-hint code {
  color: var(--amber-hot);
  font-size: 0.78rem;
}

.account-meta p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.account-meta strong {
  color: var(--text);
}

.owner-box {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(226, 168, 74, 0.25);
  background: rgba(226, 168, 74, 0.06);
}

/* Advertising */
.ad-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ad-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(22, 27, 36, 0.98), rgba(14, 17, 24, 0.98));
  min-height: 260px;
}

.ad-card.is-available {
  border-color: rgba(111, 191, 138, 0.28);
}

.ad-card.is-mine {
  border-color: rgba(226, 168, 74, 0.45);
  box-shadow: 0 0 0 1px rgba(226, 168, 74, 0.12);
}

.ad-card__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.ad-card__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.ad-card__price {
  text-align: right;
}

.ad-card__price strong {
  display: block;
  color: var(--amber-hot);
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
}

.ad-card__price span {
  color: var(--muted);
  font-size: 0.82rem;
}

.ad-card__size {
  margin: 0;
  color: var(--faint);
  font-size: 0.9rem;
}

.ad-card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
}

.ad-card__inventory {
  margin: 0;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
}

.ad-card__status {
  margin: 0;
  color: var(--amber-hot);
  font-weight: 700;
  font-size: 0.9rem;
}

.ad-rotate {
  display: grid;
  gap: 0.65rem;
}

.ad-rotate--sidebar {
  gap: 0.75rem;
}

.ad-rotate--wide .ad-creative {
  width: 100%;
}

.ad-card.is-available .ad-card__status {
  color: var(--online);
}

.ad-card__actions {
  margin-top: 0.25rem;
}

.ad-card__actions .btn {
  width: 100%;
}

.setup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.25rem;
  align-items: start;
  padding-bottom: 2.5rem;
}

.setup-aside .setup-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.setup-aside .setup-list li {
  margin-bottom: 0.4rem;
}

.setup-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.setup-step {
  text-align: center;
  padding: 0.55rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.8rem;
  font-weight: 700;
}

.setup-step.is-active {
  color: #1a1208;
  background: linear-gradient(135deg, var(--amber), var(--ember));
  border-color: transparent;
}

.upload-zone {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: center;
}

.upload-zone.is-dragover .banner-preview {
  border-color: var(--amber-hot);
  background: rgba(226, 168, 74, 0.1);
}

.upload-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.banner-preview {
  display: grid;
  place-items: center;
  min-height: 90px;
  border-radius: 12px;
  border: 1px dashed rgba(226, 168, 74, 0.35);
  background: rgba(0, 0, 0, 0.25);
  color: var(--faint);
  font-size: 0.95rem;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover .banner-preview {
  border-color: rgba(226, 168, 74, 0.65);
  background: rgba(226, 168, 74, 0.06);
}

.banner-preview small {
  display: inline-block;
  margin-top: 0.35rem;
  color: var(--faint);
  font-size: 0.78rem;
}

.banner-preview--wide {
  min-height: 90px;
}

.banner-preview--box {
  width: min(100%, 300px);
  aspect-ratio: 300 / 250;
  min-height: 0;
}

.banner-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 860px) {
  .setup-layout {
    grid-template-columns: 1fr;
  }
}

.ad-creative {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0d1016;
}

.ad-creative img {
  width: 100%;
  height: auto;
  display: block;
}

.ad-creative--leaderboard {
  width: 100%;
  margin: 0 0 1rem;
}

.ad-creative--leaderboard img {
  max-height: 90px;
  object-fit: cover;
}

.ad-creative--sidebar img {
  width: 100%;
  aspect-ratio: 300 / 250;
  object-fit: cover;
}

.ad-slot.has-ad {
  padding: 0;
  border-style: solid;
  min-height: 0;
}

/* Vote interstitial */
.honeypot-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.vote-guard-panel {
  max-width: 420px;
}

.vote-guard-copy {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.turnstile-wrap {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
  min-height: 70px;
}

.fallback-captcha p {
  margin: 0 0 0.85rem;
  color: var(--text);
  font-size: 1.05rem;
}

.fallback-captcha__options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}

.fallback-captcha__options .btn {
  min-height: 48px;
  font-size: 1.1rem;
  font-weight: 800;
}

.vote-interstitial {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  background: rgba(5, 7, 10, 0.82);
  backdrop-filter: blur(6px);
  padding: 1rem;
}

.vote-interstitial.open {
  display: grid;
}

.vote-interstitial__panel {
  width: min(100%, 360px);
  padding: 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: #141820;
  text-align: center;
}

.vote-interstitial__panel img {
  width: 100%;
  aspect-ratio: 300 / 250;
  object-fit: cover;
  border-radius: 10px;
  margin: 0.75rem 0;
}

/* Modal checkout */
body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  place-items: center;
  padding: 1rem;
  background: rgba(5, 7, 10, 0.78);
  backdrop-filter: blur(6px);
}

.modal.open {
  display: grid;
}

.modal__panel {
  width: min(100%, 520px);
  max-height: min(90vh, 820px);
  overflow: auto;
  padding: 1.25rem;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--border-strong);
  background: #12161e;
  box-shadow: var(--shadow);
}

.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.modal__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.modal__close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
}

.checkout-summary {
  margin-bottom: 1rem;
  padding: 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.checkout-price {
  margin-top: 0.35rem;
  color: var(--amber-hot);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
}

.checkout-price span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.checkout-hold {
  margin-top: 0.45rem;
  color: var(--amber-hot);
  font-size: 0.88rem;
  font-weight: 700;
}

@media (max-width: 860px) {
  .ad-grid {
    grid-template-columns: 1fr;
  }
}

.owner-box h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1rem;
}

.owner-box p {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
  word-break: break-all;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s, filter 0.2s, background 0.2s, border-color 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber), var(--ember));
  color: #1a1208;
  box-shadow: 0 10px 28px rgba(196, 92, 38, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(226, 168, 74, 0.4);
  background: rgba(226, 168, 74, 0.08);
}

.btn-vote {
  min-width: 96px;
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #2a2116, #1d1812);
  border: 1px solid rgba(226, 168, 74, 0.35);
  color: var(--amber-hot);
  font-weight: 700;
  font-size: 0.88rem;
}

.btn-vote:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--amber), var(--ember));
  color: #1a1208;
  border-color: transparent;
}

.btn-vote:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-sm {
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: clamp(520px, 78vh, 720px);
  display: grid;
  align-items: end;
  padding: 3rem 0 4rem;
  overflow: visible;
}

.hero__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 12, 16, 0.2) 0%, rgba(10, 12, 16, 0.55) 45%, rgba(10, 12, 16, 0.96) 100%),
    radial-gradient(circle at 70% 40%, rgba(226, 168, 74, 0.18), transparent 35%),
    url('../assets/hero.svg') center / cover no-repeat;
}

.hero__glow {
  position: absolute;
  width: 420px;
  height: 420px;
  right: 8%;
  top: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 168, 74, 0.22), transparent 65%);
  filter: blur(10px);
  animation: pulseGlow 5s ease-in-out infinite;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: min(100%, 52rem);
  animation: riseIn 0.9s ease both;
}

.hero__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
  padding: 0.12em 0.04em 0.18em 0;
  overflow: visible;
  background: linear-gradient(180deg, #fff6e4 0%, var(--amber) 48%, #d4783a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero__headline {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero__sub {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 34rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.vote-reset-banner {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.vote-reset-banner strong {
  color: var(--amber-hot);
}

.stats-strip {
  margin-top: -1.5rem;
  margin-bottom: 1rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  animation: riseIn 1s ease 0.15s both;
}

.stat {
  background: rgba(17, 21, 28, 0.92);
  padding: 1.15rem 1.25rem;
}

.stat__value {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--amber-hot);
}

.stat__label {
  color: var(--muted);
  font-size: 0.88rem;
}

/* Layout */
.section {
  padding: 2.5rem 0 3.5rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  letter-spacing: -0.03em;
}

.section-sub {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.layout-split {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  align-items: start;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.filter-chip {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s;
}

.filter-chip:hover,
.filter-chip.active {
  color: #1a1208;
  background: linear-gradient(135deg, var(--amber), var(--copper));
  border-color: transparent;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.search-field,
.select-field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(17, 21, 28, 0.85);
}

.search-field {
  flex: 1;
  min-width: 220px;
}

.search-field input,
.select-field select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.select-field select {
  padding-right: 0.25rem;
}

/* Featured */
.featured {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(226, 168, 74, 0.28);
  background:
    linear-gradient(135deg, rgba(226, 168, 74, 0.12), transparent 45%),
    linear-gradient(180deg, #1a1520, #12161e);
  overflow: hidden;
  animation: riseIn 0.8s ease both;
}

.featured::before {
  content: 'SERVER OF THE DAY';
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(226, 168, 74, 0.16);
  border: 1px solid rgba(226, 168, 74, 0.35);
  color: var(--amber-hot);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.featured__media {
  position: relative;
  min-height: 220px;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, transparent, rgba(10, 12, 16, 0.55)),
    var(--banner, linear-gradient(135deg, #2a2118, #12161e));
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
}

.featured__meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  padding-right: 5rem;
}

.featured__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: -0.03em;
}

.featured__desc {
  margin: 0;
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag--accent {
  color: var(--amber-hot);
  border-color: rgba(226, 168, 74, 0.3);
  background: rgba(226, 168, 74, 0.08);
}

.tag--new {
  color: #9fd9b1;
  border-color: rgba(111, 191, 138, 0.4);
  background: rgba(111, 191, 138, 0.12);
}

.tag--age {
  color: var(--text);
  border-color: rgba(239, 233, 223, 0.14);
  background: rgba(255, 255, 255, 0.04);
  text-transform: none;
  letter-spacing: 0;
}

/* Server list */
.server-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.server-row {
  display: grid;
  grid-template-columns: 64px 56px 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(22, 27, 36, 0.95), rgba(17, 21, 28, 0.95));
  transition: border-color 0.2s, transform 0.2s, background 0.2s, box-shadow 0.35s;
  animation: riseIn 0.55s ease both;
}

.server-row:hover {
  border-color: rgba(226, 168, 74, 0.28);
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(28, 34, 46, 0.98), rgba(18, 22, 30, 0.98));
}

.server-row.is-sponsored {
  border-color: rgba(226, 168, 74, 0.35);
  background:
    linear-gradient(90deg, rgba(226, 168, 74, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(28, 24, 18, 0.98), rgba(17, 21, 28, 0.98));
}

.server-row.is-top1 {
  border-color: rgba(226, 168, 74, 0.55);
  box-shadow:
    0 0 0 1px rgba(226, 168, 74, 0.2),
    0 0 28px rgba(226, 168, 74, 0.22);
  animation: riseIn 0.55s ease both, topGlow 2.8s ease-in-out infinite;
}

.server-row.is-top2 {
  border-color: rgba(192, 198, 208, 0.45);
  box-shadow:
    0 0 0 1px rgba(192, 198, 208, 0.15),
    0 0 22px rgba(192, 198, 208, 0.14);
}

.server-row.is-top3 {
  border-color: rgba(196, 138, 82, 0.45);
  box-shadow:
    0 0 0 1px rgba(196, 138, 82, 0.16),
    0 0 20px rgba(196, 138, 82, 0.14);
}

.rank-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.rank-move {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.rank-move--up { color: #6fbf8a; }
.rank-move--down { color: #d66a5e; }
.rank-move--new { color: var(--amber-hot); }
.rank-move--same { color: var(--faint); }

.tag--trend {
  color: #9fd9b1;
  border-color: rgba(111, 191, 138, 0.35);
  background: rgba(111, 191, 138, 0.1);
  text-transform: none;
  letter-spacing: 0;
}

/* Live ticker */
.vote-ticker {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0 0 1.25rem;
  border-block: 1px solid rgba(226, 168, 74, 0.2);
  background: linear-gradient(90deg, rgba(226, 168, 74, 0.1), rgba(17, 21, 28, 0.9) 18%, rgba(17, 21, 28, 0.9));
  overflow: hidden;
}

.vote-ticker__label {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0.65rem 0.9rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #1a1208;
  background: linear-gradient(135deg, var(--amber-hot), var(--ember));
}

.vote-ticker__viewport {
  overflow: hidden;
  min-width: 0;
  flex: 1;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.vote-ticker__track {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: max-content;
  padding: 0.7rem 1rem;
  animation: tickerMove 42s linear infinite;
}

.vote-ticker__item {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.vote-ticker__item a {
  color: var(--amber-hot);
  font-weight: 700;
}

.vote-ticker__dot {
  color: rgba(226, 168, 74, 0.45);
  font-size: 0.65rem;
}

.toast--vote {
  border-color: rgba(111, 191, 138, 0.4) !important;
}

.toast--vote a {
  color: var(--amber-hot);
  font-weight: 700;
}

/* Trending */
.trending-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.trend-card {
  display: grid;
  grid-template-columns: auto 44px 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(28, 34, 46, 0.95), rgba(17, 21, 28, 0.95));
  transition: transform 0.2s, border-color 0.2s;
}

.trend-card:hover {
  transform: translateY(-2px);
  border-color: rgba(111, 191, 138, 0.35);
}

.trend-card__rank {
  font-family: var(--font-display);
  font-weight: 800;
  color: #9fd9b1;
}

.trend-card .server-banner,
.trend-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.trend-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.trend-card__meta strong {
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trend-card__meta span {
  color: #9fd9b1;
  font-size: 0.78rem;
  font-weight: 700;
}

@keyframes tickerMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes topGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(226, 168, 74, 0.2), 0 0 22px rgba(226, 168, 74, 0.18); }
  50% { box-shadow: 0 0 0 1px rgba(226, 168, 74, 0.35), 0 0 34px rgba(226, 168, 74, 0.32); }
}

.rank {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  text-align: center;
  color: var(--faint);
}

.rank--1 { color: var(--rank-gold); text-shadow: 0 0 18px rgba(226, 168, 74, 0.35); }
.rank--2 { color: var(--rank-silver); }
.rank--3 { color: var(--rank-bronze); }

.server-banner {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--banner, linear-gradient(135deg, #2a2118, #151a22));
  background-size: cover;
  background-position: center;
  overflow: hidden;
  flex-shrink: 0;
}

.server-banner.has-icon {
  background: #0d1016;
}

.server-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.upload-zone--icon {
  width: 140px;
}

.icon-preview {
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  border-radius: 16px;
  border: 1px dashed rgba(226, 168, 74, 0.35);
  background: rgba(0, 0, 0, 0.25);
  color: var(--faint);
  font-size: 0.82rem;
  text-align: center;
  padding: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone--icon:hover .icon-preview,
.upload-zone--icon.is-dragover .icon-preview {
  border-color: rgba(226, 168, 74, 0.65);
  background: rgba(226, 168, 74, 0.06);
}

.icon-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon-preview small {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
}

.featured__icon {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid rgba(239, 233, 223, 0.35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  background: #0d1016;
}

.detail-banner__row {
  display: flex;
  align-items: end;
  gap: 0.85rem;
  width: 100%;
}

.detail-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid rgba(239, 233, 223, 0.35);
  background: #0d1016;
  flex-shrink: 0;
}

.server-main {
  min-width: 0;
}

.server-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-name a:hover {
  color: var(--amber-hot);
}

.server-desc {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-votes {
  min-width: 86px;
  text-align: right;
}

.votes-count {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.votes-label {
  color: var(--faint);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.server-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 10px rgba(111, 191, 138, 0.6);
  display: inline-block;
  margin-right: 0.35rem;
}

.status-dot.offline {
  background: var(--faint);
  box-shadow: none;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 92px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 21, 28, 0.9);
  padding: 1.1rem;
}

.panel__title {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.vote-feed {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-height: 360px;
  overflow: auto;
}

.vote-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.vote-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.vote-item__server {
  font-weight: 700;
  color: var(--amber-hot);
}

.vote-item__user {
  color: var(--muted);
  grid-column: 1 / -1;
}

.vote-item__time {
  color: var(--faint);
  font-size: 0.78rem;
}

.ad-slot {
  min-height: 120px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(226, 168, 74, 0.25);
  background:
    linear-gradient(135deg, rgba(226, 168, 74, 0.06), transparent),
    rgba(255, 255, 255, 0.02);
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 0.82rem;
  text-align: center;
  padding: 1rem;
}

/* Server detail */
.detail-hero {
  padding: 2.5rem 0 1.5rem;
}

.detail-banner {
  height: 220px;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, transparent 20%, rgba(10, 12, 16, 0.85)),
    var(--banner, linear-gradient(135deg, #2a2118, #12161e));
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: end;
  padding: 1.35rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  padding-bottom: 3rem;
}

.detail-card,
.vote-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 21, 28, 0.92);
  padding: 1.35rem;
}

.detail-card h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
}

.detail-card p {
  color: var(--muted);
  margin: 0 0 1rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.meta-item {
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.meta-item span {
  display: block;
  color: var(--faint);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.meta-item strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.vote-card h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.vote-card p {
  color: var(--muted);
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.form-field label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
  min-height: 46px;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(10, 12, 16, 0.55);
  outline: none;
  transition: border-color 0.2s;
}

.form-field textarea {
  min-height: 110px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: rgba(226, 168, 74, 0.5);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.notice {
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(226, 168, 74, 0.25);
  background: rgba(226, 168, 74, 0.08);
  color: var(--amber-hot);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.notice.success {
  border-color: rgba(111, 191, 138, 0.35);
  background: rgba(111, 191, 138, 0.1);
  color: #9fd9b1;
}

.notice.error {
  border-color: rgba(214, 106, 94, 0.35);
  background: rgba(214, 106, 94, 0.1);
  color: #e7a39b;
}

/* Add server page */
.page-hero {
  padding: 2.75rem 0 1.25rem;
}

.page-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.page-hero p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  max-width: 40rem;
}

.form-panel {
  max-width: 760px;
  margin: 0 auto 3rem;
  padding: 1.5rem;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--border);
  background: rgba(17, 21, 28, 0.92);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 800px;
  margin-bottom: 3rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 21, 28, 0.9);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.15rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item[open] summary {
  color: var(--amber-hot);
}

.faq-item p {
  margin: 0;
  padding: 0 1.15rem 1.15rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
  margin-top: 1rem;
  background: rgba(8, 10, 14, 0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 0.55rem;
}

.footer-copy {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 28rem;
}

.footer-col h4 {
  margin: 0 0 0.7rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.footer-col a {
  display: block;
  color: var(--muted);
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--amber-hot);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.85rem;
}

.empty-state {
  padding: 2.5rem 1.5rem;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
}

/* Toast */
.toast-wrap {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.toast {
  min-width: 240px;
  max-width: 340px;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #1c2330;
  border: 1px solid rgba(226, 168, 74, 0.35);
  box-shadow: var(--shadow);
  animation: slideUp 0.35s ease;
}

/* Animations */
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.server-row:nth-child(1) { animation-delay: 0.02s; }
.server-row:nth-child(2) { animation-delay: 0.05s; }
.server-row:nth-child(3) { animation-delay: 0.08s; }
.server-row:nth-child(4) { animation-delay: 0.11s; }
.server-row:nth-child(5) { animation-delay: 0.14s; }
.server-row:nth-child(6) { animation-delay: 0.17s; }
.server-row:nth-child(7) { animation-delay: 0.2s; }
.server-row:nth-child(8) { animation-delay: 0.23s; }

/* Responsive */
@media (max-width: 980px) {
  .layout-split,
  .detail-grid,
  .featured,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .featured__meta {
    padding-right: 0;
  }

  .featured::before {
    position: static;
    width: fit-content;
    margin-bottom: 0.75rem;
  }

  .sidebar {
    position: static;
  }

  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .nav-links,
  .nav-auth {
    display: none;
  }

  .nav-links.open {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1rem;
    background: rgba(10, 12, 16, 0.96);
    border-bottom: 1px solid var(--border);
  }

  .nav-auth.open {
    display: flex;
    position: absolute;
    top: 260px;
    left: 0;
    right: 0;
    padding: 0 1rem 1rem;
    background: rgba(10, 12, 16, 0.96);
    border-bottom: 1px solid var(--border);
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .server-row {
    grid-template-columns: 48px 48px 1fr;
    grid-template-areas:
      "rank banner main"
      "votes votes actions";
    gap: 0.75rem;
  }

  .rank-wrap { grid-area: rank; }
  .server-banner { grid-area: banner; width: 48px; height: 48px; }
  .server-main { grid-area: main; }
  .server-votes { grid-area: votes; text-align: left; }
  .server-actions { grid-area: actions; justify-content: end; }

  .trending-strip {
    grid-template-columns: 1fr;
  }

  .vote-ticker__label {
    letter-spacing: 0.08em;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 560px;
    align-items: center;
  }
}
