← All Workshops

MudEngine Part 11: Peer-to-Peer (Hybrid)

Step 10 / 12

CSS additions

Add connection screen styles to assets/main.css:

mud-engine/assets/main.css
/* ── P2P Connection Screen ── */
.p2p-screen {
    text-align: center;
    padding: 60px 20px;
    max-width: 480px;
    margin: 0 auto;
}

.p2p-screen h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.p2p-choices {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
}

.p2p-btn {
    padding: 14px 32px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    background: #12122a;
    color: #d0d0e0;
    cursor: pointer;
    transition: all 0.2s;
}

.p2p-btn:hover {
    background: #1a3050;
    transform: scale(1.03);
}

.p2p-btn.host {
    border-color: #60a060;
    color: #80d080;
}

.p2p-btn.join {
    border-color: #60a0ff;
}

.p2p-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
}

.p2p-form input {
    width: 100%;
    max-width: 360px;
    padding: 10px 14px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
    border: 2px solid #3b82f6;
    border-radius: 6px;
    background: #12122a;
    color: #d0d0e0;
    outline: none;
    box-sizing: border-box;
}

.mdns-hint {
    margin-top: 24px;
    padding: 12px 16px;
    background: #1a1a30;
    border-radius: 8px;
    font-size: 13px;
    color: #8a8aaa;
    line-height: 1.5;
}
Step 10 / 12