* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
    gap: 0;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: #2a2a2a;
    border-right: 2px solid #444;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 20px;
    background: #1a1a1a;
    border-bottom: 1px solid #444;
}

.sidebar-header h2 {
    color: #4a9eff;
    font-size: 1.3em;
    margin-bottom: 15px;
}

/* Suchfeld */
.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px;
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 0.95em;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    border-color: #4a9eff;
    box-shadow: 0 0 8px rgba(74, 158, 255, 0.3);
}

.search-input::placeholder {
    color: #888;
}

/* Suchergebnisse */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2a2a2a;
    border: 1px solid #444;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #333;
    transition: background 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #333;
    color: #4a9eff;
}

.search-result-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.search-result-npc {
    font-weight: bold;
    color: #4a9eff;
}

.search-result-type {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #d8b46b;
    border: 1px solid #7b6442;
    border-radius: 10px;
    padding: 2px 6px;
    flex-shrink: 0;
}

.search-result-location {
    font-size: 0.85em;
    color: #888;
    margin-top: 3px;
}

.npc-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
}

.npc-list li {
    padding: 12px 15px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    background: #2a2a2a;
}

.npc-list li:hover {
    background: #333;
    border-left-color: #4a9eff;
    padding-left: 20px;
}

.npc-list li.active {
    background: #3a3a3a;
    border-left-color: #4a9eff;
    color: #4a9eff;
    font-weight: bold;
}

/* Kategorien */
.category {
    background: #1f1f1f;
    border-bottom: 1px solid #444;
}

.category-header {
    padding: 12px 15px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: #252525;
    font-weight: bold;
    color: #4a9eff;
    transition: all 0.2s ease;
    gap: 10px;
}

.category-header:hover {
    background: #2a2a2a;
    padding-left: 20px;
}

.category-toggle {
    display: inline-block;
    width: 20px;
    text-align: center;
    transition: transform 0.2s ease;
    font-size: 0.8em;
    flex-shrink: 0;
}

.category.expanded .category-toggle {
    transform: rotate(90deg);
}

.category-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.category.expanded .category-items {
    max-height: 500px;
}

.category-item {
    padding: 10px 15px 10px 35px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    background: #2a2a2a;
    font-size: 0.95em;
}

.category-item:hover {
    background: #333;
    border-left-color: #4a9eff;
    padding-left: 40px;
}

.category-item.active {
    background: #3a3a3a;
    border-left-color: #4a9eff;
    color: #4a9eff;
    font-weight: bold;
}

/* Haupt-Bereich */
.map-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.map-view {
    flex: 1;
    position: relative;
    overflow: auto;
    background: #000;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
}

.map-wrapper {
    position: relative;
    display: inline-block;
}

.map-content {
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    cursor: pointer;
    display: block;
}

/* Hotspots */
.hotspots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hotspot {
    position: absolute;
    padding: 4px 8px;
    background: rgba(74, 158, 255, 0.8);
    color: #fff;
    border: 2px solid #4a9eff;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.75em;
    transition: all 0.2s ease;
    white-space: nowrap;
    pointer-events: auto;
}

.hotspot:hover {
    background: rgba(74, 158, 255, 1);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.6);
}

.hotspot.active {
    background: rgba(255, 100, 100, 0.9);
    border-color: #ff6464;
}

/* NPC Hervorhebung - nur visueller Marker */
.npc-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.npc-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: transparent;
    border-radius: 50%;
}

.npc-marker:hover {
    border-color: transparent;
    box-shadow: none;
    transform: none;
}

.npc-label {
    position: absolute;
    background: rgba(255, 200, 100, 0.9);
    color: #000;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
    white-space: nowrap;
    pointer-events: auto;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.npc-label:hover {
    background: rgba(255, 200, 100, 1);
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(255, 200, 100, 0.6);
}

/* Mob Label - Rote Markierung */
.mob-label {
    position: absolute;
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
    white-space: nowrap;
    pointer-events: auto;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    border: 2px solid #c82333;
}

.mob-label:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.8);
}

.npc-label.active {
    background: rgba(102, 204, 102, 0.9);
    border: 2px solid #66cc66;
    box-shadow: 0 0 10px rgba(102, 204, 102, 0.8);
}

.mob-label.active {
    background: rgba(102, 204, 102, 0.9);
    border: 2px solid #66cc66;
    box-shadow: 0 0 10px rgba(102, 204, 102, 0.8);
}

/* Info Panel */
.info-panel {
    padding: 12px 15px;
    background: #2a2a2a;
    border-top: 2px solid #444;
    min-height: auto;
    max-height: 100px;
    overflow-y: auto;
}

.info-panel h3 {
    color: #4a9eff;
    margin-bottom: 5px;
    font-size: 1em;
}

.info-panel p {
    color: #b0b0b0;
    line-height: 1.4;
    font-size: 0.9em;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2a2a2a;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
        border-right: none;
        border-bottom: 2px solid #444;
    }

    .npc-list {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
    }

    .npc-list li {
        white-space: nowrap;
    }
}

/* NPC Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    padding: 30px;
    border: 2px solid #4a9eff;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    color: #e0e0e0;
    box-shadow: 0 8px 32px rgba(74, 158, 255, 0.2);
    position: relative;
    animation: slideIn 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h2 {
    color: #4a9eff;
    margin-bottom: 15px;
    font-size: 1.5em;
    margin-top: 0;
}

.modal-content p {
    color: #b0b0b0;
    line-height: 1.8;
    font-size: 1em;
}

.modal-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 15px 0;
    display: block;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #4a9eff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close:hover {
    color: #fff;
    transform: scale(1.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
