@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

:root {
	/* Backgrounds */
	--bg-darkest: #05060c;
	--bg-dark: #060712;
	--bg: #080815;
	--bg-light: #0c0d1a;

	/* Surfaces */
	--surface-0: #04040b;
	--surface-1: #05050d;
	--surface-2: #07080f;
	--surface-3: #0a0b14;
	--surface-4: #0d0f1a;
	--surface-5: #111326;

	/* Accent */
	--accent: #3b4275;
	--accent-hover: #2c2c5e;
	--accent-light: #50588e;
	--accent-strong: #5e6998;
	--accent-muted: #292c4a;
	--accent-glow: rgba(59, 66, 117, 0.35);

	/* Status */
	--success: #4f8a6f;
	--success-hover: #5c9b7e;
	--info: #4a6b96;
	--info-hover: #5878a8;
	--danger: #bb4242;
	--danger-hover: #d24b4b;
	--warning: #bba142;

	/* Greys */
	--gray-100: #12121a;
	--gray-200: #1a1a24;
	--gray-300: #262634;
	--gray-400: #343445;
	--gray-500: #45455a;
	--gray-600: #5a5a73;
	--gray-700: #74748f;
	--gray-800: #9b9fb6;
	--gray-900: #d0d3e2;

	/* Text */
	--text: #fff;
	--text-dim: #aeb4c8;
	--text-muted: #80849a;
	--text-inverted: #0a0a0f;

	/* Borders & shadows */
	--border: #191a25;
	--border-strong: #242634;
	--outline: #2a2d45;
	--outline-accent: #3b4275;
	--shadow: rgba(0, 0, 0, 0.6);
	--shadow-soft: rgba(0, 0, 0, 0.3);
	--shadow-popup: 0 6px 20px var(--shadow);

	/* Glass */
	--glass-light: rgba(15, 16, 28, 0.6);
	--glass-dark: rgba(9, 10, 20, 0.85);
	--glass-border-soft: rgba(59, 66, 117, 0.12);
	--blur-strength: 16px;

	/* Derived */
	--muted-a: color-mix(in srgb, var(--accent-muted) 48%, var(--surface-2));
	--muted-b: color-mix(in srgb, var(--surface-3) 60%, var(--surface-2) 40%);
	--muted-c: color-mix(in srgb, var(--surface-1) 65%, var(--surface-2) 35%);

	/* Gradients */
	--grad-accent: linear-gradient(90deg, var(--accent), var(--accent-light));
	--grad-surface: linear-gradient(145deg, var(--surface-1), var(--surface-3));

	/* Buttons */
	--btn-tone-1: color-mix(in srgb, var(--surface-3) 45%, var(--surface-1));
	--btn-tone-1-hover: color-mix(in srgb, var(--surface-3) 55%, var(--surface-1));
	--btn-tone-1-active: color-mix(in srgb, var(--surface-3) 65%, var(--surface-1));
	--btn-grad: linear-gradient(90deg, var(--btn-tone-1) 0%, var(--surface-1) 100%);
	--btn-grad-hover: linear-gradient(90deg, var(--btn-tone-1-hover) 0%, var(--surface-1) 100%);
	--btn-grad-active: linear-gradient(90deg, var(--btn-tone-1-active) 0%, var(--surface-1) 100%);

	/* Layout */
	--scrollbar-size: 12px;
	--sidebar-pad: 6px;

	/* Radii */
	--radius: 2px;
	--radius-lg: 3px;
	--radius-pill: 3px;

	/* Misc */
	--transition-fast: 0.15s;
	--transition-medium: 0.25s;
	--transition-slow: 0.45s;
	--transparent: transparent;

	/* Edge garnish */
	--edge: 10px;
	--ring-glow: 0 0 0 1px var(--outline-accent), 0 0 18px var(--accent-glow);
	--scanline: repeating-linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.04) 0px,
		rgba(255, 255, 255, 0.04) 1px,
		transparent 1px,
		transparent 3px
	);
}

/* ─── RESET ─────────────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* ─── SCROLLBAR ──────────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: var(--scrollbar-size); height: var(--scrollbar-size); }
::-webkit-scrollbar-track { background: var(--surface-0); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: var(--radius); }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

main { flex: 1; }

/* ─── NAV ────────────────────────────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-dark);
  backdrop-filter: blur(var(--blur-strength));
  -webkit-backdrop-filter: blur(var(--blur-strength));
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
}

.nav-brand {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text);
  flex-shrink: 0;
  margin-right: 16px;
}

.nav-brand span { color: var(--accent-light); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-link:hover { color: var(--text-dim); background: var(--surface-3); }
.nav-link.active { color: var(--text); background: var(--surface-4); }

.nav-spacer { flex: 1; }

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── HERO ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 72px 0 56px;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--scanline);
  pointer-events: none;
  opacity: 0.6;
}

.hero::after {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 280px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 68%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-muted);
  border: 1px solid var(--outline-accent);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.hero h1 span { color: var(--accent-light); }

.hero-tagline {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 440px;
  margin: 0 auto 36px;
  line-height: 1.5;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.hero-stat { text-align: center; }

.hero-stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.hero-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── SEARCH / FILTER ────────────────────────────────────────────────────── */

.browse-header {
  padding: 28px 0 0;
}

.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.search-input-wrap {
  flex: 1;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 38px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

.search-input:focus {
  border-color: var(--outline-accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.filter-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.filter-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 4px;
}

.filter-btn {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--outline);
  color: var(--text-dim);
  background: var(--surface-3);
}

.filter-btn.active {
  background: var(--accent-muted);
  border-color: var(--outline-accent);
  color: var(--accent-light);
}

/* ─── GAME GRID ──────────────────────────────────────────────────────────── */

.game-grid-section {
  padding: 28px 0 64px;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 700;
}

.section-count {
  font-size: 13px;
  color: var(--text-muted);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ─── GAME CARD ──────────────────────────────────────────────────────────── */

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.game-card:hover {
  transform: translateY(-3px);
  background: var(--surface-4);
  border-color: var(--border-strong);
  box-shadow: 0 8px 32px var(--shadow);
}

.card-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-1);
  display: block;
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

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

.card-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.game-card:hover .card-play-overlay {
  opacity: 1;
}

.card-play-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  box-shadow: 0 0 24px var(--accent-glow);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 16px 16px;
  gap: 8px;
}

.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  transition: color var(--transition-fast);
}

.card-title:hover { color: var(--accent-light); }

.card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
  padding-top: 4px;
}

.tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-3);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}

.play-count {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  font-family: inherit;
  letter-spacing: 0.01em;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent-light);
  color: var(--text);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 14px var(--accent-glow);
}

.btn-secondary {
  background: var(--surface-3);
  border-color: var(--border);
  color: var(--text-dim);
}

.btn-secondary:hover {
  background: var(--surface-4);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--surface-3);
  border-color: var(--outline);
  color: var(--text-dim);
}

.btn-danger {
  background: var(--danger);
  border-color: transparent;
  color: var(--text);
}

.btn-danger:hover { background: var(--danger-hover); }

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-lg {
  padding: 10px 24px;
  font-size: 15px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── TABS ───────────────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: -1px;
  font-family: inherit;
}

.tab-btn:hover { color: var(--text-dim); }

.tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent-light);
}

/* ─── LEADERBOARD TABLE ──────────────────────────────────────────────────── */

.leaderboard-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
}

.lb-table th {
  background: var(--surface-1);
  padding: 9px 16px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

.lb-table td {
  padding: 11px 16px;
  font-size: 13px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.lb-table tbody tr {
  background: var(--surface-2);
  transition: background var(--transition-fast);
}

.lb-table tbody tr:hover { background: var(--surface-3); }

.lb-table tbody tr.current-user {
  background: var(--accent-muted);
}

.lb-table tbody tr.current-user td { color: var(--text); }

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius);
  background: var(--surface-4);
  font-size: 11px;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  color: var(--text-muted);
}

.rank-badge.gold   { background: rgba(187, 161, 66, 0.15); color: var(--warning); }
.rank-badge.silver { background: rgba(160, 160, 185, 0.15); color: #a8aac8; }
.rank-badge.bronze { background: rgba(180, 100, 60, 0.15); color: #c08050; }

/* ─── GAME EMBED ─────────────────────────────────────────────────────────── */

.game-stage {
  background: #000;
  border-bottom: 1px solid var(--border);
}

.game-embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 76vh;
  overflow: hidden;
  margin: 0 auto;
  background: #000;
}

.game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.game-embed-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--surface-0);
  color: var(--text-muted);
  font-size: 13px;
}

/* ─── PROFILE ────────────────────────────────────────────────────────────── */

.profile-hero {
  padding: 48px 0 40px;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--scanline);
  pointer-events: none;
  opacity: 0.4;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  background: var(--accent-muted);
  border: 2px solid var(--border-strong);
  object-fit: cover;
  flex-shrink: 0;
}

.profile-avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  background: var(--accent-muted);
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-light);
}

.profile-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-joined {
  font-size: 12px;
  color: var(--text-muted);
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tier-badge.free   { background: var(--gray-200); color: var(--gray-700); border: 1px solid var(--gray-300); }
.tier-badge.core   { background: rgba(74, 107, 150, 0.18); border: 1px solid var(--info); color: var(--info-hover); }
.tier-badge.pro    { background: rgba(80, 88, 142, 0.18); border: 1px solid var(--accent-light); color: var(--accent-light); }
.tier-badge.ultra  { background: rgba(187, 161, 66, 0.15); border: 1px solid var(--warning); color: var(--warning); }

/* ─── STATS GRID ─────────────────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── MODAL ──────────────────────────────────────────────────────────────── */

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

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

.modal {
  background: var(--glass-dark);
  backdrop-filter: blur(var(--blur-strength));
  -webkit-backdrop-filter: blur(var(--blur-strength));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-popup);
  transform: translateY(10px);
  transition: transform var(--transition-medium);
}

.modal-backdrop.open .modal {
  transform: translateY(0);
}

.modal-title {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ─── FORMS ──────────────────────────────────────────────────────────────── */

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  border-color: var(--outline-accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

/* ─── TOAST ──────────────────────────────────────────────────────────────── */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--glass-dark);
  backdrop-filter: blur(var(--blur-strength));
  font-size: 13px;
  color: var(--text);
  box-shadow: var(--shadow-popup);
  animation: toastIn 0.2s ease forwards;
  pointer-events: auto;
}

.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); }
.toast.info    { border-color: var(--outline-accent); }

/* ─── LOADING / EMPTY STATES ─────────────────────────────────────────────── */

.loading-state, .empty-state, .error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 0;
  gap: 10px;
  text-align: center;
  color: var(--text-muted);
}

.loading-state { font-size: 13px; }

.empty-state h3 {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  color: var(--text-dim);
  margin-top: 4px;
}

.empty-state p {
  font-size: 13px;
  max-width: 320px;
  line-height: 1.55;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent-light);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ─── PAGE SECTIONS ──────────────────────────────────────────────────────── */

.page-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.page-section:last-child { border-bottom: none; }

.section-heading {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

/* ─── DIVIDER ────────────────────────────────────────────────────────────── */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: var(--bg-dark);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-brand span { color: var(--accent-light); }

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-link {
  font-size: 12px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-link:hover { color: var(--text-dim); }

.footer-copy {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ─── ANIMATIONS ─────────────────────────────────────────────────────────── */

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes toastIn {
  from { transform: translateX(16px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.fade-up { animation: fadeUp var(--transition-medium) ease both; }
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.10s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.20s; }

/* ─── UTILITIES ──────────────────────────────────────────────────────────── */

.text-muted  { color: var(--text-muted); }
.text-dim    { color: var(--text-dim); }
.text-accent { color: var(--accent-light); }
.font-syne   { font-family: 'Syne', sans-serif; }
.hidden      { display: none !important; }
.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;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }

  .nav-links { display: none; }

  .hero { padding: 48px 0 36px; }
  .hero-stats { gap: 24px; }

  .game-grid { grid-template-columns: 1fr; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .profile-card { flex-direction: column; text-align: center; }
  .profile-meta { justify-content: center; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }

  .lb-table th:nth-child(3),
  .lb-table td:nth-child(3) { display: none; }

  .modal { padding: 20px; }
}

@media (max-width: 480px) {
  .search-row { flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 16px; }
}
