/* Allgemeine Container-Styles */
.neon-container {
    max-width: 98%;
    margin: 2rem auto;
    padding: 35px;
    background: #1a1a1a;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    box-sizing: border-box;
}
/* Grid-Layout für Editor + Vorschau */
.editor-preview-wrapper {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
}
/* Editor-Bereich */
.editor-section {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    overflow-x: hidden;
}
.neon-editor {
    width: 100%;
    height: 300px;
    padding: 15px;
    background: #000;
    border: 2px solid #0ff;
    border-radius: 8px;
    color: #0ff;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    text-shadow: 0 0 5px #0ff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: auto;
}
/* Button-Styles */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}
.neon-button {
    background: #000;
    color: #0ff;
    border: 2px solid #0ff;
    padding: 10px 25px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
    flex-grow: 1;
}
.neon-button:hover {
    background: #0ff;
    color: #000;
    box-shadow: 0 0 20px #0ff;
}
/* Vorschau-Bereich */
.preview-section {
    position: relative;
    overflow: hidden;
    max-width: 100%;
}
/* Wrapper für den Neon-Rahmen und Glow-Effekt */
.neon-preview-wrapper {
    position: relative;
    padding: 20px;
    border: 3px solid;
    border-image: linear-gradient(45deg, #0ff, #f0f);
    border-image-slice: 1;
    border-radius: 10px;
    animation: glow 2s ease-in-out infinite alternate;
    background: #000;
    box-sizing: border-box;
    width: 100%;
}
/* Innerer Container für den scrollbaren Inhalt */
.neon-preview-inner {
    width: 100%;
    height: 400px;
    overflow: auto;
    background: #000;
    /* Entfernt, da wir das Zooming anders implementieren */
    /* transform-origin: top left; */
}

/* Container für das zoombare Diagram */
.zoom-container {
    min-width: 100%;
    min-height: 100%;
    display: inline-block;
    transition: transform 0.2s ease;
}

/* Scrollleiste für Webkit-Browser (Chrome, Safari) */
.neon-preview-inner::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}
.neon-preview-inner::-webkit-scrollbar-track {
    background: #000;
    border-radius: 10px;
}
.neon-preview-inner::-webkit-scrollbar-thumb {
    background: #0ff;
    border-radius: 10px;
    box-shadow: 0 0 10px #0ff;
}
.neon-preview-inner::-webkit-scrollbar-thumb:hover {
    background: #00cccc;
}
/* Scrollleiste für Firefox */
.neon-preview-inner {
    scrollbar-width: thin;
    scrollbar-color: #0ff #000;
}
/* Zoom-Controls */
.zoom-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.zoom-btn {
    background: #000;
    color: #0ff;
    border: 1px solid #0ff;
    padding: 5px 15px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.zoom-btn:hover {
    background: rgba(0, 255, 255, 0.2);
}
/* Zoom-Level Anzeige */
.zoom-level {
    color: #0ff;
    margin-left: auto;
    padding: 5px 10px;
    font-size: 14px;
}
/* Mermaid-Diagramm-Styling */
.mermaid {
    background: transparent !important;
}
.mermaid svg {
    background: transparent !important;
    max-width: 100%;
}
.mermaid .node rect,
.mermaid .node circle,
.mermaid .node polygon {
    stroke: #0ff !important;
    stroke-width: 2px !important;
    fill: #000 !important;
    filter: drop-shadow(0 0 5px #0ff);
}
.mermaid .edgePath path {
    stroke: #f0f !important;
    filter: drop-shadow(0 0 3px #f0f);
}
.mermaid .label {
    color: #0ff !important;
    text-shadow: 0 0 5px #0ff;
}
/* Error-Meldung Styling */
.error {
    color: #ff4d4d;
    border: 1px solid #ff4d4d;
    padding: 10px;
    border-radius: 5px;
    background: rgba(255, 77, 77, 0.1);
}
/* Responsive Design */
@media (max-width: 768px) {
    .editor-preview-wrapper {
        grid-template-columns: 1fr;
    }
    
    .preview-section {
        order: -1;
    }
    
    .neon-preview-inner {
        height: 300px;
    }
}
/* Glow-Animation */
@keyframes glow {
    from {
        box-shadow: 0 0 10px rgba(0, 255, 255, 0.5),
                    0 0 20px rgba(255, 0, 255, 0.3);
    }
    to {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.8),
                    0 0 30px rgba(255, 0, 255, 0.5),
                    0 0 40px rgba(255, 0, 255, 0.3);
    }
}