/* ==========================================================================
   GAME NIGHT RANKER — Production-Grade Design System
   Clean, Restrained, Dark Mode (De-Sloppified)
   ========================================================================== */

:root {
  /* Restrained Neutral Dark Palette */
  --bg-primary: #0d0f12;
  --bg-secondary: #111318;
  --bg-card: #181b22;
  --bg-card-hover: #1f232c;
  --bg-input: #12141a;
  --bg-elevated: #222631;

  /* Single Purposeful Accent Color */
  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-primary-active: #1d4ed8;
  --accent-primary-subtle: rgba(59, 130, 246, 0.12);
  --accent-primary-border: rgba(59, 130, 246, 0.35);

  /* Semantic Status Colors (Subtle & Restrained) */
  --status-success: #10b981;
  --status-success-subtle: rgba(16, 185, 129, 0.12);
  --status-danger: #ef4444;
  --status-danger-subtle: rgba(239, 68, 68, 0.12);
  --status-warning: #f59e0b;
  --status-warning-subtle: rgba(245, 158, 11, 0.12);

  /* High-Contrast Typography */
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  /* Crisp 1px Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-active: var(--accent-primary);

  /* Typography (Native System UI Font Stack) */
  --font-display: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Monaco, Consolas, monospace;

  /* Radii & Shadows */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
}

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

html {
  color-scheme: dark;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utility: SVG Icons */
.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-brand {
  color: var(--accent-primary);
}

.btn .icon {
  margin-right: 2px;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   APP HEADER
   ========================================================================== */

.app-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(13, 15, 18, 0.94);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 0;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.back-home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.back-home-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--border-hover);
}

.title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  line-height: 1;
}

.breadcrumbs-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-hub-link {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-hub-link:hover {
  color: var(--accent-primary);
}

.breadcrumb-separator {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.breadcrumb-board-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-muted);
}

.logo-subtitle {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Creator Mode Badge in header */
.creator-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #facc15;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.3px;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.1);
}

.creator-badge .badge-dot {
  width: 6px;
  height: 6px;
  background: #facc15;
  border-radius: 50%;
  box-shadow: 0 0 6px #facc15;
}

/* Live WebSocket status */
.live-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-dim);
}

.live-status-pill.connected {
  color: var(--status-success);
  background: var(--status-success-subtle);
  border-color: rgba(16, 185, 129, 0.2);
}

.live-status-pill.connected .status-dot {
  background-color: var(--status-success);
}

/* User Identity Badge */
.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
}

.user-badge:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-label {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.edit-name-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  transition: color 0.15s ease;
}

.edit-name-btn:hover {
  color: var(--text-main);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.25;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

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

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-hover);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 11px 22px;
  font-size: 0.95rem;
}

.full-width {
  width: 100%;
}

.btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Main Content Area */
.main-content {
  padding: 16px 20px 48px;
}

/* ==========================================================================
   1. LANDING PAGE VIEW
   ========================================================================== */

.landing-hero {
  text-align: center;
  padding: 44px 20px 28px;
  max-width: 760px;
  margin: 0 auto;
}

.landing-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 14px;
}

.landing-subhead {
  color: var(--text-muted);
  font-size: clamp(0.92rem, 1.8vw, 1.05rem);
  line-height: 1.6;
  margin-bottom: 24px;
}

.landing-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 32px 0 44px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color 0.15s ease;
}

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

.feature-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.feature-text {
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

/* ==========================================================================
   RECENT GAME NIGHTS TICKER (Compact, Centered, Single-Row Marquee)
   ========================================================================== */

.recent-ticker-section {
  margin: 28px auto 40px;
  max-width: 960px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ticker-header-centered {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ticker-live-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--status-success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulseDot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.ticker-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 6px 0;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  will-change: transform;
  animation: tickerSlide 35s linear infinite;
  user-select: none;
}

.ticker-container:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes tickerSlide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  color: var(--text-main);
  white-space: nowrap;
  pointer-events: none;
  cursor: default;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  flex-shrink: 0;
}

.ticker-title {
  font-weight: 500;
  color: var(--text-main);
}

.ticker-time {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  padding-left: 2px;
}

/* ==========================================================================
   WORKFLOW DEMONSTRATION (Auto-Playing, Crisp GIF-Style Looping UI Mockup)
   ========================================================================== */

.demo-workflow-section {
  margin: 10px auto 60px;
  max-width: 880px;
  width: 100%;
}

.demo-header-centered {
  text-align: center;
  margin-bottom: 24px;
}

.demo-badge-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
  background: var(--accent-primary-subtle);
  border: 1px solid var(--accent-primary-border);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.demo-heading {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.demo-subheading {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
}

.demo-window-container {
  background: #111318;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
}

/* Window Bar */
.demo-window-bar {
  background: #161920;
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.demo-window-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.control-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.demo-url-bar {
  flex: 1;
  max-width: 440px;
  background: #0d0f14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.icon-lock {
  color: var(--text-dim);
}

.demo-url-text {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-window-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  background: var(--accent-primary-subtle);
  padding: 3px 8px;
  border-radius: 4px;
}

.demo-pulse-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  animation: pulseDot 1.5s infinite;
}

/* Viewport */
.demo-viewport {
  position: relative;
  min-height: 380px;
  background: var(--bg-primary);
  overflow: hidden;
  user-select: none;
}

/* Simulated Cursor */
.demo-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  z-index: 100;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translate(650px, 320px);
}

.cursor-click-ring {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.4);
}

.cursor-click-ring.animating {
  animation: clickRingPulse 0.45s ease-out forwards;
}

@keyframes clickRingPulse {
  0% { opacity: 0.9; transform: scale(0.4); }
  100% { opacity: 0; transform: scale(2.2); }
}

/* Demo Scenes */
.demo-scene {
  position: absolute;
  inset: 0;
  padding: 24px;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.demo-scene.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
}

/* Scene 1: Landing */
.demo-scene-landing {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
}

.demo-hero-content {
  text-align: center;
  max-width: 480px;
}

.demo-pill-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-primary);
  background: var(--accent-primary-subtle);
  border: 1px solid var(--accent-primary-border);
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.demo-hero-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.demo-hero-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.demo-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.demo-btn-primary.demo-active {
  transform: scale(0.94);
  background: var(--accent-primary-hover);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* Scene 2: Squad Room */
.demo-scene-room {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.demo-room-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demo-room-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-room-icon {
  font-size: 1.4rem;
  width: 32px;
  height: 32px;
  background: var(--bg-elevated);
  border-radius: 6px;
  display: grid;
  place-items: center;
}

.demo-room-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.demo-room-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.demo-room-share {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.72rem;
}

.demo-share-tag {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.65rem;
}

.demo-share-link {
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Search Bar in Demo */
.demo-search-wrap {
  position: relative;
}

.demo-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.demo-search-bar.demo-focused {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.demo-search-icon {
  color: var(--text-dim);
  flex-shrink: 0;
}

.demo-search-text {
  font-size: 0.85rem;
  color: var(--text-main);
  font-weight: 500;
}

.demo-search-caret {
  width: 2px;
  height: 16px;
  background: var(--accent-primary);
  display: inline-block;
  animation: blinkCaret 0.8s infinite;
  margin-left: 1px;
}

.demo-search-caret.hidden {
  display: none;
}

@keyframes blinkCaret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.demo-search-placeholder {
  font-size: 0.82rem;
  color: var(--text-dim);
  pointer-events: none;
}

.demo-search-placeholder.hidden {
  display: none;
}

.demo-btn-add {
  margin-left: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Autocomplete Dropdown in Demo */
.demo-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #191c24;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 50;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.demo-dropdown.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
}

.demo-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.demo-dropdown-item.demo-hover,
.demo-dropdown-item.demo-active {
  background: rgba(59, 130, 246, 0.14);
}

.demo-dropdown-thumb {
  width: 60px;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  background: #242933;
  flex-shrink: 0;
}

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

.demo-dropdown-details {
  flex: 1;
}

.demo-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 3px;
}

.demo-item-tags {
  display: flex;
  gap: 6px;
  font-size: 0.68rem;
}

.demo-tag {
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 500;
}

.tag-coop {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

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

.tag-reviews {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

/* Ranked Games List in Demo */
.demo-games-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-games-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  padding: 0 4px;
}

.demo-list-title {
  font-weight: 600;
  color: var(--text-muted);
}

.demo-user-tag {
  color: var(--text-dim);
}

.demo-user-tag strong {
  color: var(--text-main);
}

/* The Snapping Game Card */
.demo-game-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 14px;
  position: relative;
  transition: opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.demo-game-card.hidden {
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  pointer-events: none;
}

.demo-game-card.demo-card-highlight {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.demo-card-rank {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: #f59e0b;
  width: 24px;
  text-align: center;
}

.demo-card-thumb {
  width: 76px;
  height: 42px;
  border-radius: 5px;
  overflow: hidden;
  background: #242933;
  flex-shrink: 0;
}

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

.demo-card-content {
  flex: 1;
}

.demo-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.demo-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.demo-card-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.demo-card-score-pill.active-score {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  transform: scale(1.06);
}

.score-star {
  color: #f59e0b;
}

.demo-score-count {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 400;
}

.demo-card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.demo-badge-coop {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 500;
}

.demo-vote-strip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-vote-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 500;
}

.demo-vote-buttons {
  display: flex;
  gap: 4px;
}

.demo-vbtn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  font-size: 0.72rem;
  font-weight: 600;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
}

.demo-vbtn.demo-vbtn-hover {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.2);
  color: #fff;
}

.demo-vbtn.demo-vbtn-active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #000;
  font-weight: 700;
  transform: scale(1.12);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* Step Progress Indicator Bar Below Window */
.demo-step-indicator {
  background: #14171e;
  border-top: 1px solid var(--border-subtle);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow-x: auto;
}

.demo-step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.4;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.demo-step-item.active {
  opacity: 1;
  transform: translateY(-1px);
}

.demo-step-item .step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  transition: all 0.3s ease;
}

.demo-step-item.active .step-num {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.demo-step-item .step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.demo-step-item.active .step-label {
  color: var(--text-main);
}

.demo-step-divider {
  width: 16px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .demo-heading {
    font-size: 1.35rem;
  }
  .demo-subheading {
    font-size: 0.84rem;
  }
  .demo-window-container {
    border-radius: var(--radius-md);
  }
  .demo-viewport {
    min-height: 400px;
  }
  .demo-step-indicator {
    padding: 10px 12px;
    gap: 8px;
  }
  .demo-step-item .step-label {
    display: none;
  }
  .demo-step-divider {
    width: 10px;
  }
}

/* ==========================================================================
   2. BOARD VIEW (Hero View — Tightened Density)
   ========================================================================== */

/* Compact Board Bar */
.board-banner-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.board-banner-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-back-hub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.btn-back-hub:hover {
  color: var(--accent-primary);
}

.board-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.board-banner-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.board-page-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.board-page-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 1px;
}

.board-share-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
}

.share-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.share-input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  outline: none;
  width: 200px;
}

/* Streamlined Search Bar Section */
.propose-section {
  margin-bottom: 14px;
}

.game-input-form {
  position: relative;
  margin-bottom: 8px;
}

.input-container {
  display: flex;
  align-items: center;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 6px 4px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-container:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary);
}

.search-icon {
  color: var(--text-dim);
  margin-right: 10px;
}

.game-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.92rem;
  font-family: var(--font-body);
  outline: none;
  padding: 8px 0;
}

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

.add-btn {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  max-height: 340px;
  overflow-y: auto;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.15s ease;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: var(--bg-card-hover);
}

.item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.item-thumb {
  width: 54px;
  height: 25px;
  object-fit: cover;
  border-radius: 3px;
  background: #000;
}

.item-name {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-main);
}

.item-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-add-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: var(--accent-primary-subtle);
  padding: 2px 6px;
  border-radius: 3px;
}

/* Suggestions chips */
.suggestions-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.suggestions-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.suggestion-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  color: var(--text-main);
}

/* ==========================================================================
   ACTIVE POLL HEADER & INLINE USERNAME WIDGET
   ========================================================================== */

.poll-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.poll-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.poll-header-right {
  display: flex;
  align-items: center;
  margin-left: auto;
}

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

.poll-user-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
}

.poll-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.poll-user-pill:hover,
.poll-user-pill:focus-visible {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.18);
  outline: none;
}

.poll-user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
}

.poll-user-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.poll-user-edit-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  transition: all 0.15s ease;
}

.poll-user-pill:hover .poll-user-edit-btn {
  color: var(--accent-primary);
  transform: scale(1.1);
}

/* Inline form for 1-step rename */
.poll-user-inline-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.poll-user-inline-input {
  background: var(--bg-card);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  color: var(--text-main);
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 600;
  outline: none;
  width: 170px;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
  transition: all 0.15s ease;
}

.poll-user-inline-input:focus {
  border-color: var(--accent-primary-hover);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

.btn-inline-save,
.btn-inline-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  padding: 0;
}

.btn-inline-save {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.btn-inline-save:hover {
  background: var(--accent-primary-hover);
  transform: scale(1.05);
}

.btn-inline-cancel {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border-color: var(--border-subtle);
}

.btn-inline-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: var(--border-hover);
}

/* Toolbar & Filters */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.toolbar-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.count-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 1px 7px;
  border-radius: 100px;
}

.filter-tabs {
  display: flex;
  gap: 3px;
  background: var(--bg-card);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.filter-tab {
  background: transparent;
  border: none;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-tab:hover {
  color: var(--text-main);
}

.filter-tab.active {
  background: var(--bg-elevated);
  color: var(--text-main);
  font-weight: 600;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-input {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  color: var(--text-main);
  font-size: 0.8rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s ease;
  width: 160px;
}

.filter-input:focus {
  border-color: var(--accent-primary);
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sort-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.sort-select {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  color: var(--text-main);
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.sort-select:focus {
  border-color: var(--accent-primary);
}

/* ==========================================================================
   GAME CARDS (Clean Alignment & Tactile Voting)
   ========================================================================== */

.games-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-card {
  display: grid;
  grid-template-columns: 240px 1fr 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.game-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

/* Subtle Rank Highlight for Leader */
.game-card.rank-1 {
  border-left: 3px solid var(--status-warning);
}

/* Left: Cover Thumbnail Media */
.card-media {
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 135px;
}

.card-header-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-rank-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: rgba(13, 15, 18, 0.88);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  z-index: 2;
}

.card-rank-badge.rank-gold {
  color: var(--status-warning);
  border-color: rgba(245, 158, 11, 0.45);
}

.card-rank-badge.rank-silver {
  color: #e2e8f0;
  border-color: rgba(226, 232, 240, 0.3);
}

.card-rank-badge.rank-bronze {
  color: #fed7aa;
  border-color: rgba(254, 215, 170, 0.3);
}

.view-photos-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(13, 15, 18, 0.88);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 3px 7px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 2;
}

.view-photos-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: var(--border-hover);
}

/* Center: Game Info Column */
.card-info {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.card-title-row {
  margin-bottom: 2px;
}

.game-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 3px;
}

.game-meta-line {
  font-size: 0.74rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.meta-dot {
  font-size: 0.6rem;
  color: var(--text-dim);
}

.game-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.steam-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.steam-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.badge-positive {
  color: var(--status-success);
  border-color: rgba(16, 185, 129, 0.25);
  background: var(--status-success-subtle);
}

.badge-players {
  color: var(--text-main);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.05);
}

.badge-price {
  color: var(--text-muted);
}

.badge-tag {
  color: #93c5fd;
  border-color: var(--accent-primary-border);
  background: var(--accent-primary-subtle);
}

.card-links-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.external-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  transition: all 0.15s ease;
}

.external-link:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.05);
}

.refresh-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  transition: color 0.15s ease;
}

.refresh-btn:hover {
  color: var(--text-main);
}

.delete-game-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  margin-left: auto;
  border-radius: var(--radius-xs);
  transition: color 0.15s ease;
}

.delete-game-btn:hover {
  color: var(--status-danger);
}

/* Right: Tactile 1-10 Voting Control Column */
.card-ranking {
  background: #14161d;
  border-left: 1px solid var(--border-subtle);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.community-score-wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.score-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.score-number {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-main);
}

.score-max {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.votes-count-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Tactile Score Buttons */
.vote-module {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

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

.vote-title {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.your-score-indicator {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

.score-buttons-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  margin-bottom: 6px;
}

.score-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 0;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: center;
}

.score-btn:hover {
  background: var(--accent-primary-subtle);
  border-color: var(--accent-primary);
  color: #fff;
}

.score-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.4);
}

.vote-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.want-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
}

.want-checkbox {
  accent-color: var(--accent-primary);
  cursor: pointer;
}

/* Voters List Accordion */
.voters-details {
  border-top: 1px solid var(--border-subtle);
  padding-top: 6px;
}

.voters-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  padding: 2px 0;
}

.voters-toggle-btn:hover {
  color: var(--text-muted);
}

.voters-chevron {
  font-size: 0.65rem;
}

.voters-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  max-height: 60px;
  overflow-y: auto;
}

.voter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 1px 6px;
  font-size: 0.7rem;
}

.voter-chip-creator {
  padding-right: 4px;
}

.btn-delete-vote {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 2px;
  margin-left: 2px;
  border-radius: 2px;
  opacity: 0.6;
  transition: all 0.15s ease;
}

.btn-delete-vote:hover {
  opacity: 1;
  color: var(--status-danger);
  background: rgba(239, 68, 68, 0.15);
}

.voter-name {
  color: var(--text-main);
  font-weight: 500;
}

.voter-score-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-main);
}

.voter-ready-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--status-success);
  background: var(--status-success-subtle);
  padding: 1px 4px;
  border-radius: 2px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 44px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}

.empty-icon {
  margin-bottom: 10px;
  color: var(--text-dim);
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.84rem;
}

/* ==========================================================================
   MODALS
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 440px;
  position: relative;
  animation: modalEnter 0.2s ease-out;
}

.modal-lg {
  max-width: 500px;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  position: relative;
  margin-bottom: 16px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.close-modal-btn {
  position: absolute;
  top: -4px;
  right: -4px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s ease;
}

.close-modal-btn:hover {
  color: var(--text-main);
}

.create-ranker-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-main);
}

.required {
  color: var(--status-danger);
}

.modal-input, .modal-textarea, .modal-name-input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.9rem;
  color: var(--text-main);
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s ease;
  width: 100%;
}

.modal-input:focus, .modal-textarea:focus, .modal-name-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary);
}

.modal-textarea {
  resize: vertical;
}

.form-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.font-mono {
  font-family: var(--font-mono) !important;
}

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

.text-large {
  font-size: 1.4rem !important;
  letter-spacing: 0.25em;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.modal-actions-split {
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Celebration Modal */
.modal-celebrate {
  text-align: center;
  max-width: 440px;
}

.creator-badge-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 16px 0 20px;
  text-align: left;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-main);
}

.creator-notice-icon {
  font-size: 1.4rem;
  line-height: 1;
}

/* Squad Button & Participants Modal */
.squad-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  padding: 5px 10px;
  margin-right: 6px;
  cursor: pointer;
}

.participants-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0 10px;
}

.participant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease;
}

.participant-item:hover {
  border-color: var(--border-hover);
}

.participant-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.participant-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.participant-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.participant-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.participant-votes-count {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.btn-remove-user {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-remove-user:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: var(--status-danger);
  color: #fff;
}

.share-box-wrap {
  text-align: left;
  margin-bottom: 16px;
}

.share-box-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 5px;
}

.share-box-row {
  display: flex;
  gap: 8px;
}

.name-input-wrap {
  margin-bottom: 14px;
}

/* Screenshots Lightbox */
.screenshot-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 18px;
  max-width: 920px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.screenshot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.screenshot-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
}

.screenshot-main {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
}

.screenshot-large-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.screenshot-thumbs-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.screenshot-thumb-item {
  width: 90px;
  height: 50px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.screenshot-thumb-item:hover,
.screenshot-thumb-item.active {
  opacity: 1;
  border-color: var(--accent-primary);
}

.screenshot-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  animation: toastSlideIn 0.2s ease-out;
  max-width: 360px;
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  color: var(--accent-primary);
}

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

.toast.toast-error .toast-icon {
  color: var(--status-danger);
}

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

/* Footer */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 20px 0;
  margin-top: 36px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.portal-link {
  color: var(--text-muted);
  text-decoration: none;
}

.portal-link:hover {
  color: var(--text-main);
  text-decoration: underline;
}

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

@media (max-width: 1024px) {
  .game-card {
    grid-template-columns: 200px 1fr 290px;
  }
}

@media (max-width: 860px) {
  .game-card {
    grid-template-columns: 1fr;
  }

  .card-media {
    min-height: 160px;
    max-height: 200px;
  }

  .card-ranking {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }

  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .main-content {
    padding: 12px 14px 36px;
  }

  .score-buttons-row {
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
  }

  .poll-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .poll-header-right {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .poll-user-widget {
    width: 100%;
    justify-content: space-between;
  }

  .poll-user-pill {
    flex: 1;
    justify-content: space-between;
  }

  .poll-user-inline-form {
    width: 100%;
  }

  .poll-user-inline-input {
    flex: 1;
    width: auto;
  }

  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .filter-input {
    width: 100%;
  }

  .board-banner-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .board-banner-right {
    width: 100%;
  }

  .board-share-box {
    width: 100%;
  }

  .share-input {
    width: 100%;
  }
}

/* Form Helper Text & Privacy Checkbox */
.form-helper-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.form-group-checkbox {
  margin-top: 10px;
  margin-bottom: 2px;
}

.form-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

.form-checkbox {
  accent-color: var(--accent-primary);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* Footer Privacy Button */
.footer-privacy-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: inherit;
  font-family: inherit;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.footer-privacy-btn:hover {
  color: var(--accent-primary);
}

/* Privacy Modal Styles */
.privacy-points-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0 20px;
}

.privacy-point-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: left;
}

.privacy-point-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.privacy-point-icon {
  font-size: 1rem;
  line-height: 1;
}

.privacy-point-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.privacy-point-card code {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  padding: 1px 4px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-secondary);
}

/* Inline Style Replacements for Strict CSP compliance */
.btn-spinner.active {
  display: inline-block;
}

.toast.toast-hiding {
  opacity: 0;
  transform: translateY(10px);
}

.clipboard-temp {
  position: fixed;
  left: -999999px;
  top: -999999px;
}

.suggester-name {
  color: #fff;
}

.voter-empty-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.empty-participants-notice {
  text-align: center;
  color: var(--text-dim);
  padding: 24px 0;
  font-size: 0.8rem;
}

.participant-you-tag {
  font-size: 0.7rem;
  color: var(--accent-primary);
  font-weight: normal;
}
