/* Page shell and navigation bar */

.home-page {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 70% 50% at 0% 0%, rgba(61,217,179,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(167,139,250,0.07) 0%, transparent 55%),
    var(--bg-base);
  animation: fadeIn 0.4s ease;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 64px;
  background: rgba(10,10,20,0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.navbar-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.navbar-user { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 0.9rem; }

.navbar-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }

.navbar-avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-brand); color: #0a0a14; font-weight: 700;
}

@media (max-width: 640px) {
  .navbar { padding: 0 12px; }
  .navbar-actions { gap: 2px; }
  .navbar-username { display: none; } /* the avatar is enough on a phone */
  .navbar-user { padding: 3px; }
  .home-main { padding: 24px 16px 60px; }
}

@media (max-width: 400px) {
  .navbar-brand { font-size: 0; gap: 0; } /* keep only the logo */
}

.navbar-link {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--text-secondary); text-decoration: none; font-weight: 600; font-size: 0.9rem;
  padding: 8px 14px; border-radius: var(--radius-pill); transition: all 0.2s ease;
}

.navbar-link:hover { color: var(--text-primary); background: var(--bg-card-hover); }

.navbar-link.active { color: var(--accent-teal); background: rgba(61,217,179,0.12); }


.navbar-user {
  text-decoration: none; padding: 4px 12px 4px 5px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: rgba(255,255,255,0.03); transition: all 0.2s ease;
}

.navbar-user:hover, .navbar-user.active { background: var(--bg-card-hover); color: var(--text-primary); }

.navbar-user.active { border-color: var(--border-accent); }

.admin-main, .profile-main { max-width: 1200px; }

/* Playing now: the chip with the avatars of who is playing, and the aura on an avatar that is playing */
.playing-slot { display: flex; align-items: center; }
.playing-slot:empty { display: none; }
.playing-chip {
  display: flex; align-items: center; gap: 4px; min-width: 44px; height: 44px; padding: 0 6px;
  background: none; border: none; border-radius: var(--radius-pill); cursor: pointer; color: var(--text-secondary);
  font: inherit; font-size: 0.8rem; font-weight: 700;
}
.playing-chip:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.pl-stack { display: flex; }
.pl-stack .pl-avatar + .pl-avatar { margin-left: -9px; }
.pl-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%; box-sizing: border-box;
  background: var(--gradient-brand) center / cover no-repeat; color: #0a0a14; font-size: 0.8rem; font-weight: 700;
  border: 2px solid var(--bg-base);
}
.pl-avatar.live { box-shadow: 0 0 0 1.5px var(--live-green), 0 0 9px 1px rgba(74, 222, 128, 0.55); animation: live-aura 2.8s ease-in-out infinite; }
.pl-avatar.dim { box-shadow: 0 0 0 1.5px var(--text-muted); filter: grayscale(0.7); opacity: 0.7; }
.navbar-user.playing .navbar-avatar { box-shadow: 0 0 0 2px var(--bg-base), 0 0 0 3.5px var(--live-green), 0 0 10px 2px rgba(74, 222, 128, 0.5); animation: live-aura 2.8s ease-in-out infinite; }
@keyframes live-aura { 50% { box-shadow: 0 0 0 1.5px var(--live-green), 0 0 4px 0 rgba(74, 222, 128, 0.25); } }
@media (prefers-reduced-motion: reduce) {
  .pl-avatar.live, .navbar-user.playing .navbar-avatar { animation: none; }
}

.pl-list { list-style: none; margin: 0; padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.pl-row { display: flex; align-items: center; gap: 12px; }
.pl-row .pl-avatar { width: 40px; height: 40px; font-size: 1rem; border-color: var(--bg-surface); }
.pl-row.stale { opacity: 0.6; }
.pl-info { min-width: 0; }
.pl-name { font-weight: 700; color: var(--text-primary); }
.pl-game { color: var(--text-secondary); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-since { color: var(--text-muted); font-size: 0.8rem; }
.pl-empty { color: var(--text-muted); text-align: center; padding: 12px 0; }
@media (max-width: 400px) {
  .playing-chip { min-width: 40px; padding: 0 2px; }
}

/* icons only on a phone (after the base rule, so it wins) */
@media (max-width: 640px) {
  .navbar-link { padding: 0; width: 42px; height: 42px; justify-content: center; }
  .navbar-link-text { display: none; }
}
.pl-row.shared .pl-stack { flex: none; }
.pl-row.shared .pl-avatar { width: 34px; height: 34px; border-color: var(--bg-surface); }
.pl-row.shared .pl-stack .pl-avatar + .pl-avatar { margin-left: -12px; }

.navbar-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
@media (max-width: 400px) {
  .navbar-left { gap: 2px; }
  .navbar-link { width: 38px; height: 38px; }
}
