/* ============================================================
   STREAMORIA – style.css
   Einzige CSS-Datei für das gesamte GamesApp-Projekt.
   Einbindung: <link rel="stylesheet" href="/css/style.css">
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────── */
:root {
  --bg-base:      #0a0e27;
  --bg-surface:   #0d1129;
  --bg-elevated:  #151830;
  --bg-card:      rgba(21, 24, 48, 0.85);
  --bg-glass:     rgba(255, 255, 255, 0.05);
  --bg-glass-md:  rgba(255, 255, 255, 0.08);

  --purple:       #7b2ff7;
  --purple-light: #9d5ff9;
  --purple-glow:  rgba(123, 47, 247, 0.4);
  --cyan:         #00d4ff;
  --cyan-light:   #5de8ff;
  --cyan-glow:    rgba(0, 212, 255, 0.35);
  --magenta:      #ff00ff;
  --magenta-glow: rgba(255, 0, 255, 0.3);
  --gold:         #ffd700;

  --text-primary:   #ffffff;
  --text-secondary: #a0a8cc;
  --text-muted:     #8090b0;
  --border:         rgba(255, 255, 255, 0.08);
  --border-bright:  rgba(255, 255, 255, 0.16);
  --border-purple:  rgba(123, 47, 247, 0.45);
  --border-cyan:    rgba(0, 212, 255, 0.35);

  --grad-primary: linear-gradient(135deg, var(--purple), var(--cyan));
  --grad-vivid:   linear-gradient(135deg, var(--purple), var(--magenta), var(--cyan));
  --grad-text:    linear-gradient(90deg, var(--purple-light), var(--cyan));
  --grad-surface: linear-gradient(135deg, rgba(123,47,247,.12), rgba(0,212,255,.07));

  --font-display: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-body:    'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --radius-pill: 50px;

  --shadow-card:   0 8px 32px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.05);
  --shadow-purple: 0 0 24px var(--purple-glow), 0 0 60px rgba(123,47,247,.14);
  --shadow-cyan:   0 0 24px var(--cyan-glow), 0 0 60px rgba(0,212,255,.12);

  --blur-sm: blur(8px);
  --blur-md: blur(16px);
  --blur-lg: blur(24px);

  --ease:       0.3s ease;
  --ease-fast:  0.15s ease;
  --ease-spring: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-base);
  background:
    radial-gradient(circle at top left,    rgba(123,47,247,.38), transparent 55%),
    radial-gradient(circle at bottom right, rgba(0,212,255,.3),  transparent 50%),
    var(--bg-base);
  min-height: 100vh;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }

a {
  color: var(--purple-light);
  text-decoration: none;
  transition: color var(--ease);
}
a:hover { color: var(--cyan); }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar          { width: 6px; height: 6px; }
::-webkit-scrollbar-track    { background: var(--bg-surface); }
::-webkit-scrollbar-thumb    { background: var(--grad-primary); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { filter: brightness(1.3); }

/* ── Headings ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: center;
  color: var(--text-primary);
  text-shadow: 0 0 30px var(--purple-glow);
  margin-bottom: 2rem;
}

h2 {
  color: var(--cyan);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  text-shadow: 0 0 16px var(--cyan-glow);
}

h3 {
  color: var(--text-secondary);
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid rgba(123,47,247,.5);
  text-shadow: 0 0 12px var(--purple-glow);
}

p { color: var(--text-secondary); }

/* Gradient text helper */
.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ═══════════════════════════════════════════════════════════
   ANIMATED BACKGROUND (optional, via JS oder direkt in body)
   Nutzung: <div class="bg-blobs" aria-hidden="true">
              <div class="bg-blob b1"></div>
              <div class="bg-blob b2"></div>
              <div class="bg-blob b3"></div>
            </div>
   ═══════════════════════════════════════════════════════════ */
.bg-blobs {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.bg-blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .18;
  animation: blobFloat 22s infinite ease-in-out;
}
.bg-blob.b1 { width:600px; height:600px; background:var(--purple); top:-200px; left:-150px; }
.bg-blob.b2 { width:500px; height:500px; background:var(--cyan);   bottom:-120px; right:-120px; animation-delay:-7s; animation-duration:19s; }
.bg-blob.b3 { width:400px; height:400px; background:var(--magenta); top:50%; left:50%; transform:translate(-50%,-50%); animation-delay:-13s; animation-duration:27s; opacity:.07; }

@keyframes blobFloat {
  0%,100% { transform: translate(0,0)   scale(1); }
  25%      { transform: translate(28px,-38px) scale(1.06); }
  50%      { transform: translate(-22px,28px) scale(0.95); }
  75%      { transform: translate(38px,18px)  scale(1.03); }
}

/* ═══════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════ */
.navbar {
  position: sticky; top: 0; z-index: 900;
  background: rgba(10,14,39,.8);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border-bottom: 1px solid var(--border);
  transition: background var(--ease), box-shadow var(--ease);
}
.navbar.scrolled {
  background: rgba(10,14,39,.97);
  box-shadow: 0 4px 30px rgba(0,0,0,.5), 0 1px 0 var(--purple-glow);
}
.navbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding-inline: 1.5rem;
  max-width: 1280px; margin-inline: auto;
}
.navbar__logo {
  display: flex; align-items: center; gap: .75rem;
  font-family: var(--font-display); font-size: 1.4rem;
  font-weight: 700; letter-spacing: .06em;
  color: var(--text-primary); text-decoration: none;
  transition: opacity var(--ease-fast);
}
.navbar__logo:hover { opacity: .82; color: var(--text-primary); }
.navbar__logo-icon {
  width: 34px; height: 34px; border-radius: var(--radius-md);
  background: var(--grad-primary);
  display: grid; place-items: center; font-size: 1rem;
  box-shadow: var(--shadow-purple); flex-shrink: 0;
}
.navbar__logo-text { background: var(--grad-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.navbar__nav { display: flex; align-items: center; gap: .25rem; }
.navbar__link {
  font-family: var(--font-display); font-size: .8rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); padding: .4rem 1rem;
  border-radius: var(--radius-pill);
  transition: color var(--ease), background var(--ease);
  position: relative;
}
.navbar__link::after {
  content: ''; position: absolute;
  bottom: 3px; left: 50%; width: 70%; height: 2px;
  background: var(--grad-primary); border-radius: 99px;
  transform: translateX(-50%) scaleX(0);
  transition: transform var(--ease);
}
.navbar__link:hover, .navbar__link.active {
  color: var(--text-primary); background: var(--bg-glass);
}
.navbar__link:hover::after, .navbar__link.active::after { transform: translateX(-50%) scaleX(1); }
.navbar__actions { display: flex; align-items: center; gap: .75rem; }

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */
button,
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-display); font-size: .9rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  padding: .75rem 1.8rem; border-radius: var(--radius-pill);
  cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none;
  transition: transform var(--ease-spring), box-shadow var(--ease), filter var(--ease-fast);
  position: relative; overflow: hidden; border: none;
  /* default = primary */
  width: 100%;
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 20px var(--cyan-glow);
  text-shadow: 0 0 8px rgba(10,14,39,.6);
  margin-top: .6rem;
}

/* shimmer sweep */
button::after, .btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.13), transparent);
  transform: translateX(-100%);
  transition: transform .5s ease;
}
button:hover::after, .btn:hover::after { transform: translateX(100%); }

button:hover, .btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px var(--purple-glow), 0 0 40px rgba(0,212,255,.18);
}
button:active, .btn:active { transform: translateY(-1px) scale(.98); }
button:disabled, .btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* Variants */
.primary-btn, .btn-primary {
  background: var(--grad-primary);
  box-shadow: 0 4px 20px var(--cyan-glow);
}
.primary-btn:hover, .btn-primary:hover {
  box-shadow: 0 10px 30px var(--purple-glow);
}

.leave-btn, .btn-danger {
  background: linear-gradient(135deg, var(--magenta), var(--purple));
  box-shadow: 0 4px 16px var(--magenta-glow);
  width: auto; padding: .7rem 1.6rem; margin: 0; font-size: .85rem;
}
.leave-btn:hover, .btn-danger:hover {
  box-shadow: 0 8px 24px var(--magenta-glow);
}

.btn-ghost {
  background: var(--bg-glass);
  color: var(--text-secondary);
  border: 1px solid var(--border-bright);
  box-shadow: none;
  width: auto;
}
.btn-ghost:hover {
  background: var(--bg-glass-md);
  color: var(--text-primary);
  box-shadow: none;
}

/* Twitch Button */
.twitch-button, .twitch-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .7rem 1.6rem;
  background-color: #9146FF;
  color: #fff !important;
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  letter-spacing: .05em;
  border: none; border-radius: var(--radius-pill);
  text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 22px rgba(145,70,255,.45);
  transition: transform var(--ease-spring), box-shadow var(--ease), filter var(--ease-fast);
  margin-top: 1rem; width: auto;
}
.twitch-button:hover, .twitch-btn:hover {
  filter: brightness(1.18);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(145,70,255,.65);
  color: #fff;
}
.twitch-button:active, .twitch-btn:active { transform: translateY(-1px); }

/* Logout / secondary small */
#logoutBtn {
  width: auto; padding: .5rem 1.2rem; font-size: .8rem;
  background: var(--bg-glass); border: 1px solid var(--border-bright);
  color: var(--text-secondary); margin-top: 0;
}
#logoutBtn:hover { color: var(--text-primary); background: var(--bg-glass-md); box-shadow: none; }

/* In-app notifications (replaces browser alerts) */
.ui-toast-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  max-width: min(92vw, 360px);
  pointer-events: none;
}

.ui-toast {
  pointer-events: auto;
  background: rgba(10, 14, 39, .92);
  border: 1px solid var(--border-cyan);
  border-left: 4px solid var(--cyan);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  color: var(--text-primary);
  padding: .8rem .95rem;
  font-family: var(--font-display);
  font-size: .85rem;
  letter-spacing: .03em;
  line-height: 1.4;
  animation: toastIn .24s ease-out;
}

.ui-toast--success {
  border-color: rgba(46, 204, 113, .55);
  border-left-color: #2ecc71;
}

.ui-toast--error {
  border-color: rgba(255, 77, 106, .55);
  border-left-color: #ff4d6a;
}

.ui-toast--warning {
  border-color: rgba(255, 196, 0, .5);
  border-left-color: #ffc400;
}

.ui-toast.is-leaving {
  animation: toastOut .24s ease-in forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(6px) scale(.98); }
}

/* ═══════════════════════════════════════════════════════════
   INPUTS / FORMS
   ═══════════════════════════════════════════════════════════ */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: .8rem 1rem;
  margin-top: .5rem;
  background: var(--bg-glass);
  border: 1.5px solid var(--border-cyan);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: .95rem;
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
  -webkit-appearance: none;
}
input::placeholder, textarea::placeholder { color: rgba(255,255,255,.45); }
input:focus, select:focus, textarea:focus {
  border-color: var(--cyan);
  background: rgba(0,212,255,.06);
  box-shadow: 0 0 0 3px rgba(0,212,255,.22);
}
select {
  background-color: var(--bg-elevated);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238090b0' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  appearance: none;
}

/* ═══════════════════════════════════════════════════════════
   PANELS / CARDS
   ═══════════════════════════════════════════════════════════ */
.panel, .card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--border);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  position: relative;
  overflow: hidden;
}
.panel::before, .card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad-primary); opacity: 0;
  transition: opacity var(--ease);
}
.panel:hover, .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), 0 16px 48px rgba(123,47,247,.12);
  border-color: var(--border-bright);
}
.panel:hover::before, .card:hover::before { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   LOBBY PAGE
   ═══════════════════════════════════════════════════════════ */
.lobby-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 2.5rem; padding: 1.4rem 1.8rem;
  background: rgba(10,14,39,.8);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-cyan);
  gap: 1rem; flex-wrap: wrap;
}

.lobby-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.75rem;
  min-height: 420px;
}

/* Players Panel */
.players-panel {
  background: rgba(10,14,39,.78);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  height: fit-content;
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-purple);
  position: relative; overflow: hidden;
}
.players-panel::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad-primary);
}

#playerList { overflow-y: auto; max-height: 480px; }
#playerList li {
  background: var(--bg-glass);
  padding: .9rem 1.1rem;
  margin: .65rem 0;
  border-radius: var(--radius-md);
  font-weight: 600; color: #fff;
  display: flex; align-items: center;
  animation: fadeInLeft .3s ease-out;
  backdrop-filter: var(--blur-sm);
  border: 1px solid var(--border-cyan);
  border-left: 4px solid var(--cyan);
  transition: background var(--ease), transform var(--ease);
  font-family: var(--font-display); font-size: .95rem; letter-spacing: .03em;
}
#playerList li::before { content: "👤"; margin-right: .7rem; font-size: 1.1rem; }
#playerList li:hover   { background: var(--bg-glass-md); transform: translateX(5px); }

/* Settings Panel */
.settings-panel {
  background: rgba(10,14,39,.82);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-cyan);
}

/* Game Mode Buttons */
.game-mode-section > label {
  display: block; color: var(--text-secondary);
  font-family: var(--font-display); font-weight: 700;
  font-size: 1rem; margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(0,212,255,.4);
  text-transform: uppercase; letter-spacing: .08em;
}
.game-mode-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .9rem; margin-top: .5rem;
}
.game-mode-btn {
  padding: 1.3rem 1rem;
  background: var(--bg-glass);
  color: #fff;
  border: 1.5px solid var(--border-cyan);
  border-radius: var(--radius-lg);
  font-family: var(--font-display); font-size: .95rem; font-weight: 700;
  cursor: pointer; text-shadow: 0 0 6px var(--purple-glow);
  transition: transform var(--ease-spring), background var(--ease), border-color var(--ease), box-shadow var(--ease);
  margin: 0; width: 100%; text-align: center;
  backdrop-filter: var(--blur-sm);
}
.game-mode-btn:hover {
  transform: translateY(-4px);
  background: rgba(0,212,255,.14);
  border-color: var(--cyan);
  box-shadow: 0 8px 22px var(--cyan-glow);
}
.game-mode-btn.active {
  background: var(--grad-primary); border-color: transparent;
  box-shadow: 0 8px 28px var(--purple-glow);
}
.game-mode-btn.active:hover { transform: translateY(-5px); box-shadow: 0 12px 34px var(--cyan-glow); }

/* Setting item */
.setting-item { margin-bottom: 1.4rem; }
.setting-item label, .setting-item > label {
  display: block; color: var(--text-secondary);
  font-family: var(--font-display); font-weight: 700;
  font-size: .9rem; margin-bottom: .4rem;
  text-transform: uppercase; letter-spacing: .07em;
  text-shadow: 0 0 8px rgba(0,212,255,.4);
}
.setting-item input { margin-top: 0; }

/* No-lobby screen */
#no-lobby {
  text-align: center; max-width: 440px;
  margin: 0 auto; padding: 2.5rem;
  background: rgba(10,14,39,.88);
  border-radius: var(--radius-xl);
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-cyan);
}
#no-lobby .no-lobby-card {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
#no-lobby h3 { margin-top: 2rem; }
#no-lobby .hint {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: .5rem;
}
.divider {
  position: relative;
  margin: 1.3rem 0 .4rem;
  text-align: center;
}
.divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-bright), transparent);
}
.divider span {
  position: relative;
  z-index: 1;
  padding: 0 .8rem;
  background: rgba(10,14,39,.88);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* Auth section */
#authSection {
  display: flex; align-items: center; gap: 1rem;
  justify-content: center; margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
#authSection span {
  font-family: var(--font-display); font-size: .85rem;
  color: var(--text-muted); letter-spacing: .04em;
}

/* Lobby-Code styling */
#lobbyCode {
  color: var(--gold); font-weight: 700;
  font-size: 1.5rem; letter-spacing: 4px;
  text-shadow: 0 0 12px rgba(255,215,0,.5);
}

/* Start/leave button in lobby */
#startGameBtn {
  margin-top: 1.5rem;
  background: var(--grad-primary);
  box-shadow: 0 6px 24px var(--purple-glow);
}

.wait-hint {
  margin-top: 1.25rem;
  display: none;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-bright);
  background: var(--bg-glass);
  color: var(--text-secondary);
  font-family: var(--font-display);
  letter-spacing: .04em;
}
.wait-hint__icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 255, .12);
  box-shadow: 0 0 12px rgba(0, 212, 255, .22);
}

/* ═══════════════════════════════════════════════════════════
   COMING SOON PAGE
   ═══════════════════════════════════════════════════════════ */
.animated-bg {
  position: fixed; width: 100%; height: 100%; overflow: hidden;
  pointer-events: none; z-index: 0;
}
.animated-bg .circle {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .28;
  animation: blobFloat 20s infinite ease-in-out;
}
.animated-bg .circle1 {
  width: 420px; height: 420px;
  background: linear-gradient(45deg, var(--purple), var(--cyan));
  top: -100px; left: -100px;
}
.animated-bg .circle2 {
  width: 360px; height: 360px;
  background: linear-gradient(135deg, var(--magenta), var(--cyan));
  bottom: -100px; right: -100px;
  animation-delay: -7s; animation-duration: 18s;
}
.animated-bg .circle3 {
  width: 300px; height: 300px;
  background: linear-gradient(90deg, var(--purple), var(--magenta));
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  animation-delay: -3.5s; animation-duration: 25s; opacity: .14;
}

/* Geometric shapes */
.shapes { position: fixed; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: hidden; }
.shape { position: absolute; animation: shapeRotate 18s linear infinite; }
.shape.square {
  width: 90px; height: 90px;
  border: 1.5px solid rgba(123,47,247,.25);
  top: 22%; left: 9%;
  animation: shapeRotate 22s linear infinite, shapeFloat 9s ease-in-out infinite;
}
.shape.triangle {
  top: 58%; right: 14%;
  width: 0; height: 0;
  border-left: 44px solid transparent;
  border-right: 44px solid transparent;
  border-bottom: 76px solid rgba(0,212,255,.18);
  animation: shapeRotate 28s linear infinite reverse, shapeFloat 11s ease-in-out infinite;
}
.shape.hexagon {
  width: 72px; height: 42px;
  background: rgba(255,0,255,.14);
  top: 72%; left: 19%;
  animation: shapeRotate 16s linear infinite, shapeFloat 13s ease-in-out infinite;
}
.shape.hexagon::before,
.shape.hexagon::after {
  content: ''; position: absolute; width: 0;
  border-left: 36px solid transparent;
  border-right: 36px solid transparent;
}
.shape.hexagon::before { bottom: 100%; border-bottom: 21px solid rgba(255,0,255,.14); }
.shape.hexagon::after  { top: 100%;    border-top:    21px solid rgba(255,0,255,.14); }

@keyframes shapeRotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shapeFloat  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-28px); } }

/* Particles */
.particles { position: fixed; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.particle {
  position: absolute; width: 3px; height: 3px;
  background: rgba(255,255,255,.7); border-radius: 50%; opacity: 0;
  animation: riseParticle 15s linear infinite;
}
@keyframes riseParticle {
  0%   { opacity: 0; transform: translateY(0) translateX(0); }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-100vh) translateX(80px); }
}

/* Coming soon content */
.coming-soon-wrapper {
  position: relative; z-index: 10;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.coming-soon-content {
  text-align: center; max-width: 720px; width: 100%;
}
.logo-container { position: relative; display: inline-block; margin-bottom: 1.5rem; }
.logo {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  background: linear-gradient(45deg, var(--cyan), var(--purple), var(--magenta), var(--cyan));
  background-size: 300% 300%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: gradientShift 8s ease infinite, logoPulse 6s ease-in-out infinite;
  letter-spacing: .08em; text-transform: uppercase;
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes logoPulse {
  0%,100% { filter: drop-shadow(0 0 18px rgba(0,212,255,.5)); }
  50%      { filter: drop-shadow(0 0 38px rgba(123,47,247,.8)); }
}
.tagline {
  font-family: var(--font-body); font-size: clamp(1rem, 2.5vw, 1.6rem);
  color: var(--text-secondary); margin-bottom: 2.5rem;
  font-weight: 300; animation: fadeInUp 1.6s ease-in;
}
.coming-soon-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700; color: var(--text-primary); margin-bottom: .75rem;
  text-shadow: 0 0 28px var(--purple-glow);
  animation: slideUp .8s .1s ease-out both;
}
.coming-soon-subtitle {
  font-size: clamp(.95rem, 2vw, 1.2rem);
  color: var(--text-muted); margin-bottom: 2.5rem;
  animation: slideUp .8s .25s ease-out both;
}
.coming-soon-actions { animation: slideUp .8s .4s ease-out both; }

.social-links {
  display: flex; gap: 1.2rem; justify-content: center;
  margin-top: 2.5rem; animation: slideUp .8s .5s ease-out both;
}
.social-link {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--bg-glass); border: 1.5px solid var(--border-purple);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: #fff; font-size: 1.6rem;
  transition: transform var(--ease-spring), box-shadow var(--ease), border-color var(--ease);
  position: relative; overflow: hidden;
}
.social-link::before {
  content: ''; position: absolute; inset: 0;
  background: var(--grad-primary); opacity: 0; transition: opacity var(--ease);
}
.social-link:hover {
  transform: translateY(-8px) scale(1.1);
  border-color: var(--cyan); box-shadow: 0 10px 28px var(--cyan-glow);
}
.social-link:hover::before { opacity: .25; }
.social-link span { position: relative; z-index: 1; }

.page-footer {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  font-size: .85rem; color: #6070a0; z-index: 10;
  animation: fadeInUp 2s 1s ease-out both;
}
.page-footer a { color: var(--purple); transition: color var(--ease); }
.page-footer a:hover { color: var(--cyan); }

/* ═══════════════════════════════════════════════════════════
   OVERLAY / STREAM STYLES
   ═══════════════════════════════════════════════════════════ */
.overlay-body {
  margin: 0; padding: 0;
  background:
    radial-gradient(circle at top left,    rgba(123,47,247,.38), transparent 55%),
    radial-gradient(circle at bottom right, rgba(0,212,255,.3),  transparent 50%),
    #0a0e27;
  color: #fff;
  font-family: var(--font-body);
  overflow: hidden;
}
.overlay-container {
  width: 100vw; height: 100vh;
  display: flex; flex-direction: column;
  position: relative;
}
.overlay-panel {
  background: rgba(0,0,0,.75);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  box-shadow: 0 12px 30px rgba(0,0,0,.7);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: var(--blur-sm);
}
.overlay-loading-title  { font-family: var(--font-display); font-size: 2rem; text-align: center; }
.overlay-loading-subtitle { font-size: 1rem; color: var(--text-secondary); text-align: center; }
.overlay-error {
  color: #ff6b6b; display: none; text-align: center; padding: 1.5rem;
}
.overlay-game-content { display: none; width: 100%; height: 100%; padding: 0; flex-direction: column; position: relative; overflow: hidden; }
.overlay-info {
  flex-shrink: 0;
  z-index: 20;
  background: rgba(10,14,39,.88);
  padding: 7px 18px;
  border-bottom: 1px solid var(--border-purple);
  border-left: 3px solid var(--purple);
  backdrop-filter: var(--blur-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.overlay-title {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 700;
  text-shadow: 0 0 12px var(--purple-glow);
  line-height: 1.1;
}

.overlay-title--df {
  font-size: clamp(.9rem, 1.5vw, 1.1rem);
}

/* Player status badges in overlay */
.player-status { display: none; }
.player-badge {
  background: rgba(76,175,80,.8); padding: 4px 10px;
  border-radius: var(--radius-sm); font-size: .82rem; font-weight: 600;
}
.player-badge.eliminated {
  background: rgba(244,67,54,.8); text-decoration: line-through;
}

/* Camera grid */
.camera-grid {
  display: grid;
  gap: 0;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.camera-grid-empty {
  grid-column: 1/-1; text-align: center;
  padding: 2rem; color: rgba(255,255,255,.4);
}
.camera-container {
  background: #000;
  border: none;
  border-radius: 0;
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
  min-height: 0;
  min-width: 0;
  container-type: inline-size;
  container-name: cam;
}
.camera-container.eliminated {
  filter: grayscale(100%) brightness(0.5);
}
.camera-title {
  background: rgba(123,47,247,.25);
  padding: 8px 14px; font-family: var(--font-display);
  font-weight: 600; font-size: .9rem;
  border-bottom: 1px solid var(--border-purple);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}
.camera-timer-pill {
  font-size: .73rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: .28rem .58rem;
  background: rgba(0,212,255,.2);
  border: 1px solid rgba(0,212,255,.45);
  white-space: nowrap;
}
.camera-feed {
  flex: 1; background: #111;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  min-height: 0;
  overflow: hidden;
}
/* Player bar – name pill + hearts side by side at bottom-left */
.camera-player-bar {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 5;
  pointer-events: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 16px);
}
/* Camera name overlay – pill badge inside player bar */
.camera-name-overlay {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .18);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .82rem;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}
/* Hearts container inside player bar */
.camera-hearts {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: var(--camera-heart-gap, 4px);
  align-items: center;
  flex-shrink: 0;
}
.camera-heart {
  width: var(--camera-heart-size, 14px);
  height: var(--camera-heart-size, 14px);
  min-width: var(--camera-heart-size, 14px);
  min-height: var(--camera-heart-size, 14px);
  display: block;
  flex-shrink: 0;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.8));
}

/* Container-query scaling: medium cameras (250–420px wide) */
@container cam (max-width: 420px) {
  .camera-player-bar { bottom: 6px; left: 6px; gap: 5px; max-width: calc(100% - 12px); }
  .camera-name-overlay { font-size: .68rem; padding: 3px 8px; }
  .camera-heart { --camera-heart-size: 28px; }
  .camera-hearts { --camera-heart-gap: 3px; }
  .camera-votes { font-size: .68rem; padding: .12rem .4rem; bottom: 6px; right: 6px; }
  .camera-eliminated-label { font-size: .6rem; padding: .18rem .5rem; bottom: 6px; right: 6px; }
  .camera-timer-pill { font-size: .65rem; padding: .2rem .45rem; }
}
/* Container-query scaling: small cameras (≤ 240px wide) */
@container cam (max-width: 240px) {
  .camera-player-bar { bottom: 4px; left: 4px; gap: 3px; max-width: calc(100% - 8px); }
  .camera-name-overlay { font-size: .55rem; padding: 2px 5px; }
  .camera-heart { --camera-heart-size: 20px; }
  .camera-hearts { --camera-heart-gap: 2px; }
  .camera-votes { font-size: .55rem; padding: .08rem .28rem; bottom: 4px; right: 4px; }
  .camera-eliminated-label { font-size: .5rem; padding: .12rem .36rem; bottom: 4px; right: 4px; }
  .camera-timer-pill { font-size: .55rem; padding: .14rem .34rem; }
}

/* Fallback for environments without @container support (e.g. older embedded browsers) */
@media (max-width: 1280px) {
  .camera-heart { --camera-heart-size: 28px; }
  .camera-hearts { --camera-heart-gap: 3px; }
}
@media (max-width: 760px) {
  .camera-heart { --camera-heart-size: 20px; }
  .camera-hearts { --camera-heart-gap: 2px; }
}
.camera-feed img:not(.camera-heart), .camera-feed video, .camera-feed iframe { width: 100%; height: 100%; object-fit: cover; }
.no-feed { color: #9ca3af; font-size: .82rem; }
.camera-votes {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 5;
  pointer-events: none;
  background: rgba(255, 215, 0, 0.25);
  border: 1px solid rgba(255, 215, 0, 0.6);
  border-radius: var(--radius-pill);
  padding: .2rem .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .82rem;
  color: #ffd700;
  text-shadow: 0 1px 4px rgba(0,0,0,.9);
  white-space: nowrap;
}
.camera-eliminated-label {
  position: absolute;
  inset: auto 10px 10px auto;
  border-radius: var(--radius-pill);
  padding: .22rem .62rem;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: rgba(244,67,54,.82);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
}

/* ═══════════════════════════════════════════════════════════
   BADGE / TAG
   ═══════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-display); font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .22em .75em; border-radius: 99px; white-space: nowrap;
}
.badge-purple  { background: rgba(123,47,247,.2);  color: var(--purple-light); border: 1px solid rgba(123,47,247,.3); }
.badge-cyan    { background: rgba(0,212,255,.15);   color: var(--cyan);         border: 1px solid rgba(0,212,255,.25); }
.badge-success { background: rgba(0,230,118,.15);   color: #00e676;             border: 1px solid rgba(0,230,118,.2); }
.badge-live {
  background: rgba(255,77,106,.2); color: #ff4d6a;
  border: 1px solid rgba(255,77,106,.3);
}
.badge-live::before { content: '●'; margin-right: 4px; animation: blink 1s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* ═══════════════════════════════════════════════════════════
   MISC UTILITIES
   ═══════════════════════════════════════════════════════════ */
.invisible { opacity: 0; pointer-events: none; }

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--bg-glass-md);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .lobby-content      { grid-template-columns: 1fr; gap: 1.2rem; }
  .game-mode-buttons  { grid-template-columns: 1fr; }
  .camera-grid        { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .container          { padding: 1.5rem 1rem; }
  h1                  { font-size: 1.9rem; }
  .lobby-header       { flex-direction: column; gap: .75rem; }
  .leave-btn          { width: 100%; }
  .camera-grid        { grid-template-columns: 1fr; }
  .logo               { font-size: 3rem; }
}
