﻿/* ============================================
   APERITY - MODERN DESIGN SYSTEM
   Premium, playful, and immersive UI
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');


/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
  /* Typography */
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Colors - Dark Theme */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(20, 20, 30, 0.7);
  --bg-card-hover: rgba(30, 30, 45, 0.8);

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);

  /* Accent Colors */
  --accent-primary: #8b5cf6;
  --accent-secondary: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 50%, #ec4899 100%);

  /* Game Colors */
  --game-undercover: #ef4444;
  --game-palmier: #22c55e;
  --game-neverhave: #3b82f6;
  --game-roulette: #f97316;
  --game-auctions: #eab308;
  --game-quiz: #a855f7;
  --game-liar: #ec4899;
  --game-blindtest: #06b6d4;
  --game-mostlikely: #8b5cf6;
  --game-timesup: #f97316;
  --game-limitelimite: #e11d48;
  --game-petitbac: #10b981;
  --game-bombparty: #f59e0b;
  --game-pictionary: #f472b6;
  --game-devinetete: #e879f9;
  --game-unanimo: #f59e0b;
  --game-vendetta: #dc2626;
  --game-contrario: #14b8a6;
  --game-bang: #d97706;
  --game-tierlist: #8b5cf6;
  --game-horserace: #059669;
  --game-blackjack: #dc2626;
  --game-jugement: #f97316;
  --game-oracle: #8b5cf6;
  --game-clocktower: #7c2d12;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: 20px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);

  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}


/* ============================================
   BASE STYLES
   ============================================ */
* {
  box-sizing: border-box;
}

body.modern-theme {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Animated Gradient Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
    var(--bg-primary);
  animation: bgPulse 15s ease-in-out infinite;
}

@keyframes bgPulse {
  0%, 100% { background-position: 0% 0%, 100% 100%, 50% 50%; }
  50% { background-position: 20% 40%, 80% 60%, 30% 70%; }
}

/* Floating Particles */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 25s; }
.particle:nth-child(2) { left: 20%; animation-delay: -5s; animation-duration: 20s; }
.particle:nth-child(3) { left: 30%; animation-delay: -10s; animation-duration: 28s; }
.particle:nth-child(4) { left: 40%; animation-delay: -15s; animation-duration: 22s; }
.particle:nth-child(5) { left: 50%; animation-delay: -2s; animation-duration: 26s; }
.particle:nth-child(6) { left: 60%; animation-delay: -8s; animation-duration: 24s; }
.particle:nth-child(7) { left: 70%; animation-delay: -12s; animation-duration: 21s; }
.particle:nth-child(8) { left: 80%; animation-delay: -6s; animation-duration: 27s; }
.particle:nth-child(9) { left: 90%; animation-delay: -18s; animation-duration: 23s; }

@keyframes float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}


/* ============================================
   LANDING PAGE (index.html)
   ============================================ */
.landing-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem;
  overflow-x: hidden;
}

.landing-exit {
  animation: landingExit 0.4s ease-in forwards;
}

@keyframes landingExit {
  to { opacity: 0; transform: translateY(-40px) scale(0.97); }
}

.landing-content {
  text-align: center;
  animation: landingEnter 0.8s ease-out;
  width: 100%;
  max-width: 480px;
}

@keyframes landingEnter {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Logo */
.landing-logo { margin-bottom: 1rem; }

.landing-logo-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 0.5rem;
  animation: logoBounce 2s ease-in-out infinite;
}

@keyframes logoBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.landing-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin: 0;
}

.landing-tagline {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--text-secondary);
  margin: 0.75rem auto 2rem;
  max-width: 400px;
  line-height: 1.5;
}

/* Scrolling game ribbon */
.landing-game-ribbon {
  width: 100%;
  overflow: hidden;
  margin: 0 auto 2.5rem;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.landing-ribbon-track {
  display: flex;
  gap: 1rem;
  animation: ribbonScroll 40s linear infinite;
  width: max-content;
}

.landing-ribbon-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  padding: 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2rem;
  transition: background 0.3s, border-color 0.3s;
}

.landing-ribbon-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.landing-ribbon-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.landing-ribbon-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

@keyframes ribbonScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Input form */
.landing-form { width: 100%; }

.landing-input-wrap {
  display: flex;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 0.35rem;
  transition: var(--transition-normal);
}

.landing-input-wrap:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.landing-input-wrap.error {
  border-color: var(--game-undercover);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.landing-input {
  flex: 1;
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
  font-family: var(--font-body);
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  min-width: 0;
}

.landing-input::placeholder { color: var(--text-muted); }

.landing-submit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-full);
  color: white;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-normal);
  white-space: nowrap;
  flex-shrink: 0;
}

.landing-submit:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-glow);
}

.landing-submit:active { transform: scale(0.98); }

.landing-submit-arrow {
  transition: transform 0.2s;
}

.landing-submit:hover .landing-submit-arrow {
  transform: translateX(3px);
}

.landing-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Emoji picker on landing page */
.landing-emoji-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.landing-emoji-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
  font-weight: 500;
}

.landing-emoji-preview {
  font-size: 2.5rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(251, 191, 36, 0.4);
  border-radius: 50%;
  margin-bottom: 0.75rem;
  transition: transform 0.2s ease;
}

.landing-emoji-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  max-width: 360px;
}

.landing-emoji-btn {
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.landing-emoji-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.15);
}

.landing-emoji-active {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
}

/* Floating decorative icons */
.landing-floating-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.landing-float-icon {
  position: absolute;
  font-size: 2rem;
  opacity: 0.12;
  left: var(--x);
  top: var(--y);
  animation: floatIcon 6s ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(10deg); }
}

/* Landing page responsive */
@media (max-width: 480px) {
  .landing-ribbon-item {
    padding: 0.3rem 0.65rem;
    gap: 0.35rem;
  }
  .landing-ribbon-icon {
    font-size: 1.1rem;
  }
  .landing-ribbon-name {
    font-size: 0.7rem;
  }
  .landing-emoji-grid {
    max-width: 300px;
  }
  .landing-emoji-btn {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }
  .landing-emoji-preview {
    font-size: 2rem;
    width: 48px;
    height: 48px;
  }
}


/* ============================================
   HUB PAGE (menu.html)
   ============================================ */
.hub-page {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
  padding-bottom: 2rem;
}

/* Sticky header */
.hub-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.hub-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hub-logo { font-size: 1.5rem; }

.hub-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hub-header-right {
  display: flex;
  align-items: center;
}

.hub-player-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
}

.hub-player-icon { font-size: 0.85rem; }
.hub-player-name { color: var(--text-primary); font-weight: 500; }

.hub-player-edit {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  opacity: 0.5;
  transition: opacity 0.2s;
  padding: 0 0.15rem;
}

.hub-player-edit:hover { opacity: 1; }

/* Inline name editor */
.hub-name-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(10, 10, 15, 0.9);
  border-bottom: 1px solid var(--glass-border);
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hub-name-input {
  flex: 1;
  padding: 0.6rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
}

.hub-name-input:focus { border-color: var(--accent-primary); }

.hub-name-save,
.hub-name-cancel {
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.hub-name-save { background: var(--accent-primary); color: white; }

/* Emoji picker dans l'éditeur de pseudo */
.hub-emoji-picker { width: 100%; }
.hub-emoji-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  max-width: 340px;
  margin: 0 auto;
  padding: 0.4rem 0;
}
.hub-emoji-btn {
  font-size: 1.3rem;
  width: 36px;
  height: 36px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.hub-emoji-btn:hover { background: rgba(255,255,255,0.12); transform: scale(1.15); }
.hub-emoji-selected { border-color: #fbbf24; background: rgba(251,191,36,0.15); }

/* Émojis secrets — glow doré animé */
.landing-emoji-secret,
.hub-emoji-secret {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.08);
  animation: secret-glow 2s ease-in-out infinite;
}
@keyframes secret-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(251, 191, 36, 0.3); }
  50% { box-shadow: 0 0 12px rgba(251, 191, 36, 0.6); }
}

/* Toast de déblocage */
.secret-toast {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.15));
  border: 1px solid rgba(251, 191, 36, 0.4);
  backdrop-filter: blur(12px);
  color: #fbbf24;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 0.95rem;
  z-index: 10000;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
  pointer-events: none;
  white-space: nowrap;
}
.secret-toast-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.secret-toast-emoji {
  font-size: 1.3rem;
  margin-right: 0.3rem;
}

.hub-name-cancel {
  background: var(--glass-bg);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

/* Search bar */
.hub-search {
  padding: 0.75rem 1.25rem 0;
  box-sizing: border-box;
}

.hub-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.75rem;
  transition: var(--transition-normal);
}

.hub-search-wrap:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.hub-search-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
  opacity: 0.5;
}

.hub-search-input {
  flex: 1;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  font-family: var(--font-body);
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  min-width: 0;
}

.hub-search-input::placeholder {
  color: var(--text-muted);
}

.hub-search-clear {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.hub-search-clear:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

/* No results message */
.hub-no-results {
  text-align: center;
  padding: 3rem 1.5rem;
  animation: hubFadeIn 0.3s ease;
}

@keyframes hubFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hub-no-results-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.75rem;
  opacity: 0.3;
}

.hub-no-results-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 0.25rem;
}

.hub-no-results-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.hub-no-results-btn {
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-normal);
}

.hub-no-results-btn:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-1px);
}

/* Filter bar */
.hub-filters {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.25rem 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.hub-filters::-webkit-scrollbar { display: none; }

.hub-filter-tag {
  flex-shrink: 0;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.hub-filter-tag:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.hub-filter-tag.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

/* Game cards grid */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  padding: 0.75rem 1.25rem;
}

.hub-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s ease;
  aspect-ratio: 3 / 4;
  animation: cardStagger 0.5s ease-out both;
}

.hub-card:nth-child(1)  { animation-delay: 0ms; }
.hub-card:nth-child(2)  { animation-delay: 60ms; }
.hub-card:nth-child(3)  { animation-delay: 120ms; }
.hub-card:nth-child(4)  { animation-delay: 180ms; }
.hub-card:nth-child(5)  { animation-delay: 240ms; }
.hub-card:nth-child(6)  { animation-delay: 300ms; }
.hub-card:nth-child(7)  { animation-delay: 360ms; }
.hub-card:nth-child(8)  { animation-delay: 420ms; }
.hub-card:nth-child(9)  { animation-delay: 480ms; }
.hub-card:nth-child(10) { animation-delay: 540ms; }

@keyframes cardStagger {
  from { opacity: 0; transform: translateY(30px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hub-card-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(var(--card-rgb), 0.25) 0%,
    rgba(var(--card-rgb), 0.08) 50%,
    rgba(0, 0, 0, 0.4) 100%
  );
  border: 1px solid rgba(var(--card-rgb), 0.2);
  border-radius: inherit;
  transition: var(--transition-normal);
}

.hub-card-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(var(--card-rgb), 0.4),
    transparent 70%
  );
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.hub-card:hover .hub-card-glow,
.hub-card.active .hub-card-glow {
  opacity: 1;
}

.hub-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 1.25rem 0.75rem;
  text-align: center;
}

.hub-card-icon {
  font-size: 2.75rem;
  margin-bottom: 0.6rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.35s ease;
}

.hub-card:hover .hub-card-icon {
  transform: scale(1.15) translateY(-4px);
}

.hub-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin: 0 0 0.2rem;
}

.hub-card-tagline {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hub-card-meta {
  margin-top: auto;
  padding-top: 0.6rem;
}

.hub-card-players {
  font-size: 0.7rem;
  color: rgb(var(--card-rgb));
  background: rgba(var(--card-rgb), 0.15);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* Active/selected card */
.hub-card.active {
  transform: scale(1.03);
  box-shadow: 0 0 30px rgba(var(--card-rgb), 0.3),
              0 10px 40px rgba(0, 0, 0, 0.4);
}

.hub-card.active .hub-card-bg {
  border-color: rgba(var(--card-rgb), 0.5);
}

.hub-card-beta {
  position: absolute;
  top: 10px;
  right: -28px;
  z-index: 5;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 32px;
  transform: rotate(35deg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
  pointer-events: none;
}

.hub-card.filtered-out {
  display: none;
}


/* ============================================
   BOTTOM SHEET / MODAL
   ============================================ */
.hub-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.hub-sheet-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.hub-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

.hub-sheet.open {
  transform: translateY(0);
}

.hub-sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 0.75rem auto;
}

.hub-sheet-content {
  padding: 0 1.5rem 2rem;
}

.hub-sheet-game-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.hub-sheet-icon {
  font-size: 2.25rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--sheet-rgb), 0.15);
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}

.hub-sheet-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.hub-sheet-tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.1rem 0 0;
}

.hub-sheet-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.hub-sheet-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.hub-sheet-tag {
  padding: 0.25rem 0.65rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Drink mode selector */
.hub-drink-mode {
  margin-bottom: 1rem;
}

.hub-drink-mode-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.4rem;
}

.hub-drink-mode-btns {
  display: flex;
  gap: 0.5rem;
}

.hub-drink-mode-btn {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.hub-drink-mode-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hub-drink-mode-btn.selected {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  font-weight: 600;
}

/* Action buttons */
.hub-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hub-action-create {
  width: 100%;
  padding: 0.9rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.hub-action-create::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.hub-action-create:hover::before { left: 100%; }

.hub-action-create:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.hub-action-create:active { transform: translateY(0); }

.hub-action-create:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.hub-action-join {
  width: 100%;
  padding: 0.9rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-normal);
}

.hub-action-join:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* Join code input */
.hub-join-section {
  animation: slideDown 0.2s ease-out;
  margin-bottom: 1rem;
}

.hub-join-input-wrap {
  display: flex;
  gap: 0.5rem;
}

.hub-join-input {
  flex: 1;
  padding: 0.8rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-align: center;
  outline: none;
}

.hub-join-input:focus { border-color: var(--accent-primary); }

.hub-join-go {
  padding: 0.8rem 1.25rem;
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.hub-join-go:hover { background: #7c3aed; }

/* Lobby list in sheet */
.hub-lobbies-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.hub-lobbies-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 0.75rem;
}

.hub-lobby-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.hub-lobby-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.hub-lobby-code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.hub-lobby-players {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hub-lobby-join {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.82rem;
  font-family: var(--font-display);
}

/* Created success block */
.hub-created {
  text-align: center;
  animation: slideDown 0.3s ease-out;
}

.hub-created-code {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  padding: 1rem;
  background: var(--glass-bg);
  border: 2px dashed var(--accent-primary);
  border-radius: var(--radius-lg);
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.2); }
  50% { box-shadow: 0 0 30px rgba(139, 92, 246, 0.4); }
}

.hub-created-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hub-action-enter {
  width: 100%;
  padding: 0.9rem;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-normal);
}

.hub-action-enter:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.hub-sheet-status {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  min-height: 1.2em;
}

.hub-sheet-status.error { color: var(--game-undercover); }
.hub-sheet-status.success { color: var(--game-palmier); }

.hub-sheet-lobbies { margin-bottom: 0.75rem; }


/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
@media (min-width: 640px) {
  .hub-grid {
    grid-template-columns: repeat(3, 1fr);
    padding: 0.75rem 2rem;
    gap: 1.25rem;
  }

  .hub-card { aspect-ratio: 4 / 5; }
  .hub-filters { padding: 1rem 2rem 0.5rem; }
  .hub-header { padding: 0.75rem 2rem; }
  .hub-search { padding: 0.75rem 2rem 0; }
  .hub-no-results { padding: 3rem 2rem; }
}

@media (min-width: 1024px) {
  .hub-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 960px;
    margin: 0 auto;
    gap: 1.5rem;
    padding: 0.75rem 0;
  }

  .hub-card { aspect-ratio: 3 / 4; }

  .hub-header {
    max-width: 960px;
    margin: 0 auto;
    border-bottom: none;
    background: transparent;
    backdrop-filter: none;
    position: relative;
  }

  .hub-filters {
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 0 0.5rem;
  }

  .hub-search {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.75rem 0 0;
  }

  .hub-no-results {
    max-width: 960px;
    margin: 0 auto;
  }

  /* Desktop: bottom sheet becomes centered modal */
  .hub-sheet {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    pointer-events: none;
    max-width: 520px;
    width: 90vw;
    max-height: 80vh;
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .hub-sheet.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
  }
}


/* ============================================
   GAME PAGE — FULL-SCREEN IMMERSIVE LAYOUT
   Mobile-first design with bottom nav + sheets
   ============================================ */

/* Game page layout — full screen */
.game-page-container {
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}

/* Lobby Container — full screen app shell (keeps class for inline override selectors) */
.lobby-container {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100%;
  max-width: none;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  overflow: hidden;
  animation: none;
}

/* ---- GP HEADER ---- */
.gp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 52px;
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  gap: 0.5rem;
}

.gp-header-back {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  padding: 0.4rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gp-header-back:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.gp-header-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* WS connection indicator */
.ws-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  transition: background 0.3s ease;
}
.ws-indicator.ws-connected {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}
.ws-indicator.ws-disconnected {
  background: #ef4444;
  animation: ws-pulse 1.5s ease-in-out infinite;
}
@keyframes ws-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* WS reconnection overlay */
.ws-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ws-overlay-in 0.3s ease;
}
@keyframes ws-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ws-overlay-content {
  text-align: center;
  padding: 2rem;
  max-width: 320px;
}
.ws-overlay-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.2rem;
  border: 3px solid rgba(139, 92, 246, 0.2);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: ws-spin 0.8s linear infinite;
}
@keyframes ws-spin {
  to { transform: rotate(360deg); }
}
.ws-overlay-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary, #fff);
  margin-bottom: 0.5rem;
}
.ws-overlay-text {
  font-size: 0.9rem;
  color: var(--text-secondary, rgba(255,255,255,0.7));
  margin-bottom: 1.2rem;
}
.ws-overlay-btn {
  padding: 0.7rem 1.6rem;
  border: none;
  border-radius: 12px;
  background: #8b5cf6;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.ws-overlay-btn:hover {
  background: #7c3aed;
}

.gp-header-code {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gp-header-copy {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.gp-header-copy:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.gp-header-game {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

/* ---- GP PLAYERS BAR ---- */
.gp-players-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--glass-border);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 0;
}

.gp-players-bar::-webkit-scrollbar {
  display: none;
}

.gp-player-count {
  background: var(--accent-primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  font-family: var(--font-display);
}

.gp-player-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 48px;
  flex-shrink: 0;
}

.gp-player-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  position: relative;
  transition: var(--transition-fast);
}

.gp-player-avatar.is-me {
  box-shadow: 0 0 0 2.5px var(--accent-primary);
}

.gp-player-avatar.is-offline {
  opacity: 0.35;
  filter: grayscale(0.5);
}

/* Emoji dans les avatars — taille ajustée */
.gp-player-avatar.has-emoji { font-size: 1.25rem; }
.gp-drink-avatar.has-emoji { font-size: 1.15rem; }
.gp-chat-avatar.has-emoji { font-size: 1.1rem; }

.gp-player-name {
  font-size: 0.65rem;
  color: var(--text-muted);
  max-width: 52px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  text-align: center;
  font-family: var(--font-body);
}

.gp-player-host-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  font-size: 0.55rem;
  line-height: 1;
}

/* ---- GP CONTENT ---- */
.gp-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
  padding-bottom: 80px; /* space for bottom nav */
}

/* Spacing for direct children inside gp-content */
.gp-content > * + * {
  margin-top: 0.75rem;
}

/* ---- GP BOTTOM NAV ---- */
.gp-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.gp-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  color: var(--text-muted);
  font-size: 0.6rem;
  font-family: var(--font-body);
  font-weight: 500;
  background: none;
  border: none;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.gp-nav-btn:active {
  transform: scale(0.92);
}

.gp-nav-btn.active {
  color: var(--accent-primary);
}

.gp-nav-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.gp-nav-label {
  line-height: 1;
}

.gp-nav-badge {
  position: absolute;
  top: 0;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.gp-nav-badge.visible {
  display: flex;
}

.gp-nav-btn.host-only {
  display: none;
}

.gp-nav-btn.host-only.show {
  display: flex;
}

/* ---- GP BOTTOM SHEETS ---- */
.gp-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.gp-sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.gp-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 75vh;
  background: rgba(18, 18, 28, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 201;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
  padding: 0 1rem 2rem;
}

.gp-sheet.open {
  transform: translateY(0);
}

.gp-sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  margin: 0.75rem auto 0.5rem;
}

.gp-sheet-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Rules sheet */
.gp-rules-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}
.gp-rules-icon {
  font-size: 2rem;
  line-height: 1;
}
.gp-rules-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}
.gp-rules-desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
  padding: 0 0.25rem;
}
.gp-rules-section {
  margin-bottom: 1rem;
}
.gp-rules-subtitle {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}
.gp-rules-steps {
  margin: 0;
  padding-left: 1.4rem;
  list-style: decimal;
}
.gp-rules-steps li {
  margin-bottom: 0.3rem;
}
.gp-rules-list {
  margin: 0;
  padding-left: 1.2rem;
  list-style: disc;
}
.gp-rules-list li {
  margin-bottom: 0.25rem;
}
.gp-rules-note {
  margin: 0.3rem 0 0;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid rgba(139, 92, 246, 0.5);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}


/* ============================================
   GAME COMPONENTS — DARK THEME
   Buttons, cards, banners, lists, etc.
   ============================================ */

.banner {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  margin: 0.75rem 0 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

h3.section-title-old {
  margin-top: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-primary);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.lobby-container h1,
.lobby-container h2,
.lobby-container h3 {
  margin: 0 0 0.5rem;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.lobby-container label {
  font-weight: 600;
  color: var(--text-secondary);
}

.lobby-container input,
.lobby-container button,
.lobby-container select,
.lobby-container textarea {
  font: inherit;
}

.field {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.field input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: var(--font-body);
}

.field input::placeholder {
  color: var(--text-muted);
}

.field input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.btn {
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.btn:disabled:active,
.btn[disabled]:active {
  transform: none;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn.success {
  background: rgba(16, 185, 129, 0.8);
  border-color: rgba(16, 185, 129, 0.6);
  color: #fff;
}

.btn.success:hover {
  background: #10b981;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn.danger {
  background: rgba(220, 38, 38, 0.8);
  border-color: rgba(220, 38, 38, 0.6);
  color: #fff;
}

.btn.danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-sm {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.btn:active {
  transform: translateY(1px);
}

.inline-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.list {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin: 1rem 0;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  max-height: none;
  overflow: visible;
}

.list-item {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
}

.list-item:not(:last-child) {
  border-bottom: 1px solid var(--glass-border);
}

.list-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.wheel-wrap {
  position: relative;
  margin: 1.5rem auto;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 280px;
  height: 280px;
}

.wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(139, 92, 246, 0.2);
  transition: transform 4s cubic-bezier(0.2, 0.8, 0.1, 1);
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 24px solid #fbbf24;
  z-index: 10;
  filter: drop-shadow(0 2px 6px rgba(251, 191, 36, 0.5));
}

.wheel-center-knob {
  position: absolute;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 5;
}

.auctions-leaderboard .list-item {
  justify-content: space-between;
}

.badge {
  background: var(--accent-primary);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.muted {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.chip.offline {
  opacity: 0.5;
  border-style: dashed;
}

.row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .card {
    padding: 1.25rem;
    width: min(520px, 96vw);
  }

  .field {
    flex-direction: column;
    align-items: stretch;
  }

  .field input,
  .field select,
  .field textarea {
    width: 100%;
  }
}

.players {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}

.chat {
  margin-top: 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  max-height: 150px;
  overflow-y: auto;
}

.chat-entry {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}


/* Gambling UI */
/* Legacy gambling classes removed — replaced by .gmb-* prefix */

/* ============================================
   FEEDBACK MODAL
   ============================================ */

.fb-float-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 50;
  transition: var(--transition-normal);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fb-float-btn:hover {
  transform: scale(1.1);
  background: rgba(139, 92, 246, 0.35);
  box-shadow: 0 6px 28px rgba(139, 92, 246, 0.4);
}

.fb-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fb-modal {
  max-width: 480px;
  width: 92%;
  animation: modal-pop 0.3s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}

.fb-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem;
}

.fb-subtitle {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.fb-field {
  margin-bottom: 1rem;
}

.fb-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.fb-required { color: #f87171; }
.fb-optional { color: var(--text-muted); font-weight: 400; text-transform: none; letter-spacing: normal; }

.fb-cat-btns {
  display: flex;
  gap: 0.5rem;
}

.fb-cat-btn {
  flex: 1;
  padding: 0.6rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.fb-cat-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.fb-cat-btn.selected {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
  color: #c4b5fd;
}

.fb-textarea,
.fb-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  box-sizing: border-box;
}

.fb-textarea {
  resize: vertical;
  min-height: 80px;
}

.fb-textarea::placeholder,
.fb-input::placeholder {
  color: var(--text-muted);
}

.fb-textarea:focus,
.fb-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.fb-char-count {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.fb-status {
  text-align: center;
  font-size: 0.85rem;
  min-height: 1.2em;
  margin: 0.5rem 0;
  color: var(--text-muted);
}

.fb-status.error { color: #f87171; }
.fb-status.success { color: #4ade80; }

.fb-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.fb-cancel-btn,
.fb-submit-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.fb-cancel-btn {
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.fb-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.fb-submit-btn {
  border: 1px solid rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
}

.fb-submit-btn:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.5);
  color: #fff;
}

.fb-submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================
   ADMIN PAGE
   ============================================ */

.admin-login { min-height: 100vh; }

.admin-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-stat-card {
  flex: 1;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  text-align: center;
}

.admin-stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-filter-group {
  display: flex;
  gap: 0.4rem;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-card {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.admin-card.unread {
  border-left: 3px solid #fbbf24;
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.admin-card-cat {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.admin-card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.admin-card-message {
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 0.5rem;
  white-space: pre-wrap;
}

.admin-card-email,
.admin-card-page {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.15rem 0;
}

.admin-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.admin-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

@media (max-width: 480px) {
  .admin-filters { flex-direction: column; }
  .admin-card-header { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
  .admin-card-actions { flex-direction: column; }
}

