/* ═══════════════════════════════════════════════════════
   nexus-lobby.css  —  Lobby, player list, waiting, join, toast
   ═══════════════════════════════════════════════════════ */

/* ── Lobby panel wrapper ── */
.lobby-panel { max-width: 560px; text-align: center; }

/* ── Room code display ── */
.room-code-section { margin: 1.5rem 0; }
.room-code-label {
    font-size: 0.78rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: #818cf8; margin-bottom: 0.5rem;
}
.room-code-display {
    display: inline-flex; align-items: center; gap: 0.75rem;
    background: rgba(99,102,241,0.12);
    border: 1.5px solid rgba(99,102,241,0.35);
    border-radius: 16px; padding: 0.75rem 1.25rem;
}
.room-code-text {
    font-size: 2.4rem; font-weight: 800;
    letter-spacing: 0.15em; color: #fff;
}
.copy-code-btn {
    background: rgba(99,102,241,0.2); border: none; color: #818cf8;
    width: 36px; height: 36px; border-radius: 8px;
    cursor: pointer; font-size: 0.95rem;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.copy-code-btn:hover   { background: rgba(99,102,241,0.35); color: #fff; }
.copy-code-btn.copied  { color: #34d399; }

/* ── In-lobby game info strip ── */
.lobby-game-info {
    display: flex; align-items: center; justify-content: center; gap: 1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px; padding: 0.75rem 1rem;
    margin-bottom: 1.5rem; text-align: left;
}
.lobby-game-info img,
.lobby-game-info .lobby-thumb-placeholder {
    width: 48px; height: 48px; border-radius: 9px;
    object-fit: cover; background: rgba(99,102,241,0.12); flex-shrink: 0;
}
.lobby-thumb-placeholder {
    display: flex; align-items: center; justify-content: center;
    color: #6366f1; font-size: 1.2rem;
}
.lobby-game-title { font-size: 0.95rem; font-weight: 700; color: #e6eef8; }
.lobby-game-mode  { font-size: 0.8rem; color: #818cf8; margin-top: 0.1rem; }

/* ── Player list header ── */
.lobby-players-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0.5rem;
}
.lobby-players-title {
    font-size: 0.78rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: #64748b;
}
.lobby-player-count { font-size: 0.78rem; color: #818cf8; font-weight: 700; }

/* ── Player list box ── */
.lobby-player-list {
    min-height: 80px; max-height: 220px; overflow-y: auto;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px; display: block; margin-bottom: 1.5rem;
}
.lobby-player-list::-webkit-scrollbar       { width: 4px; }
.lobby-player-list::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.4); border-radius: 4px; }

.lobby-empty-state {
    display: flex; align-items: center; justify-content: center;
    min-height: 80px; color: #4b5563; font-size: 0.9rem;
}

/* ── Player rows ── */
.lobby-player-row {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.15s;
}
.lobby-player-row:last-child { border-bottom: none; }
.lobby-player-row:hover      { background: rgba(255,255,255,0.03); }

.lobby-player-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    border: 2px solid rgba(129,140,248,0.3);
}
.lobby-player-name {
    font-size: 0.95rem; font-weight: 700; color: #e6eef8; flex: 1;
}
.lobby-host-badge {
    font-size: 0.65rem; font-weight: 800;
    letter-spacing: 0.07em; text-transform: uppercase;
    background: rgba(99,102,241,0.2);
    border: 1px solid rgba(99,102,241,0.45);
    color: #818cf8; padding: 0.18rem 0.5rem; border-radius: 50px;
}

.start-game-btn { width: 100%; padding: 1rem; font-size: 1.05rem; }

/* ══════════════════════════════════════
   PLAYER-WAITING PANEL
   ══════════════════════════════════════ */
.player-waiting-panel { max-width: 420px; text-align: center; }

.pw-avatar {
    width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
    border: 3px solid #818cf8;
    box-shadow: 0 0 0 4px rgba(129,140,248,0.2);
    margin: 0 auto 0.6rem; display: block;
}
.pw-name   { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 1.25rem; }
.pw-status { font-size: 0.9rem; color: #64748b; margin-bottom: 0.35rem; }

.pw-pulse {
    display: inline-block; width: 8px; height: 8px;
    border-radius: 50%; background: #34d399;
    box-shadow: 0 0 6px #34d399;
    animation: pw-blink 1.5s ease-in-out infinite;
    margin-right: 0.4rem;
}
@keyframes pw-blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

.pw-leave-btn {
    margin-top: 1.5rem; width: 100%; padding: 0.85rem;
    border-color: rgba(239,68,68,0.4); color: #fca5a5;
}

/* ══════════════════════════════════════
   JOIN PANEL
   ══════════════════════════════════════ */
.join-panel { max-width: 440px; }

.room-code-input {
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(99,102,241,0.3);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 1.6rem; font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase; text-align: center;
    width: 100%; outline: none; transition: border-color 0.2s;
}
.room-code-input:focus       { border-color: #6366f1; }
.room-code-input::placeholder { color: #334155; font-size: 1.2rem; letter-spacing: 0.1em; font-weight: 600; }

/* ══════════════════════════════════════
   TOAST
   ══════════════════════════════════════ */
.nexus-toast {
    position: fixed; bottom: 2rem; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(99,102,241,0.95);
    color: #fff; padding: 0.7rem 1.5rem; border-radius: 50px;
    font-size: 0.95rem; font-weight: 700; z-index: 9999;
    opacity: 0; transition: opacity 0.3s, transform 0.3s;
    pointer-events: none; white-space: nowrap;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.nexus-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
