/* First-visit UX pass — topbar, HUD, lobby, auth, atmosphere */

/* 1–2. Topbar hierarchy + sticky layer */
.showcase-topbar--clean {
  position: sticky;
  top: 0;
  z-index: 120;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(8, 12, 24, 0.92), rgba(8, 12, 24, 0.78));
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.showcase-topbar--clean .showcase-topbar-right {
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* 3. Balance HUD readability */
.showcase-balance-chip {
  min-width: 7.5rem;
  padding: 0.35rem 0.55rem 0.3rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.08);
}

.showcase-balance-chip .label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
}

.showcase-balance-chip strong[data-balance] {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  color: #fde68a;
}

.showcase-balance-earned {
  display: block;
  font-size: 0.68rem;
  color: #86efac;
  font-weight: 600;
  margin-top: 0.1rem;
}

/* 4. Companion CTA prominence */
.showcase-companion-hub-btn {
  background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
  color: #0f172a !important;
  font-weight: 800 !important;
  border: none !important;
  box-shadow: 0 4px 18px rgba(251, 191, 36, 0.35);
}

.showcase-companion-hub-btn:hover {
  filter: brightness(1.06);
}

/* 5. Hub menu dropdown */
.showcase-hub-menu {
  position: relative;
}

.showcase-hub-menu-toggle {
  min-width: 4.5rem;
}

.showcase-hub-menu-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 11rem;
  padding: 0.35rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  z-index: 200;
}

.showcase-hub-menu-panel.is-open {
  display: flex;
}

.showcase-hub-menu-panel .beta-ui-btn {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

/* 6. Sound with label */
.showcase-sound-btn .showcase-sound-label {
  display: none;
}

@media (min-width: 900px) {
  .showcase-sound-btn .showcase-sound-label {
    display: inline;
    margin-left: 0.25rem;
    font-size: 0.78rem;
  }
}

/* 7. Back to lobby visibility */
.game-lobby-back-btn {
  font-weight: 700 !important;
  border-color: rgba(129, 140, 248, 0.45) !important;
  color: #c7d2fe !important;
}

/* 8. Background atmosphere — softer, less noisy */
.site-atmosphere__vignette {
  opacity: 0.55 !important;
}

.site-atmosphere__scanlines {
  opacity: 0.04 !important;
}

.site-atmosphere__noise {
  opacity: 0.03 !important;
}

/* 9. Hide duplicate sidebar farm when lobby quest board visible */
.playground--lobby-active .showcase-sidebar--companion-only .beta-ui-btn--farm {
  display: none;
}

/* 10–11. Lobby cards + focus */
.game-lobby-card {
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.game-lobby-card:hover:not([disabled]) {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
}

.game-lobby-tab:focus-visible,
.game-lobby-card:focus-visible,
.beta-ui-btn:focus-visible,
.showcase-hub-menu-toggle:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

/* 12. Scrollable tabs on mobile */
@media (max-width: 640px) {
  .game-lobby-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .game-lobby-tabs::-webkit-scrollbar {
    display: none;
  }

  .game-lobby-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* 13. Tab hints */
.game-lobby-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  line-height: 1.2;
}

.game-lobby-tab-hint {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.65;
  text-transform: none;
}

.game-lobby-tab.is-active .game-lobby-tab-hint {
  opacity: 0.9;
  color: #c7d2fe;
}

/* 14. First-visit coach strip */
.first-visit-coach {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.18), rgba(56, 189, 248, 0.1));
  border: 1px solid rgba(129, 140, 248, 0.35);
  margin-bottom: 0.25rem;
}

.first-visit-coach p {
  margin: 0;
  color: #e2e8f0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.first-visit-coach strong {
  color: #fde68a;
}

.first-visit-coach-dismiss {
  flex-shrink: 0;
  padding: 0.25rem 0.55rem !important;
  font-size: 0.72rem !important;
}

/* 15. Hero quick actions */
.game-lobby-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.game-lobby-hero-chip {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

.game-lobby-hero-chip--gold {
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

/* 16. Auth portal — guest path obvious */
.auth-portal-skip {
  width: 100%;
  margin-top: 0.35rem !important;
  border: 1px dashed rgba(148, 163, 184, 0.45) !important;
  color: #e2e8f0 !important;
  font-weight: 600 !important;
}

.auth-portal-overlay:not([hidden]) {
  backdrop-filter: blur(8px);
}

.auth-portal-card {
  max-height: min(92vh, 640px);
  overflow-y: auto;
}

/* 17. Quest hint banner */
.hub-quest-hint {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.45);
  border-left: 3px solid #fbbf24;
}

/* 18. Topbar compact on small screens */
@media (max-width: 720px) {
  .showcase-topbar--clean .showcase-profile-btn,
  .showcase-topbar--clean .showcase-account-btn,
  .showcase-topbar--clean .showcase-daily-btn {
    display: none !important;
  }

  .showcase-hub-menu {
    display: block !important;
  }

  .showcase-topbar-title {
    font-size: 0.95rem;
  }

  .showcase-mode-badge {
    display: none;
  }
}

/* 19. Social panel empty hint */
.social-hub-empty-hint {
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.25);
  color: #cbd5e1;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

/* 20. Farm panel cap reminder */
.game-lobby-farm-cap {
  font-size: 0.8rem;
  color: #86efac;
  margin: 0.25rem 0 0;
  font-weight: 600;
}
