/* Global hidden utility (mirrors style.css) */
.hidden { display: none !important; }

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

:root {
  --bg:       #0a0a14;
  --panel:    #12121e;
  --border:   #2a2a3e;
  --accent:   #c87df0;
  --accent2:  #7cb8f0;
  --green:    #4cde7a;
  --red:      #f05060;
  --text:     #e8e0d0;
  --dim:      #6a6080;
  --font:     'Press Start 2P', monospace;
  --radius:   4px;
}

html { min-height: 100%; background: var(--bg); }
body { min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); overflow-x: hidden; overflow-y: auto; }

/* ── Star canvas ───────────────────────────────── */
#star-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── Header ────────────────────────────────────── */
.lp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  background: rgba(10,10,20,0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.lp-logo {
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 1px;
}
.lp-nav-link {
  font-family: var(--font);
  font-size: 8px;
  color: #9b6bdb;
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid #9b6bdb;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}
.lp-nav-link:hover { background: #9b6bdb; color: #fff; }

/* ── Main layout ───────────────────────────────── */
.lp-main {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ── Hero ──────────────────────────────────────── */
.lp-hero {
  text-align: center;
  padding: 64px 0 48px;
}
.lp-title {
  font-size: clamp(18px, 3vw, 28px);
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 24px;
}
.lp-title-accent {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(200,125,240,0.5);
  animation: titleGlow 2.5s ease-in-out infinite alternate;
}
@keyframes titleGlow {
  from { text-shadow: 0 0 10px rgba(200,125,240,0.3); }
  to   { text-shadow: 0 0 28px rgba(200,125,240,0.8), 0 0 50px rgba(200,125,240,0.3); }
}
.lp-subtitle {
  font-size: 8px;
  color: var(--dim);
  line-height: 2.4;
  max-width: 560px;
  margin: 0 auto 36px;
}
.lp-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.lp-feature-pill {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 7px 14px;
  font-size: 7px;
  color: var(--dim);
  transition: border-color 0.2s, color 0.2s;
}
.lp-feature-pill:hover { border-color: var(--accent); color: var(--text); }

/* ── Section titles ────────────────────────────── */
.lp-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.lp-section-title-text {
  font-size: 12px;
  color: var(--text);
}
.live-count-badge {
  background: var(--green);
  color: #000;
  font-size: 7px;
  padding: 4px 8px;
  border-radius: 99px;
  animation: pulseBadge 1.5s infinite;
}
.live-count-badge.hidden { display: none; }
@keyframes pulseBadge {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ── Spaces grid ───────────────────────────────── */
.lp-spaces-section { margin-bottom: 64px; }
.lp-spaces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* skeleton */
.room-card-skeleton {
  height: 280px;
  background: linear-gradient(90deg, var(--panel) 25%, #1a1a2e 50%, var(--panel) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
  border: 1px solid var(--border);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* room card */
.room-card {
  position: relative;
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.room-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(200,125,240,0.2);
}
.room-card.live {
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(76,222,122,0.15);
}
.room-card.live:hover {
  box-shadow: 0 8px 32px rgba(76,222,122,0.3);
}
.room-card.offline {
  opacity: 0.85;
}

/* card banner */
.room-card-banner {
  height: 80px;
  background: linear-gradient(135deg, #1a1230 0%, #0f0f20 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.room-card-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(200,125,240,0.12) 0%, transparent 70%);
}
.room-banner-icon { font-size: 36px; z-index: 1; filter: drop-shadow(0 0 8px rgba(200,125,240,0.4)); }

/* live badge */
.room-live-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--font);
  font-size: 7px;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 2;
}
.room-live-badge.live { background: var(--green); color: #000; animation: pulseBadge 1.5s infinite; }
.room-live-badge.offline { background: #333; color: #666; }

.room-viewer-count {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font);
  font-size: 7px;
  color: #fff;
  background: rgba(0,0,0,0.6);
  padding: 3px 7px;
  border-radius: 4px;
  z-index: 2;
}
.room-viewer-count.hidden { display: none; }

/* card body */
.room-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.room-card-name {
  font-size: 10px;
  color: var(--text);
  line-height: 1.6;
}
.room-card-streamer {
  font-size: 7px;
  color: var(--accent);
}
.room-card-stream-title {
  font-size: 7px;
  color: #aaa;
  line-height: 1.8;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.room-card-game {
  font-size: 6px;
  color: var(--dim);
}
.room-card-players {
  font-size: 7px;
  color: var(--dim);
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

/* enter button */
.room-enter-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  font-family: var(--font);
  font-size: 8px;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: filter 0.2s, transform 0.1s;
  text-decoration: none;
  text-align: center;
}
.room-card.live    .room-enter-btn { background: var(--green);  color: #000; }
.room-card.offline .room-enter-btn { background: #2a2a3e; color: #aaa; }
.room-enter-btn:hover { filter: brightness(1.15); transform: scale(1.01); }

/* no-spaces placeholder */
.lp-no-spaces {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px;
  font-size: 8px;
  color: var(--dim);
  line-height: 2.5;
  border: 1px dashed var(--border);
  border-radius: 8px;
}

/* ── How it works ──────────────────────────────── */
.lp-how-section { margin-bottom: 64px; }
.lp-steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.lp-step {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 16px;
  transition: border-color 0.2s;
}
.lp-step:hover { border-color: var(--accent2); }
.lp-step-num {
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 12px;
  opacity: 0.6;
}
.lp-step-title {
  font-size: 8px;
  color: var(--text);
  margin-bottom: 10px;
}
.lp-step-desc {
  font-size: 7px;
  color: var(--dim);
  line-height: 2;
}

/* ── Footer ────────────────────────────────────── */
.lp-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--border);
  font-size: 7px;
  color: var(--dim);
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 600px) {
  .lp-header { padding: 10px 16px; }
  .lp-logo { font-size: 10px; }
  .lp-title { font-size: 16px; }
  .lp-main { padding: 0 16px 48px; }
}

/* ── Room card avatar ────────────────────────────────────── */
.room-banner-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.25);
  z-index: 1;
}
.room-enter-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.lp-offline-banner {
  background: rgba(255,60,60,0.12);
  border: 1px solid #c04;
  color: #f88;
  font-size: 8px;
  padding: 10px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  text-align: center;
  line-height: 2;
}

/* ── Creator CTA ─────────────────────────────────────────── */
.lp-creator-section { text-align: center; padding: 40px 20px 56px; }
.lp-creator-badge {
  display: inline-block;
  font-size: 7px;
  background: rgba(147,81,234,0.18);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.lp-creator-desc { font-size: 8px; color: var(--dim); line-height: 2.4; margin: 12px auto 20px; max-width: 500px; }
.lp-creator-perks-label { font-size: 8px; color: var(--text); margin-bottom: 10px; }
.lp-creator-perks {
  list-style: none;
  padding: 0; margin: 0 auto 28px;
  max-width: 400px;
  display: flex; flex-direction: column; gap: 10px;
  text-align: left;
}
.lp-creator-perks li { font-size: 7px; color: var(--dim); line-height: 2; padding-left: 4px; }
.lp-creator-btn { font-size: 9px; padding: 12px 28px; background: var(--accent); color: #fff; border: none; cursor: pointer; }
.lp-creator-btn:hover { background: #b060e8; }

/* ── Creator / Interest modal ────────────────────────────── */
.lp-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 3000;
  overflow-y: auto;
  padding: 20px;
}
.lp-modal-overlay.hidden { display: none; }
.lp-modal-box {
  background: #111120;
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 28px 32px;
  max-width: 420px; width: 100%;
  text-align: left;
}
.lp-modal-title { font-size: 12px; color: var(--text); margin-bottom: 10px; text-align: center; }
.lp-modal-sub { font-size: 8px; color: var(--dim); margin-bottom: 20px; line-height: 2; text-align: center; }
.lp-modal-label { display: block; font-size: 7px; color: var(--dim); margin-bottom: 5px; margin-top: 10px; letter-spacing: 1px; text-transform: uppercase; }
.lp-modal-label:first-of-type { margin-top: 0; }
.lp-modal-required { color: var(--accent); }
.lp-modal-optional { opacity: 0.5; }
.lp-modal-input {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font);
  font-size: 9px;
  background: #1a1a2e;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 4px;
  outline: none;
  margin-bottom: 4px;
}
.lp-modal-textarea { resize: vertical; min-height: 60px; }
.lp-radio-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.lp-radio-option {
  display: flex; align-items: center; gap: 10px;
  font-size: 8px; color: var(--dim); cursor: pointer;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.15s, color 0.15s;
}
.lp-radio-option:hover { border-color: var(--accent); color: var(--text); }
.lp-radio-option input[type="radio"] { accent-color: var(--accent); width: 14px; height: 14px; flex-shrink: 0; cursor: pointer; }
.lp-radio-option:has(input:checked) { border-color: var(--accent); color: var(--text); background: rgba(147,81,234,0.1); }
.lp-modal-input:focus { border-color: var(--accent); }
.lp-modal-error { font-size: 7px; color: var(--red); min-height: 16px; margin: 6px 0 0; }
.lp-modal-success { font-size: 8px; color: #4ade80; line-height: 2; margin: 10px 0; text-align: center; }
.lp-modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.lp-pixel-btn {
  font-family: var(--font);
  font-size: 8px;
  padding: 8px 16px;
  border: 2px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  border-radius: 2px;
}
.lp-pixel-btn:hover { border-color: var(--accent); }
.lp-pixel-btn.danger { border-color: var(--red); color: var(--red); }
.lp-pixel-btn.danger:hover { background: var(--red); color: #fff; }

/* ── Hero auth buttons ───────────────────────────────────── */
.lp-hero-auth {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.lp-twitch-signin-btn {
  font-family: var(--font);
  font-size: 9px;
  background: #9146FF;
  color: #fff;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 4px;
  transition: background 0.2s;
}
.lp-twitch-signin-btn:hover { background: #7d3ae8; }
.lp-guest-link {
  font-family: var(--font);
  font-size: 7px;
  color: var(--dim);
  text-decoration: none;
}
.lp-guest-link:hover { color: var(--text); }

/* ── Google sign-in button ───────────────────────────────── */
.lp-google-signin-btn {
  font-family: var(--font);
  font-size: 9px;
  background: #4285F4;
  color: #fff;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 4px;
  transition: background 0.2s;
  display: inline-block;
}
.lp-google-signin-btn:hover { background: #2b6fe0; }

/* ── Landing page user pill (signed-in / guest state) ───── */
.lp-guest-icon {
  font-size: 16px;
  line-height: 1;
}
.lp-guest-pill .lp-user-name {
  color: #aaa;
}
.lp-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lp-user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}
.lp-user-name {
  font-family: var(--font);
  font-size: 8px;
  color: var(--text);
}
.lp-signout-btn {
  font-family: var(--font);
  font-size: 7px;
  background: none;
  border: 1px solid var(--border);
  color: var(--dim);
  padding: 4px 8px;
  border-radius: 2px;
  cursor: pointer;
}
.lp-signout-btn:hover { border-color: var(--red); color: var(--red); }

/* ── Room enter offline ───────────────────────────────────── */
.room-enter-offline {
  background: #2a2a3e !important;
  color: #888 !important;
}
.room-enter-offline:hover { filter: brightness(1.2); }

/* ── Sign-in prompt modal ────────────────────────────────── */
.signin-prompt-box { min-width: 300px; }

/* ── Guest name input ────────────────────────────────────── */
.lp-name-input {
  width: 100%;
  font-family: var(--font);
  font-size: 9px;
  background: #0d0d1a;
  border: 2px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius);
  outline: none;
  letter-spacing: 1px;
  margin-top: 4px;
}
.lp-name-input:focus { border-color: var(--accent); }
.lp-name-input::placeholder { color: var(--dim); }

/* ── Avatar picker in guest prompt ──────────────────────── */
.lp-avatar-pick-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 12px 0 8px;
}
.lp-gender-btn {
  font-family: var(--font);
  font-size: 8px;
  background: #1a1a2e;
  border: 2px solid var(--border);
  color: var(--dim);
  padding: 7px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.lp-gender-btn.active,
.lp-gender-btn:hover { border-color: var(--accent); color: var(--text); }

.lp-color-pick-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 14px;
}
.lp-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.lp-color-swatch.active,
.lp-color-swatch:hover { border-color: #fff; transform: scale(1.15); }
