:root {
  color-scheme: dark;
  --background: #090b13;
  --surface: rgba(18, 21, 33, .76);
  --surface-border: rgba(255, 255, 255, .075);
  --text: #f3f4fa;
  --muted: #898da3;
  --cyan: #e6e6e6;
  --purple: #a9a9a9;
  font-family: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 360px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--text);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 64px 64px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.page-glow { position: absolute; z-index: -1; width: 440px; height: 440px; border-radius: 50%; filter: blur(130px); opacity: .13; pointer-events: none; }
.page-glow--cyan { top: 110px; left: -250px; background: #e8e8e8; }
.page-glow--purple { top: 440px; right: -250px; background: #929292; opacity: .11; }

.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font: 700 13px "Space Grotesk", sans-serif; letter-spacing: .12em; text-decoration: none; }
.brand-logo { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; object-fit: cover; }
.brand-dot { color: #bdbdbd; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.discord-join, .discord-login, .primary-button, .secondary-button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; padding: 0 15px; border: 1px solid rgba(230,230,230,.2); border-radius: 8px; background: rgba(235,235,235,.08); color: #f3f3f3; font: 600 11px "DM Sans", sans-serif; text-decoration: none; transition: background .2s, border-color .2s, transform .2s; cursor: pointer; }
.discord-join:hover, .discord-login:hover, .primary-button:hover, .secondary-button:hover { border-color: rgba(255,255,255,.45); background: rgba(235,235,235,.16); transform: translateY(-1px); }
.discord-login { background: transparent; color: #c8c8c8; }
.discord-login[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.login-status { margin: 14px 0 0; color: var(--muted); font-size: 11px; }
.login-status:empty { display: none; }
.discord-join--small { min-height: 34px; }
.primary-button { background: #e7e7e7; color: #101010; }
.primary-button:hover { background: #fff; }
.secondary-button { min-height: 34px; }
.primary-button:disabled, .secondary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.topbar-status, .updated-label { display: flex; align-items: center; gap: 9px; color: #a4a8ba; font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.status-pulse { position: relative; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #d5d5d5; box-shadow: 0 0 12px rgba(220,220,220,.45); }

.hero-banner { position: relative; display: flex; min-height: 340px; align-items: end; overflow: hidden; margin: 24px 0 0; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: #08090d; box-shadow: 0 20px 70px rgba(0,0,0,.4); }
.hero-banner::after { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,6,9,.78), rgba(5,6,9,.08) 80%), linear-gradient(0deg, rgba(5,6,9,.58), transparent 70%); content: ""; }
.hero-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-banner-copy { position: relative; z-index: 1; padding: 36px 40px; }
.hero-banner-copy h1 { margin: 14px 0 0; font: 600 clamp(34px, 5vw, 58px)/1.04 "Space Grotesk", sans-serif; letter-spacing: -.06em; text-shadow: 0 2px 24px rgba(0,0,0,.75); }
.hero-banner-copy h1 span { color: #e6e5e3; }
.intro { padding: 24px 0 30px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0; color: #a2a6b8; font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.eyebrow-line { width: 19px; height: 1px; background: var(--cyan); box-shadow: 0 0 9px rgba(230,230,230,.45); }
h1, h2, h3, p { margin-top: 0; }
.intro h1 { margin: 17px 0 13px; font: 600 clamp(45px, 7vw, 72px)/1.04 "Space Grotesk", sans-serif; letter-spacing: -.065em; }
.intro h1 span, .section-heading h2 span { color: var(--cyan); }
.intro-copy { max-width: 460px; margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.glass-card { border: 1px solid var(--surface-border); background: linear-gradient(135deg, rgba(23,26,41,.86), rgba(15,17,28,.76)); box-shadow: 0 18px 60px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.035); backdrop-filter: blur(18px); }
.featured { position: relative; display: flex; min-height: 255px; align-items: center; overflow: hidden; padding: 38px 44px; border-radius: 19px; }
.featured::after { position: absolute; top: -100px; right: 12%; width: 420px; height: 400px; border-radius: 50%; background: radial-gradient(circle, rgba(220,220,220,.12), transparent 68%); content: ""; pointer-events: none; }
.featured-copy { position: relative; z-index: 1; width: min(650px, 76%); }
.featured h2 { margin: 17px 0 16px; font: 600 clamp(26px, 4vw, 38px)/1.15 "Space Grotesk", sans-serif; letter-spacing: -.04em; }
.featured h2 span { color: #b7bbcb; }
.featured-content { display: flex; align-items: center; gap: 12px; }
.featured-content p { max-width: 430px; margin: 0; color: #a8adbf; font-size: 13px; line-height: 1.7; }
.featured-content .featured-name { color: var(--text); font-weight: 700; }
.featured-content .featured-badge { display: inline-block; margin-bottom: 6px; color: var(--cyan); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.featured-avatar { position: absolute; z-index: 0; right: 60px; bottom: -34px; display: grid; width: 215px; height: 215px; place-items: center; border: 1px solid rgba(220,220,220,.24); border-radius: 50%; background: linear-gradient(145deg, rgba(220,220,220,.12), rgba(255,255,255,.035)); box-shadow: 0 0 90px rgba(220,220,220,.1); }
.featured-avatar img { width: 158px; height: 158px; border: 4px solid rgba(255,255,255,.09); border-radius: 50%; object-fit: cover; }
.featured-art { position: absolute; top: 0; right: 0; width: 370px; height: 100%; overflow: hidden; opacity: .62; }
.orbit { position: absolute; top: 50%; left: 50%; border: 1px solid rgba(225,225,225,.15); border-radius: 50%; transform: translate(-50%,-50%) rotate(-24deg); }
.orbit--one { width: 290px; height: 130px; }
.orbit--two { width: 230px; height: 98px; transform: translate(-50%,-50%) rotate(35deg); }
.featured-star { position: absolute; top: 33px; right: 52px; color: #dedede; font-size: 21px; text-shadow: 0 0 22px #dedede; }
.muted { color: var(--muted) !important; }

.admin-panel { margin-top: 24px; padding: 25px; border-radius: 16px; }
.admin-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-panel h2 { margin: 10px 0 0; font: 600 24px "Space Grotesk", sans-serif; letter-spacing: -.04em; }
.admin-panel h2 span { color: #c7c7c7; }
.admin-account { margin: 12px 0 20px; color: var(--muted); font-size: 12px; }
.admin-panel form { display: grid; gap: 10px; }
.admin-panel label { margin-top: 4px; color: #d7d7d7; font-size: 11px; font-weight: 700; }
.admin-panel input, .admin-panel textarea { width: 100%; padding: 11px 12px; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; outline: none; background: rgba(0,0,0,.24); color: var(--text); font: 12px "DM Sans", sans-serif; }
.admin-panel input:focus, .admin-panel textarea:focus { border-color: rgba(235,235,235,.55); box-shadow: 0 0 0 3px rgba(235,235,235,.07); }
.admin-panel textarea { resize: vertical; }
.user-lookup { display: flex; gap: 9px; }
.member-preview { display: flex; min-height: 0; align-items: center; gap: 9px; color: var(--text); font-size: 12px; }
.member-preview:empty { display: none; }
.member-preview .member-avatar { width: 34px; height: 34px; }
.preview-id, .optional-label { color: var(--muted); font-size: 10px; font-weight: 400; }
.admin-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 5px; }
.admin-form-footer p { margin: 0; color: #bfc0c4; font-size: 11px; line-height: 1.5; }
.admin-form-footer .error-message { color: #f0a3a3; }
.admin-form-footer .primary-button { flex: 0 0 auto; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 62px 0 20px; }
.section-heading h2 { margin: 11px 0 0; font: 600 30px "Space Grotesk", sans-serif; letter-spacing: -.04em; }
.updated-label { margin-bottom: 5px; font-size: 9px; }
.leaderboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.leaderboard-card { min-width: 0; padding: 23px 20px 10px; border-radius: 16px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.leaderboard-card:hover { border-color: rgba(230,230,230,.2); box-shadow: 0 18px 60px rgba(0,0,0,.23), 0 0 30px rgba(230,230,230,.035); transform: translateY(-2px); }
.card-heading { display: flex; align-items: center; gap: 12px; margin: 0 0 19px; }
.heading-icon { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 11px; font-size: 21px; }
.heading-icon--cyan { background: rgba(230,230,230,.09); color: var(--cyan); }
.heading-icon--purple { background: rgba(185,185,185,.1); color: var(--purple); }
.card-heading h3 { margin: 0 0 3px; font: 600 15px "Space Grotesk", sans-serif; }
.card-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 10px 7px; border-bottom: 1px solid rgba(255,255,255,.075); color: #74798e; font-size: 8px; font-weight: 700; letter-spacing: .1em; white-space: nowrap; }
td { padding: 12px 7px; border-bottom: 1px solid rgba(255,255,255,.045); color: #d3d5e0; font-size: 11px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: rgba(255,255,255,.025); }
.rank-cell { width: 25px; color: #81869b; font: 600 12px "Space Grotesk", sans-serif; }
.rank-cell--top { color: var(--cyan); }
.member-cell { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.member-avatar { width: 27px; height: 27px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; object-fit: cover; }
.member-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.level-pill { display: inline-block; padding: 4px 7px; border: 1px solid rgba(230,230,230,.18); border-radius: 6px; background: rgba(230,230,230,.08); color: var(--cyan); font-size: 9px; font-weight: 700; }
.voice-time { color: #c8c8c8; font-variant-numeric: tabular-nums; }
.active-status { display: inline-flex; align-items: center; gap: 6px; color: #cfcfcf; font-size: 10px; }
.active-status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; box-shadow: 0 0 9px currentColor; }
.inactive-status { color: #82869a; }
.inactive-status::before { background: currentColor; box-shadow: none; }
.table-state { padding: 26px 8px; color: var(--muted); text-align: center; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 38px 0 25px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.07); color: #73778b; font-size: 9px; letter-spacing: .09em; }
footer .discord-join { min-height: 32px; font-size: 10px; letter-spacing: normal; }

@media (max-width: 820px) {
  .leaderboard-grid { grid-template-columns: 1fr; }
  .featured-avatar { right: 20px; width: 175px; height: 175px; }
  .featured-avatar img { width: 130px; height: 130px; }
  .featured-copy { width: 72%; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 30px, 440px); }
  .topbar { height: 68px; }
  .brand { gap: 8px; font-size: 11px; }
  .brand-logo { width: 32px; height: 32px; }
  .topbar-actions { gap: 6px; }
  .discord-join--small, .discord-login { min-height: 31px; padding: 0 9px; font-size: 9px; }
  .hero-banner { min-height: 235px; margin-top: 16px; }
  .hero-banner-copy { padding: 24px 20px; }
  .hero-banner-copy h1 { font-size: 36px; }
  .intro { padding: 20px 0 26px; }
  .featured { min-height: 265px; padding: 28px 22px; }
  .featured-copy { width: 100%; align-self: flex-start; }
  .featured h2 { max-width: 260px; font-size: 26px; }
  .featured-avatar { right: -28px; bottom: -65px; width: 150px; height: 150px; opacity: .48; }
  .featured-avatar img { width: 112px; height: 112px; }
  .featured-art { right: -80px; opacity: .35; }
  .section-heading { align-items: flex-start; flex-direction: column; margin-top: 48px; }
  .section-heading h2 { font-size: 27px; }
  .updated-label { margin: 0; }
  .leaderboard-card { padding: 19px 12px 8px; }
  th { padding-right: 4px; padding-left: 4px; font-size: 7px; }
  td { padding-right: 4px; padding-left: 4px; font-size: 10px; }
  .member-avatar { width: 23px; height: 23px; }
  .member-name { max-width: 95px; }
  .admin-panel { padding: 18px 14px; }
  .admin-panel-heading { align-items: flex-start; }
  .admin-panel h2 { max-width: 230px; font-size: 20px; }
  .user-lookup, .admin-form-footer { align-items: stretch; flex-direction: column; }
  .user-lookup .secondary-button, .admin-form-footer .primary-button { width: 100%; }
  footer { flex-wrap: wrap; gap: 10px; font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
