@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&family=Space+Grotesk:wght@400;500;700;900&display=swap');

:root {
  --surface: #131315;
  --surface-dim: #0e0e10;
  --surface-low: #1c1b1d;
  --surface-container: #201f22;
  --surface-high: #2a2a2c;
  --surface-highest: #353437;
  --surface-glass: rgba(19, 19, 21, .78);
  --on-surface: #e5e1e4;
  --on-surface-variant: #bccbb9;
  --on-surface-muted: #869585;
  --primary: #4be277;
  --primary-container: #22c55e;
  --on-primary: #003915;
  --secondary-container: #00a572;
  --on-secondary-container: #00311f;
  --tertiary: #46e0a4;
  --gold: #f5c84b;
  --red: #ff8a80;
  --ghost-border: rgba(188, 203, 185, .12);
  --ghost-border-strong: rgba(188, 203, 185, .2);
  --primary-glow: rgba(75, 226, 119, .18);
  --radius-sm: .5rem;
  --radius-md: .75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.35rem;
  --shadow-ambient: 0 20px 40px rgba(0, 0, 0, .4);
  --shadow-deep: 0 34px 80px rgba(0, 0, 0, .5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--surface); }
body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--on-surface);
  background:
    radial-gradient(circle at 50% -10%, rgba(75, 226, 119, .11), transparent 36rem),
    radial-gradient(circle at 85% 12%, rgba(70, 224, 164, .06), transparent 28rem),
    linear-gradient(180deg, #161618 0%, var(--surface) 34rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--primary); color: var(--on-primary); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
code, .mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 72%);
}
main {
  position: relative;
  z-index: 1;
  width: min(1536px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 8px;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 0 max(24px, calc((100vw - 1536px) / 2 + 24px));
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .22);
}
.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(188,203,185,.12), transparent);
}
.brand { display: inline-flex; align-items: center; gap: 12px; font: 900 1.55rem/1 "Space Grotesk", sans-serif; letter-spacing: -.04em; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--surface-low);
  border-radius: var(--radius-md);
  box-shadow: inset 0 .5px 0 rgba(188, 203, 185, .12), 0 0 28px rgba(75, 226, 119, .08);
}
.brand-accent { color: var(--primary); }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a, .locale-link, .footer-links a {
  color: var(--on-surface-variant);
  font: 700 .95rem/1 "Space Grotesk", sans-serif;
  letter-spacing: -.01em;
  transition: color .2s ease, background .2s ease;
}
.nav a:hover, .footer-links a:hover { color: var(--on-surface); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.locale-link {
  padding: 10px 14px;
  background: rgba(53, 52, 55, .55);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--ghost-border);
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(1536px, calc(100% - 32px));
  margin: 96px auto 32px;
  padding: 34px 0 0;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  color: var(--on-surface-variant);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(188,203,185,.13), transparent);
}
.site-footer strong { color: var(--primary); font: 900 1.4rem "Space Grotesk", sans-serif; }
.footer-links { display: flex; gap: 24px; }

h1, h2, h3 { font-family: "Space Grotesk", Inter, sans-serif; letter-spacing: -.035em; }
h1 {
  font-size: clamp(3.15rem, 7.2vw, 6.6rem);
  line-height: .9;
  font-weight: 900;
  max-width: 1050px;
}
h2 { font-size: clamp(1.85rem, 3.6vw, 3.1rem); line-height: 1; font-weight: 900; }
h3 { font-size: 1.35rem; line-height: 1.1; font-weight: 800; }
.accent { color: var(--primary); }
.text-muted { color: var(--on-surface-variant); }

.hero, .page-hero, .profile-hero { padding: 82px 0 48px; }
.hero {
  min-height: 690px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 470px;
  align-items: center;
  gap: 72px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 80px 0 auto;
  height: 560px;
  border-radius: 0 0 72px 72px;
  background: radial-gradient(ellipse at top, rgba(28, 27, 29, .9), transparent 70%);
  z-index: -1;
}
.hero-content { display: flex; flex-direction: column; gap: 28px; }
.hero-lead, .page-hero p {
  max-width: 690px;
  color: var(--on-surface-variant);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}
.eyebrow, .eyebrow-text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font: 800 .78rem/1 Inter, sans-serif;
  text-transform: uppercase;
  letter-spacing: .13em;
}
.eyebrow-text { margin-bottom: 18px; }
.eyebrow-dot, .pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
}
.eyebrow-dot::after, .pulse-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  background: var(--primary);
  opacity: .35;
  animation: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
}

.search-bar, .filter-panel, .address-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--surface-dim);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--ghost-border), 0 0 0 rgba(75,226,119,0);
  transition: box-shadow .2s ease;
}
.search-bar:focus-within, .filter-panel:focus-within, .address-copy:hover {
  box-shadow: inset 0 0 0 1px rgba(75,226,119,.38), 0 0 18px rgba(75,226,119,.1);
}
.search-bar svg { width: 20px; height: 20px; margin-left: 8px; color: var(--on-surface-variant); }
.search-bar input, .filter-panel input, .filter-panel select, .address-copy code {
  flex: 1;
  min-width: 0;
  color: var(--on-surface);
  background: transparent;
  border: 0;
  outline: 0;
}
.filter-panel { flex-wrap: wrap; }
.filter-panel input { min-width: 260px; }
.filter-panel select {
  flex: 0 0 auto;
  padding: 12px 14px;
  cursor: pointer;
  border-radius: var(--radius-md);
  background: var(--surface-low);
  box-shadow: inset 0 0 0 1px var(--ghost-border);
}
::placeholder { color: rgba(188,203,185,.52); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 22px;
  color: var(--on-surface);
  background: var(--surface-highest);
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px var(--ghost-border);
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease;
  white-space: nowrap;
}
.button:hover { transform: translateY(-1px); background: var(--surface-high); box-shadow: inset 0 0 0 1px var(--ghost-border-strong); }
.button--primary {
  color: var(--on-primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  box-shadow: 0 0 32px rgba(75,226,119,.16);
}
.button--primary:hover { opacity: .94; box-shadow: 0 0 38px rgba(75,226,119,.24); }
.hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.hero-panel, .content-card, .stats-panel, .server-row, .empty-state, .notice {
  background: var(--surface-low);
  border-radius: var(--radius-xl);
  box-shadow: inset 0 .5px 0 rgba(188,203,185,.08), var(--shadow-ambient);
}
.hero-panel {
  min-height: 430px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  position: relative;
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: -20% -20% auto auto;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: rgba(75,226,119,.1);
  filter: blur(44px);
}
.category-strip { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.category-strip a, .tag, .mini-badge, .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  color: var(--on-surface-variant);
  background: rgba(53, 52, 55, .52);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--ghost-border);
  font: 800 .75rem/1 Inter, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.category-strip a:hover { color: var(--on-surface); background: var(--surface-highest); }
.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}
.status-pill.is-online {
  color: var(--on-secondary-container);
  background: var(--secondary-container);
  box-shadow: 0 0 24px rgba(0,165,114,.16);
}
.status-pill.is-online::before { color: var(--on-secondary-container); animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite; }
.status-pill.is-offline { color: #ffd8d4; background: rgba(255, 138, 128, .12); }
.mini-badge.is-gold { color: #2b2100; background: var(--gold); }

.hero-panel__stats, .stats-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 26px;
}
.stat, .stat-box {
  padding: 20px;
  background: rgba(14,14,16,.72);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px rgba(188,203,185,.08);
}
.stat b, .stat-box b, .server-row__stats b {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(1.65rem, 2.6vw, 2.65rem);
  line-height: 1;
  color: var(--on-surface);
}
.stat span, .stat-box span, .server-row__stats span {
  display: block;
  margin-top: 8px;
  color: var(--on-surface-variant);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.section { padding: 52px 0; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.section-heading > a { color: var(--primary); font-weight: 800; }
.server-list { display: flex; flex-direction: column; gap: 22px; }
.server-row {
  display: grid;
  grid-template-columns: minmax(320px, 468px) minmax(0, 1fr) minmax(160px, 230px);
  gap: 24px;
  align-items: center;
  padding: 18px;
  background: var(--surface-low);
  opacity: 0;
  transform: translateY(12px);
  animation: fadeInUp .5s ease forwards;
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
}
.server-row:nth-child(even) { background: var(--surface-container); }
.server-row:hover {
  transform: translateY(-2px);
  background: var(--surface-high);
  box-shadow: inset 0 .5px 0 rgba(188,203,185,.1), 0 0 34px rgba(75,226,119,.04), var(--shadow-ambient);
}
.server-row__banner {
  position: relative;
  width: 100%;
  aspect-ratio: 468 / 60;
  min-height: 60px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(75,226,119,.12), transparent),
    var(--surface-dim);
}
.server-row__banner img { width: 100%; height: 100%; object-fit: contain; }
.detail-banner img { width: 100%; height: 100%; object-fit: cover; }
.server-row__banner-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--primary);
  font: 900 1.2rem/1 "Space Grotesk", sans-serif;
  text-align: center;
}
.server-row__main { min-width: 0; }
.server-row__identity, .profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.server-icon {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  color: var(--primary);
  background:
    linear-gradient(135deg, rgba(75,226,119,.13), transparent),
    var(--surface-dim);
  box-shadow: inset 0 0 0 1px var(--ghost-border), 0 0 22px rgba(75,226,119,.06);
  font: 900 1.5rem/1 "Space Grotesk", sans-serif;
  text-transform: uppercase;
}
.server-icon img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.server-icon--large {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  font-size: 2.5rem;
  box-shadow: inset 0 .5px 0 rgba(188,203,185,.1), 0 20px 40px rgba(0,0,0,.28);
}
.server-row__title { min-width: 0; }
.server-row__topline { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.server-row__main h3 a:hover { color: var(--primary); }
.server-row__main p {
  max-width: 720px;
  margin-top: 8px;
  color: var(--on-surface-variant);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.server-row__address { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.server-row__address code, .address-copy code {
  padding: 8px 12px;
  color: var(--primary);
  background: var(--surface-dim);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--ghost-border);
}
.text-link { color: var(--primary); font-weight: 900; }
.server-row__stats {
  display: grid;
  gap: 18px;
  text-align: right;
}

.profile-hero {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 36px;
  align-items: end;
}
.profile-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 80px;
  border-radius: 0 0 48px 48px;
  background:
    linear-gradient(to top, var(--surface), rgba(19,19,21,.78), transparent),
    radial-gradient(circle at 72% 18%, rgba(75,226,119,.13), transparent 28rem),
    var(--surface-low);
  z-index: -1;
}
.profile-hero__main { display: flex; flex-direction: column; gap: 20px; }
.profile-identity { align-items: flex-end; }
.profile-hero .eyebrow { flex-wrap: wrap; }
.detail-banner {
  height: 220px;
  max-width: 760px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(75,226,119,.14), transparent),
    var(--surface-dim);
  box-shadow: inset 0 .5px 0 rgba(188,203,185,.09), var(--shadow-ambient);
}
.stats-panel {
  grid-template-columns: repeat(2, 1fr);
  padding: 22px;
  margin: 0;
  background: rgba(53, 52, 55, .62);
  backdrop-filter: blur(16px);
}
.address-copy { width: fit-content; max-width: 100%; }
.copy-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--on-surface-variant);
  background: var(--surface-highest);
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--ghost-border);
}
.copy-btn:hover { color: var(--primary); box-shadow: inset 0 0 0 1px rgba(75,226,119,.28); }
.copy-btn svg { width: 18px; height: 18px; }

.profile-content, .dashboard-grid, .article-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.content-card {
  padding: clamp(24px, 3vw, 36px);
  background: var(--surface-low);
}
.content-card h2 { margin-bottom: 16px; }
.content-card p { color: var(--on-surface-variant); }
.fact-list { display: grid; grid-template-columns: auto 1fr; gap: 14px 22px; }
.fact-list dt { color: var(--on-surface-muted); font-weight: 800; }
.fact-list dd { color: var(--on-surface); min-width: 0; overflow-wrap: anywhere; }

.vote-flow {
  max-width: 560px;
  margin: 0 auto;
  padding-top: 18px;
}
.vote-card { background: rgba(53,52,55,.58); backdrop-filter: blur(16px); }
.tool-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.stack-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label {
  color: var(--on-surface-variant);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.form-group input, .form-group textarea, .form-group select, textarea[name="admin_note"], textarea[name="message"] {
  width: 100%;
  padding: 13px 15px;
  color: var(--on-surface);
  background: var(--surface-dim);
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px var(--ghost-border);
  transition: box-shadow .18s ease;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus, textarea:focus {
  outline: 0;
  box-shadow: inset 0 0 0 1px rgba(75,226,119,.42), 0 0 18px rgba(75,226,119,.1);
}
.form-group textarea, textarea { min-height: 112px; resize: vertical; }
.field-hint {
  margin: 0;
  color: var(--on-surface-muted);
  font-size: .9rem;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}
.category-check {
  position: relative;
  display: block;
  cursor: pointer;
}
.category-check input {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.category-check span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--on-surface-variant);
  background: var(--surface-dim);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--ghost-border);
  font: 900 .74rem/1 Inter, sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.category-check input:checked + span {
  color: var(--on-primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  box-shadow: 0 0 24px rgba(75,226,119,.14);
}
.category-check input:focus-visible + span {
  box-shadow: inset 0 0 0 1px rgba(75,226,119,.52), 0 0 18px rgba(75,226,119,.12);
}
.category-check input:disabled + span {
  opacity: .36;
  cursor: not-allowed;
}
.notice, .empty-state {
  padding: 26px;
  justify-content: center;
  text-align: center;
  color: var(--on-surface-variant);
}
.notice--error { color: #ffd8d4; background: rgba(255, 138, 128, .12); }
.upload-box {
  position: relative;
  min-height: 132px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 30px;
  text-align: center;
  color: var(--on-surface-variant);
  background: var(--surface-dim);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px rgba(188,203,185,.16);
}
.upload-box strong { color: var(--on-surface); font-family: "Space Grotesk", sans-serif; font-size: 1.15rem; }
.upload-box input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.token-box {
  display: block;
  padding: 14px 16px;
  color: var(--primary);
  background: var(--surface-dim);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--ghost-border);
  overflow-wrap: anywhere;
}

.is-visible { opacity: 1 !important; transform: translateY(0) !important; }
.button.is-loading { opacity: .7; pointer-events: none; }
.form-group input.is-valid { box-shadow: inset 0 0 0 1px rgba(75,226,119,.42); }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .48; transform: scale(1.55); }
}

@media (max-width: 1100px) {
  .hero, .profile-hero, .profile-content, .dashboard-grid, .article-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; gap: 28px; }
  .hero-panel { min-height: 320px; }
  .server-row { grid-template-columns: minmax(0, 468px) minmax(0, 1fr); }
  .server-row__banner { max-width: 468px; }
  .server-row__stats { grid-column: 2; }
  .server-row__stats { display: flex; text-align: left; }
}
@media (max-width: 760px) {
  main, .site-footer { width: min(100% - 24px, 1536px); }
  .site-header { position: relative; flex-direction: column; align-items: stretch; min-height: auto; padding: 16px 18px; }
  .brand { justify-content: center; }
  .nav { justify-content: center; gap: 16px; flex-wrap: wrap; }
  .nav-actions { justify-content: center; }
  h1 { font-size: clamp(2.5rem, 14vw, 4rem); }
  .hero, .page-hero, .profile-hero { padding: 54px 0 34px; }
  .search-bar, .filter-panel { flex-direction: column; align-items: stretch; }
  .filter-panel input, .filter-panel select { width: 100%; min-width: 0; }
  .hero-actions, .tool-hero { flex-direction: column; display: flex; align-items: stretch; }
  .hero-actions .button, .search-bar .button { width: 100%; }
  .hero-panel__stats, .stats-panel { grid-template-columns: 1fr; }
  .server-row { grid-template-columns: 1fr; padding: 16px; }
  .server-row__banner { grid-column: 1; max-width: 468px; height: auto; justify-self: center; }
  .server-row__stats { grid-column: 1; justify-content: space-between; }
  .server-row__identity, .profile-identity { align-items: flex-start; }
  .server-icon--large { width: 74px; height: 74px; border-radius: 18px; }
  .section-heading, .site-footer { flex-direction: column; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; }
}
