.jvm-map-container {
    width: 100%;
    max-width: 800px;
    height: 600px;
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin: 40px auto;
    font-family: inherit;
}

/* Zoom Controls */
.jvm-zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
}

.jvm-zoom-controls button {
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.jvm-zoom-controls button:hover {
    background: #f5f5f5;
    color: #dd3333;
}

.jvm-map-target {
    width: 100%;
    height: 100%;
}

.jvm-map-container svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Default state: Red (Not Visited) */
.jvm-map-container .prefecture {
    fill: #dd3333 !important; 
    transition: fill 0.3s ease, filter 0.3s ease;
    cursor: pointer;
    stroke: #ffffff !important;
    stroke-width: 1px !important;
}

/* Visited state: Green */
.jvm-map-container .prefecture.visited {
    fill: #6ca754 !important;
}

/* Hover effect - Lift up effect without transforming coordinates */
.jvm-map-container .prefecture:hover {
    filter: brightness(1.15) drop-shadow(4px 6px 6px rgba(0,0,0,0.5));
}

/* Distance lines for Okinawa (excluding castle markers) */
.jvm-map-container line {
    stroke-width: 2px !important;
    stroke: #dcdde1 !important;
}

.jvm-map-container .castle-marker line {
    stroke-width: 0.5px !important;
    stroke: #333333 !important;
}

/* Cities: greyish styling */
.jvm-map-container .city-label {
    fill: #999999 !important;
    font-weight: normal !important;
}
.jvm-map-container .city-dot {
    fill: #b2bec3 !important;
}

/* Articles Mode Overrides */
.jvm-map-container[data-mode="articles"] .prefecture {
    fill: #e5e7eb !important;
}
.jvm-map-container[data-mode="articles"] .prefecture.visited {
    fill: #6ca754 !important;
}

/* Legend styling */
.jvm-legend {
    position: absolute;
    bottom: 20px;
    right: 66px; /* Platziert die Legende links neben die Zoom-Buttons (20px + 36px + 10px Lücke) */
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 500;
    color: #475569;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    z-index: 5;
    max-width: 60%;
    pointer-events: none;
}
.jvm-legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.jvm-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
    flex-shrink: 0;
}
.jvm-legend-text {
    line-height: 1.3;
}

/* Custom Tooltip Link Hint */
.jvm-tooltip-click-hint {
    margin-top: 8px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: underline;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.jvm-tooltip-click-hint .jvm-arrow {
    font-size: 13px;
    color: #ffffff;
    text-decoration: none; /* Keine Unterstreichung für den Pfeil */
    display: inline-block;
}

/* Castles Mode Overrides */
.jvm-map-container[data-mode="castles"] .prefecture {
    fill: #e5e7eb !important;
    stroke: #ffffff !important;
    cursor: default !important;
}
.jvm-map-container[data-mode="castles"] .prefecture:hover {
    filter: none !important;
}

/* Placement Mode (Admin-only) */
.jvm-placement-hint {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    pointer-events: none;
}

.placement-mode svg {
    cursor: crosshair !important;
}

/* Custom Tooltip */
.jvm-tooltip {
    position: absolute;
    background: rgba(51, 51, 51, 0.98);
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    transform: translate(-50%, -100%);
    margin-top: -15px;
    z-index: 10;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    width: 220px;
    text-align: center;
    overflow: hidden;
    font-family: inherit;
}

@media (max-width: 768px) {
    .jvm-map-container {
        height: 450px;
    }
    .jvm-tooltip {
        pointer-events: auto !important;
        cursor: pointer;
    }
}

.jvm-mobile-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 20;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
}

.jvm-mobile-overlay.jvm-show {
    opacity: 1;
}

.jvm-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(51, 51, 51, 0.98) transparent transparent transparent;
}

.jvm-tooltip-image {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.jvm-tooltip-title {
    padding: 10px 10px 5px 10px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.jvm-tooltip-info {
    padding: 0 10px 12px 10px;
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.4;
}
