← All Workshops

MudEngine Part 9: The Twin Guardians

Step 9 / 11

CSS Additions

Add styles for the quest panel, guardian indicators, and action buttons. Append these to assets/main.css:

mud-engine/assets/main.css
/* ── Quest panel ── */
.quest-panel {
    margin: 12px 0;
    padding: 12px 16px;
    background: #1a1030;
    border: 1px solid #6a3aaa;
    border-radius: 8px;
}

.quest-title {
    font-size: 16px;
    font-weight: bold;
    color: #d0b0f0;
    margin-bottom: 8px;
}

.quest-guardians {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quest-guardian {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    background: #2a1a40;
    color: #8a6aaa;
}

.quest-guardian.active {
    background: #2a3a20;
    color: #80d080;
    border: 1px solid #60a060;
}

.quest-active-msg {
    margin-top: 8px;
    font-size: 13px;
    color: #f0d060;
    font-weight: bold;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ── Quest action buttons ── */
.quest-actions {
    margin: 8px 0;
    text-align: center;
}

.quest-btn {
    padding: 10px 24px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    border: 2px solid #6a3aaa;
    border-radius: 8px;
    background: #2a1a40;
    color: #d0b0f0;
    cursor: pointer;
    transition: all 0.2s;
}

.quest-btn:hover {
    background: #3a2a5a;
    border-color: #8a5aca;
    transform: scale(1.05);
}

.quest-btn:active {
    transform: scale(0.95);
}

/* ── Quest completion state ── */
.quest-panel.completed {
    border-color: #f0d060;
    background: #2a2a10;
    animation: none;
}

.quest-phase-hint {
    font-size: 12px;
    color: #8a8aaa;
    margin-bottom: 8px;
    font-style: italic;
}

.quest-complete-msg {
    font-size: 14px;
    color: #f0d060;
    font-weight: bold;
    text-align: center;
    padding: 8px;
}

/* ── NPC dialog (King Aldric) ── */
.npc-dialog {
    margin: 12px 0;
    padding: 14px 18px;
    background: #1a1828;
    border: 1px solid #4a3a6a;
    border-radius: 10px;
    border-left: 4px solid #8a5aca;
}

.npc-name {
    font-size: 14px;
    font-weight: bold;
    color: #d0b0f0;
    margin-bottom: 6px;
}

.npc-text {
    font-size: 13px;
    color: #b0a0c0;
    line-height: 1.5;
    font-style: italic;
}

.npc-text.highlight {
    color: #f0d060;
    font-weight: bold;
}
Step 9 / 11