@font-face {
    font-family: 'Deltarune';
    src: url('/undertale-deltarune-text-font-extended.ttf') format('truetype');
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #000;
    overflow: hidden;
    position: relative;
}

body.fullscreen-active {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
}

canvas {
    background-color: #000;
    border: none;
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto;
    position: relative;
    z-index: 20;
    /* Ensures pixels remain sharp when scaled up, crucial for pixel art. */
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#fightBackground {
    display: none;
    position: absolute;
    z-index: 10;
}

#fightBackground.active {
    display: block;
}

#mobileControls {
    display: none; /* Hidden by default */
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40vh; /* Increased from 30vh to 40vh */
    pointer-events: none; /* Allow clicks to pass through to canvas */
}

#joystickArea {
    position: absolute;
    bottom: 30px; /* Increased from 20px */
    left: 30px; /* Increased from 20px */
    width: 150px; /* Increased from 120px */
    height: 150px; /* Increased from 120px */
    pointer-events: auto; /* Enable interaction */
}

#zButton {
    position: absolute;
    bottom: 30px; /* Increased from 20px */
    right: 30px; /* Increased from 20px */
    width: 100px; /* Increased from 60px */
    height: 100px; /* Increased from 60px */
    border-radius: 50%;
    background-color: rgba(255, 0, 0, 0.5);
    color: white;
    font-family: 'Deltarune', sans-serif;
    font-size: 40px; /* Increased from 24px */
    border: 3px solid white; /* Increased from 2px */
    pointer-events: auto; /* Enable interaction */
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

#editorControls {
    position: static; /* Remove absolute positioning */
    top: auto;
    left: auto;
    right: auto;
    z-index: auto;
}

#toggleEditor {
    background-color: #444;
    color: white;
    border: 2px solid #666;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Deltarune', sans-serif;
    cursor: pointer;
    width: 100%; /* Make buttons fill the container width */
}

#toggleEditor:hover {
    background-color: #555;
}

#categoryContainer {
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-radius: 4px;
    line-height: 1.4;
}

.categoryHeader {
    margin: 5px 0;
    padding-bottom: 3px;
    border-bottom: 1px solid #555;
    font-size: 14px;
}

#tileSelector, #objectSelector, #npcSelector, #toolSelector {
    display: flex;
    gap: 3px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.tileButton {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 3px 5px;
    cursor: pointer;
    min-width: 60px;
    min-height: 60px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.tileButton.active {
    background-color: #4a4a4a;
    border-color: #fff;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.tileButton span {
    position: absolute;
    bottom: 2px;
    font-size: 9px;
}

.tileButton[data-tile="select"] span,
.tileButton[data-tile="delete"] span {
    position: relative;
    bottom: 0;
    margin-top: 5px;
}

.tileButton[data-tile="select"] {
    background-color: #2c4d65;
    position: relative;
}

.tileButton[data-tile="select"]:hover {
    background-color: #3a6080;
}

.tileButton[data-tile="select"].active {
    background-color: #4a7090;
    box-shadow: 0 0 5px #7ab;
}

#editorInfo {
    font-size: 13px;
    margin-top: 10px;
    color: #c4a7e7;
    background-color: #2d2b40;
    padding: 8px;
    border-radius: 4px;
    line-height: 1.4;
}

#layerSelector {
    margin-top: 10px;
    margin-bottom: 10px;
    background-color: #222;
    padding: 5px;
}

#layerSelector h4 {
    margin: 5px 0;
    font-size: 14px;
    color: #c4a7e7;
}

#layerButtons {
    display: flex;
    gap: 3px;
    margin-top: 5px;
}

.layerButton {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 3px 0;
    cursor: pointer;
    min-width: 30px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.layerButton.active {
    background-color: #555;
    border-color: #fff;
}

#generateTrees {
    margin-top: 15px;
    background-color: #2c652c;
    color: white;
    border: 1px solid #3a8a3a;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-family: 'Deltarune', sans-serif;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#generateTrees:hover {
    background-color: #3a8a3a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

#propertiesPanel {
    position: fixed;
    top: 60px;
    width: 400px;
    background-color: rgba(20, 20, 30, 0.9);
    border: 2px solid #666;
    border-radius: 5px;
    padding: 10px;
    color: white;
    font-family: 'Deltarune', sans-serif;
    z-index: 1001; /* Increased z-index to be on top of other potential UI */
    display: none; /* Hidden by default */
    overflow-y: auto; /* Add scroll for vertical overflow */
    box-sizing: border-box; /* Ensures padding and border are included in the width */
}

#propertiesPanel::-webkit-scrollbar {
    display: none; /* For Webkit browsers */
}

#propertiesPanel h4 {
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #555;
}

#propertiesPanel h5 {
    margin: 10px 0 5px 0;
    color: #eee;
    font-size: 14px;
}

#propertiesPanel .objectProperties {
    display: none;
}
#propertiesPanel .objectProperties.active {
    display: block;
}

.property-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.property-row label {
    flex-basis: 80px;
    flex-shrink: 0;
}

.property-row input[type="range"] {
    flex-grow: 1;
}

.property-row #scaleValue {
    min-width: 35px;
    flex-shrink: 0;
    text-align: right;
    padding-right: 5px;
}

.property-row .propertyInput {
    width: 60px;
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 5px;
    font-family: 'Deltarune', sans-serif;
}

.property-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

#npcAction {
    width: auto;
    flex-grow: 1;
}

#npcDialogueProperties {
    margin-top: 15px;
}

#dialogueLinesContainer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    background-color: rgba(0,0,0,0.2);
    border: 1px solid #555;
    border-radius: 3px;
}

.dialogue-line-editor {
    display: flex;
    flex-direction: column; /* Stack elements vertically inside each card */
    gap: 5px;
    align-items: stretch; /* Make children fill the width of the card */
    background-color: #333344;
    padding: 5px;
    border-radius: 3px;
    position: relative; /* Needed for positioning the remove button */
    flex-shrink: 0; /* Prevent cards from shrinking */
}

.dialogue-line-editor textarea {
    flex-grow: 1;
    background-color: #2b2b3a;
    color: white;
    border: 1px solid #555;
    padding: 5px;
    font-family: 'Deltarune', sans-serif;
    resize: none; /* Disable resizing to maintain a consistent layout */
    min-height: 40px;
    font-size: 12px;
    width: 100%;
    box-sizing: border-box;
}

.dialogue-line-editor .face-selector {
    background-color: #2b2b3a;
    color: white;
    border: 1px solid #555;
    padding: 5px;
    font-family: 'Deltarune', sans-serif;
    font-size: 11px;
}

.dialogue-line-editor .remove-dialogue-line {
    position: absolute; /* Position button in the corner of the card */
    top: 3px;
    right: 3px;
    background-color: #8b3c3c;
    color: white;
    border: 1px solid #a85151;
    cursor: pointer;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
    padding: 0;
    line-height: 20px; /* Vertically center the 'X' */
    text-align: center;
    z-index: 1;
}

#addDialogueLine {
    background-color: #2c652c;
    color: white;
    border: 1px solid #3a8a3a;
    padding: 8px 12px;
    border-radius: 3px;
    cursor: pointer;
    width: 100%;
    font-family: 'Deltarune', sans-serif;
    margin-top: 5px;
}

#updateNpcProperties {
    background-color: #2c652c;
    color: white;
    border: 1px solid #3a8a3a;
    padding: 8px 12px;
    border-radius: 3px;
    cursor: pointer;
    width: 100%;
    font-family: 'Deltarune', sans-serif;
    margin-top: 5px;
}

#updateNpcProperties:hover {
    background-color: #3a8a3a;
}

#signProperties textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 80px;
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 5px;
    font-family: 'Deltarune', sans-serif;
    margin-bottom: 5px;
    resize: vertical;
}

#updateSignText {
    background-color: #2c652c;
    color: white;
    border: 1px solid #3a8a3a;
    padding: 8px 12px;
    border-radius: 3px;
    cursor: pointer;
    width: 100%;
    font-family: 'Deltarune', sans-serif;
}

#updateSignText:hover {
    background-color: #3a8a3a;
}

#debugStats {
    position: absolute;
    bottom: 10px;
    right: 10px;
    left: auto;
    background-color: rgba(20, 20, 30, 0.8);
    color: white;
    padding: 8px;
    font-family: 'Deltarune', sans-serif;
    font-size: 12px;
    z-index: 1001; /* Above other UI */
    pointer-events: none;
    border: 1px solid #666;
    border-radius: 4px;
    display: none; /* Controlled by JS */
    line-height: 1.4;
}

#uiToggleButton {
    /* @tweakable The styling for the main UI toggle button */
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 200; /* High z-index to be on top of other elements */
    background-color: rgba(68, 68, 68, 0.8);
    color: white;
    border: 2px solid #888;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

#uiToggleButton:hover {
    background-color: rgba(85, 85, 85, 0.9);
    transform: scale(1.05);
}

#uiContainer {
    /* @tweakable The styling for the container holding the UI buttons */
    position: absolute;
    top: 65px; /* Position below the toggle button */
    left: 10px;
    z-index: 199;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: rgba(30, 30, 45, 0.9);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #555;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform-origin: top left;
}

#uiContainer.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

#fullscreenButton,
#musicToggleButton,
#debugFightButton,
#editorControls {
    position: static; /* Remove absolute positioning */
    top: auto;
    left: auto;
    right: auto;
    z-index: auto;
}

#toggleFullscreen,
#toggleMusic,
#debugFight,
#toggleEditor {
    width: 100%; /* Make buttons fill the container width */
}

#toggleFullscreen {
    background-color: rgba(68, 68, 68, 0.7);
    color: white;
    border: 2px solid #666;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Deltarune', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s;
}

#toggleFullscreen:hover {
    background-color: rgba(85, 85, 85, 0.8);
}

#toggleMusic {
    /* @tweakable The styling for the music toggle button */
    background-color: rgba(68, 68, 68, 0.7);
    color: white;
    border: 2px solid #666;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Deltarune', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s;
    /* @tweakable The font size for the music toggle button icon */
    font-size: 16px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#toggleMusic:hover {
    background-color: rgba(85, 85, 85, 0.8);
}

/* @tweakable Debug fight button styling */
#debugFightButton {
    /* This rule is now empty, positioning is handled by #uiContainer flexbox */
}

#debugFight {
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    border: 2px solid #666;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Deltarune', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#debugFight:hover {
    background-color: rgba(255, 50, 50, 0.8);
}

#generatorMenu {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    background-color: rgba(20, 20, 30, 0.95);
    border: 2px solid #666;
    border-radius: 5px;
    padding: 15px;
    color: white;
    font-family: 'Deltarune', sans-serif;
    z-index: 102; /* Above properties panel */
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    flex-direction: row;
    gap: 15px;
}

#generatorWobbleCharacter {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#generatorWobbleCharacter img {
    width: 128px;
    height: auto;
    image-rendering: pixelated;
}

#generatorOptionsContainer {
    flex-grow: 1;
}

.generator-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.generator-option label {
    flex-basis: 100px;
    flex-shrink: 0;
}

.generator-option input[type="range"] {
    flex-grow: 1;
}

.generator-option span {
    min-width: 25px;
    text-align: right;
}

.generator-option select {
    flex-grow: 1;
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 5px;
    font-family: 'Deltarune', sans-serif;
}

.generator-button {
    background-color: #444;
    color: white;
    border: 2px solid #666;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Deltarune', sans-serif;
    cursor: pointer;
    width: 48%;
    display: inline-block;
    margin-top: 10px;
}

#generateNewMap {
    background-color: #2c652c;
    border-color: #3a8a3a;
    margin-right: 2%;
}

#generateNewMap:hover {
    background-color: #3a8a3a;
}

#closeGeneratorMenu:hover {
    background-color: #555;
}

#introSequence, #introBlackScreen, #introText {
    display: none;
}

#splashScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease-out;
}

#splashScreen img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Add a media query for square screens */
@media (max-width: 768px) {
    #mobileControls {
        display: block;
    }
    
    #editorControls {
        display: block !important; /* Override the display: none for mobile */
        top: auto;
        bottom: 20px;
        right: 20px;
        left: auto;
        z-index: 200; /* Above mobile controls */
    }
    
    #toggleEditor {
        padding: 12px 16px;
        font-size: 16px;
        border-radius: 8px;
        background-color: rgba(68, 68, 68, 0.9);
        border: 3px solid #888;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
    }
    
    #toggleEditor:hover,
    #toggleEditor:active {
        background-color: rgba(85, 85, 85, 0.9);
        transform: scale(1.05);
    }
    
    /* @tweakable Mobile editor panel adjustments */
    #propertiesPanel {
        width: 90vw !important;
        max-width: 350px !important;
        max-height: 60vh !important;
        left: 5vw !important;
        top: auto !important;
        bottom: 10px !important;
        font-size: 14px;
    }
    
    /* @tweakable Mobile editor button sizing */
    .tileButton {
        min-width: 50px;
        min-height: 50px;
        font-size: 10px;
    }
    
    /* @tweakable Mobile editor text input sizing */
    .property-row input,
    .property-row select,
    .property-row textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 8px;
    }
    
    /* @tweakable Mobile editor touch targets */
    .editor-cat-button {
        min-height: 60px;
        padding: 10px 5px;
    }
    
    /* @tweakable Mobile editor scrollable content */
    .editor-content {
        max-height: 200px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* @tweakable Prevent text selection during touch interactions in editor */
.editor-mode * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

@media (aspect-ratio: 1/1) {
    #gameCanvas, #mobileControls, #editorControls {
        display: none;
    }
    
    #splashScreen {
        opacity: 1 !important;
        display: flex !important;
    }
    
    #splashScreen img {
        max-width: 100%;
        max-height: 100%;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* Add custom scrollbar styling */
::-webkit-scrollbar {
    /* @tweakable The width of the scrollbar. */
    width: 10px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #333;
    border-radius: 0;
    border: 1px solid #444;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 0;
    border: 1px solid #666;
    image-rendering: pixelated;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: #777;
    border-color: #888;
}

::-webkit-scrollbar-corner {
    background: #333;
}

#editorTools {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.editorTool {
    background-color: #333344;
    color: white;
    border: 1px solid #8860d0;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Deltarune', sans-serif;
    transition: all 0.2s ease;
    flex-grow: 1;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.editorTool:hover {
    background-color: #444455;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

#layerOpacityControls {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.layerOpacityControl {
    display: flex;
    align-items: center;
    gap: 10px;
}

.layerOpacityControl label {
    min-width: 70px;
    font-size: 12px;
}

.layerOpacityControl input {
    flex-grow: 1;
    background: #333344;
    border: none;
    height: 8px;
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
}

.layerOpacityControl input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #8860d0;
    border-radius: 50%;
    cursor: pointer;
}

#objectControls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.objectControl {
    background-color: #2c4d65;
    color: white;
    border: 1px solid #4a7090;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Deltarune', sans-serif;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.objectControl:hover {
    background-color: #3a6080;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

#inGameEditorUI {
    display: none;
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(20, 20, 30, 0.8);
    border: 2px solid #8860d0;
    border-radius: 5px;
    z-index: 1000;
    flex-direction: column;
    width: 280px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.editor-category {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    background-color: #333344;
    border-bottom: 1px solid #555;
    padding: 5px;
}

.editor-cat-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: transparent;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #ccc;
    font-family: 'Deltarune', sans-serif;
    font-size: 10px;
    transition: all 0.2s;
}

.editor-cat-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.editor-cat-button.active {
    background-color: rgba(136, 96, 208, 0.3);
    color: white;
}

.editor-cat-button img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    margin-bottom: 5px;
}

.editor-content {
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.editor-panel {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}

.editor-panel.active {
    display: grid;
}

.editor-panel .tileButton {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #333;
    border: 1px solid #555;
    padding: 5px;
    cursor: pointer;
    height: 60px;
}

.editor-panel .tileButton img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-bottom: 5px;
}

.editor-panel .tileButton span {
    position: relative;
    color: white;
    font-size: 10px;
    font-family: 'Deltarune', sans-serif;
}

.editor-panel .tileButton:hover {
    background-color: #444;
    border-color: #777;
}

#blueprintPanel {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    max-height: 80vh;
    background-color: rgba(20, 20, 30, 0.95);
    border: 2px solid #8860d0;
    border-radius: 5px;
    z-index: 2000;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
    color: white;
    font-family: 'Deltarune', sans-serif;
    padding: 10px;
}

#blueprintPanel h4 {
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #555;
    text-align: center;
}

#mapPackList {
    margin-bottom: 15px;
}

#mapPackList h5, #blueprintListContainer h5 {
    margin: 5px 0;
    font-size: 14px;
    color: #c4a7e7;
    padding-bottom: 3px;
    border-bottom: 1px solid #555;
}

#mapPacks,
#blueprintList {
    overflow-y: auto;
    max-height: 150px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    background-color: rgba(0,0,0,0.2);
    margin-bottom: 10px;
}

.map-pack-item,
.blueprint-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333344;
    padding: 8px;
    border-radius: 3px;
}

.map-pack-item span,
.blueprint-item span {
    flex-grow: 1;
}

.map-pack-item button,
.blueprint-item button {
    background-color: #2c652c;
    color: white;
    border: 1px solid #3a8a3a;
    padding: 5px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Deltarune', sans-serif;
    margin-left: 5px;
}

.blueprint-item .delete-btn {
    background-color: #8b3c3c;
    border-color: #a85151;
}

#blueprintActions {
    display: flex;
    gap: 10px;
}

#blueprintName {
    flex-grow: 1;
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 5px;
    font-family: 'Deltarune', sans-serif;
}

#saveBlueprint, #closeBlueprintPanel {
    background-color: #2c4d65;
    border-color: #4a7090;
}

#mapGeneratorControls {
    margin-top: 10px;
    background-color: rgba(20, 20, 30, 0.8);
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #555;
    display: flex;
    gap: 10px;
    align-items: center;
}

#mapGeneratorControls label {
    font-family: 'Deltarune', sans-serif;
    color: white;
}

#mapGeneratorControls select,
#mapGeneratorControls button {
    font-family: 'Deltarune', sans-serif;
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 5px;
    border-radius: 3px;
}

#mapGeneratorControls button {
    background-color: #2c652c;
    border-color: #3a8a3a;
    cursor: pointer;
}

#mapGeneratorControls button:hover {
    background-color: #3a8a3a;
}