/* ============================================================
   GlowBright Design System 2.0 — hierarchy, cards, empty, chips
   ============================================================ */

:root {
  --ds-0: 0;
  --ds-1: 0.25rem;
  --ds-2: 0.5rem;
  --ds-3: 0.75rem;
  --ds-4: 1rem;
  --ds-5: 1.25rem;
  --ds-6: 1.5rem;
  --ds-8: 2rem;
  --ds-10: 2.5rem;
  --ds-12: 3rem;
  --ds-text-xs: 0.75rem;
  --ds-text-sm: 0.875rem;
  --ds-text-base: 1rem;
  --ds-text-md: 1.125rem;
  --ds-text-lg: 1.25rem;
  --ds-text-xl: 1.5rem;
  --ds-text-2xl: 1.875rem;
  --ds-text-3xl: 2.25rem;
}

/* Focus accessibility */
:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.85);
  outline-offset: 2px;
}
.btn:focus-visible,
.nav-link:focus-visible,
.content-card:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.9);
  outline-offset: 2px;
}

/* Section hierarchy */
.section {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.section-header {
  margin-bottom: 1.5rem;
  max-width: 40rem;
}
.section-eyebrow {
  font-size: var(--ds-text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent, #22d3ee);
  margin-bottom: 0.4rem;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
}
.section-description {
  font-size: var(--ds-text-md);
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Unified content cards */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.15rem;
}
.content-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.content-card:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22), 0 0 24px rgba(34, 211, 238, 0.18);
  color: inherit;
}
/* neon ring enabled on content-cards (see neon.css) */
.content-card-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(167, 139, 250, 0.12));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.content-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.content-card:hover .content-card-thumb img {
  transform: scale(1.05);
}
.content-card-fallback { font-size: 2.1rem; opacity: 0.85; }
.content-card-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1;
}
.content-card-body { padding: 0.85rem 1rem 1rem; }
.content-card-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
.content-card-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Filter chips */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 1rem;
  align-items: center;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--text);
  text-decoration: none;
}
.filter-chip:hover { background: rgba(34, 211, 238, 0.18); color: var(--text); }
.filter-chip-clear {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 2.5rem 1.25rem;
  border-radius: 16px;
  border: 1px dashed var(--border-strong);
  background: rgba(148, 163, 184, 0.04);
  max-width: 420px;
  margin: 1.5rem auto;
}
.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}
.empty-state h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}
.empty-state p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}
.empty-state .btn { margin: 0.2rem; }

/* Mobile header: hide tagline */
@media (max-width: 700px) {
  .logo-tagline { display: none !important; }
  .theme-label { display: none !important; }
}

/* Light theme polish */
[data-theme="light"] {
  --bg: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);
  --header-bg: rgba(255, 255, 255, 0.92);
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .content-card {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
[data-theme="light"] .content-card:hover {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

/* Leaderboard polish */
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-align: left;
  padding: 0.6rem 0.75rem;
}
.lb-table td {
  padding: 0.85rem 0.75rem;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
.lb-rank {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(148, 163, 184, 0.12);
}
.lb-rank--1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #111; }
.lb-rank--2 { background: linear-gradient(135deg, #e2e8f0, #94a3b8); color: #111; }
.lb-rank--3 { background: linear-gradient(135deg, #fdba74, #ea580c); color: #111; }
.lb-name { font-weight: 600; }
.lb-you { background: rgba(96, 165, 250, 0.1); }

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, rgba(148,163,184,0.08) 25%, rgba(148,163,184,0.16) 50%, rgba(148,163,184,0.08) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.2s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Toast */
.gb-toast-wrap {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.gb-toast {
  pointer-events: auto;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 8px 28px rgba(0,0,0,0.3);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  animation: toastIn 0.25s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 900px) {
  .gb-toast-wrap { bottom: 5rem; right: 0.75rem; left: 0.75rem; }
}

/* Social links (About / Contact) */
.gb-social-block {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border, rgba(148,163,184,0.12));
}
.gb-social-title {
  margin: 0 0 0.85rem;
  font-size: 1.1rem;
  font-weight: 600;
}
.gb-social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.gb-social-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text, #f1f5f9);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.28);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.gb-social-link:hover {
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(34, 211, 238, 0.5);
  color: var(--text, #f1f5f9);
  transform: translateY(-1px);
}

/* List toolbar: title | filters side by side */
.gb-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
}
.gb-list-toolbar-title {
  flex: 0 0 auto;
  min-width: 6rem;
}
.gb-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  justify-content: flex-end;
  margin: 0;
}
.gb-filter-bar .form-select {
  width: auto;
  min-width: 7.5rem;
  max-width: 11rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.85rem;
}
.gb-filter-search {
  position: relative;
  flex: 1 1 10rem;
  min-width: 9rem;
  max-width: 16rem;
}
.gb-filter-search .form-input {
  width: 100%;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
}
@media (max-width: 700px) {
  .gb-list-toolbar {
    align-items: stretch;
  }
  .gb-filter-bar {
    justify-content: stretch;
    width: 100%;
  }
  .gb-filter-bar .form-select {
    flex: 1 1 45%;
    max-width: none;
  }
  .gb-filter-search {
    flex: 1 1 100%;
    max-width: none;
  }
}
