/* Map Editor Styles */

:root {
    --neon-blue: #00f3ff;
    --neon-gold: #ffd700;
    --neon-pink: #ff00ff;
    --dark-bg: #0a0a0a;
    --panel-bg: #1a1a1a;
    --border-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: var(--dark-bg);
    color: #fff;
    overflow: hidden;
}

#editor-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* TOOLBAR */
#editor-toolbar {
    height: 60px;
    background: #111;
    border-bottom: 2px solid var(--neon-blue);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0, 243, 255, 0.3);
}

.toolbar-left, .toolbar-center, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-nav-links .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 243, 255, 0.1);
    border: 2px solid rgba(0, 243, 255, 0.3);
    border-radius: 8px;
    color: var(--neon-blue);
    text-decoration: none;
    font-size: 18px;
    transition: all 0.2s;
    cursor: pointer;
}

.admin-nav-links .nav-link:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.admin-nav-links .nav-link.active {
    background: var(--neon-blue);
    border-color: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
}

.header-logo {
    height: 28px;
    width: auto;
    margin: 0 10px;
    filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.5));
}

.editor-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
}

.map-name {
    color: #888;
    font-size: 14px;
}

.btn-icon, .tool-btn, .btn-action {
    padding: 8px 15px;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-icon:hover, .tool-btn:hover, .btn-action:hover {
    background: #333;
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.tool-btn.active {
    background: var(--neon-blue);
    color: #000;
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px var(--neon-blue);
}

.btn-primary {
    background: var(--neon-blue);
    color: #000;
    font-weight: bold;
}

.btn-danger {
    background: #ff4444;
    color: #fff;
    border-color: #ff4444;
}

.btn-full {
    width: 100%;
    padding: 10px;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-full:hover {
    background: #333;
    border-color: var(--neon-blue);
}

/* LAYOUT */
#editor-layout {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.sidebar {
    width: 300px;
    background: var(--panel-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

#right-sidebar {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

.sidebar-header {
    padding: 15px;
    background: #111;
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
    color: var(--neon-blue);
    text-shadow: 0 0 5px var(--neon-blue);
}

.panel-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.panel-empty {
    text-align: center;
    color: #666;
    padding: 40px 20px;
}

.tool-panel {
    display: none;
}

.tool-panel.active {
    display: block;
}

/* CANVAS AREA */
#canvas-area {
    flex: 1;
    position: relative;
    background: #0a0a0a;
    overflow: hidden;
}

#canvas-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.8);
    padding: 5px;
    border: 1px solid #444;
    border-radius: 5px;
}

#canvas-controls button {
    padding: 5px 10px;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    cursor: pointer;
    font-size: 11px;
}

#canvas-controls button:hover {
    background: #333;
    border-color: var(--neon-blue);
}

.zoom-info {
    padding: 5px 10px;
    color: #888;
    font-size: 11px;
}

#editor-canvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* MINIMAP */
#minimap-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 200px;
    height: 200px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
}

#minimap-canvas {
    width: 100%;
    height: 100%;
}

/* PANELS */
.panel-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.panel-section:last-child {
    border-bottom: none;
}

.panel-section h4 {
    color: var(--neon-gold);
    margin-bottom: 10px;
    font-size: 14px;
}

.hint {
    font-size: 11px;
    color: #666;
    margin-bottom: 10px;
}

/* FORM ELEMENTS */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #aaa;
    font-size: 12px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    background: #111;
    border: 1px solid #444;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
}

.form-group input[type="color"] {
    width: 100%;
    height: 40px;
    background: #111;
    border: 1px solid #444;
    cursor: pointer;
}

.form-group input[type="range"] {
    width: 80%;
    margin-right: 10px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
    cursor: pointer;
}

/* LISTS */
.item-list {
    max-height: 300px;
    overflow-y: auto;
    background: #111;
    border: 1px solid #333;
    border-radius: 3px;
}

.list-item {
    padding: 10px;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.list-item:hover {
    background: #1a1a1a;
}

.list-item.selected {
    background: rgba(0, 243, 255, 0.2);
    border-left: 3px solid var(--neon-blue);
}

.list-item button {
    padding: 4px 8px;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    cursor: pointer;
    font-size: 11px;
}

/* UPLOAD AREA */
.upload-area {
    border: 2px dashed #444;
    border-radius: 5px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: var(--neon-blue);
    background: rgba(0, 243, 255, 0.05);
}

.upload-area.dragover {
    border-color: var(--neon-gold);
    background: rgba(255, 215, 0, 0.1);
}

.upload-prompt {
    color: #888;
    font-size: 14px;
}

/* SPRITES GRID */
.sprites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.sprite-item {
    aspect-ratio: 1;
    background: #111;
    border: 2px solid #333;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s;
}

.sprite-item:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.sprite-item.selected {
    border-color: var(--neon-gold);
    box-shadow: 0 0 15px var(--neon-gold);
}

.sprite-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.library-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #666;
    padding: 40px;
}

/* ANIMATION FRAMES */
.animation-frames {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px;
    background: #111;
    border: 1px solid #333;
    border-radius: 3px;
    margin-bottom: 15px;
}

.frame-slot {
    width: 60px;
    height: 60px;
    background: #0a0a0a;
    border: 2px dashed #444;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.frame-slot.filled {
    border-style: solid;
    border-color: var(--neon-blue);
}

.frame-slot img {
    max-width: 100%;
    max-height: 100%;
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--panel-bg);
    border: 2px solid var(--neon-blue);
    border-radius: 10px;
    min-width: 500px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.5);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--neon-blue);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-secondary {
    padding: 10px 20px;
    background: #333;
    border: 1px solid #555;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
}

/* SCROLLBARS */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #111;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* NOTIFICATIONS */
.editor-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.editor-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background: #00ff88;
    color: #000;
    border: 2px solid #00ff88;
}

.notification-error {
    background: #ff4444;
    color: #fff;
    border: 2px solid #ff4444;
}

.notification-warning {
    background: #ffaa00;
    color: #000;
    border: 2px solid #ffaa00;
}

.notification-info {
    background: var(--neon-blue);
    color: #000;
    border: 2px solid var(--neon-blue);
}

/* SHORTCUTS HELP BUTTON */
.shortcuts-help-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--neon-blue);
    color: #000;
    border: 2px solid var(--neon-blue);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 20px var(--neon-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s;
}

.shortcuts-help-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px var(--neon-blue);
}

/* UNSAVED CHANGES INDICATOR */
.unsaved-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4444;
    margin-left: 10px;
    animation: pulse 1.5s infinite;
}

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

/* RESPONSIVENESS */
@media (max-width: 1400px) {
    .sidebar {
        width: 250px;
    }
}

@media (max-width: 1200px) {
    #editor-toolbar {
        flex-wrap: wrap;
        height: auto;
        padding: 10px;
    }

    .toolbar-center {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    .tool-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* ============================================
   PHASE 2A: NEUE MODAL-STYLES
   ============================================ */

/* Modal Sizes */
.modal-small .modal-content {
    max-width: 500px;
}

.modal-large .modal-content {
    max-width: 1200px;
    max-height: 80vh;
}

/* Modal Icon */
.modal-icon {
    font-size: 32px;
    margin-right: 10px;
}

/* Modal Input */
.modal-input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background: #0a0e14;
    border: 2px solid #444;
    color: #fff;
    border-radius: 5px;
    margin-top: 10px;
}

.modal-input:focus {
    border-color: var(--neon-cyan);
    outline: none;
}

/* Map Status Tabs */
.map-status-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.map-status-tab {
    padding: 10px 20px;
    background: transparent;
    border: 2px solid #444;
    color: #fff;
    cursor: pointer;
    border-radius: 5px 5px 0 0;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.map-status-tab:hover {
    background: #1a1e24;
    border-color: var(--neon-cyan);
}

.map-status-tab.active {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    border-color: var(--neon-cyan);
    color: #000;
}

/* Maps Grid */
.maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.no-maps {
    text-align: center;
    color: #888;
    padding: 40px;
    font-size: 18px;
}

/* Map Card */
.map-card {
    background: linear-gradient(135deg, #0a0e14, #1a1e24);
    border: 2px solid #333;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.map-card:hover {
    border-color: var(--neon-cyan);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.3);
}

.map-thumbnail {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #1a1e24, #2a2e34);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.map-info {
    padding: 15px;
}

.map-info h4 {
    margin: 0 0 10px 0;
    color: var(--neon-gold);
    font-size: 18px;
}

.map-author {
    color: #888;
    font-size: 12px;
    margin: 5px 0;
}

.map-mode {
    color: var(--neon-cyan);
    font-size: 14px;
    margin: 5px 0;
}

.map-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-top: 10px;
}

.map-status-badge.status-draft {
    background: rgba(255, 200, 0, 0.2);
    color: #ffc800;
    border: 1px solid #ffc800;
}

.map-status-badge.status-published {
    background: rgba(0, 255, 100, 0.2);
    color: #00ff64;
    border: 1px solid #00ff64;
}

.map-status-badge.status-archived {
    background: rgba(150, 150, 150, 0.2);
    color: #999;
    border: 1px solid #999;
}

.map-actions {
    padding: 15px;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

/* Scrollbar Styles */
.maps-grid::-webkit-scrollbar {
    width: 8px;
}

.maps-grid::-webkit-scrollbar-track {
    background: #0a0e14;
}

.maps-grid::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 4px;
}

.maps-grid::-webkit-scrollbar-thumb:hover {
    background: var(--neon-purple);
}

/* Selection Highlight (for Select Tool) */
.selection-highlight {
    stroke: var(--neon-cyan);
    stroke-width: 3px;
    stroke-dasharray: 10 5;
    fill: none;
    animation: dash 1s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: -15;
    }
}

/* ============================================ */
/* MODAL STYLES */
/* ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.editor-modal {
    background: #1a1a1a;
    border: 2px solid var(--neon-blue);
    border-radius: 10px;
    min-width: 400px;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.modal-overlay.show .editor-modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #111;
    border-bottom: 1px solid var(--neon-blue);
}

.modal-icon {
    font-size: 24px;
}

.modal-title {
    flex: 1;
    font-size: 18px;
    color: var(--neon-blue);
    font-weight: bold;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.modal-close:hover {
    color: #ff4444;
}

.modal-content {
    padding: 20px;
    max-height: 50vh;
    overflow-y: auto;
    line-height: 1.6;
}

.modal-footer {
    padding: 15px 20px;
    background: #111;
    border-top: 1px solid #333;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-btn {
    padding: 10px 25px;
    background: linear-gradient(135deg, #00f3ff, #0088ff);
    border: none;
    border-radius: 5px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
}

/* Modal Typen */
.modal-success .modal-header { border-color: #00ff00; }
.modal-success .modal-title { color: #00ff00; }

.modal-error .modal-header { border-color: #ff4444; }
.modal-error .modal-title { color: #ff4444; }

.modal-warning .modal-header { border-color: #ffaa00; }
.modal-warning .modal-title { color: #ffaa00; }

/* ============================================ */
/* MAP SELECTION MODAL */
/* ============================================ */

.map-selection-modal {
    min-width: 500px;
    max-width: 700px;
}

.map-selection-actions {
    margin-bottom: 20px;
}

.map-btn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.map-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.map-selection-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.map-selection-item {
    padding: 15px;
    background: #222;
    border: 1px solid #444;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.map-selection-item:hover {
    background: #333;
    border-color: var(--neon-blue);
    transform: translateX(5px);
}

.map-item-name {
    font-size: 16px;
    font-weight: bold;
    color: var(--neon-blue);
    margin-bottom: 5px;
}

.map-item-info {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #888;
}

.map-selection-empty {
    text-align: center;
    padding: 30px;
    color: #666;
}

.map-selection-loading {
    text-align: center;
    padding: 30px;
    color: var(--neon-blue);
}

.map-selection-error {
    text-align: center;
    padding: 20px;
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
}

/* ============================================ */
/* NOTIFICATION STYLES */
/* ============================================ */

.editor-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #1a1a1a;
    border: 2px solid var(--neon-blue);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    z-index: 10001;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

.editor-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification-success {
    border-color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
}

.notification-error {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.notification-warning {
    border-color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
}

.notification-info {
    border-color: var(--neon-blue);
    background: rgba(0, 243, 255, 0.1);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    /* Toolbar auf mobile optimieren */
    #editor-toolbar {
        height: auto;
        min-height: 60px;
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .toolbar-left, .toolbar-center, .toolbar-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .toolbar-center {
        order: 3;
    }

    .tool-group {
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .tool-btn {
        font-size: 11px;
        padding: 6px 10px;
        white-space: nowrap;
    }

    /* Sidebars ausblendbar machen */
    #left-sidebar, #right-sidebar {
        position: absolute;
        top: 0;
        width: 280px;
        height: 100%;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    #right-sidebar {
        right: 0;
        left: auto;
        transform: translateX(100%);
    }

    #left-sidebar.mobile-visible {
        transform: translateX(0);
    }

    #right-sidebar.mobile-visible {
        transform: translateX(0);
    }

    /* Canvas area full width */
    #canvas-area {
        width: 100%;
    }

    /* Canvas controls */
    #canvas-controls {
        flex-wrap: wrap;
        gap: 5px;
    }

    #canvas-controls button {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* Minimap kleiner */
    #minimap-container {
        width: 120px;
        height: 120px;
    }

    #minimap-canvas {
        width: 120px !important;
        height: 120px !important;
    }

    /* Modals */
    .modal-content {
        width: 95vw;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-small {
        width: 90vw;
    }

    .modal-large {
        width: 95vw;
    }

    /* Form groups */
    .form-row {
        flex-direction: column;
    }

    .form-group {
        margin-bottom: 15px;
    }

    /* Notifications */
    .editor-notification {
        width: 90vw;
        font-size: 12px;
    }

    /* Header logo kleiner */
    .header-logo {
        height: 30px;
    }

    /* Map name display */
    .map-name {
        font-size: 12px;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Shortcuts help button größer */
    .shortcuts-help-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    /* Toolbar noch kompakter */
    #editor-toolbar {
        padding: 5px;
    }

    .btn-action {
        font-size: 11px;
        padding: 6px 10px;
    }

    .editor-title {
        font-size: 14px;
    }

    /* Tool buttons kleiner */
    .tool-btn {
        font-size: 10px;
        padding: 5px 8px;
    }

    /* Sidebars volle Breite */
    #left-sidebar, #right-sidebar {
        width: 100%;
    }

    /* Panel sections */
    .panel-section {
        padding: 10px;
    }

    .panel-section h4 {
        font-size: 14px;
    }

    /* Form elements größer für Touch */
    input[type="text"],
    input[type="number"],
    input[type="color"],
    select,
    textarea {
        font-size: 16px; /* Verhindert Zoom auf iOS */
        padding: 10px;
        min-height: 44px; /* iOS Touch-Target */
    }

    button {
        min-height: 44px; /* iOS Touch-Target */
        padding: 10px 15px;
    }

    /* Canvas controls */
    #canvas-controls {
        padding: 5px;
        gap: 3px;
    }

    #canvas-controls button {
        font-size: 11px;
        padding: 4px 8px;
        min-height: 36px;
    }

    /* Zoom info */
    .zoom-info {
        font-size: 11px;
    }

    /* Maps grid */
    .maps-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .map-card {
        padding: 12px;
    }

    /* Map status tabs */
    .map-status-tabs {
        overflow-x: auto;
        gap: 5px;
    }

    .map-status-tab {
        font-size: 11px;
        padding: 8px 12px;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    /* Sehr kleine Displays */
    .btn-action span {
        display: none; /* Nur Icons zeigen */
    }

    .toolbar-left span.editor-title {
        display: none;
    }

    /* Minimap noch kleiner oder ausblenden */
    #minimap-container {
        width: 80px;
        height: 80px;
    }

    #minimap-canvas {
        width: 80px !important;
        height: 80px !important;
    }

    /* Form labels */
    label {
        font-size: 12px;
    }

    /* Notifications */
    .editor-notification {
        font-size: 11px;
        padding: 8px 12px;
    }
}

/* Touch-specific improvements */
@media (hover: none) and (pointer: coarse) {
    /* Größere Touch-Targets */
    button, .tool-btn, .btn-action {
        min-height: 48px;
        min-width: 48px;
    }

    /* Scroll-Snapping für Tool-Gruppen */
    .tool-group {
        scroll-snap-type: x mandatory;
    }

    .tool-btn {
        scroll-snap-align: start;
    }

    /* Tap highlight */
    * {
        -webkit-tap-highlight-color: rgba(0, 243, 255, 0.2);
    }
}

/* Landscape auf Mobile */
@media (max-width: 1024px) and (orientation: landscape) {
    #editor-toolbar {
        height: auto;
        min-height: 50px;
    }

    .sidebar {
        width: 250px;
    }

    #minimap-container {
        width: 100px;
        height: 100px;
    }
}

