:root {
  --bg: #0e0e10;
  --bg-card: #18181b;
  --bg-card-hover: #1f1f23;
  --bg-elevated: #232326;
  --border: #27272a;
  --border-hover: #3f3f46;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --green: #22c55e;
  --red: #ef4444;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --max-w: 1200px;
  --header-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text-primary); line-height: 1.5; min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font: inherit; color: inherit; }

/* Remove number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ---- HEADER ---- */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(14,14,16,0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}
.header-left, .header-right { display: flex; align-items: center; gap: 16px; }
.header-left { gap: 8px; }
.header-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.header-logo img { width: 32px; height: 32px; border-radius: 8px; }

.profile-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-elevated); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; transition: border-color 0.2s;
}
.profile-btn:hover { border-color: var(--accent); }
.profile-btn img { width: 100%; height: 100%; object-fit: cover; }
.profile-btn svg { width: 18px; height: 18px; color: var(--text-muted); }

.auth-dropdown {
  display: none; position: absolute; top: calc(var(--header-h) - 4px); right: 24px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  min-width: 220px; padding: 6px; box-shadow: 0 16px 48px rgba(0,0,0,0.5); z-index: 200;
}
.auth-dropdown.open { display: block; }
.auth-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}
.auth-dropdown-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.auth-dropdown-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.auth-dropdown-sep { height: 1px; background: var(--border); margin: 4px 8px; }
.auth-dropdown-user { padding: 12px 14px 8px; display: flex; align-items: center; gap: 10px; }
.auth-dropdown-user .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; overflow: hidden; }
.auth-dropdown-user .info { display: flex; flex-direction: column; }
.auth-dropdown-user .name { font-size: 13px; font-weight: 600; }
.auth-dropdown-user .email { font-size: 11px; color: var(--text-muted); }

/* ---- SIDEBAR ---- */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 260px; z-index: 150;
  background: var(--bg-card); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform 0.25s ease;
}
.sidebar.open { transform: translateX(0); }
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.sidebar-logo img { width: 32px; height: 32px; border-radius: 8px; }
.sidebar-close {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all 0.15s;
}
.sidebar-close:hover { background: var(--bg-elevated); color: var(--text-primary); }
.sidebar-body { flex: 1; overflow-y: auto; padding: 12px; }
.sidebar-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 8px; padding: 0 8px; }
.sidebar-link { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius); font-size: 14px; color: var(--text-secondary); transition: all .15s; }
.sidebar-link:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.sidebar-link.active { color: var(--accent); background: rgba(59,130,246,0.1); }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 12px 0; }

.sidebar-account {
  display: none;
  padding: 12px;
  border-top: 1px solid var(--border);
  position: relative;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 140;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }
.hamburger-btn {
  display: none; width: 36px; height: 36px; border-radius: 8px;
  align-items: center; justify-content: center;
  color: var(--text-secondary); transition: all 0.15s; flex-shrink: 0;
}
.hamburger-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }

.page-main { overflow-x: hidden; }

/* ---- SEARCH (HOME) ---- */
.search-section {
  max-width: var(--max-w); margin: 0 auto;
  padding: 24px 24px 32px; text-align: center;
}
.search-title { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; }
.search-subtitle { font-size: 15px; color: var(--text-muted); margin-bottom: 28px; }
.search-wrap { position: relative; max-width: 580px; margin: 0 auto; }
.search-input {
  width: 100%; height: 48px; padding: 0 16px 0 46px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  font-size: 15px; color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-muted);
  cursor: pointer; transition: color 0.15s;
}
.search-icon:hover { color: var(--accent); }
.search-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  max-height: 420px; overflow-y: auto; z-index: 50;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5); text-align: left;
}
.search-dropdown.open { display: block; }
.search-result {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; cursor: pointer; transition: background 0.12s;
}
.search-result:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.search-result:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.search-result:hover { background: var(--bg-card-hover); }
.search-result-img { width: 40px; height: 40px; border-radius: var(--radius); background: var(--bg-elevated); object-fit: cover; flex-shrink: 0; }
.search-result-info { flex: 1; min-width: 0; }
.search-result-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 10px; }
.search-result-meta .playing { color: var(--green); font-weight: 600; }
.search-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ---- LEADERBOARD (HOME) ---- */
.content { max-width: var(--max-w); margin: 0 auto; padding: 0 24px 60px; overflow: hidden; }
.lb-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.lb-title { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }

/* Leaderboard 4-column */
.lb-dashboard { max-width: var(--max-w); margin: 0 auto; padding: 0 24px 60px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lb-column { display: flex; flex-direction: column; }
.lb-col-list { display: flex; flex-direction: column; gap: 6px; max-height: 600px; overflow-y: auto; padding-right: 4px; }
.lb-col-list::-webkit-scrollbar { width: 4px; }
.lb-col-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.game-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); cursor: pointer; transition: background 0.15s, border-color 0.15s; overflow: hidden;
  width: 100%; min-width: 0;
}
.game-card:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }
.game-rank { font-size: 14px; font-weight: 800; color: var(--text-muted); width: 24px; text-align: center; flex-shrink: 0; }
.game-rank.top-3 { color: var(--accent); }
.game-thumb { width: 44px; height: 44px; border-radius: var(--radius); background: var(--bg-elevated); object-fit: cover; flex-shrink: 0; }
.game-info { flex: 1; min-width: 0; width: 0; }
.game-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-owner { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; }
.game-stat { display: flex; align-items: center; gap: 3px; }
.game-stat svg { width: 12px; height: 12px; }
.game-playing { color: var(--green); }
.game-likes { color: var(--accent); }
.lb-show-more {
  display: block; width: 100%; margin-top: 10px; padding: 10px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  text-align: center; cursor: pointer; transition: background 0.15s, color 0.15s;
}
.lb-show-more:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.lb-skeleton {
  height: 64px; border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---- FOOTER ---- */
.footer { border-top: 1px solid var(--border); padding: 24px; text-align: center; font-size: 12px; color: var(--text-muted); max-width: var(--max-w); margin: 0 auto; }
.footer-links { margin-left: 16px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

/* ---- SEARCH PAGE ---- */
.sp-hero { max-width: var(--max-w); margin: 0 auto; padding: 40px 24px 0; }
.sp-title { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 4px; }
.sp-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.sp-search-wrap { position: relative; max-width: 100%; }
.sp-search-input {
  width: 100%; height: 48px; padding: 0 46px 0 46px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  font-size: 15px; color: var(--text-primary); transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.sp-search-input::placeholder { color: var(--text-muted); }
.sp-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.sp-search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-muted); cursor: pointer; transition: color 0.15s;
}
.sp-search-icon:hover { color: var(--accent); }
.sp-filter-icon {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer; transition: all 0.15s; background: none; border: none;
}
.sp-filter-icon:hover { color: var(--accent); background: var(--bg-elevated); }
.sp-filter-icon.open { color: var(--accent); }

/* Filter pane */
.sp-filters { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; position: relative; }
.sp-filter-pane {
  display: none; position: absolute; top: 8px; left: 24px; right: 24px; max-width: var(--max-w);
  padding: 14px 18px; z-index: 50;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  flex-wrap: wrap; gap: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.sp-filter-pane.open { display: flex; }
.sp-filter-group { display: flex; align-items: center; gap: 6px; }
.sp-filter-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted); white-space: nowrap;
}
.sp-filter-sep { width: 1px; height: 24px; background: var(--border); flex-shrink: 0; }
.sp-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; width: 100%; }
.sp-filter-reset {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: var(--radius);
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  transition: all 0.15s; flex-shrink: 0;
}
.sp-filter-reset:hover { color: var(--text-primary); background: var(--bg-elevated); }

/* Pills */
.sp-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-pill {
  display: inline-flex; align-items: center;
  padding: 5px 14px; border-radius: 24px;
  background: transparent; border: 1px solid var(--border);
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.sp-pill:hover { border-color: var(--text-muted); color: var(--text-secondary); }
.sp-pill.active { border-color: var(--accent); color: var(--accent); background: rgba(59,130,246,0.1); }

/* Sort select */
.sp-select { position: relative; }
.sp-select-trigger {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.sp-select-trigger:hover { border-color: var(--text-muted); }
.sp-select-trigger svg { width: 10px; height: 10px; transition: transform 0.15s; }
.sp-select.open .sp-select-trigger svg { transform: rotate(180deg); }
.sp-select.open .sp-select-trigger { border-color: var(--accent); }
.sp-select-options {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 160px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 4px; z-index: 60;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.sp-select.open .sp-select-options { display: block; }
.sp-select-option {
  padding: 8px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; transition: all 0.12s;
}
.sp-select-option:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.sp-select-option.active { color: var(--accent); background: rgba(59,130,246,0.08); }

/* Range inputs */
.sp-range { display: flex; align-items: center; gap: 6px; }
.sp-range-input {
  width: 64px; padding: 5px 6px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-primary); font-size: 12px; font-weight: 600; text-align: center;
  outline: none; transition: border-color 0.15s;
}
.sp-range-input:focus { border-color: var(--accent); }
.sp-range-sep { color: var(--text-muted); font-size: 11px; }

/* Results — LIST layout */
.sp-results { max-width: var(--max-w); margin: 0 auto; padding: 16px 24px 60px; }
.sp-results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sp-results-count { font-size: 13px; color: var(--text-muted); }
.sp-results-list { display: flex; flex-direction: column; gap: 6px; }
.sp-game-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.sp-game-row:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }
.sp-game-row-rank { font-size: 13px; font-weight: 800; color: var(--text-muted); width: 24px; text-align: center; flex-shrink: 0; }
.sp-game-row-rank.top-3 { color: var(--accent); }
.sp-game-row-thumb { width: 42px; height: 42px; border-radius: var(--radius); background: var(--bg-elevated); object-fit: cover; flex-shrink: 0; }
.sp-game-row-info { flex: 1; min-width: 0; width: 0; }
.sp-game-row-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-game-row-owner { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-game-row-stats { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.sp-game-row-stat { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.sp-game-row-stat svg { width: 12px; height: 12px; }
.sp-game-row-playing { color: var(--green); }
.sp-game-row-liked { color: var(--accent); }

/* Pagination */
.sp-pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 16px; }
.sp-page-btn {
  padding: 7px 13px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); transition: all 0.15s;
}
.sp-page-btn:hover { border-color: var(--border-hover); color: var(--text-secondary); }
.sp-page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.sp-page-btn:disabled { opacity: 0.3; cursor: default; }

.sp-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 14px; }

/* ---- MOBILE (GLOBAL) ---- */
@media (max-width: 768px) {
  body { overflow-x: hidden; }
  .header { padding: 0 16px; }
  .search-section { padding: 28px 16px 20px; }
  .search-title { font-size: 22px; }
  .search-subtitle { font-size: 13px; margin-bottom: 20px; }
  .search-input { height: 44px; font-size: 14px; padding: 0 16px 0 40px; }
  .search-icon { left: 14px; width: 16px; height: 16px; }
  .content { padding: 0 16px 40px; }
  .lb-section { margin-bottom: 28px; }
  .lb-grid { grid-template-columns: 1fr; gap: 8px; }
  .auth-dropdown { right: 16px; min-width: 200px; }
  .game-card { padding: 8px 12px; gap: 10px; }
  .game-thumb { width: 38px; height: 38px; }
  .game-rank { width: 20px; font-size: 12px; }
  .game-name { font-size: 12px; }
  .game-owner { font-size: 10px; }
  .game-meta { font-size: 10px; gap: 6px; }
  .game-stat svg { width: 10px; height: 10px; }
  .lb-dashboard { grid-template-columns: 1fr; gap: 20px; padding: 0 16px 40px; overflow: hidden; }
  .lb-col-list { max-height: none; }

  /* Search page mobile */
  .sp-hero { padding: 24px 16px 0; }
  .sp-title { font-size: 22px; }
  .sp-subtitle { font-size: 13px; margin-bottom: 16px; }
  .sp-search-input { height: 44px; font-size: 14px; }
  .sp-search-icon { left: 14px; width: 16px; height: 16px; }
  .sp-filters { padding: 12px 16px 0; }
  .sp-filter-pane { left: 16px; right: 16px; top: 48px; flex-direction: column; gap: 10px; padding: 12px; }
  .sp-filter-row { flex-direction: column; gap: 10px; }
  .sp-filter-group { width: 100%; }
  .sp-filter-sep { width: 100%; height: 1px; }
  .sp-pills { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .sp-range-input { width: 56px; }
  .sp-results { padding: 12px 16px 40px; }
  .sp-game-row { padding: 8px 10px; gap: 10px; }
  .sp-game-row-thumb { width: 36px; height: 36px; }
  .sp-game-row-name { font-size: 12px; }
  .sp-game-row-owner { font-size: 10px; }
  .sp-game-row-stats { gap: 8px; }
  .sp-game-row-stat { font-size: 10px; }

  .sidebar { width: 100%; max-width: 300px; }
  .hamburger-btn { display: flex; }
  .header-left { flex: 1; }
  .header-logo { margin: 0 auto; position: absolute; left: 50%; transform: translateX(calc(-50% - 18px)); }

  /* hide filter icon on mobile, put filter text somewhere else? no, keep it visible but small */
}

/* Desktop sidebar always visible */
@media (min-width: 769px) {
  .sidebar { transform: translateX(0); }
  .sidebar-overlay { display: none !important; }
  .hamburger-btn { display: none; }
  .sidebar-close { display: none; }
  .header-logo { display: none; }
  .header { display: none; }
  .page-main { margin-left: 260px; }
  .sidebar-account { display: flex; align-items: center; gap: 12px; }
  .sidebar-account .auth-dropdown {
    position: absolute; bottom: calc(100% + 8px); left: 12px; right: 12px;
    top: auto;
  }
}

/* Hide sidebar logo on mobile (header shows it instead) */
@media (max-width: 768px) {
  .sidebar-logo { display: none; }
}

/* ---- SIGNED IN NAV ---- */
.user-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  transition: background 0.15s, color 0.15s; width: 100%;
}
.user-menu-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.user-menu-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.user-menu-item.danger { color: var(--red); }
.user-menu-item.danger:hover { background: rgba(239,68,68,0.1); }

/* ---- GAME DROPDOWN ---- */
.game-drop {
  display: none; position: absolute; z-index: 80;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5); overflow: hidden;
}
.game-drop.open { display: flex; flex-direction: column; }
.game-drop-thumb {
  width: 100%; height: 160px; object-fit: contain;
  background: var(--bg-elevated);
}
.game-drop.open-sm { display: flex; flex-direction: column; }
.game-drop.open-sm .game-drop-thumb { display: none; }
.game-drop-body { padding: 14px; }
.game-drop-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-drop-creator { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.game-drop-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; max-height: 72px; overflow-y: auto; }
.game-drop-actions { display: flex; gap: 8px; }
.game-drop-play {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  background: var(--green); color: #fff; font-size: 13px; font-weight: 600;
  text-decoration: none; transition: background 0.15s; white-space: nowrap;
}
.game-drop-play:hover { background: #16a34a; }
.game-drop-copy {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.game-drop-copy:hover { border-color: var(--border-hover); color: var(--text-primary); }

/* ---- TERMS OF SERVICE ---- */
.tos-section { max-width: var(--max-w); margin: 0 auto; padding: 48px 24px 32px; }
.tos-title { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 4px; }
.tos-date { font-size: 13px; color: var(--text-muted); margin-bottom: 32px; }
.tos-body h2 { font-size: 16px; font-weight: 700; margin: 24px 0 8px; }
.tos-body p { font-size: 14px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 8px; }
.tos-body a { color: var(--accent); text-decoration: none; }
.tos-body a:hover { text-decoration: underline; }
