:root {
  --bg-main: #09090b;
  --bg-elevated: #111114;
  --bg-card: #131317;
  --bg-card-hover: #1a1a20;
  --bg-card-subtle: #0d0d10;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-color-hover: rgba(16, 185, 129, 0.38);
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-subtle: #71717a;
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-ink: #031f17;
  --primary-light: rgba(16, 185, 129, 0.12);
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.14);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.14);
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.12);
  --font-sans: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 0.12rem 0.38rem;
  border-radius: var(--radius-sm);
  color: #e4e4e7;
}

.ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-success {
  color: var(--success);
}

/* Focus & Skip Link */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 200;
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0.75rem;
}

/* Container & Section Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.page-section {
  padding: 3.75rem 0;
}

.page-section + .page-section {
  border-top: 1px solid var(--border-color);
}

.page-wrap {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

.section-header {
  margin-bottom: 2rem;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.section-title {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text-main);
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-top: 0.45rem;
  max-width: 62ch;
  line-height: 1.6;
}

/* Navbar (Single-line desktop, <= 68px tall) */
.navbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(9, 9, 11, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
}

@media (prefers-reduced-transparency: reduce) {
  .navbar {
    background: var(--bg-main);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.nav-container {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--text-main);
}

.brand-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  object-fit: cover;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  flex-wrap: nowrap;
}

.nav-links li {
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.42rem 0.72rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-menu-btn:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.mobile-nav-drawer {
  display: none;
  border-top: 1px solid var(--border-color);
  background: var(--bg-elevated);
  padding: 0.85rem 1.5rem 1.25rem;
}

.mobile-nav-drawer.open {
  display: block;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

/* Status Pill */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.7rem;
  background: var(--success-light);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--success);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.65);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.55rem 1.05rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn:active {
  transform: scale(0.98);
}

.btn-lg {
  min-height: 46px;
  padding: 0.72rem 1.35rem;
  font-size: 0.94rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
  font-weight: 700;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

/* ======================================================
   SPLIT HERO & DISCORD COMMAND PREVIEW
   ====================================================== */
.hero-split-section {
  padding: 3.25rem 0 3.75rem;
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 2.75rem;
  align-items: center;
}

.hero-copy {
  animation: heroEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-title {
  font-size: clamp(2.15rem, 4.1vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--text-main);
  margin-bottom: 1.1rem;
}

.hero-title-accent {
  color: var(--primary);
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 48ch;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* Discord Preview Frame */
.discord-frame {
  background: #14151a;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: heroEnter 0.6s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.discord-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: #0f1014;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.discord-channel {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.discord-channel-hash {
  color: var(--text-subtle);
}

.preview-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.preview-tab {
  min-height: 30px;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.preview-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.preview-tab.active {
  color: var(--primary);
  background: var(--primary-light);
  border-color: rgba(16, 185, 129, 0.3);
}

.discord-body {
  padding: 1.15rem;
}

.preview-panel {
  display: none;
}

.preview-panel.active {
  display: block;
  animation: panelFade 0.2s ease;
}

@keyframes panelFade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.discord-msg {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.discord-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.discord-msg-content {
  flex: 1;
  min-width: 0;
}

.discord-msg-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.discord-author {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.discord-app-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.1rem 0.38rem;
  border-radius: 4px;
  background: var(--primary);
  color: var(--primary-ink);
}

.discord-time {
  font-size: 0.72rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.discord-embed {
  background: #1b1d24;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}

.discord-embed.embed-amber {
  border-left-color: var(--warning);
}

.discord-embed-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.discord-embed-desc {
  font-size: 0.82rem;
  color: #d4d4d8;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.poker-table-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.playing-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  background: #0d0e12;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
}

.playing-card.suit-red {
  color: #f87171;
}

.discord-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.discord-field-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.12rem;
}

.discord-field-val {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-main);
}

.discord-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.discord-ui-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.68rem;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #2b2d37;
  color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.discord-ui-btn.btn-emerald {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

/* ======================================================
   METRICS STRIP (Plain hairline layout, no cards)
   ====================================================== */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.metric-item {
  padding: 1.35rem 1.5rem;
  border-right: 1px solid var(--border-color);
}

.metric-item:first-child {
  padding-left: 0;
}

.metric-item:last-child {
  border-right: none;
  padding-right: 0;
}

.metric-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.metric-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.2;
}

.metric-value-ok {
  color: var(--primary);
}

/* ======================================================
   PERMISSION MODES COMPARISON
   ====================================================== */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.mode-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  transition: var(--transition);
}

.mode-panel:hover {
  border-color: var(--border-strong);
  border-top-color: var(--primary);
  background: var(--bg-card-hover);
}

.mode-panel-sec {
  border-top-color: var(--danger);
}

.mode-panel-sec:hover {
  border-top-color: var(--danger);
}

.mode-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.24rem 0.65rem;
  border-radius: var(--radius-full);
}

.mode-pill-emerald {
  background: var(--primary-light);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.mode-pill-danger {
  background: var(--danger-light);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.mode-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.mode-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.mode-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.15rem;
}

.mode-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mode-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.89rem;
  color: #d4d4d8;
  line-height: 1.5;
}

.mode-list li .ph {
  margin-top: 0.22rem;
  font-size: 1rem;
  color: var(--primary);
}

.mode-panel-sec .mode-list li .ph {
  color: #f87171;
}

/* ======================================================
   ASYMMETRIC 5-CELL FEATURE BENTO
   ====================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.bento-cell {
  grid-column: span 2;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: var(--transition);
}

.bento-cell:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
}

.bento-lead {
  grid-column: span 4;
  background-color: var(--bg-elevated);
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
}

.bento-tinted {
  background: linear-gradient(155deg, rgba(16, 185, 129, 0.14) 0%, var(--bg-card) 70%);
  border-color: rgba(16, 185, 129, 0.26);
}

.bento-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 0.85rem;
}

.bento-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.bento-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.bento-cmds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ======================================================
   COMMUNITY SPLIT (TOP 5 + LATEST RELEASE)
   ====================================================== */
.community-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  gap: 1.5rem;
  align-items: start;
}

.release-spotlight {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.release-spotlight-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.release-spotlight-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 1rem;
}

/* ======================================================
   TABLES & LEADERBOARD
   ====================================================== */
.card-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-header-box {
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.category-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 38px;
  padding: 0.42rem 0.9rem;
  font-size: 0.83rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: var(--primary);
  font-weight: 700;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: var(--bg-card-subtle);
  color: var(--text-subtle);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.rank-cell {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.9rem;
  width: 72px;
  color: var(--text-muted);
}

.rank-top-1 {
  color: var(--primary);
}

.rank-top-2,
.rank-top-3 {
  color: var(--text-main);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 160px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  object-fit: cover;
  flex-shrink: 0;
}

.user-name {
  font-weight: 600;
  color: var(--text-main);
}

.val-badge {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.val-muted {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.val-danger {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #f87171;
  white-space: nowrap;
}

/* ======================================================
   COMMANDS DIRECTORY
   ====================================================== */
.command-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-input-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  font-size: 1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  min-height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem 0.65rem 2.55rem;
  color: var(--text-main);
  font-size: 0.925rem;
  outline: none;
  transition: var(--transition);
}

.search-input::placeholder {
  color: var(--text-subtle);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.command-count-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.command-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.command-card:hover {
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.cmd-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.cmd-name {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.cmd-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  white-space: nowrap;
}

.cmd-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.55;
  margin-bottom: 0.85rem;
}

.cmd-params {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.65rem;
}

.param-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  color: #d4d4d8;
}

.param-pill.required {
  border-color: rgba(239, 68, 68, 0.38);
  color: #fca5a5;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.empty-state-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

/* ======================================================
   INVITE COMPARISON PAGE
   ====================================================== */
.invite-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.invite-logo-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  background: var(--bg-card);
  margin-bottom: 1.25rem;
}

.invite-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.invite-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.invite-perm-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1.15rem;
}

.invite-perm-box-danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.24);
}

.invite-perm-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #34d399;
  margin-bottom: 0.2rem;
}

.invite-perm-box-danger .invite-perm-title {
  color: #f87171;
}

.invite-perm-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.invite-notice {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.invite-notice .ph {
  color: var(--primary);
  font-size: 1.35rem;
  margin-top: 0.15rem;
}

/* ======================================================
   CHANGELOG TIMELINE & ODDS TABLES
   ====================================================== */
.changelog-grid {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  margin-top: 1.25rem;
}

.changelog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.65rem 1.85rem;
  transition: var(--transition);
}

.changelog-card.latest {
  border-color: rgba(16, 185, 129, 0.38);
}

.changelog-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.changelog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.changelog-badge-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.version-tag {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.status-pill-small {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.62rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-pill-small.latest {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.changelog-date {
  color: var(--text-subtle);
  font-size: 0.84rem;
  font-family: var(--font-mono);
}

.changelog-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.9rem;
  line-height: 1.4;
}

.changelog-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.changelog-list li {
  position: relative;
  padding-left: 1.25rem;
  color: #d4d4d8;
  font-size: 0.91rem;
  line-height: 1.6;
}

.changelog-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.62rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.changelog-list code {
  color: #6ee7b7;
}

.changelog-table-box {
  margin-top: 1.25rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
  overflow: hidden;
}

.changelog-table-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.changelog-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.odds-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
  min-width: 620px;
}

.odds-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.odds-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e4e4e7;
  vertical-align: middle;
}

.odds-table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.odds-table tr:last-child td {
  border-bottom: none;
}

.badge-odds {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
}

.rate-high {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #34d399;
}

.rate-med {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #e4e4e7;
}

.rate-low {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-muted);
}

.rate-rare {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #fbbf24;
}

.rate-jackpot {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #f87171;
}

.changelog-table-note {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--text-subtle);
  line-height: 1.5;
}

/* ======================================================
   LOGIN, ADMIN & LEGAL COMPATIBILITY CLASSES
   ====================================================== */
.login-shell {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100dvh - 180px);
  padding: 2.5rem 1.5rem;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.login-icon-box {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  margin: 0 auto 1.15rem;
}

.login-title {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.45rem;
}

.login-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.32);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: #fca5a5;
  font-size: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.alert-info {
  background: var(--primary-light);
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: #6ee7b7;
  font-size: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}

.form-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.form-input {
  width: 100%;
  min-height: 44px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.95rem;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-input::placeholder {
  color: var(--text-subtle);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.otp-input {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--primary);
}

.login-security-note {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  margin-top: 1.15rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition);
}

.back-link:hover {
  color: var(--text-main);
}

/* Admin Dashboard Compatibility */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin: 1.75rem 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

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

.stat-icon {
  font-size: 1.05rem;
  opacity: 0.85;
}

.stat-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.stat-subtext {
  font-size: 0.76rem;
  color: var(--text-subtle);
  margin-top: 0.25rem;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fbbf24;
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-panel-box {
  background: rgba(245, 158, 11, 0.04);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2rem 0;
}

/* Legal Pages */
.legal-card-grid {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  margin-top: 1.25rem;
  margin-bottom: 3rem;
}

.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.65rem 1.85rem;
}

.legal-card.alert-card {
  border-color: rgba(16, 185, 129, 0.38);
}

.legal-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.legal-text {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.legal-text:last-child {
  margin-bottom: 0;
}

.legal-list {
  list-style: disc;
  padding-left: 1.4rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.legal-list li strong {
  color: var(--text-main);
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--text-main);
}

/* ======================================================
   RESPONSIVE BREAKPOINTS (1024, 960, 768, 640, 390/320)
   ====================================================== */
@media (max-width: 1024px) {
  .nav-link {
    padding: 0.35rem 0.5rem;
    font-size: 0.825rem;
  }
  .status-badge #status-badge-text {
    display: none;
  }
  .status-badge {
    padding: 0.38rem;
  }
}

@media (max-width: 960px) {
  .hero-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .modes-grid,
  .invite-compare-grid,
  .community-split {
    grid-template-columns: 1fr;
  }
  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bento-cell {
    grid-column: span 1;
  }
  .bento-lead {
    grid-column: span 2;
  }
  .metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-item:nth-child(2n) {
    border-right: none;
    padding-right: 0;
  }
  .metric-item:nth-child(odd) {
    padding-left: 0;
  }
  .metric-item:nth-child(1),
  .metric-item:nth-child(2) {
    border-bottom: 1px solid var(--border-color);
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-actions .status-badge,
  .nav-actions .nav-invite-cta,
  .nav-actions .nav-logout-cta {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .hero-split-section {
    padding: 2.25rem 0 2.75rem;
  }
  .page-section {
    padding: 2.75rem 0;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-lead,
  .bento-cell {
    grid-column: span 1;
  }
  .discord-fields-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .command-grid {
    grid-template-columns: 1fr;
  }
  .changelog-card,
  .mode-panel,
  .login-card {
    padding: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .pulse-dot {
    animation: none;
  }
}
