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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow: hidden;
}

/* Map container */
#map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

/* Map overlay with title */
.map-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(44, 62, 80, 0.85);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

.map-overlay h1 {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
    font-weight: 300;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.map-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
    font-style: italic;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.map-overlay .goal {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    opacity: 0.8;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Legend */
.legend {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(44, 62, 80, 0.85);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
    min-width: 200px;
}

.legend h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 0.8rem;
    border: 1px solid rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.legend-item span {
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Country tooltip styles */
.country-tooltip {
    background: white;
    color: #333;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    max-width: 250px;
}

.country-tooltip h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    border-bottom: 2px solid #FF8C00;
    padding-bottom: 0.3rem;
}

.country-tooltip p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.country-tooltip strong {
    color: #E74C3C;
    font-weight: 600;
}

/* Germany-specific tooltip styling */
.germany-tooltip h4 {
    border-bottom: 2px solid #FFD700;
}

.germany-tooltip strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Poland-specific tooltip styling */
.poland-tooltip h4 {
    border-bottom: 2px solid #FF8C00;
}

.poland-tooltip strong {
    color: #E74C3C;
    font-weight: 600;
}

/* Russia-specific tooltip styling */
.russia-tooltip h4 {
    border-bottom: 2px solid #E74C3C;
}

.russia-tooltip strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Ukraine-specific tooltip styling */
.ukraine-tooltip h4 {
    border-bottom: 2px solid #27AE60;
}

.ukraine-tooltip strong {
    color: #2c3e50;
    font-weight: 600;
}

/* USA-specific tooltip styling */
.usa-tooltip h4 {
    border-bottom: 2px solid #27AE60;
}

.usa-tooltip strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Responsive design */
@media (max-width: 768px) {
    .map-overlay {
        top: 10px;
        left: 10px;
        padding: 0.75rem 1rem;
    }
    
    .map-overlay h1 {
        font-size: 1.2rem;
    }
    
    .map-overlay p {
        font-size: 0.8rem;
    }
    
    .legend {
        top: auto;
        bottom: 10px;
        right: 10px;
        padding: 0.75rem 1rem;
        min-width: 180px;
    }
    
    .legend h3 {
        font-size: 1rem;
    }
    
    .legend-item {
        font-size: 0.8rem;
    }
    
    .legend-color {
        width: 14px;
        height: 14px;
        margin-right: 0.6rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.map-overlay:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .map-overlay {
        display: none;
    }
}
