/* ===== Multiplayer Overlay Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');

#mpLobby, .mp-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 5, 16, 0.92);
    backdrop-filter: blur(20px);
    font-family: 'Inter', system-ui, sans-serif;
    transition: opacity 0.4s, visibility 0.4s;
}
#mpLobby.hidden, .mp-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.mp-panel {
    background: linear-gradient(145deg, rgba(30, 30, 60, 0.95), rgba(15, 15, 40, 0.98));
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 24px;
    padding: 40px 36px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6), 0 0 40px rgba(99, 102, 241, 0.08);
}

.mp-panel h1 {
    font-size: 2.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, #e0e7ff, #a5b4fc, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 4px;
}
.mp-panel h2 {
    color: #e0e7ff;
    font-size: 1.5rem;
    margin: 0 0 16px;
}
.mp-subtitle {
    color: #818cf8;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    margin: 0 0 28px;
}

.mp-info-box {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: left;
}
.mp-info-box p {
    margin: 6px 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}
.mp-info-box .mp-note {
    margin-top: 10px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    text-align: center;
    font-style: italic;
}

.mp-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mp-btn {
    padding: 14px 20px;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.25s;
}
.mp-btn.primary {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
}
.mp-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}
.mp-btn.secondary {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}
.mp-btn.secondary:hover {
    background: rgba(99, 102, 241, 0.35);
}
.mp-btn.ghost {
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}
.mp-btn.ghost:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.mp-join-row {
    display: flex;
    gap: 10px;
}
.mp-join-row input {
    flex: 1;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.4);
    color: #fff;
    font-size: 1.1rem;
    text-align: center;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: inherit;
}
.mp-join-row input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.mp-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
}
.mp-divider::before, .mp-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.1);
}
.mp-divider span {
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
}

.mp-error {
    color: #ef4444;
    min-height: 20px;
    margin-top: 12px;
    font-size: 0.85rem;
}

.mp-room-code {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 6px;
    color: #818cf8;
    background: rgba(0,0,0,0.4);
    padding: 16px 28px;
    border-radius: 16px;
    margin: 20px 0;
    border: 2px dashed rgba(99, 102, 241, 0.4);
    display: inline-block;
}

.mp-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: mp-spin 0.8s linear infinite;
    margin: 20px auto 10px;
}
@keyframes mp-spin { to { transform: rotate(360deg); } }

.mp-waiting-text {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

/* Status Badge */
.mp-status {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    background: rgba(15, 15, 40, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    padding: 6px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    transition: opacity 0.3s;
}
.mp-status.hidden {
    opacity: 0;
    pointer-events: none;
}
.mp-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}
.mp-status .room-code {
    font-weight: 800;
    color: #a5b4fc;
    letter-spacing: 1px;
}

@media (max-width: 480px) {
    .mp-panel { padding: 28px 20px; }
    .mp-panel h1 { font-size: 2rem; }
    .mp-room-code { font-size: 2rem; padding: 12px 20px; }
}
