body {
    margin: 0;
    padding: 0;
    background: #000;
    font-family: 'Courier New', monospace;
    color: #00aaff;
    overflow: hidden;
}

#editorContainer {
    width: 100vw;
    height: 100vh;
    background: #000;
    position: relative;
    border: 2px solid #00aaff;
    box-sizing: border-box;
}

#toolbar {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    height: 50px;
    background: #001133;
    border: 1px solid #00aaff;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 10px;
    z-index: 100;
}

.toolbar-button {
    background: #001122;
    color: #00aaff;
    border: 1px solid #00aaff;
    padding: 8px 15px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.toolbar-button:hover {
    background: #002244;
}

.toolbar-button.active {
    background: #0044aa;
    color: #ffff00;
}

#mapArea {
    position: absolute;
    top: 70px;
    left: 10px;
    right: 320px;
    bottom: 10px;
    background: #000811;
    border: 1px solid #00aaff;
    overflow: hidden;
}

#mapCanvas {
    background: #000811;
    cursor: crosshair;
    width: 100%;
    height: 100%;
}

#mapCanvas.pan-mode {
    cursor: grab;
}

#mapCanvas.pan-mode:active {
    cursor: grabbing;
}

#mapCanvas.dragging {
    cursor: grabbing;
}

#sidePanel {
    position: absolute;
    top: 70px;
    right: 10px;
    width: 400px;
    bottom: 10px;
    background: #000811;
    border: 1px solid #00aaff;
    padding: 10px;
    overflow-y: auto;
}

.panel-section {
    margin-bottom: 20px;
    border: 1px solid #002244;
    padding: 10px;
}

.panel-section h3 {
    margin: 0 0 10px 0;
    color: #ffff00;
    font-size: 14px;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 3px;
    font-size: 12px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    background: #000;
    color: #00aaff;
    border: 1px solid #00aaff;
    padding: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    box-sizing: border-box;
}

.form-group textarea {
    height: 60px;
    resize: vertical;
}

.room-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #002244;
    padding: 5px;
    background: #000;
}

.room-item {
    padding: 3px;
    cursor: pointer;
    border-bottom: 1px solid #001122;
}

.room-item:hover {
    background: #001133;
}

.room-item.selected {
    background: #002244;
    color: #ffff00;
}

.connection-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-top: 10px;
}

.connection-button {
    padding: 5px;
    text-align: center;
    border: 1px solid #00aaff;
    background: #001122;
    color: #00aaff;
    cursor: pointer;
    font-size: 10px;
}

.connection-button:hover {
    background: #002244;
}

.connection-button.active {
    background: #0044aa;
    color: #ffff00;
}

.export-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.export-button {
    padding: 8px;
    background: #001133;
    color: #00aaff;
    border: 1px solid #00aaff;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.export-button:hover {
    background: #002244;
}

#roomModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #000811;
    border: 2px solid #00aaff;
    padding: 20px;
    width: 500px;
    color: #00aaff;
}

.modal-content h3 {
    margin: 0 0 15px 0;
    color: #ffff00;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.modal-button {
    flex: 1;
    padding: 8px;
    background: #001133;
    color: #00aaff;
    border: 1px solid #00aaff;
    cursor: pointer;
    font-family: 'Courier New', monospace;
}

.modal-button:hover {
    background: #002244;
}

.modal-button.cancel {
    background: #330000;
    border-color: #ff0000;
    color: #ff0000;
}

.modal-button.cancel:hover {
    background: #440000;
}

.room-graphics {
    fill: #001133;
    stroke: #00aaff;
    stroke-width: 2;
}

.room-graphics.selected {
    fill: #ffff00;
    stroke: #ff0000;
    stroke-width: 3;
}

.connection-line {
    stroke: #00aaff;
    stroke-width: 2;
    marker-end: url(#arrowhead);
}

.connection-lineRed {
    stroke: #00aaff;
    stroke-width: 2;
    marker-end: url(#arrowheadRed);
}

.connection-lineBlue {
    stroke: #00aaff;
    stroke-width: 2;
    marker-end: url(#arrowheadBlue);
}

.connection-line.down {
    stroke: #ff6600;
    stroke-width: 3;
    stroke-opacity: 0.7;
    stroke-dasharray: 10,5;
}

.connection-line.up {
    stroke: #00ffaa;
    stroke-width: 3;
    stroke-opacity: 0.7;
    stroke-dasharray: 10,5;
}

.room-text {
    fill: #00aaff;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
}

.room-text.selected {
    fill: #000;
}

.room-name-text {
    fill: #00aaff;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
}

.room-name-text.selected {
    fill: #000;
}

.grid-lines {
    stroke: #001122;
    stroke-width: 1;
    opacity: 0.5;
}

.basic-export-section {
    background: #001122;
    border: 1px solid #0044aa;
    padding: 10px;
    margin-top: 10px;
}

.basic-line-number {
    width: 80px;
    margin-right: 10px;
}

.basic-export-controls {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.stats-info {
    font-size: 11px;
    color: #888;
    margin-top: 5px;
}

/* BASIC Code Modal */
#basicCodeModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#basicCodeModal .modal-content {
    width: 700px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.basic-code-container {
    background: #000;
    border: 1px solid #002244;
    padding: 10px;
    margin: 10px 0;
    overflow-y: auto;
    max-height: 50vh;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #00aaff;
    white-space: pre;
    line-height: 1.4;
}

.basic-code-container::-webkit-scrollbar {
    width: 8px;
}

.basic-code-container::-webkit-scrollbar-track {
    background: #000811;
}

.basic-code-container::-webkit-scrollbar-thumb {
    background: #00aaff;
    border-radius: 4px;
}

.basic-code-container::-webkit-scrollbar-thumb:hover {
    background: #0088cc;
}

.modal-button.copy {
    background: #001133;
    border-color: #00aaff;
    color: #00aaff;
}

.modal-button.copy:hover {
    background: #002244;
}

.modal-button.copy.copied {
    background: #0044aa;
    color: #ffff00;
}

/* Für tödliche Räume und Items-Liste */
.deadly-options { margin-top: 10px; }
.deadly-label { color: #ff6666; }
.items-list { 
    max-height: 80px; 
    overflow-y: auto; 
    padding: 5px; 
    margin-bottom: 5px;
}
.item-entry { display: flex; justify-content: space-between; padding: 2px 0; }
.remove-item { cursor: pointer; color: #ff6666; }
.no-items { color: #666; font-style: italic; }
.warning-box { background: #331100; border: 1px solid #ff6600; padding: 8px; margin: 5px 0; border-radius: 3px; }
.success-box { background: #001133; border: 1px solid #00aaff; padding: 8px; margin: 5px 0; border-radius: 3px; }
.context-menu { background: #000811; border: 1px solid #00aaff; }
.context-menu-item { padding: 5px 10px; cursor: pointer; }
.context-menu-item:hover { background: #001133; }


/* Tab-System für Hilfe/Walkthrough */
.tab-container {
    display: flex;
    background: #000811;
    border-bottom: 2px solid #00aaff;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border: 1px solid #002244;
    border-bottom: none;
    background: #001122;
    color: #00aaff;
    margin-right: 2px;
}

.tab.active {
    background: #001133;
    font-weight: bold;
}

.tab:hover {
    background: #002244;
}

.tab-content {
    display: none;
    height: 100%;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

#helpContent {
    padding: 20px;
    line-height: 1.6;
    max-width: 800px;
    font-size: 12px;
}

#helpContent h2 {
    color: #00ccff;
    border-bottom: 1px solid #002244;
    padding-bottom: 5px;
    margin-top: 25px;
}

#helpContent h3 {
    color: #00bbff;
    margin-top: 15px;
}

#helpContent code {
    background: #001122;
    padding: 2px 6px;
    border-radius: 3px;
    color: #00ffff;
}

#helpContent ul {
    margin-left: 20px;
}

#helpContent .example {
    background: #000811;
    border-left: 3px solid #00aaff;
    padding: 10px;
    margin: 10px 0;
}

.walkthrough-container {
    padding: 20px;
    max-width: 900px;
}

.walkthrough-step {
    background: #001122;
    border: 1px solid #002244;
    padding: 12px;
    margin: 8px 0;
    border-radius: 5px;
}

.walkthrough-step .step-number {
    color: #00ffff;
    font-weight: bold;
    margin-right: 10px;
}

.walkthrough-step .command {
    color: #ffff00;
    font-family: monospace;
    background: #000811;
    padding: 2px 6px;
    border-radius: 3px;
}

.walkthrough-info {
    color: #888;
    font-style: italic;
    margin-top: 5px;
}

.walkthrough-header {
    background: #001133;
    border: 2px solid #00aaff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}