/* ═══════════════════════════════════════════════════════════════
   PORTAL — VRChat World Discovery
   Quiet Cyberpunk. The machine hums; it does not shout.
   ═══════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  /* Surfaces */
  --bg: #0A0A0F;
  --bg-raised: #12121A;
  --bg-hover: #1A1A26;
  --bg-overlay: rgba(8, 8, 12, 0.88);

  /* Lines */
  --border: #262636;
  --border-light: #1C1C2A;
  --border-accent: rgba(124, 108, 255, 0.35);

  /* Ink */
  --text: #EDEDF2;
  --text-secondary: #9494AB;
  --text-muted: #585870;

  /* Signals — purple is interface, teal is alive, pink is heat */
  --accent: #7C6CFF;
  --accent-bright: #948AFF;
  --accent-dim: #6455E0;
  --accent-glow: rgba(124, 108, 255, 0.14);
  --accent-glow-strong: rgba(124, 108, 255, 0.4);

  --live: #4EE1C2;
  --live-glow: rgba(78, 225, 194, 0.14);
  --live-glow-strong: rgba(78, 225, 194, 0.45);

  --hot: #FF5C8A;
  --hot-glow: rgba(255, 92, 138, 0.14);

  --danger: #FF4757;

  /* Type */
  --font-body: 'Inter', 'Noto Sans JP', sans-serif;
  --font-display: 'Space Grotesk', 'Noto Sans JP', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Geometry — tighter than before. This is a machine, not a toy. */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 140ms var(--ease-out);
  --normal: 220ms var(--ease-out);
  --slow: 400ms var(--ease-out);

  --max-width: 1400px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font: inherit; border: none; background: none; color: inherit; }
input { font: inherit; }

/* ── Atmosphere ─────────────────────────────────────────────
   Two fixed layers behind everything:
   1. A faint blueprint grid, masked so it fades below the fold.
   2. Ambient color pools you can actually perceive.
   Quiet ≠ invisible. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(124, 108, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 108, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 70vh);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 70vh);
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 18% -10%, rgba(124, 108, 255, 0.09), transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 110%, rgba(78, 225, 194, 0.05), transparent 60%);
  pointer-events: none;
}

/* ── Selection & Scrollbar — sign every surface ─────────────── */
::selection { background: var(--accent-glow-strong); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* ── Focus — glowing ring, on brand, non-negotiable ─────────── */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent), 0 0 16px var(--accent-glow-strong);
  border-radius: var(--radius-sm);
}

/* ── Keyframes ──────────────────────────────────────────────── */
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--live-glow-strong); }
  60%      { box-shadow: 0 0 0 6px transparent; }
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-overlay);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border-light);
}
/* Hairline accent trace along the bottom edge — the header's heartbeat */
.site-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, var(--accent-glow-strong) 20%,
    transparent 50%, var(--live-glow-strong) 80%, transparent 100%);
  opacity: 0.5;
  pointer-events: none;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.logo-icon {
  color: var(--accent);
  font-size: 1.25rem;
  filter: drop-shadow(0 0 8px var(--accent-glow-strong));
  transition: filter var(--normal);
}
.logo:hover .logo-icon { filter: drop-shadow(0 0 14px var(--accent-glow-strong)); }

.main-nav { display: flex; gap: 2px; flex: 1; }
.nav-link {
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: color var(--fast), background var(--fast);
}
.nav-link:hover { color: var(--text); background: var(--bg-raised); }
.nav-link.active { color: var(--accent-bright); }
/* Active nav gets an underglow tick, not a pill */
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  box-shadow: 0 0 10px var(--accent-glow-strong);
}

/* ── Buttons — an inner light, not a flat slab ──────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background var(--fast), border-color var(--fast),
              color var(--fast), box-shadow var(--normal), transform var(--fast);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent-dim));
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 1px 3px rgba(0, 0, 0, 0.4);
}
.btn-primary:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 24px var(--accent-glow-strong),
    0 4px 12px rgba(0, 0, 0, 0.4);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover {
  border-color: var(--border-accent);
  color: var(--text);
  background: var(--accent-glow);
  box-shadow: 0 0 16px var(--accent-glow);
}

/* Launch — the destination button. Teal, because pressing it means GOING. */
.btn-launch {
  font-size: 1rem;
  padding: 14px 28px;
  background: linear-gradient(180deg, #5FEFD0, #38C9AB);
  color: #05201A;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 20px var(--live-glow);
}
.btn-launch:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 0 32px var(--live-glow-strong),
    0 4px 16px rgba(0, 0, 0, 0.4);
}

/* ── Layout ─────────────────────────────────────────────────── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  min-height: calc(100vh - 200px);
}

.page-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 36px 0 20px;
}
.page-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-count {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.page-count::before { content: '// '; color: var(--accent-dim); }

/* ── Hero ───────────────────────────────────────────────────── */
.home-hero {
  position: relative;
  text-align: center;
  padding: 96px 24px 72px;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  animation: rise var(--slow) both;
}
/* Mono eyebrow — the machine announces itself. Add this element
   above .hero-title in markup: <p class="hero-eyebrow">…</p> */
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--live);
  margin-bottom: 20px;
}
.hero-eyebrow::before, .hero-eyebrow::after { content: ' — '; color: var(--text-muted); }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 20px;
}
.hero-line { display: block; }
.hero-line.accent {
  background: linear-gradient(105deg, var(--accent-bright) 20%, var(--live) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 540px;
  margin-inline: auto;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero-gradient {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background:
    radial-gradient(ellipse 60% 55% at 50% 40%, rgba(124, 108, 255, 0.16) 0%, transparent 70%),
    radial-gradient(ellipse 40% 35% at 60% 55%, rgba(78, 225, 194, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Sections ───────────────────────────────────────────────── */
.home-section { padding: 44px 0; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
/* Terminal tick before each section title */
.section-title::before {
  content: '▸';
  color: var(--accent);
  font-size: 0.85em;
}
.section-link {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color var(--fast);
}
.section-link:hover { color: var(--accent-bright); }
.section-link::after { content: ' →'; }

/* ── World Grid ─────────────────────────────────────────────── */
.world-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ── World Card — the atom of the site. Earn the hover. ─────── */
.world-card {
  display: block;
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  overflow: hidden;
  position: relative;
  transition: transform var(--normal), border-color var(--normal), box-shadow var(--normal);
}
.world-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
  }

  .world-card:hover .world-card-thumb img {
    transform: scale(1.05);
  }

  .world-card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-tertiary);
  }

  .world-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
  }

  .world-card-thumb .thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2rem;
    color: var(--text-muted);
  }

  .world-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
  }

  .world-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .world-card-author {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .world-card-author a {
    color: inherit;
    text-decoration: none;
  }

  .world-card-author a:hover {
    color: var(--accent);
  }

  .world-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
  }

  .world-card-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
  }

  /* ============================================
     Badges
     ============================================ */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.4;
    white-space: nowrap;
  }

  .badge-platform-pc {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
  }

  .badge-platform-quest {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
  }

  .badge-platform-cross {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
  }

  .badge-featured {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
  }

  .badge-new {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
  }

  .badge-lab {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
  }

  .world-card-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    z-index: 2;
  }

  /* ============================================
     World Detail
     ============================================ */
  .world-detail {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 2rem;
    margin-top: 1.5rem;
  }

  .world-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
  }

  .world-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .world-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    margin: 1rem 0 0.25rem;
  }

  .world-detail-author {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
  }

  .world-detail-author a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
  }

  .world-detail-author a:hover {
    text-decoration: underline;
  }

  .world-description {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-line;
    word-break: break-word;
  }

  .world-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .sidebar-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
  }

  .sidebar-card h3 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
  }

  .world-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  /* ============================================
     Tags
     ============================================ */
  .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
  }

  .tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.15s ease;
  }

  .tag:hover {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent);
  }

  .tag.tag-active {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
  }

  /* ============================================
     Stats
     ============================================ */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-item {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    text-align: center;
  }

  .stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
  }

  .stat-label {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.125rem;
  }

  /* ============================================
     Filters
     ============================================ */
  .filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .filter-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
  }

  .filter-select {
    appearance: none;
    background: var(--bg-secondary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.625rem center;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.8125rem;
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    cursor: pointer;
    transition: border-color 0.15s ease;
  }

  .filter-select:hover,
  .filter-select:focus {
    border-color: var(--accent);
    outline: none;
  }

  .filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
  }

  .filter-chip:hover {
    border-color: var(--accent);
    color: var(--text-primary);
  }

  .filter-chip.active {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
  }

  .filter-chip .chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1;
  }

  .filter-chip .chip-remove:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .filter-clear {
    margin-left: auto;
    font-size: 0.8125rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
  }

  .filter-clear:hover {
    color: var(--accent);
  }

  /* ============================================
     Search Palette
     ============================================ */
  .search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 10vh 1rem 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
  }

  .search-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  .search-palette {
    width: 100%;
    max-width: 560px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transform: translateY(-8px);
    transition: transform 0.15s ease;
  }

  .search-overlay.open .search-palette {
    transform: translateY(0);
  }

  .search-palette-input {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
  }

  .search-palette-input svg {
    flex-shrink: 0;
    color: var(--text-muted);
  }

  .search-palette-input input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9375rem;
  }

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

  .search-palette-input kbd {
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.6875rem;
    font-family: inherit;
  }

  .search-results {
    max-height: 50vh;
    overflow-y: auto;
    padding: 0.375rem;
  }

  .search-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.625rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    cursor: pointer;
  }

  .search-result:hover,
  .search-result.selected {
    background: var(--bg-tertiary);
  }

  .search-result-thumb {
    width: 48px;
    height: 27px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-tertiary);
    flex-shrink: 0;
  }

  .search-result-info {
    min-width: 0;
    flex: 1;
  }

  .search-result-title {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .search-result-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .search-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
  }

  /* ============================================
     Collections
     ============================================ */
  .collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
  }

  .collection-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease;
  }

  .collection-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
  }

  .collection-cover {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    aspect-ratio: 2 / 1;
    background: var(--bg-tertiary);
  }

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

  .collection-cover img:first-child {
    grid-row: span 2;
  }

  .collection-body {
    padding: 1rem;
  }

  .collection-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
  }

  .collection-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .collection-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
  }

  /* ============================================
     Creators
     ============================================ */
  .creator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
  }

  .creator-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
  }

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

  .creator-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    object-fit: cover;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent);
    font-size: 1.125rem;
  }

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

  .creator-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .creator-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
  }

  .creator-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 0;
  }

  .creator-header .creator-avatar {
    width: 80px;
    height: 80px;
    font-size: 1.75rem;
  }

  .creator-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
  }

  .creator-header .creator-bio {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
  }

  /* ============================================
     Events
     ============================================ */
  .event-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .event-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: border-color 0.2s ease;
  }

  .event-card:hover {
    border-color: var(--border-hover);
  }

  .event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    flex-shrink: 0;
  }

  .event-date .day {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
  }

  .event-date .month {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    font-weight: 600;
  }

  .event-info {
    min-width: 0;
    flex: 1;
  }

  .event-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
  }

  .event-time {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
  }

  .event-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .event-live {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--danger);
  }

  .event-live::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--danger);
    animation: pulse-dot 1.5s ease-in-out infinite;
  }

  @keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
  }

  /* ============================================
     Empty States
     ============================================ */
  .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--text-muted);
  }

  .empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.6;
  }

  .empty-state h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
  }

  .empty-state p {
    font-size: 0.875rem;
    max-width: 380px;
    line-height: 1.6;
  }

  .empty-state .btn {
    margin-top: 1.25rem;
  }

  /* ============================================
     Error Pages
     ============================================ */
  .error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh;
    padding: 2rem 1rem;
  }

  .error-code {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--accent), #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.75rem;
  }

  .error-page h1 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
  }

  .error-page p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    max-width: 420px;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }

  /* ============================================
     Toast
     ============================================ */
  .toast-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .toast {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
    font-size: 0.875rem;
    max-width: 340px;
    animation: toast-in 0.25s ease;
  }

  .toast.toast-success {
    border-color: rgba(16, 185, 129, 0.4);
  }

  .toast.toast-error {
    border-color: rgba(239, 68, 68, 0.4);
  }

  .toast.hiding {
    animation: toast-out 0.2s ease forwards;
  }

  @keyframes toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
  }

  @keyframes toast-out {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to   { opacity: 0; transform: translateX(-50%) translateY(8px); }
  }