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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.controls {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.control-group label {
    font-weight: bold;
    min-width: 100px;
}

.control-group input,
.control-group select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    flex: 1;
    max-width: 300px;
    background: white;
    cursor: pointer;
}

.control-group select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    color: #999;
}

.control-group input {
    cursor: text;
}

.control-group button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background 0.3s;
}

.control-group button:hover {
    background: #5568d3;
}

.control-group button:active {
    background: #4557b8;
}

.control-group button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.control-group .location-btn {
    background: #10b981;
    margin-left: 10px;
}

.control-group .location-btn:hover {
    background: #059669;
}

.control-group .location-btn:active {
    background: #047857;
}

.legend {
    border-top: 2px solid #eee;
    padding-top: 15px;
}

.legend h3 {
    margin-bottom: 10px;
    color: #333;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: #f9f9f9;
    border-radius: 5px;
    font-size: 0.9em;
}

.legend-item .icon {
    font-size: 1.2em;
}

#map {
    height: 600px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: white;
}

.status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.status.loading {
    background: #fff3cd;
    color: #856404;
}

.status.success {
    background: #d4edda;
    color: #155724;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
}

/* 現在位置マーカー */
.current-location-icon {
    background: transparent !important;
    border: none !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* カスタムマーカーアイコン - 同心円配置 */
.custom-marker-icon {
    background: transparent !important;
    border: none !important;
}

.marker-container {
    position: relative;
    width: 200px;
    height: 200px;
}

.center-pin {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    z-index: 2;
    filter: drop-shadow(0 0 2px white) drop-shadow(0 0 4px white);
}

.disaster-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    z-index: 1;
    background: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Leafletポップアップのカスタマイズ */
.leaflet-popup-content {
    min-width: 300px;
}

.popup-content h3 {
    margin-bottom: 10px;
    color: #667eea;
    border-bottom: 2px solid #667eea;
    padding-bottom: 5px;
}

.popup-content .info-row {
    margin: 8px 0;
    display: flex;
    gap: 5px;
}

.popup-content .label {
    font-weight: bold;
    color: #555;
}

.popup-content .disaster-types {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.popup-content .disaster-types h4 {
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #666;
}

.popup-content .disaster-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.popup-content .disaster-tag {
    background: #667eea;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.85em;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .control-group {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group label {
        min-width: auto;
    }

    .control-group input,
    .control-group select {
        max-width: none;
    }

    .legend-items {
        flex-direction: column;
    }

    #map {
        height: 400px;
    }
}
