/* Map Specific Styles */

/* Nuclear Site Attack Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Attacked Nuclear Sites */
.nuclear-site-marker.attacked-site {
    z-index: 1000 !important;
}

.attacked-site .nuclear-icon-container {
    position: relative;
    border: 3px solid #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
}

.attacked-site .nuclear-icon-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid #ff0000;
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
}

/* Enhanced Nuclear Popup for Attacked Sites */
.nuclear-site-popup.attacked-popup .leaflet-popup-content-wrapper {
    background: #fff5f5;
    border: 2px solid #ff0000;
    box-shadow: 0 5px 20px rgba(255, 0, 0, 0.3);
}

.nuclear-site-popup.attacked-popup .leaflet-popup-tip {
    background: #fff5f5;
    border-color: #ff0000;
}

/* Pulse Circle Animation */
.pulse-circle {
    animation: pulse-opacity 2s infinite;
}

@keyframes pulse-opacity {
    0%, 100% {
        fill-opacity: 0.3;
    }
    50% {
        fill-opacity: 0.6;
    }
}

.map-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
    color: white;
    padding: 1.2rem 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.4);
    position: relative;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.map-header .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.map-header h1 {
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.map-header h1 i {
    font-size: 2rem;
    color: #4CAF50;
}

.title-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.main-title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.map-header .subtitle {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.9;
    color: #B0BEC5;
    letter-spacing: 0.5px;
}

.back-link {
    color: white;
    text-decoration: none;
    padding: 0.7rem 1.8rem;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(33, 150, 243, 0.3);
    font-size: 0.95rem;
}

.back-link i {
    font-size: 1.1rem;
}

.back-link:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(33, 150, 243, 0.4);
}

.back-link:active {
    transform: translateY(0);
}

/* Map Container */
.map-container {
    height: calc(100vh - 70px);
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Map Controls Top */
.map-controls-top {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: white;
    padding: 0.8rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Map Controls Bottom */
.map-controls-bottom {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: white;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    max-width: 90%;
}

.control-group {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.control-btn:hover {
    background: #f0f0f0;
}

.control-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.layer-controls {
    display: flex;
    gap: 3rem;
}

.layer-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.layer-controls label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    font-size: 0.8rem;
    white-space: nowrap;
}

.layer-controls input[type="checkbox"] {
    cursor: pointer;
}

/* Map Legend */
.map-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    max-width: 250px;
}

.map-legend h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #333;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.legend-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.legend-icon.iron-dome {
    width: 20px;
    height: 20px;
    background: rgba(0, 123, 255, 0.3);
    border: 2px solid #007bff;
    border-radius: 50%;
}

/* Info Panel */
.info-panel {
    position: absolute;
    top: 150px;
    right: 20px;
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.info-panel h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

#info-content {
    font-size: 0.9rem;
    line-height: 1.5;
}

#info-content p {
    margin: 0.5rem 0;
}

#info-content strong {
    color: #333;
}

/* Custom Marker Styles */
.iron-dome-marker {
    background: #007bff;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Removido .nuclear-marker - agora usando .nuclear-icon-container */

.base-marker {
    background: white;
    border: 2px solid #333;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Iron Dome Coverage Circles */
.iron-dome-coverage {
    fill: rgba(0, 123, 255, 0.1);
    stroke: #007bff;
    stroke-width: 2;
    stroke-dasharray: 5, 5;
}

/* Popup Styles */
.leaflet-popup-content {
    min-width: 250px;
    max-width: 350px;
    padding: 0;
}

.popup-content {
    padding: 0;
}

.popup-title {
    font-weight: 600;
    font-size: 1.2rem;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    color: #1a1a2e;
    margin: 0;
    border-radius: 8px 8px 0 0;
}

.popup-info {
    padding: 15px 20px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.popup-info p {
    margin: 0.5rem 0;
    display: flex;
    align-items: flex-start;
}

.popup-info strong {
    color: #495057;
    min-width: 100px;
    margin-right: 10px;
}

.leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.leaflet-popup-tip {
    background: white;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

/* Extra Controls */
.extra-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 1002;
}

.tool-btn {
    background: white;
    border: 2px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.tool-btn.active {
    background: #d32f2f;
    color: white;
    border-color: #d32f2f;
}

.marker-counter {
    background: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Dark mode styles */
body.dark-mode {
    background: #1a1a1a;
}

body.dark-mode .map-header {
    background: #2a2a2a;
}

body.dark-mode .map-controls-top,
body.dark-mode .map-controls-bottom,
body.dark-mode .map-legend,
body.dark-mode .info-panel,
body.dark-mode .favorites-menu {
    background: rgba(42, 42, 42, 0.95);
    color: #fff;
}

body.dark-mode .control-btn,
body.dark-mode .tool-btn {
    background: rgba(52, 52, 52, 0.95);
    border-color: #555;
    color: #fff;
}

body.dark-mode .control-btn:hover,
body.dark-mode .tool-btn:hover {
    background: rgba(72, 72, 72, 0.95);
}

body.dark-mode .leaflet-popup-content-wrapper {
    background: rgba(42, 42, 42, 0.95);
    color: #fff;
}

body.dark-mode .popup-title {
    background: rgba(52, 52, 52, 0.95);
    color: #fff;
    border-bottom-color: #555;
}

body.dark-mode .popup-info strong {
    color: #adb5bd;
}

/* Legend toggle */
.legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.legend-toggle {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px;
}

.map-legend.collapsed .legend-items {
    display: none;
}

.map-legend.collapsed {
    padding: 1rem;
}

/* Favorites menu */
.favorites-menu {
    position: absolute;
    top: 80px;
    right: 20px;
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 1001;
    min-width: 250px;
}

.favorites-menu h4 {
    margin: 0 0 1rem 0;
    color: #333;
}

.save-view-btn {
    width: 100%;
    background: #d32f2f;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
}

.favorite-item {
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.favorite-item:hover {
    background: #f0f0f0;
}

.delete-favorite {
    color: #d32f2f;
    cursor: pointer;
}

/* Distance tool line */
.distance-line {
    stroke: #d32f2f;
    stroke-width: 2;
    stroke-dasharray: 5, 5;
}

.distance-label {
    background: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Distance popup styles */
.distance-popup .leaflet-popup-content {
    padding: 0;
    min-width: 200px;
}

.distance-result {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: white;
    border-radius: 8px;
}

.distance-icon {
    font-size: 2rem;
    opacity: 0.9;
}

.distance-value {
    display: flex;
    flex-direction: column;
}

.distance-value strong {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.distance-value span {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 2px;
}

.distance-popup .leaflet-popup-content-wrapper {
    padding: 0;
    overflow: hidden;
}

/* Enhanced distance popup */
.distance-popup-enhanced .leaflet-popup-content {
    min-width: 280px;
    padding: 15px;
}

.distance-result-enhanced {
    font-size: 0.9rem;
}

.distance-result-enhanced h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
}

.distance-result-enhanced .info-row {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
}

.distance-result-enhanced .info-label {
    color: #666;
    font-weight: 600;
}

.distance-result-enhanced .info-value {
    color: #333;
}

/* Distance markers */
.distance-marker {
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    cursor: pointer;
}

/* Finalize button animation */
#finalize-distance-btn {
    animation: bounceIn 0.5s ease-out;
}

@keyframes bounceIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .main-title {
        font-size: 1.3rem;
    }
    
    .map-header .subtitle {
        font-size: 0.85rem;
    }
    
    .back-link {
        padding: 0.6rem 1.4rem;
        font-size: 0.9rem;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .map-header .container {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding: 0 1rem;
    }
    
    .header-left {
        justify-content: center;
        text-align: center;
    }
    
    .header-center {
        justify-content: center;
        order: 2;
    }
    
    .header-right {
        display: none;
    }
    
    .main-title {
        font-size: 1.1rem;
    }
    
    .map-header .subtitle {
        font-size: 0.75rem;
    }
    
    .back-link {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .map-header h1 i {
        font-size: 1.5rem;
    }
    
    .map-controls-top {
        top: 60px;
        padding: 0.5rem;
        width: 95%;
    }
    
    .map-controls-bottom {
        bottom: 10px;
        padding: 0.5rem;
        width: 98%;
        max-width: 98%;
    }
    
    .control-group {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .control-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .layer-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .layer-group {
        gap: 0.5rem;
    }
    
    .layer-controls label {
        font-size: 0.7rem;
    }
    
    .map-legend {
        bottom: 10px;
        right: 10px;
        padding: 0.5rem;
        max-width: 200px;
    }
    
    .info-panel {
        display: none;
    }
    
    .map-header h1 {
        font-size: 1.2rem;
    }
    
    .map-header .subtitle {
        display: none;
    }
}

/* City Popup Styles */
.city-popup {
    min-width: 300px;
}

.city-popup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    margin: -10px -10px 15px -10px;
    border-radius: 8px 8px 0 0;
}

.city-popup-header h3 {
    margin: 0;
    font-size: 1.4rem;
}

.country-flag {
    font-size: 1.5rem;
}

.city-popup-content {
    padding: 0 10px 10px;
}

.city-basic-info {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.city-description {
    font-style: italic;
    color: #666;
    margin: 10px 0;
}

.city-importance {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

.city-importance p {
    margin: 5px 0;
}

.city-points {
    margin-top: 10px;
}

.city-points ul {
    margin: 5px 0;
    padding-left: 20px;
}

.city-points li {
    margin: 3px 0;
    color: #555;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.4;
    }
    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Air Defense Marker */
.air-defense-marker {
    background: #17a2b8;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Pipeline Legend Style */
.legend-icon.pipeline {
    width: 20px;
    height: 2px;
    background: #FF6B6B;
    border-top: 2px dashed #FF6B6B;
}

/* Loading Overlay */
.map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.map-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Nuclear Sites Styles */
.nuclear-site-marker {
    z-index: 500;
}

.nuclear-icon-container {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border: 2px solid white;
    transition: all 0.3s ease;
}

.nuclear-icon-container:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.nuclear-icon {
    font-size: 18px;
}

/* Nuclear Site Popup */
.nuclear-popup {
    min-width: 350px;
    max-width: 500px;
}

.nuclear-popup h3 {
    margin: 0 0 5px 0;
    color: #d32f2f;
    font-size: 1.3rem;
}

.nuclear-popup h4 {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9rem;
}

.nuclear-popup h5 {
    margin: 15px 0 10px 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.nuclear-popup .popup-info p {
    margin: 8px 0;
    font-size: 0.9rem;
}

/* Satellite Image Styles */
.nuclear-popup img {
    transition: all 0.3s ease;
}

.nuclear-popup img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}

/* Enhanced popup for attacked sites */
.leaflet-popup-content {
    max-height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #888 #f0f0f0;
}

.leaflet-popup-content::-webkit-scrollbar {
    width: 8px;
}

.leaflet-popup-content::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.leaflet-popup-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.leaflet-popup-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Attack Trajectory Styles */
.attack-trajectory {
    transition: all 0.3s ease;
}

.attack-trajectory:hover {
    stroke-width: 5;
    opacity: 1;
}

/* Radar System Styles */
.radar-system-marker {
    background: transparent;
}

.radar-icon-container {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-icon {
    font-size: 24px;
    z-index: 2;
    position: relative;
}

.radar-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    border: 2px solid #00ff00;
    border-radius: 50%;
    animation: radarPulse 2s infinite;
}

@keyframes radarPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Estilos para Sites Nucleares do Irão */
.nuclear-site-marker {
    cursor: pointer;
}

.nuclear-icon-container {
    position: relative;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.nuclear-icon-container:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.7);
}

.nuclear-icon {
    font-size: 18px;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.5));
}

/* Popup específico para sites nucleares */
.nuclear-site-popup .leaflet-popup-content-wrapper {
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.nuclear-popup h3 {
    margin: 0 0 5px 0;
    color: #d32f2f;
    font-size: 1.3rem;
}

.nuclear-popup h4 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.9rem;
    font-weight: normal;
}

.nuclear-popup .popup-info p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.nuclear-popup .popup-info strong {
    color: #333;
}

/* Animação de alerta para sites nucleares ativos */
@keyframes nuclearPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

.nuclear-icon-container[style*="background-color: #ff0000"] {
    animation: nuclearPulse 2s infinite;
}

/* Animação para menu de favoritos */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para Bases Militares de Israel */
.israel-base-marker {
    cursor: pointer;
}

.israel-base-icon-container {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
    font-size: 18px;
}

.israel-base-icon-container:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.7);
}

.israel-base-icon-container.strategic {
    border: 3px solid #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Animação de pulso para bases estratégicas */
@keyframes strategicPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

.israel-base-icon-container.strategic {
    animation: strategicPulse 2s infinite;
}

/* Simulador de Alcance */
.range-simulator-menu {
    position: absolute;
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 1001;
    min-width: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.range-simulator-menu h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
}

.missile-category {
    margin-bottom: 1rem;
}

.missile-category h5 {
    margin: 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.missile-option {
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 5px;
    margin-bottom: 0.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.missile-option:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.missile-option .missile-name {
    font-weight: 500;
}

.missile-option .missile-range {
    font-size: 0.85rem;
    color: #666;
}

.range-circle-animation {
    animation: rangeExpand 2s ease-out;
}

@keyframes rangeExpand {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.range-info-popup {
    min-width: 250px;
}

.range-info-popup h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.range-info-popup .info-row {
    display: flex;
    justify-content: space-between;
    margin: 0.3rem 0;
}

.range-info-popup .info-label {
    font-weight: 600;
    color: #666;
}

.range-info-popup .info-value {
    color: #333;
}

/* Simulador ativo */
#range-simulator.active {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

/* Dark mode para o simulador */
body.dark-mode .range-simulator-menu {
    background: rgba(42, 42, 42, 0.95);
    color: #fff;
}

body.dark-mode .missile-option:hover {
    background: rgba(72, 72, 72, 0.95);
}

/* Mensagem de área não disponível */
.range-simulator-menu .unavailable-area {
    text-align: center;
    padding: 2rem 1rem;
    color: #666;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    margin: 1rem 0;
}

.range-simulator-menu .unavailable-area i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.4;
    color: #adb5bd;
}

.range-simulator-menu .unavailable-area strong {
    color: #495057;
}

body.dark-mode .range-simulator-menu .unavailable-area {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    color: #adb5bd;
}

body.dark-mode .range-simulator-menu .unavailable-area strong {
    color: #f8f9fa;
}

/* Search System */
.search-container {
    position: absolute;
    top: 80px;
    left: 20px;
    z-index: 1001;
    width: 350px;
}

.search-box {
    position: relative;
    background: white;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
}

.search-box i {
    color: #666;
    margin-right: 0.5rem;
}

#map-search {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9rem;
    background: transparent;
}

.clear-search-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 0.5rem;
}

.clear-search-btn:hover {
    color: #333;
}

.search-results {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-item:hover {
    background: #f0f0f0;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-name {
    font-weight: 500;
    color: #333;
}

.search-result-type {
    font-size: 0.8rem;
    color: #666;
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}


/* Dark mode support for search */
body.dark-mode .search-box,
body.dark-mode .search-results {
    background: rgba(42, 42, 42, 0.95);
    color: #fff;
}

body.dark-mode #map-search {
    color: #fff;
}

body.dark-mode .search-result-item:hover {
    background: rgba(72, 72, 72, 0.95);
}

body.dark-mode .search-result-type {
    background: rgba(72, 72, 72, 0.95);
    color: #aaa;
}

/* Efeito de highlight nos marcadores */
.leaflet-marker-icon.highlight-marker {
    animation: markerHighlight 2s ease-in-out infinite;
}

@keyframes markerHighlight {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
    }
    50% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1));
    }
}


/* Mobile adjustments */
@media (max-width: 768px) {
    .search-container {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
    }
}

/* Simulador de Aviões */
.aircraft-simulator-menu {
    position: absolute;
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 1001;
    min-width: 350px;
    max-height: 500px;
    overflow-y: auto;
}

.aircraft-simulator-menu h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
}

.aircraft-category {
    margin-bottom: 1rem;
}

.aircraft-category h5 {
    margin: 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aircraft-option {
    padding: 0.75rem;
    cursor: pointer;
    border-radius: 5px;
    margin-bottom: 0.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.aircraft-option:hover {
    background: #e3f2fd;
    transform: translateX(5px);
    border-color: #2196f3;
}

.aircraft-option .aircraft-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.aircraft-option .aircraft-range {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}

/* Animação para círculos de alcance de aviões */
.aircraft-range-animation {
    animation: aircraftRangeExpand 3s ease-out;
}

@keyframes aircraftRangeExpand {
    from {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 0.8;
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Popup de informações do avião */
.aircraft-info-popup .leaflet-popup-content-wrapper {
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.aircraft-popup {
    min-width: 350px;
}

.aircraft-popup h4 {
    margin: 0 0 10px 0;
    color: #1976d2;
    font-size: 1.3rem;
}

.aircraft-specs {
    background: white;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

.aircraft-specs p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.flight-times {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

/* Marcador de alvos */
.target-marker {
    z-index: 600;
}

/* Botão do simulador de aviões ativo */
#aircraft-simulator.active {
    background: #2196f3;
    color: white;
    border-color: #2196f3;
}

/* Dark mode para o simulador de aviões */
body.dark-mode .aircraft-simulator-menu {
    background: rgba(42, 42, 42, 0.95);
    color: #fff;
}

body.dark-mode .aircraft-option {
    background: rgba(72, 72, 72, 0.95);
    border-color: #555;
    color: #fff;
}

body.dark-mode .aircraft-option:hover {
    background: rgba(33, 150, 243, 0.2);
    border-color: #2196f3;
}

body.dark-mode .aircraft-popup {
    color: #333;
}

/* Atalho de teclado info */
.aircraft-base-marker {
    z-index: 650;
}

/* Temporary airbase markers for aircraft simulator */
.temp-airbase-marker {
    z-index: 700 !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.temp-airbase-marker:hover {
    transform: scale(1.1);
}

/* Mobile Warning - herda estilos do styles.css mas com ajustes específicos para o mapa */
/* Estilos para o Sistema de Alertas */
.alert-circle {
    cursor: pointer;
    transition: all 0.3s ease;
}

.alert-circle:hover {
    stroke-width: 3;
}

/* Animação de pulso para círculos de alerta */
.pulse-animation {
    animation: alertPulse 2s infinite;
}

@keyframes alertPulse {
    0% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0.3;
    }
}

/* Popup de alerta personalizado */
.alert-popup {
    min-width: 300px;
}

.alert-popup h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.alert-popup p {
    margin: 8px 0;
    font-size: 0.9rem;
}

.alert-popup strong {
    color: #333;
}

/* Container do popup de alerta */
.alert-popup-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Controlo de legenda de alertas */
.alert-legend-control {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    margin: 10px;
    font-size: 0.9rem;
}

.alert-legend h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1rem;
}

/* Dark mode para alertas */
body.dark-mode .alert-popup-container {
    background: rgba(42, 42, 42, 0.95);
}

body.dark-mode .alert-popup {
    color: #f0f0f0;
}

body.dark-mode .alert-popup strong {
    color: #fff;
}

body.dark-mode .alert-legend-control {
    background: rgba(42, 42, 42, 0.95);
    color: #f0f0f0;
}

body.dark-mode .alert-legend h4 {
    color: #fff;
}

/* Estilos adicionais para o simulador de aviões melhorado */
.aircraft-range-animation {
    animation: pulse-range 3s ease-in-out infinite;
}

@keyframes pulse-range {
    0% {
        stroke-opacity: 0.8;
        stroke-width: 2;
    }
    50% {
        stroke-opacity: 1;
        stroke-width: 3;
    }
    100% {
        stroke-opacity: 0.8;
        stroke-width: 2;
    }
}

.aircraft-info-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
}

.aircraft-info-popup .aircraft-popup {
    padding: 15px;
}

.temp-airbase-marker div {
    white-space: nowrap;
}

.aircraft-base-marker {
    z-index: 1000;
}

.airbase-popup .leaflet-popup-content {
    max-width: 450px;
}

@media (max-width: 767px) {
    /* Garantir que o aviso móvel aparece também no mapa */
    .mobile-warning {
        display: flex !important;
    }
    
    /* Esconder todos os elementos do mapa em mobile */
    .map-header,
    .extra-controls,
    .search-container,
    .map-controls-top,
    .map-controls-bottom,
    #map,
    .map-legend,
    .info-panel,
    .favorites-menu {
        display: none !important;
    }
}

/* Strait of Hormuz Styles */
.strait-hormuz-marker {
    z-index: 1000 !important;
}

.hormuz-icon-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.hormuz-pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid #ff6b6b;
    border-radius: 50%;
    animation: hormuz-pulse 3s ease-out infinite;
}

.hormuz-pulse-ring.delay-1 {
    animation-delay: 1s;
}

.hormuz-pulse-ring.delay-2 {
    animation-delay: 2s;
}

@keyframes hormuz-pulse {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.hormuz-icon {
    position: relative;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff0000 100%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.5);
    z-index: 2;
}

.hormuz-icon .icon-main {
    font-size: 30px;
    position: absolute;
}

.hormuz-icon .oil-barrel {
    font-size: 16px;
    position: absolute;
    bottom: -5px;
    right: -5px;
}

.hormuz-label {
    position: absolute;
    bottom: -20px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hormuz Popup Styles */
.hormuz-popup .leaflet-popup-content-wrapper {
    background: #f8f9fa;
    border: 2px solid #ff0000;
    border-radius: 10px;
    padding: 0;
}

.hormuz-popup .leaflet-popup-content {
    margin: 0;
    max-height: 700px;
    width: 600px !important;
}

.hormuz-popup-content {
    padding: 0;
}

.hormuz-header {
    background: linear-gradient(135deg, #ff0000 0%, #8b0000 100%);
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
}

.hormuz-header h2 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
}

.risk-level {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.risk-level.critical {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Tabs */
.hormuz-tabs {
    display: flex;
    background: #e9ecef;
    padding: 0;
}

.tab-btn {
    flex: 1;
    padding: 12px 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: #dee2e6;
}

.tab-btn.active {
    color: #ff0000;
    border-bottom-color: #ff0000;
    background: white;
}

.tab-content {
    display: none;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Key Stats */
.key-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.stat-box {
    background: white;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ff0000;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
}

/* Warning Box */
.warning-box {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #856404;
}

.warning-box i {
    color: #ffc107;
    margin-right: 10px;
}

/* Oil Flow Chart */
.flow-bars {
    margin: 20px 0;
}

.flow-bar {
    background: linear-gradient(90deg, #ff6b6b 0%, #ff0000 100%);
    color: white;
    padding: 8px 15px;
    margin: 5px 0;
    border-radius: 5px;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.flow-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Destination Grid */
.destination-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.dest-box {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.dest-box.asia {
    border: 2px solid #ff6b6b;
}

.dest-box.europe {
    border: 2px solid #3498db;
}

.dest-box.usa {
    border: 2px solid #2ecc71;
}

.dest-percent {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.dest-label {
    font-weight: 600;
    margin-bottom: 10px;
}

.dest-breakdown {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Scenario Grid */
.scenario-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.scenario {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.scenario:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.scenario h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.oil-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff6b6b;
    margin: 10px 0;
}

.oil-price.extreme {
    color: #ff0000;
    font-size: 1.8rem;
}

.probability {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 10px;
}

.probability.medium {
    background: #fff3cd;
    color: #856404;
}

.probability.low {
    background: #d1ecf1;
    color: #0c5460;
}

.probability.very-low {
    background: #d4edda;
    color: #155724;
}

/* Current Price Box */
.current-price-box {
    background: #e3f2fd;
    border: 2px solid #2196f3;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    font-size: 1.1rem;
}

/* Alternatives Info */
.alternatives-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

/* Control Grid */
.control-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.control-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.control-section h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.control-section ul {
    margin: 0;
    padding-left: 20px;
}

.control-section li {
    margin: 8px 0;
    color: #6c757d;
}

/* History Timeline */
.history-timeline {
    margin: 20px 0;
}

.incident {
    background: white;
    border-left: 4px solid #ff0000;
    padding: 15px;
    margin: 10px 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.incident .impact {
    color: #ff6b6b;
    font-style: italic;
}

/* Simulator */
.simulator-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.simulator-controls {
    margin-bottom: 30px;
}

.simulator-controls label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
}

#closure-duration {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #e9ecef;
    border-radius: 5px;
    outline: none;
}

#closure-duration::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ff0000;
    border-radius: 50%;
    cursor: pointer;
}

#duration-display {
    display: inline-block;
    margin-left: 15px;
    font-weight: bold;
    color: #ff0000;
}

.simulation-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.sim-result {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.sim-result label {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.sim-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
}

.sim-value.extreme {
    color: #ff0000;
    animation: pulse 1s infinite;
}

.affected-countries {
    margin-top: 30px;
}

.country-impact {
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 5px;
    font-weight: 500;
}

.country-impact.high {
    background: #ffebee;
    color: #c62828;
}

.country-impact.medium {
    background: #fff3e0;
    color: #e65100;
}

.country-impact.low {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.track-btn, .oil-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.track-btn {
    background: #3498db;
    color: white;
}

.track-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.oil-btn {
    background: #2ecc71;
    color: white;
}

.oil-btn:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

/* Shipping Lane Styles */
.shipping-lane {
    transition: all 0.3s ease;
}

.shipping-lane:hover {
    stroke-width: 5;
}

/* Critical Warning */
.critical-warning {
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 600;
    text-align: center;
}

/* Economic Dashboard Panel Styles */
.economic-dashboard-panel {
    position: fixed;
    right: -600px;
    top: 0;
    width: 600px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0,0,0,0.2);
    z-index: 2000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.economic-dashboard-panel.active {
    right: 0;
}

.dashboard-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #2196F3;
}

.dashboard-header h2 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-dashboard-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.close-dashboard-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* Dashboard Tabs */
.dashboard-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.tab-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.tab-btn.active {
    color: #2196F3;
    border-bottom-color: #2196F3;
    background: white;
}

/* Tab Content */
.dashboard-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    background: #f8f9fa;
    max-height: calc(100vh - 200px); /* Account for header, tabs and footer */
    scrollbar-width: thin;
    scrollbar-color: #adb5bd #f8f9fa;
}

.dashboard-content::-webkit-scrollbar {
    width: 8px;
}

.dashboard-content::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.dashboard-content::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 4px;
}

.dashboard-content::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}

.tab-content {
    display: none;
    padding-bottom: 20px; /* Extra padding at bottom for better scroll */
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Overview Tab */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.overview-indicator {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.overview-indicator:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.overview-indicator.critical {
    border-color: #dc3545;
    background: #fff5f5;
}

.indicator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.indicator-title {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.indicator-icon {
    font-size: 1.5rem;
    color: #adb5bd;
}

.indicator-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 5px;
}

.indicator-change {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.indicator-change.positive {
    color: #28a745;
}

.indicator-change.negative {
    color: #dc3545;
}

/* Market Alerts */
.market-alerts {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.market-alerts h3 {
    margin: 0 0 15px 0;
    color: #dc3545;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

#alert-list {
    max-height: 200px;
    overflow-y: auto;
}

.alert-item {
    padding: 10px;
    border-left: 4px solid #dc3545;
    background: #fff5f5;
    margin-bottom: 10px;
    border-radius: 0 5px 5px 0;
}

.alert-item.warning {
    border-left-color: #ffc107;
    background: #fff3cd;
}

.alert-time {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Energy Tab */
.energy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.energy-chart-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.energy-chart-container h3 {
    margin: 0 0 20px 0;
    color: #1a1a2e;
}

.energy-indicators {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* Defense Tab */
.defense-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.defense-stocks {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.defense-stock-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stock-symbol {
    font-weight: 700;
    color: #1a1a2e;
    font-size: 1.1rem;
}

.stock-name {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.stock-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
}

/* Regional Tab */
.regional-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.regional-markets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.currency-matrix {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.currency-matrix h3 {
    margin: 0 0 15px 0;
    color: #1a1a2e;
}

#currency-table {
    overflow-x: auto;
}

.currency-table {
    width: 100%;
    border-collapse: collapse;
}

.currency-table th,
.currency-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.currency-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

/* Analysis Tab */
.analysis-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.correlation-matrix,
.impact-calculator {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calculator-controls label {
    display: block;
    margin-bottom: 15px;
    font-weight: 500;
}

.calculator-controls input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

.impact-results {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.impact-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.impact-metric:last-child {
    border-bottom: none;
}

.impact-metric strong {
    color: #495057;
    font-weight: 600;
}

.impact-results h4 {
    margin: 0 0 15px 0;
    color: #1a1a2e;
    font-size: 1.1rem;
}

/* Dashboard Footer */
.dashboard-footer {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.update-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: #6c757d;
}

.update-interval {
    font-size: 0.8rem;
    background: #e9ecef;
    padding: 3px 8px;
    border-radius: 12px;
}

.export-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.export-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* Chart placeholders */
canvas {
    max-width: 100%;
    height: 300px !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .economic-dashboard-panel {
        width: 100%;
        right: -100%;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .energy-indicators,
    .defense-stocks,
    .regional-markets {
        grid-template-columns: 1fr;
    }
}

/* Dark mode support */
body.dark-mode .economic-dashboard-panel {
    background: #1a1a2e;
    color: #f8f9fa;
}

body.dark-mode .dashboard-header {
    background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
}

body.dark-mode .tab-btn {
    color: #adb5bd;
}

body.dark-mode .tab-btn.active {
    background: #1a1a2e;
    color: #2196F3;
}

body.dark-mode .overview-indicator,
body.dark-mode .market-alerts,
body.dark-mode .energy-chart-container,
body.dark-mode .defense-stock-card,
body.dark-mode .currency-matrix,
body.dark-mode .correlation-matrix,
body.dark-mode .impact-calculator {
    background: #2a2a3e;
    border-color: #3a3a4e;
}

body.dark-mode .dashboard-content {
    background: #1a1a2e;
}

body.dark-mode .dashboard-footer {
    background: #2a2a3e;
    border-top-color: #3a3a4e;
}

/* Error state for indicators */
.indicator-change.error {
    color: #e74c3c;
    font-size: 0.75rem;
}

/* Attack site styles for Al Udeid */
@keyframes pulse {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.1);
    }
    100% {
        opacity: 0.8;
        transform: scale(1);
    }
}

.pulsing-circle {
    animation: pulse 2s infinite;
}

.attack-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #ff0000;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.attack-icon {
    background: transparent !important;
    border: none !important;
}

.attack-trajectory {
    animation: dash 20s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: -100;
    }
}

.attack-popup {
    max-width: 600px !important;
}

.attack-info h3 {
    margin-top: 0;
    border-bottom: 2px solid #d32f2f;
    padding-bottom: 10px;
}

.attack-info h4 {
    margin-top: 15px;
    margin-bottom: 8px;
}

.attack-info ul {
    margin: 5px 0;
    padding-left: 20px;
}

.attack-info li {
    margin-bottom: 5px;
}

.attack-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}


