/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* anti-flicker hard override */
html, body { opacity: 1 !important; }
body.page-loading { opacity: 1 !important; }

/* Force HTML hidden attribute to win over .btn display */
[hidden],
.btn[hidden],
#openAdminBtn[hidden],
#openSubmitBtn[hidden] {
  display: none !important;
}


:root {
  /* Tom & Jerry inspired palette — cream, soft blue-gray fur, warm wood */
  --bg: #1a1612;
  --bg-alt: #231e18;
  --card: #2a241c;
  --border: #3d3428;
  --text: #f5ead8;
  --muted: #b5a48a;
  --accent: #7a9bb5;
  --accent-hover: #6589a3;
  --green: #6aab7a;
  --gold: #c9a06a;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

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

/* ── No full-page opacity fade (was causing flicker) ── */
body.page-loading,
body.page-ready,
body {
  opacity: 1 !important;
  transition: none !important;
}




a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: rgba(122, 155, 181, 0.18);
  color: #b8d4e8;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* ── Navbar ── */
/* ── Navbar: one continuous bar → pill (smooth on Home + Discover) ── */
/* Outer shell is always transparent; the .nav-container IS the visual bar.
   Borders stay 1px transparent→visible so no side/top “glitch lines” while morphing. */
.navbar {
  --nav-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-dur: 0.8s;

  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  pointer-events: none;
  transition: padding var(--nav-dur) var(--nav-ease);
}

.navbar .nav-container,
.navbar .nav-toggle,
.navbar .nav-links,
.navbar .btn-nav,
.navbar .logo,
.navbar .nav-right-actions {
  pointer-events: auto;
}

.nav-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  /* Full-bleed bar at top — same element becomes the floating pill */
  width: 100%;
  max-width: 100%;
  margin: 0;
  height: 64px;
  padding: 0 clamp(0.85rem, 3vw, 2rem);
  /* Solid bg so Home (hero gradient) and Discover look identical */
  background: #1a1612;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  /* Always a full 1px border — transparent at top so nothing “draws in” on sides */
  border: 1px solid transparent;
  border-radius: 0;
  /* Soft bottom separator (not a hard border) — fades into pill shadow */
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
  outline: none;
  overflow: visible;
  isolation: isolate;
  transition:
    width var(--nav-dur) var(--nav-ease),
    max-width var(--nav-dur) var(--nav-ease),
    height var(--nav-dur) var(--nav-ease),
    margin var(--nav-dur) var(--nav-ease),
    padding var(--nav-dur) var(--nav-ease),
    border-radius var(--nav-dur) var(--nav-ease),
    border-color var(--nav-dur) var(--nav-ease),
    background var(--nav-dur) var(--nav-ease),
    box-shadow var(--nav-dur) var(--nav-ease),
    transform var(--nav-dur) var(--nav-ease),
    backdrop-filter var(--nav-dur) ease;
}

.nav-container .logo {
  position: relative;
  z-index: 2;
  margin-right: auto;
  flex-shrink: 0;
}

.nav-container .btn-nav {
  position: relative;
  z-index: 2;
  margin-left: auto;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
  transition:
    font-size var(--nav-dur) var(--nav-ease),
    gap var(--nav-dur) var(--nav-ease);
}

.logo:hover { text-decoration: none; color: var(--text); }
.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition:
    width var(--nav-dur) var(--nav-ease),
    height var(--nav-dur) var(--nav-ease),
    border-color var(--nav-dur) ease;
}

.nav-links {
  /* Always centered in the bar / pill (same on Home + Discover) */
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  list-style: none;
  z-index: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  transition: gap var(--nav-dur) var(--nav-ease);
}

.nav-links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.92rem;
  transition:
    color 0.2s,
    background 0.2s,
    font-size var(--nav-dur) var(--nav-ease),
    padding var(--nav-dur) var(--nav-ease),
    gap var(--nav-dur) var(--nav-ease);
  padding: 0.45rem 0.7rem; /* room for full labels at top */
  border-radius: 999px;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 36px;
  min-height: 36px;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
}

/* Active section highlight (scroll spy + static on Discover) */
.nav-links a.nav-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

/* Minimalist icon nav */
.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav-links a:hover .nav-icon,
.nav-links a.nav-active .nav-icon {
  opacity: 1;
}

.nav-label {
  display: inline-block;
  max-width: 10em;
  opacity: 1;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: middle;
  transition:
    max-width var(--nav-dur) var(--nav-ease),
    opacity calc(var(--nav-dur) * 0.65) var(--nav-ease),
    margin var(--nav-dur) var(--nav-ease);
}

/* Show logo name + pfp when bar is square (top) */
.logo-text {
  display: inline-block;
  max-width: 10em;
  opacity: 1;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: middle;
  transition:
    max-width var(--nav-dur) var(--nav-ease),
    opacity calc(var(--nav-dur) * 0.65) var(--nav-ease),
    margin var(--nav-dur) var(--nav-ease);
}

/* Minimal look only after scroll (pill) — smooth fade + collapse */
.navbar.is-scrolled .nav-label {
  max-width: 0;
  opacity: 0;
  margin-left: 0;
  margin-right: 0;
  pointer-events: none;
}

.navbar.is-scrolled .logo-text {
  max-width: 0;
  opacity: 0;
  margin-left: 0;
  margin-right: 0;
  pointer-events: none;
}

@media (min-width: 801px) {
  .nav-links {
    gap: 0.15rem;
  }
  .nav-links a {
    padding: 0.5rem 0.75rem; /* room for full labels at top */
  }
}

.btn-nav {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  background: #5865F2 !important;
  color: #fff !important;
  padding: 0.48rem 1rem !important;
  border-radius: 999px;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition:
    background 0.2s,
    transform 0.15s,
    border-radius var(--nav-dur) var(--nav-ease),
    padding var(--nav-dur) var(--nav-ease),
    font-size var(--nav-dur) var(--nav-ease),
    box-shadow var(--nav-dur) var(--nav-ease);
}

.btn-nav:hover {
  background: #4752c4 !important;
  color: #fff !important;
  text-decoration: none !important;
  transform: translateY(-1px);
}

.btn-discord-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 999px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ── Scrolled: same bar morphs into floating centered pill ── */
.navbar.is-scrolled {
  padding: 0.75rem 1rem 0;
}

.navbar.is-scrolled .nav-container {
  width: min(960px, calc(100% - 2rem));
  max-width: 960px;
  height: 54px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 0.85rem;
  /* Same solid tone as expanded bar — slight lift via shadow only */
  background: #1a1612;
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  /* Only change color of the already-present 1px border — no new edges appear */
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateZ(0);
}

.navbar.is-scrolled .logo {
  font-size: 1.05rem;
  margin-right: 0;
  gap: 0;
}

.navbar.is-scrolled .logo-icon {
  width: 30px;
  height: 30px;
  border-color: rgba(255, 255, 255, 0.12);
}

/* Links stay absolutely centered in both states */
.navbar.is-scrolled .nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  flex: none;
  gap: 0.12rem;
}

.navbar.is-scrolled .nav-links a {
  font-size: 0.86rem;
  padding: 0.38rem 0.65rem;
  gap: 0;
}

.navbar.is-scrolled .btn-nav {
  margin-left: 0;
  border-radius: 999px !important;
  padding: 0.4rem 0.9rem !important;
  font-size: 0.84rem !important;
  box-shadow: 0 2px 10px rgba(88, 101, 242, 0.3);
}

.navbar.is-scrolled .nav-right-actions {
  margin-left: 0;
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  /* original warm base glow */
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(122, 155, 181, 0.22), transparent),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(201, 160, 106, 0.1), transparent);
}

/* soft blue-gray drifting light */
.hero-bg::before {
  content: "";
  position: absolute;
  width: 70vmin;
  height: 70vmin;
  top: -5%;
  left: 10%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(122, 155, 181, 0.35) 0%,
    rgba(122, 155, 181, 0.12) 40%,
    transparent 70%
  );
  filter: blur(40px);
  animation: glowDriftA 7s ease-in-out infinite alternate;
  will-change: transform;
}

/* warm gold secondary swirl */
.hero-bg::after {
  content: "";
  position: absolute;
  width: 55vmin;
  height: 55vmin;
  bottom: 5%;
  right: 8%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(201, 160, 106, 0.22) 0%,
    rgba(201, 160, 106, 0.08) 45%,
    transparent 70%
  );
  filter: blur(48px);
  animation: glowDriftB 9s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes glowDriftA {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(20%, 12%) scale(1.15); }
  100% { transform: translate(-8%, 18%) scale(1.05); }
}

@keyframes glowDriftB {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-22%, -10%) scale(1.2); }
  100% { transform: translate(10%, -16%) scale(1.08); }
}

.hero-content {
  position: relative;
  width: min(900px, 92%);
  margin: 0 auto;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(106, 171, 122, 0.15);
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(106, 171, 122, 0.3);
}

.pulse {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-brand {
  display: inline;
}

.hero-inline-icon {
  display: inline-block;
  vertical-align: middle;
  width: 1.15em;
  height: 1.15em;
  margin: 0 0.15em;
  border-radius: 22%;
  object-fit: contain;
  position: relative;
  top: -0.05em;
}

.gradient {
  background: linear-gradient(135deg, #7a9bb5, #a8c5d8, #c9a06a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 2.5rem;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  max-width: 620px;
  margin: 0 auto 2.5rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  box-shadow: var(--shadow);
  /* Keep cards solid during number updates — no layout jump */
  contain: layout style;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
  /* Fixed digit width so 9 → 10 / commas don't reflow the card */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  min-height: 1.35em;
  line-height: 1.35;
  white-space: nowrap;
  /* Avoid paint flicker when textContent updates every frame */
  backface-visibility: hidden;
  transform: translateZ(0);
}

.status-online {
  color: var(--green);
  font-size: 1.35rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Buttons */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #1a1612;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(122, 155, 181, 0.35);
}

.btn-secondary {
  background: #3a3228;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #4a4034;
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Sections ── */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
}

/* Features */
/* Features — bento grid ("Everything in One Place") */
.features-header {
  margin-bottom: 2.5rem;
}

.features-kicker {
  width: 42px;
  height: 42px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--accent);
  background: rgba(122, 155, 181, 0.14);
  border: 1px solid rgba(122, 155, 181, 0.28);
  box-shadow: 0 0 24px rgba(122, 155, 181, 0.12);
}

.features-title {
  position: relative;
  display: inline-block;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.features-title-text {
  position: relative;
  z-index: 1;
}

/* Curvy underline — draws in when section scrolls into view */
.features-underline {
  display: block;
  width: 100%;
  height: 14px;
  margin-top: 0.15rem;
  overflow: visible;
}

.features-underline-path {
  stroke: var(--accent);
  stroke-width: 3.2;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  transition: none;
}

.features-title.is-underlined .features-underline-path {
  animation: features-underline-draw 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes features-underline-draw {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .features-title.is-underlined .features-underline-path {
    animation: none;
    stroke-dashoffset: 0;
  }
}

.features-bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  max-width: 980px;
  margin: 0 auto;
}

.feature-card {
  background: rgba(26, 22, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 22px;
  padding: 1.6rem 1.5rem;
  transition:
    border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.3s ease;
  grid-column: span 2;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.feature-card.feature-wide {
  grid-column: span 4;
}

.feature-card.feature-tall {
  grid-column: span 2;
  grid-row: span 1;
  min-height: 150px;
}

.feature-card:hover {
  border-color: rgba(122, 155, 181, 0.5);
  transform: translateY(-4px);
  background: rgba(36, 30, 24, 0.9);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(122, 155, 181, 0.12);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.55rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.feature-card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

.feature-card code {
  font-size: 0.85em;
}

@media (max-width: 860px) {
  .features-bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-card,
  .feature-card.feature-wide,
  .feature-card.feature-tall {
    grid-column: span 1;
  }

  .feature-card.feature-wide {
    grid-column: span 2;
  }
}

@media (max-width: 520px) {
  .features-bento {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .feature-card.feature-wide,
  .feature-card.feature-tall {
    grid-column: span 1;
  }
}

/* How it Works layout */
.how-layout {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2.25rem;
  align-items: start;
  margin-bottom: 2.75rem;
}

.how-left .steps {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 0;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
  padding: 1.15rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.step:hover {
  border-color: rgba(122, 155, 181, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.step-num {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #7a9bb5, #5a7a94);
  color: #1a1612;
  font-weight: 800;
  font-size: 1.05rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.step-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
}

.step-body p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.45;
}

.step-body code {
  font-size: 0.85em;
  background: rgba(122, 155, 181, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  color: var(--text);
}

/* Preview screenshot */
.how-preview {
  background: #1e1f22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(122, 155, 181, 0.12);
}

.how-preview-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.9rem;
  background: #2b2d31;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.how-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4e5058;
}

.how-dot:nth-child(1) { background: #ed4245; }
.how-dot:nth-child(2) { background: #fee75c; }
.how-dot:nth-child(3) { background: #57f287; }

.how-preview-label {
  margin-left: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #b5bac1;
}

.how-preview-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  vertical-align: top;
}

/* Commands box */
.commands-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 1.75rem 1.35rem;
  max-width: 820px;
  margin: 0 auto;
}

.commands-head {
  text-align: center;
  margin-bottom: 1.15rem;
}

.commands-head h3 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.commands-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.commands-head code {
  font-size: 0.85em;
  background: rgba(122, 155, 181, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
}

.cmd-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cmd-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.7rem 0.9rem;
  background: var(--bg-alt);
  border: 1px solid transparent;
  border-radius: 10px;
  transition: border-color 0.15s, background 0.15s;
}

.cmd-row:hover {
  border-color: rgba(122, 155, 181, 0.3);
  background: rgba(122, 155, 181, 0.06);
}

.cmd-row code {
  font-size: 0.88rem;
  font-weight: 600;
  background: rgba(122, 155, 181, 0.18);
  color: var(--text);
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  white-space: nowrap;
}

.cmd-row span {
  color: var(--muted);
  font-size: 0.92rem;
  margin-left: auto;
  text-align: right;
}

.cmd-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 1.1rem;
  margin-bottom: 0;
}

.cmd-note code {
  font-size: 0.85em;
  background: rgba(122, 155, 181, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
}

@media (max-width: 900px) {
  .how-layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .how-right {
    order: -1;
  }
}

@media (max-width: 560px) {
  .cmd-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .cmd-row span {
    margin-left: 0;
    text-align: left;
  }
}

/* FAQ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item summary {
  padding: 1.1rem 1.35rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--muted);
  transition: transform 0.25s ease;
}

.faq-item[open] summary::after {
  content: '−';
}

/* Smooth open + close (works both directions) */
.faq-item::details-content {
  display: block;
  overflow: hidden;
  height: 0;
  opacity: 0;
  transition:
    height 0.35s ease,
    opacity 0.25s ease,
    content-visibility 0.35s allow-discrete;
}

.faq-item[open]::details-content {
  height: auto;
  opacity: 1;
}

.faq-item p {
  padding: 0 1.35rem 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.faq-item a { color: var(--accent); }

/* Add section */
.add-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.add-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.add-card h3 { font-size: 1.2rem; }
.add-card p { color: var(--muted); font-size: 0.95rem; flex: 1; }

/* Privacy / Terms */
.privacy-content {
  max-width: 740px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.privacy-content h3 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.6rem;
  color: var(--text);
}

.privacy-content h3:first-child { margin-top: 0; }

.privacy-content p,
.privacy-content li {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.privacy-content ul {
  padding-left: 1.4rem;
  margin-bottom: 0.75rem;
}

.privacy-content a { color: var(--accent); }

/* Legal tab switcher — smooth cross-fade */
.legal-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0 auto 1.25rem;
  padding: 0.3rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.legal-tab {
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  cursor: pointer;
  transition:
    color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}

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

.legal-tab.is-active {
  color: var(--text);
  background: var(--card);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* Stack both panels in the same grid cell so height follows the taller one */
.legal-panels {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "legal";
  max-width: 740px;
  margin: 0 auto;
}

.legal-panel {
  grid-area: legal;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.4s;
  /* Keep inactive panel in layout for height, but not interactive */
  z-index: 0;
}

.legal-panel.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  z-index: 1;
}

/* Title fade when switching */
#legalTitle,
#legalUpdated {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#legalTitle.is-switching,
#legalUpdated.is-switching {
  opacity: 0;
  transform: translateY(4px);
}

@media (prefers-reduced-motion: reduce) {
  .legal-tab,
  .legal-panel,
  #legalTitle,
  #legalUpdated {
    transition: none !important;
  }
}


/* ── Communities marquee ── */
.communities {
  padding: 1.5rem 0 3rem;
  overflow: hidden;
  border-top: 1px solid transparent;
}

.communities-label {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: marquee-scroll 120s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.server-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 1.1rem 0.55rem 0.55rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.2s, transform 0.2s;
}

.server-chip:hover {
  border-color: rgba(122, 155, 181, 0.45);
  transform: translateY(-2px);
}

.server-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  overflow: hidden;
  background: #3d3428;
}
.server-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.server-name-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.boost-badge {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.si-1 { background: linear-gradient(135deg, #5865F2, #7289da); }
.si-2 { background: linear-gradient(135deg, #3ba55d, #2d7d46); }
.si-3 { background: linear-gradient(135deg, #7a9bb5, #5a7a94); }
.si-4 { background: linear-gradient(135deg, #eb459e, #c23a82); }
.si-5 { background: linear-gradient(135deg, #c9a06a, #a67c4a); }
.si-6 { background: linear-gradient(135deg, #ed4245, #c03538); }
.si-7 { background: linear-gradient(135deg, #9b59b6, #7d3c98); }
.si-8 { background: linear-gradient(135deg, #f1c40f, #d4a90a); color: #1a1612; }

.server-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.2;
}

.server-members {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

@media (max-width: 500px) {
  .communities-label { font-size: 0.75rem; }
  .server-chip { padding: 0.45rem 0.9rem 0.45rem 0.45rem; }
  .server-icon { width: 36px; height: 36px; font-size: 1rem; }
}


/* ── Leaderboard ── */
.lb-live {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green);
  margin: -1.5rem auto 1.75rem;
}

.lb-updated {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8rem;
}

.lb-box {
  max-width: 740px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.lb-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.lb-box .lb-row {
  background: var(--bg-alt);
}

.lb-loading {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
}

.lb-row {
  display: grid;
  grid-template-columns: 48px 48px 1fr auto;
  align-items: center;
  gap: 0.9rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.15rem;
  transition: border-color 0.2s, transform 0.2s;
}

.lb-row:hover {
  border-color: rgba(122, 155, 181, 0.45);
  transform: translateY(-2px);
}

.lb-row.rank-1 {
  border-color: rgba(201, 160, 106, 0.55);
  background: linear-gradient(135deg, rgba(201, 160, 106, 0.12), var(--card));
}
.lb-row.rank-2 {
  border-color: rgba(180, 180, 190, 0.4);
  background: linear-gradient(135deg, rgba(180, 180, 190, 0.08), var(--card));
}
.lb-row.rank-3 {
  border-color: rgba(180, 120, 70, 0.4);
  background: linear-gradient(135deg, rgba(180, 120, 70, 0.08), var(--card));
}

.lb-rank {
  font-weight: 800;
  font-size: 1.15rem;
  text-align: center;
  color: var(--muted);
}

.lb-row.rank-1 .lb-rank { color: var(--gold); }
.lb-row.rank-2 .lb-rank { color: #c0c4ce; }
.lb-row.rank-3 .lb-rank { color: #c4895a; }

.lb-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: #3d3428;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.lb-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lb-info {
  min-width: 0;
}

.lb-name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lb-name {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.lb-points {
  text-align: right;
  flex-shrink: 0;
}

.lb-points-val {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent);
  line-height: 1.1;
}

.lb-points-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 500px) {
  .lb-row {
    grid-template-columns: 36px 40px 1fr auto;
    gap: 0.55rem;
    padding: 0.75rem 0.85rem;
  }
  .lb-icon { width: 40px; height: 40px; }
  .lb-name { font-size: 0.9rem; }
  .lb-points-val { font-size: 1rem; }
}


/* ── Scroll to top ── */
.scroll-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s, background 0.2s, border-color 0.2s, color 0.2s;
  padding: 0;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.scroll-top-arrow svg {
  display: block;
}

.scroll-top-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--shadow);
  transition: opacity 0.2s, transform 0.2s;
}

.scroll-top:hover {
  background: #2f2920;
  border-color: rgba(122, 155, 181, 0.5);
  color: var(--text);
}

.scroll-top:hover .scroll-top-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ── Discover ── */
.discover-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 820px;
  margin: 0 auto 1.15rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 50;
  overflow: visible;
}

.discover-search {
  flex: 1 1 240px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.75rem 1.15rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}

.discover-search:focus-within {
  border-color: rgba(122, 155, 181, 0.55);
  box-shadow: 0 0 0 3px rgba(122, 155, 181, 0.1);
}

.discover-search-icon {
  color: var(--muted);
  flex-shrink: 0;
}

.discover-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  min-width: 0;
}

.discover-search input::placeholder {
  color: var(--muted);
}

/* Sort dropdown */
.discover-sort {
  position: relative;
  flex-shrink: 0;
  z-index: 60;
  overflow: visible;
}

.discover-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  white-space: nowrap;
  user-select: none;
}

.discover-sort-btn:hover,
.discover-sort.open .discover-sort-btn {
  border-color: rgba(122, 155, 181, 0.45);
  background: #2f2920;
}

.discover-sort-caret {
  opacity: 0.75;
  flex-shrink: 0;
  transition: transform 0.22s ease;
  transform-origin: center;
}

.discover-sort.open .discover-sort-caret {
  transform: rotate(180deg);
}

.discover-sort-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: rgba(22, 18, 14, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  padding: 0.4rem;
  z-index: 80;
  display: none;
  flex-direction: column;
  gap: 0.1rem;
}

.discover-sort.open .discover-sort-menu,
.discover-sort-menu:not([hidden]) {
  display: flex;
}

.discover-sort-menu[hidden] {
  display: none !important;
}

.discover-sort-option {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.discover-sort-option:hover {
  background: rgba(122, 155, 181, 0.14);
  color: var(--text);
}

.discover-sort-option.active {
  color: var(--text);
  background: rgba(122, 155, 181, 0.18);
  font-weight: 600;
}

.discover-grid.is-resorting {
  opacity: 0.55;
  transition: opacity 0.18s ease;
}

/* Horizontal scrolling tags with arrows */
.discover-tags-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 auto 1.75rem;
  max-width: 100%;
}

.discover-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  justify-content: flex-start;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  min-width: 0;
  padding: 0.15rem 0.1rem;
}

.discover-tags::-webkit-scrollbar {
  display: none;
}

.tags-scroll-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(34, 28, 22, 0.92);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}

.tags-scroll-btn:hover {
  background: #2f2920;
  border-color: rgba(122, 155, 181, 0.4);
}

.tags-scroll-btn[hidden] {
  display: none !important;
}

.tag-chip {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tag-chip-count {
  font-size: 0.78rem;
  opacity: 0.8;
  font-weight: 600;
}

.tag-chip:hover {
  border-color: rgba(122, 155, 181, 0.45);
  color: var(--text);
}

.tag-chip.active {
  background: rgba(122, 155, 181, 0.2);
  border-color: var(--accent);
  color: var(--text);
}

.tag-chip.active .tag-chip-count {
  opacity: 1;
}

@media (max-width: 560px) {
  .discover-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .discover-sort-btn {
    width: 100%;
    justify-content: space-between;
  }
  .discover-sort-menu {
    left: 0;
    right: 0;
  }
}

.discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.discover-loading,
.discover-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 2.5rem 1rem;
}

.server-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
}

.server-card:hover {
  border-color: rgba(122, 155, 181, 0.45);
  transform: translateY(-3px);
}

.server-card-banner {
  height: 90px;
  background: linear-gradient(135deg, #2a241c 0%, #3d3428 50%, #1a1612 100%);
  position: relative;
  overflow: hidden;
}

.server-card-banner.has-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Icon used as banner when no Discord banner is set */
.server-card-banner.has-icon-fallback {
  background-size: cover;
  background-position: center;
}

.server-card-banner.has-icon-fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 22, 18, 0.15) 0%, rgba(26, 22, 18, 0.45) 100%);
  pointer-events: none;
}

.server-card-featured {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  background: rgba(0,0,0,0.55);
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 160, 106, 0.4);
}

.server-card-body {
  padding: 0 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  margin-top: -28px;
  position: relative;
}

.server-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 3px solid var(--card);
  background: #3d3428;
  object-fit: cover;
  display: block;
}

.server-card-icon.letter {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
}

.server-card-name {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0.65rem 0 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-card-desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.55em;
  margin-bottom: 0.75rem;
}

.server-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.server-card-tags span {
  background: rgba(122, 155, 181, 0.12);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.server-card-stats {
  display: flex;
  gap: 0.85rem;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 0.9rem;
}

.server-card-stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.server-card-join {
  margin-top: auto;
  display: block;
  text-align: center;
  background: #3a3228;
  color: var(--text) !important;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none !important;
  transition: background 0.2s, border-color 0.2s;
}

.server-card-join:hover {
  background: #4a4034;
  border-color: rgba(122, 155, 181, 0.4);
}

/* Detail overlay */
.server-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  padding: 2rem 1rem 3rem;
}

.server-detail-overlay[hidden] {
  display: none !important;
}

.server-detail-panel {
  max-width: 900px;
  margin: 0 auto;
}

.server-detail-back {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-family: var(--font);
  cursor: pointer;
  margin-bottom: 1rem;
  padding: 0.35rem 0;
}

.server-detail-back:hover {
  color: var(--text);
}

.sd-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  /* do NOT use overflow:hidden here — it clips the overlapping server icon */
  overflow: visible;
  margin-bottom: 1.25rem;
}

.sd-banner {
  position: relative;
  height: 160px;
  background: linear-gradient(135deg, #2a3538 0%, #1a1612 100%);
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.sd-banner.has-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* When using icon as banner fallback, darken so text/badge stay readable */
.sd-banner.has-icon-fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26,22,18,0.25) 0%, rgba(26,22,18,0.75) 100%);
  pointer-events: none;
}

.sd-main {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  padding: 0 1.5rem 1.35rem;
  margin-top: -40px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.sd-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  border: 4px solid var(--card);
  background: #3d3428;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.sd-icon.letter {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--text);
}

.sd-info {
  flex: 1;
  min-width: 160px;
  padding-bottom: 0.15rem;
}

.sd-name {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--text);
  line-height: 1.2;
  word-break: break-word;
}

.sd-meta {
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.sd-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
  padding-bottom: 0.15rem;
}

.sd-actions .btn {
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
}

.sd-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.25rem;
}

@media (max-width: 720px) {
  .sd-grid { grid-template-columns: 1fr; }
}

.sd-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.35rem;
  margin-bottom: 1rem;
}

.sd-block h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.sd-block p {
  color: var(--muted);
  font-size: 0.95rem;
}

.sd-side-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.sd-stat {
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
}

.sd-stat-val {
  font-weight: 800;
  font-size: 1.15rem;
}

.sd-stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.sd-tags span {
  background: rgba(122, 155, 181, 0.15);
  color: var(--text);
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

.sd-review-note {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 3.75rem 0 2rem;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem 4rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 280px;
  flex-shrink: 0;
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  transition: opacity 0.15s;
}

.footer-brand-link:hover {
  text-decoration: none;
  opacity: 0.85;
  color: var(--text);
}

.footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.08);
  display: block;
}

.footer-brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.footer-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem 4rem;
  flex: 1;
  justify-content: flex-end;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 110px;
}

.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 0.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--text);
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-copy-left,
.footer-copy-note {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
}

@media (max-width: 720px) {
  .footer-top {
    flex-direction: column;
    gap: 2.25rem;
  }

  .footer-cols {
    justify-content: flex-start;
    gap: 2rem 2.75rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Responsive ── */
@media (max-width: 800px) {
  .nav-toggle { display: flex; }

  .logo-text,
  .navbar.is-scrolled .logo-text {
    display: inline-block;
    max-width: 10em;
    opacity: 1;
    pointer-events: auto; /* keep name on mobile in both states */
  }

  .nav-label,
  .navbar.is-scrolled .nav-label {
    display: inline-block;
    max-width: 10em;
    opacity: 1;
    pointer-events: auto; /* keep labels in the mobile menu */
  }

  .nav-links {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    top: 64px;
    transform: translateY(-8px);
    background: rgba(22, 18, 14, 0.96);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    flex-direction: column;
    align-items: stretch;
    padding: 0.65rem;
    gap: 0.2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 99;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  }

  .nav-links a {
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    justify-content: flex-start;
    min-width: auto;
    min-height: auto;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .navbar.is-scrolled .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.55rem);
    flex: none;
    transform: translateY(-8px);
  }

  .navbar.is-scrolled .nav-links.open {
    transform: translateY(0);
  }

  .stats-grid { grid-template-columns: repeat(2, 1fr); max-width: 360px; }
  .add-cards { grid-template-columns: 1fr; }
  .privacy-content { padding: 1.5rem; }
}

@media (max-width: 500px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
}


/* Discover page extras */
.discover-page .discover-main {
  padding-top: 72px;
  min-height: calc(100vh - 72px);
  overflow: visible;
}

.btn-nav-home {
  display: inline-flex !important;
  align-items: center;
  background: #3a3228 !important;
  color: var(--text) !important;
  padding: 0.5rem 1.05rem !important;
  border-radius: 10px;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  text-decoration: none !important;
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-radius 0.3s, padding 0.3s;
}

.btn-nav-home:hover {
  background: #4a4034 !important;
  color: var(--text) !important;
  text-decoration: none !important;
}

.navbar.is-scrolled .btn-nav-home {
  background: transparent !important;
  color: var(--muted) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px !important;
  padding: 0.4rem 0.85rem !important;
  font-size: 0.85rem !important;
}

.navbar.is-scrolled .btn-nav-home:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text) !important;
}

/* Phase 2 auth + modals */
.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  position: relative;
  z-index: 2;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-container .btn-nav-home {
  margin-left: 0;
}

#authArea {
  display: flex;
  align-items: center;
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
}

.auth-user img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.auth-logout {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font);
}

.auth-logout:hover {
  color: var(--text);
  border-color: rgba(122, 155, 181, 0.45);
}

.discover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5rem 1rem 2rem;
  overflow-y: auto;
}

.modal[hidden] { display: none !important; }

.modal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  width: min(480px, 100%);
  box-shadow: var(--shadow);
}

.modal-wide { width: min(720px, 100%); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.modal-head h3 { font-size: 1.15rem; }

.modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-note {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

#submitForm label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.75rem 0 0.35rem;
}

#submitForm select,
#submitForm textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 0.65rem 0.85rem;
  font-family: var(--font);
  font-size: 0.95rem;
}

#submitForm textarea { resize: vertical; min-height: 80px; }

.tag-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-pick label {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500 !important;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  margin: 0 !important;
  font-size: 0.82rem !important;
}

.form-error {
  color: #ed4245;
  font-size: 0.88rem;
  margin: 0.75rem 0;
}

.form-ok {
  color: var(--green);
  font-size: 0.88rem;
  margin: 0.75rem 0;
}

#submitBtn { width: 100%; margin-top: 1rem; }


.admin-search-wrap {
  position: relative;
  margin: 0 0 1rem;
}

.admin-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  opacity: 0.85;
}

.admin-search-wrap input {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.92rem;
  padding: 0.7rem 0.9rem 0.7rem 2.4rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-search-wrap input::placeholder {
  color: var(--muted);
}

.admin-search-wrap input:focus {
  border-color: rgba(122, 155, 181, 0.55);
  box-shadow: 0 0 0 3px rgba(122, 155, 181, 0.12);
}

.admin-row {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.admin-row-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-row-top img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.admin-row-name { font-weight: 700; flex: 1; }

.admin-status {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.admin-status.pending { background: rgba(201,160,106,0.2); color: var(--gold); }
.admin-status.approved { background: rgba(106,171,122,0.2); color: var(--green); }

.admin-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-ids {
  display: grid;
  gap: 0.25rem;
  margin: 0.15rem 0;
}

.admin-ids strong {
  color: var(--text);
  font-weight: 600;
}

.admin-id {
  font-size: 0.75rem;
  background: rgba(122, 155, 181, 0.12);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  margin-left: 0.25rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.admin-actions button {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}

.admin-actions .btn-approve {
  background: rgba(106,171,122,0.2);
  border-color: rgba(106,171,122,0.4);
  color: var(--green);
}

.admin-actions .btn-deny,
.admin-actions .btn-delete {
  background: rgba(237,66,69,0.12);
  border-color: rgba(237,66,69,0.35);
  color: #ed4245;
}

@media (max-width: 800px) {
  .nav-right-actions {
    margin-left: 0;
  }
}

/* Server detail — manage listing (owner / admin) */
.sd-manage {
  border-color: rgba(122, 155, 181, 0.35);
}

.sd-manage-note {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.sd-edit-panel label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.75rem 0 0.35rem;
}

.sd-edit-panel textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 0.65rem 0.85rem;
  font-family: var(--font);
  font-size: 0.95rem;
  resize: vertical;
  min-height: 90px;
}

.sd-edit-panel .tag-pick {
  margin-bottom: 0.5rem;
}

.sd-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-danger {
  background: rgba(237, 66, 69, 0.15);
  color: #ed4245;
  border: 1px solid rgba(237, 66, 69, 0.4);
}

.btn-danger:hover {
  background: rgba(237, 66, 69, 0.28);
  transform: translateY(-1px);
}

.btn-danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}


/* ── Avatar account menu ── */
.auth-menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.55rem 0.2rem 0.2rem;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.auth-menu-toggle:hover {
  border-color: rgba(122, 155, 181, 0.5);
  background: #2f2920;
}

.auth-menu-toggle img,
.auth-avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
  display: block;
}

.auth-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3d3428;
  font-weight: 800;
  font-size: 0.85rem;
}

.auth-menu-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-menu-caret {
  margin-right: 0.25rem;
  color: var(--muted);
  flex-shrink: 0;
}

.auth-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 260px;
  background: rgba(34, 28, 22, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  padding: 0.55rem;
  z-index: 120;
  animation: auth-menu-in 0.18s ease;
}

@keyframes auth-menu-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-menu-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  padding: 0.9rem 0.7rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.35rem;
}

.auth-menu-header img,
.auth-menu-header .auth-avatar-fallback {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2.5px solid rgba(122, 155, 181, 0.45);
  box-shadow:
    0 0 0 3px rgba(26, 22, 18, 0.9),
    0 4px 14px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.auth-menu-header .auth-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3d3428, #2a241c);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
}

.auth-menu-header-name {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  color: var(--text);
}

.auth-menu-header-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.auth-menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.auth-menu-item:hover {
  background: rgba(122, 155, 181, 0.12);
}

.auth-menu-item-danger {
  color: #ed4245;
}

.auth-menu-item-danger:hover {
  background: rgba(237, 66, 69, 0.12);
}

.auth-menu-item-icon {
  width: 1.25rem;
  text-align: center;
  opacity: 0.9;
}

@media (max-width: 500px) {
  .auth-menu-name { display: none; }
}

/* ── Your servers overlay ── */
.my-servers-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  padding: 2rem 1rem 3rem;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.my-servers-overlay.open {
  opacity: 1;
}

.my-servers-overlay[hidden] {
  display: none !important;
}

.my-servers-panel {
  max-width: 820px;
  margin: 0 auto;
  transform: translateY(12px);
  transition: transform 0.25s ease;
}

.my-servers-overlay.open .my-servers-panel {
  transform: translateY(0);
}

.my-servers-head {
  margin-bottom: 1.25rem;
}

.my-servers-head h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0.35rem 0 0.25rem;
}

.my-servers-sub {
  color: var(--muted);
  font-size: 0.95rem;
}

.my-servers-empty {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.my-servers-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.my-servers-empty h3 {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.my-servers-empty p {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.my-servers-grid {
  display: grid;
  gap: 1rem;
}

.my-srv-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem;
  transition: border-color 0.2s, transform 0.2s;
}

.my-srv-card:hover {
  border-color: rgba(122, 155, 181, 0.4);
}

.my-srv-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.65rem;
}

.my-srv-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: #3d3428;
  flex-shrink: 0;
}

.my-srv-icon.letter {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.my-srv-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.my-srv-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.my-srv-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.my-srv-actions {
  margin-top: 0.75rem;
}

.my-srv-pending-note {
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
}

.my-servers-footer {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
}


/* Admin featured toggle on detail */
.sd-featured-box {
  background: var(--bg-alt);
  border: 1px solid rgba(201, 160, 106, 0.35);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.sd-featured-label {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--gold);
  margin: 0 !important;
}

.sd-featured-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
}

.sd-featured-hint {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0.5rem 0 0.85rem;
}

.sd-featured-box .btn {
  width: 100%;
}

.server-card-featured {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  backdrop-filter: blur(6px);
}

.sd-detail-featured { z-index: 2; }

/* ── Ratings & Reviews ── */
.sd-reviews-block h3 {
  margin-bottom: 1rem;
}

.sd-rating-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

@media (max-width: 560px) {
  .sd-rating-summary {
    grid-template-columns: 1fr;
  }
}

.sd-rating-score {
  text-align: center;
  min-width: 110px;
}

.sd-rating-num {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.sd-rating-count {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.stars {
  display: inline-flex;
  gap: 0.1rem;
  letter-spacing: 0;
}

.star {
  color: #3d3428;
  position: relative;
  display: inline-block;
}

.star.full {
  color: #c9a06a;
}

.star.half {
  background: linear-gradient(90deg, #c9a06a 50%, #3d3428 50%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.stars-lg .star { font-size: 1.15rem; }
.stars-md .star { font-size: 1rem; }
.stars-sm .star { font-size: 0.9rem; }

.rating-bar-row {
  display: grid;
  grid-template-columns: 36px 1fr 24px;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.rating-bar-track {
  height: 8px;
  background: #2a241c;
  border-radius: 999px;
  overflow: hidden;
}

.rating-bar-fill {
  height: 100%;
  background: #c9a06a;
  border-radius: 999px;
}

.sd-review-login {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.9rem 1.25rem;
  font-family: var(--font);
  font-size: 0.95rem;
  cursor: pointer;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.sd-review-login:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(122, 155, 181, 0.08);
}

.sd-review-form {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem;
  margin-bottom: 1.25rem;
}

.sd-review-form-label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.star-picker {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
}

.star-pick {
  position: relative;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  color: #3d3428;
}

.star-pick .star-glyph.full { color: #c9a06a; }
.star-pick .star-glyph.half {
  background: linear-gradient(90deg, #c9a06a 50%, #3d3428 50%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.star-pick .star-glyph.empty { color: #3d3428; }

.star-half-hit,
.star-full-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 1;
}
.star-half-hit { left: 0; }
.star-full-hit { right: 0; }

.sd-review-form textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 0.75rem 0.9rem;
  font-family: var(--font);
  font-size: 0.95rem;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 0.75rem;
}

.sd-review-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.sd-review-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sd-review-item {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.sd-review-item-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.sd-review-av img,
.sd-review-av-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.sd-review-av-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3d3428;
  font-weight: 700;
}

.sd-review-item-meta { flex: 1; min-width: 0; }
.sd-review-item-name { font-weight: 700; font-size: 0.95rem; }
.sd-review-item-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.sd-review-text {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 0 3.25rem;
  line-height: 1.45;
}

.sd-review-empty {
  color: var(--muted);
  text-align: center;
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.sd-review-menu-wrap { position: relative; }
.sd-review-menu-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  line-height: 1;
}
.sd-review-menu-btn:hover { background: rgba(122,155,181,0.12); color: var(--text); }

.sd-review-menu {
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 120px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 5;
  padding: 0.3rem;
}

.sd-review-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
}
.sd-review-menu-item:hover { background: rgba(122,155,181,0.12); }
.sd-review-menu-item.danger { color: #ed4245; }
.sd-review-menu-item.danger:hover { background: rgba(237,66,69,0.12); }

/* Toast (bottom-right) */
.sb-toast-host {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.sb-toast {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  font-weight: 500;
  max-width: 320px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
}

.sb-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.sb-toast-warn {
  border-color: rgba(201, 160, 106, 0.5);
}

.sb-toast-ok {
  border-color: rgba(106, 171, 122, 0.45);
}


/* ── Opening animation (load / reload) — smooth, no blank flash ── */
/* Pre-enter pose: once JS is ready but before soft-enter, match the
   animation "from" state so content never flashes fully visible then snaps. */
html.js-ready body:not(.soft-enter) .nav-container {
  opacity: 0;
  transform: translateY(-12px);
}
html.js-ready body:not(.soft-enter) .hero-content,
html.js-ready body:not(.soft-enter) .hero-actions,
html.js-ready body:not(.soft-enter) .hero-cta,
html.js-ready body:not(.soft-enter) .stats-grid,
html.js-ready body:not(.soft-enter) .stat-card,
html.js-ready body:not(.soft-enter) #features .section-header,
html.js-ready body:not(.soft-enter) #how .section-header,
html.js-ready body:not(.soft-enter) #faq .section-header,
html.js-ready body:not(.soft-enter) #leaderboard .section-header,
html.js-ready body:not(.soft-enter) #privacy .section-header,
html.js-ready body:not(.soft-enter) #add .section-header,
html.js-ready body:not(.soft-enter) .features-grid,
html.js-ready body:not(.soft-enter) .features-bento,
html.js-ready body:not(.soft-enter) .how-layout,
html.js-ready body:not(.soft-enter) .commands-box,
html.js-ready body:not(.soft-enter) .faq-list,
html.js-ready body:not(.soft-enter) .lb-list,
html.js-ready body:not(.soft-enter) .leaderboard-list,
html.js-ready body:not(.soft-enter) .discover-main .section-header,
html.js-ready body:not(.soft-enter) .discover-main .discover-actions,
html.js-ready body:not(.soft-enter) .discover-main .discover-toolbar,
html.js-ready body:not(.soft-enter) .discover-main .discover-tags,
html.js-ready body:not(.soft-enter) .discover-main .discover-grid {
  opacity: 0;
  transform: translateY(16px);
}
html.js-ready body:not(.soft-enter) .stat-card {
  transform: translateY(12px) scale(0.98);
}

body.soft-enter .nav-container {
  animation: soft-nav 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.soft-enter .hero-content {
  animation: soft-rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

body.soft-enter .hero-actions,
body.soft-enter .hero-cta,
body.soft-enter .stats-grid {
  animation: soft-rise 1.05s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}

body.soft-enter .stat-card {
  animation: soft-stat 0.95s cubic-bezier(0.22, 1, 0.36, 1) both;
}
body.soft-enter .stat-card:nth-child(1) { animation-delay: 0.16s; }
body.soft-enter .stat-card:nth-child(2) { animation-delay: 0.24s; }
body.soft-enter .stat-card:nth-child(3) { animation-delay: 0.32s; }
body.soft-enter .stat-card:nth-child(4) { animation-delay: 0.40s; }

body.soft-enter #features .section-header,
body.soft-enter #how .section-header,
body.soft-enter #faq .section-header,
body.soft-enter #leaderboard .section-header,
body.soft-enter #privacy .section-header,
body.soft-enter #add .section-header {
  animation: soft-rise 1s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

body.soft-enter .features-grid,
body.soft-enter .features-bento,
body.soft-enter .how-layout,
body.soft-enter .commands-box,
body.soft-enter .faq-list,
body.soft-enter .lb-list,
body.soft-enter .leaderboard-list {
  animation: soft-rise 1.05s cubic-bezier(0.22, 1, 0.36, 1) 0.36s both;
}

/* Discover page */
body.soft-enter .discover-main .section-header {
  animation: soft-rise 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
body.soft-enter .discover-main .discover-actions {
  animation: soft-rise 1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
body.soft-enter .discover-main .discover-toolbar {
  animation: soft-fade 0.8s ease 0.18s both;
}
body.soft-enter .discover-main .discover-tags {
  animation: soft-rise 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both;
}
body.soft-enter .discover-main .discover-grid {
  animation: soft-rise 1.05s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
}

@keyframes soft-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes soft-nav {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes soft-stat {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.js-ready body:not(.soft-enter) .nav-container,
  html.js-ready body:not(.soft-enter) .hero-content,
  html.js-ready body:not(.soft-enter) .hero-actions,
  html.js-ready body:not(.soft-enter) .hero-cta,
  html.js-ready body:not(.soft-enter) .stats-grid,
  html.js-ready body:not(.soft-enter) .stat-card,
  html.js-ready body:not(.soft-enter) #features .section-header,
  html.js-ready body:not(.soft-enter) #how .section-header,
  html.js-ready body:not(.soft-enter) #faq .section-header,
  html.js-ready body:not(.soft-enter) #leaderboard .section-header,
  html.js-ready body:not(.soft-enter) #privacy .section-header,
  html.js-ready body:not(.soft-enter) #add .section-header,
  html.js-ready body:not(.soft-enter) .features-grid,
html.js-ready body:not(.soft-enter) .features-bento,
  html.js-ready body:not(.soft-enter) .how-layout,
  html.js-ready body:not(.soft-enter) .commands-box,
  html.js-ready body:not(.soft-enter) .faq-list,
  html.js-ready body:not(.soft-enter) .lb-list,
  html.js-ready body:not(.soft-enter) .leaderboard-list,
  html.js-ready body:not(.soft-enter) .discover-main .section-header,
  html.js-ready body:not(.soft-enter) .discover-main .discover-actions,
  html.js-ready body:not(.soft-enter) .discover-main .discover-toolbar,
  html.js-ready body:not(.soft-enter) .discover-main .discover-tags,
  html.js-ready body:not(.soft-enter) .discover-main .discover-grid {
    opacity: 1 !important;
    transform: none !important;
  }

  body.soft-enter .nav-container,
  body.soft-enter .hero-content,
  body.soft-enter .hero-actions,
  body.soft-enter .hero-cta,
  body.soft-enter .stats-grid,
  body.soft-enter .stat-card,
  body.soft-enter #features .section-header,
  body.soft-enter #how .section-header,
  body.soft-enter #faq .section-header,
  body.soft-enter #leaderboard .section-header,
  body.soft-enter #privacy .section-header,
  body.soft-enter #add .section-header,
  body.soft-enter .features-grid,
body.soft-enter .features-bento,
  body.soft-enter .how-layout,
  body.soft-enter .commands-box,
  body.soft-enter .faq-list,
  body.soft-enter .lb-list,
  body.soft-enter .leaderboard-list,
  body.soft-enter .discover-main .section-header,
  body.soft-enter .discover-main .discover-actions,
  body.soft-enter .discover-main .discover-toolbar,
  body.soft-enter .discover-main .discover-tags,
  body.soft-enter .discover-main .discover-grid {
    animation: none !important;
  }

  .navbar,
  .nav-container,
  .logo,
  .logo-icon,
  .nav-links,
  .nav-links a,
  .btn-nav {
    transition: none !important;
  }
}
