/* ==========================================================================
   DISCORD BADGES DESIGN SYSTEM
   Authentic Discord Desktop & Developer Portal Design Language
   Bespoke, human-crafted, high-contrast, zero generic AI bloat
   ========================================================================== */

:root {
  /* Discord Surface Palette */
  --bg-canvas: #111214;
  --bg-tertiary: #1e1f22;
  --bg-secondary: #2b2d31;
  --bg-primary: #313338;
  --bg-elevated: #383a40;
  --bg-hover: #35373c;
  --bg-active: #3f4147;
  --bg-card: #232428;
  --bg-card-hover: #27292e;

  /* Discord Brand Accents */
  --blurple: #5865f2;
  --blurple-hover: #4752c4;
  --blurple-active: #3c45a5;
  --blurple-light: #7983f5;
  --blurple-subtle: rgba(88, 101, 242, 0.12);
  --blurple-border: rgba(88, 101, 242, 0.35);

  /* Status Colors (Official Discord Status Tones) */
  --green: #23a55a;
  --green-subtle: rgba(35, 165, 90, 0.15);
  --green-border: rgba(35, 165, 90, 0.35);

  --yellow: #f0b232;
  --yellow-subtle: rgba(240, 178, 50, 0.15);
  --yellow-border: rgba(240, 178, 50, 0.35);

  --red: #f23f43;
  --red-subtle: rgba(242, 63, 67, 0.15);
  --red-border: rgba(242, 63, 67, 0.35);

  --purple: #9b59b6;
  --purple-subtle: rgba(155, 89, 182, 0.15);
  --purple-border: rgba(155, 89, 182, 0.35);

  --nitro-pink: #f47fff;
  --cyan: #00d26a;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --border-focus: #5865f2;

  /* Typography */
  --text-white: #f2f3f5;
  --text-normal: #dbdee1;
  --text-muted: #949ba4;
  --text-subtle: #80848e;

  /* Fonts */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Consolas', 'Courier New', monospace;

  /* Radii & Shadows */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);

  --transition-fast: 0.14s ease;
  --transition-normal: 0.22s cubic-bezier(0.2, 0, 0, 1);
}

/* ==========================================================================
   BASE RESET & CANVAS
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  color-scheme: dark;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-canvas);
  color: var(--text-normal);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  /* Deep Discord canvas subtle ambient aura (no cheesy AI rainbow blobs) */
  background-image: radial-gradient(60% 400px at 50% 0%, rgba(88, 101, 242, 0.08) 0%, transparent 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Authentic Discord Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}
::-webkit-scrollbar-thumb {
  background: #2b2d31;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3f4147;
}

a {
  color: var(--blurple-light);
  text-decoration: none;
  transition: var(--transition-fast);
}
a:hover {
  color: #fff;
}

/* ==========================================================================
   DISCORD NAVIGATION BAR
   ========================================================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(17, 18, 20, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  height: 60px;
}

.nav-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: var(--blurple);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), background var(--transition-fast);
}
.brand:hover .brand-icon {
  background: var(--blurple-hover);
  transform: scale(1.05);
}
.brand-icon svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-link-btn {
  padding: 7px 12px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link-btn:hover, .nav-link-btn.active {
  color: var(--text-white);
  background: var(--bg-hover);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.lang-btn.active {
  background: var(--blurple);
  color: #ffffff;
}

.github-link {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-fast);
}
.github-link:hover {
  color: var(--text-white);
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}
.github-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ==========================================================================
   DISCORD ARCHIVE HUB HEADER
   ========================================================================== */

.hub-header {
  max-width: 1380px;
  margin: 0 auto;
  padding: 40px 24px 28px;
}

.hub-header-inner {
  max-width: 860px;
}

.hub-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--blurple-subtle);
  border: 1px solid var(--blurple-border);
  border-radius: 6px;
  color: var(--blurple-light);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.hub-pill-icon {
  font-size: 0.85rem;
}

.hub-title {
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.hub-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Metric Chips */
.hub-metrics-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.metric-val {
  font-weight: 700;
  color: var(--text-white);
}

.metric-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.dot-green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot-red { background: var(--red); box-shadow: 0 0 6px var(--red); }
.dot-cyan { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }

.prestige-toggle-chip {
  cursor: pointer;
  background: rgba(240, 178, 50, 0.1);
  border-color: var(--yellow-border);
  color: #f0b232;
  transition: var(--transition-fast);
}
.prestige-toggle-chip:hover {
  background: rgba(240, 178, 50, 0.18);
  border-color: #f0b232;
}
.prestige-val {
  color: #f0b232;
}
.prestige-arrow {
  font-size: 0.75rem;
  transition: transform var(--transition-fast);
}
.prestige-toggle-chip.open .prestige-arrow {
  transform: rotate(180deg);
}

/* ==========================================================================
   PRESTIGE DRAWER (COLLAPSIBLE WIDGET)
   ========================================================================== */

.prestige-drawer {
  max-width: 1380px;
  margin: 0 auto 30px;
  padding: 0 24px;
}

.prestige-drawer-inner {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.prestige-left {
  flex: 1;
  min-width: 280px;
}

.prestige-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.prestige-title-row h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
}

.prestige-badge-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blurple-light);
  background: var(--blurple-subtle);
  border: 1px solid var(--blurple-border);
  padding: 2px 8px;
  border-radius: 6px;
}

.prestige-left p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.prestige-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.prestige-score-badge {
  text-align: right;
}

.prestige-score-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 4px;
}

.prestige-rank {
  font-size: 0.76rem;
  font-weight: 700;
  color: #ffffff;
  background: #5865f2;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   CATALOG LAYOUT (SIDEBAR & MAIN AREA)
   ========================================================================== */

.catalog-section {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 24px;
  align-items: flex-start;
}

/* ==========================================================================
   LEFT SIDEBAR: CATEGORIES
   ========================================================================== */

.catalog-sidebar {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 10px;
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.sidebar-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-header-icon {
  font-size: 0.95rem;
}

.sidebar-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-subtle);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-total-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-subtle);
  background: #111214;
  border: 1px solid var(--border-subtle);
  padding: 1px 7px;
  border-radius: 10px;
}

.category-tabs-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.category-tab {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.category-tab:hover {
  background: var(--bg-hover);
  color: var(--text-white);
}

.category-tab.active {
  background: var(--bg-elevated);
  color: var(--text-white);
  font-weight: 700;
  border-color: var(--border-default);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.cat-tab-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.cat-tab-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.cat-tab-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-count {
  background: #111214;
  border: 1px solid var(--border-subtle);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.72rem;
  color: var(--text-subtle);
  font-weight: 700;
  flex-shrink: 0;
}

.category-tab.active .cat-count {
  background: var(--blurple);
  color: #ffffff;
  border-color: var(--blurple);
}

/* ==========================================================================
   MAIN CATALOG AREA (TOOLBAR & GRID)
   ========================================================================== */

.catalog-main {
  min-width: 0;
}

.toolbar-wrapper {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.toolbar-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.search-input-box {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-field {
  width: 100%;
  height: 42px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0 80px 0 42px;
  color: var(--text-white);
  font-size: 0.9rem;
  font-family: var(--font-main);
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.search-field:focus {
  border-color: var(--blurple);
  background: #0e0f11;
}
.search-field::placeholder {
  color: var(--text-subtle);
}

.search-clear-btn {
  position: absolute;
  right: 58px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-clear-btn:hover {
  color: #fff;
  background: #4752c4;
}

.search-kbd {
  position: absolute;
  right: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}

.toolbar-view-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-switcher {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}
.view-btn.active {
  background: var(--bg-elevated);
  color: var(--text-white);
}

/* Status Filter Pills */
.status-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.status-pill-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-canvas);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 5px;
}
.status-pill-btn:hover {
  color: var(--text-white);
  border-color: var(--border-default);
  background: var(--bg-hover);
}
.status-pill-btn.active {
  background: var(--blurple);
  border-color: var(--blurple);
  color: #ffffff;
}

/* ==========================================================================
   BADGES GRID & CARDS (DISCORD ITEM SHOWCASE)
   ========================================================================== */

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

.badge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.badge-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--blurple-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Card Top Bar */
.badge-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.badge-cat-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-status-dot {
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-status-dot.active { color: var(--green); }
.badge-status-dot.legacy { color: var(--red); }
.badge-status-dot.paused { color: var(--yellow); }
.badge-status-dot.system { color: var(--purple); }

/* Recessed Showcase Chamber */
.badge-showcase-box {
  width: 100%;
  height: 84px;
  background: #191a1d;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  position: relative;
  transition: border-color var(--transition-fast);
}
.badge-card:hover .badge-showcase-box {
  border-color: rgba(88, 101, 242, 0.25);
}

.badge-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.badge-card:hover .badge-img {
  transform: scale(1.12);
}

/* Card Info */
.badge-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.badge-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.badge-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.25;
}

.badge-points-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--yellow);
  background: rgba(240, 178, 50, 0.12);
  border: 1px solid rgba(240, 178, 50, 0.25);
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.badge-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Footer */
.badge-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.badge-flag-code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--blurple-light);
  background: var(--blurple-subtle);
  border: 1px solid var(--blurple-border);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
  transition: background var(--transition-fast);
}
.badge-flag-code:hover {
  background: rgba(88, 101, 242, 0.22);
}

.badge-rarity-pill {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Prestige Checkbox on Card */
.badge-prestige-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
}
.badge-prestige-check input {
  accent-color: var(--blurple);
  cursor: pointer;
}

/* ==========================================================================
   COMPACT LIST VIEW (DENSE LAYOUT)
   ========================================================================== */

.badges-grid.compact-view {
  grid-template-columns: 1fr;
  gap: 8px;
}

.badges-grid.compact-view .badge-card {
  flex-direction: row;
  align-items: center;
  padding: 10px 16px;
  gap: 16px;
}

.badges-grid.compact-view .badge-card-top {
  display: none;
}

.badges-grid.compact-view .badge-showcase-box {
  width: 44px;
  height: 44px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.badges-grid.compact-view .badge-img {
  width: 32px;
  height: 32px;
}

.badges-grid.compact-view .badge-card-info {
  margin-bottom: 0;
}

.badges-grid.compact-view .badge-desc {
  display: none;
}

.badges-grid.compact-view .badge-card-footer {
  border-top: none;
  padding-top: 0;
  flex-shrink: 0;
}

/* ==========================================================================
   AUTHENTIC DISCORD MODAL (PROFILE / ITEM POPOUT)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.98);
  transition: transform var(--transition-normal);
}
.modal-backdrop.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  z-index: 10;
}
.modal-close-btn:hover {
  background: var(--bg-elevated);
  color: #fff;
}

.modal-header-visual {
  background: linear-gradient(180deg, rgba(88, 101, 242, 0.3) 0%, rgba(30, 31, 34, 0.6) 100%);
  padding: 32px 20px 16px;
  text-align: center;
  position: relative;
}

.modal-badge-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6));
  position: relative;
  z-index: 2;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-badge-img:hover {
  transform: scale(1.1);
}

.modal-body {
  padding: 0 24px 24px;
}

.modal-badge-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-white);
  text-align: center;
  margin-bottom: 6px;
}

.modal-chips-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.badge-status-chip {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-status-chip.active { background: var(--green-subtle); color: var(--green); border: 1px solid var(--green-border); }
.badge-status-chip.legacy { background: var(--red-subtle); color: var(--red); border: 1px solid var(--red-border); }
.badge-status-chip.paused { background: var(--yellow-subtle); color: var(--yellow); border: 1px solid var(--yellow-border); }
.badge-status-chip.system { background: var(--purple-subtle); color: var(--purple); border: 1px solid var(--purple-border); }

.modal-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.modal-text-block {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--text-normal);
  line-height: 1.55;
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
}

.modal-flag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.btn-copy-flag-mini {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-normal);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-fast);
}
.btn-copy-flag-mini:hover {
  background: var(--blurple);
  color: #fff;
}

.modal-code-block {
  background: #111214;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 0;
}

.modal-code-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--blurple-light);
}

/* ==========================================================================
   HALL OF FAME & CHANGELOG (DISCORD CURATED ARTICLES)
   ========================================================================== */

.section-container {
  max-width: 1380px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

.section-header {
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.section-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.fame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.fame-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.fame-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-default);
}

.fame-img-box {
  width: 100%;
  height: 200px;
  background: #141517;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fame-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fame-content {
  padding: 16px;
}

.fame-badge-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blurple-light);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.fame-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 8px;
}

.fame-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Timeline */
.timeline-box {
  position: relative;
  padding-left: 28px;
}
.timeline-box::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border-strong);
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blurple);
  box-shadow: 0 0 0 3px var(--bg-canvas);
}

.timeline-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blurple-light);
  margin-bottom: 4px;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-white);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  transform: translateY(60px);
  opacity: 0;
  transition: transform var(--transition-normal), opacity var(--transition-fast);
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  border-top: 1px solid var(--border-subtle);
  background: #0d0e10;
  padding: 36px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.footer-disclaimer {
  font-size: 0.76rem;
  color: var(--text-subtle);
  line-height: 1.5;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 960px) {
  .catalog-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .catalog-sidebar {
    position: static;
    max-height: none;
  }
  .category-tabs-container {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .category-tab {
    width: auto;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 16px;
  }
  .nav-links {
    display: none;
  }
  .hub-header {
    padding: 28px 16px 20px;
  }
  .hub-title {
    font-size: 1.8rem;
  }
  .catalog-section {
    padding: 0 16px 40px;
  }
  .toolbar-wrapper {
    padding: 12px;
  }
  .search-input-box {
    min-width: 100%;
  }
  .search-kbd {
    display: none;
  }
  .badges-grid {
    grid-template-columns: 1fr;
  }
  .fame-grid {
    grid-template-columns: 1fr;
  }
}
