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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);

    /* Restrict width & center the block */
    max-width: 800px;
    margin: 20px auto; /* top/bottom 20px, auto left/right */
    text-align: center;
    border-radius: 12px; /* optional: rounded edges */
}


.header h1 {
    color: #2d3748;
    font-size: 28px;
    margin-bottom: 10px;
}

.header p {
    color: #718096;
    font-size: 14px;
}

.logo {
    display: block;
    margin: 0 auto 20px; /* center + spacing */
    max-width: 220px;    /* scale up */
    height: auto;        /* keep proportions */
}

.footer {
    background: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 12px 20px;
    font-size: 13px;
    color: #4a5568;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    margin-top: auto; /* pushes footer to bottom */
}


.main-container {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.map-section {
    flex: 1;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

#map {
    height: 700px;
    width: 100%;
}

.loading-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.sidebar {
    width: 420px;
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    max-height: 700px;
}

.location-info {
    display: none;
}

.location-info.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.location-header {
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.location-name {
    font-size: 24px;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 5px;
}

.suitability-score {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    margin-top: 10px;
}

.score-excellent {
    background: #10b981;
    color: white;
}

.score-good {
    background: #3b82f6;
    color: white;
}

.score-moderate {
    background: #f59e0b;
    color: white;
}

.score-limited {
    background: #ef4444;
    color: white;
}

.metric-card {
    background: #f7fafc;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.metric-title {
    font-size: 12px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 20px;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 5px;
}

.metric-detail {
    font-size: 13px;
    color: #718096;
    line-height: 1.5;
}

.chart-container {
    margin-top: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 12px;
}

.advantages-list {
    margin-top: 20px;
}

.advantage-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.advantage-icon {
    width: 24px;
    height: 24px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.advantage-text {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.5;
}

.legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.legend-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 13px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
}

.data-layers {
    margin-top: 20px;
    padding: 15px;
    background: #edf2f7;
    border-radius: 12px;
}

.layer-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.layer-toggle input {
    margin-right: 8px;
}

.initial-message {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.initial-message h3 {
    color: #2d3748;
    margin-bottom: 15px;
}

.recommendations {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea15, #764ba215);
    border-radius: 12px;
    border: 1px solid #667eea30;
}

.recommendations h4 {
    color: #5a67d8;
    margin-bottom: 10px;
    font-size: 16px;
}

.recommendation-item {
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.recommendation-item:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #667eea;
}

.cable-marker {
    background: transparent;
    border: none;
    font-size: 20px;
}