/* Threat Monitor Section */
.threat-monitor-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    position: relative;
    overflow: hidden;
}

.threat-monitor-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.threat-monitor-section .text-center {
    text-align: center;
}

.threat-monitor-section .section-badge {
    display: inline-block;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.threat-monitor-section .section-title {
    color: #fff;
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.threat-monitor-section .title-gradient {
    background: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
    background: -webkit-linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    display: inline-block;
    font-weight: 700;
}

/* Fallback for browsers that don't support text gradients */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .threat-monitor-section .title-gradient {
        color: #00d4ff;
    }
}

.threat-monitor-section .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.monitor-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* Canvas Container */
.world-map-canvas {
    position: relative;
    background: #0a1628;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

#threatMapCanvas {
    width: 100%;
    height: auto;
    display: block;
}

/* Overlay Stats */
.map-overlay-stats {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.live-stat-box, .legend-box {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.live-stat-box h4, .legend-box h4 {
    color: #00d4ff;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    min-width: 200px;
}

.stat-line .stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.stat-line .stat-value {
    color: #00ff88;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
}

.stat-line .stat-value.critical {
    color: #ff4444;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 8px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
}

.legend-dot.main-sensor {
    background: #00ff88;
    box-shadow: 0 0 8px #00ff88;
}

.legend-dot.local-sensor {
    background: #fbbf24;
    box-shadow: 0 0 8px #fbbf24;
}

.legend-dot.threat {
    background: #ff4444;
    box-shadow: 0 0 8px #ff4444;
    animation: pulse-threat 1.5s infinite;
}

@keyframes pulse-threat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Info Cards */
.monitor-info {
    margin-top: 3rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.2);
}

.info-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.info-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.info-card h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.info-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Mobile Fallback */
.mobile-threat-view {
    display: none;
    background: linear-gradient(135deg, #0a1628 0%, #1a2847 100%);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.mobile-threat-view::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 255, 136, 0.1) 0%, transparent 50%);
    animation: rotate-slow 20s linear infinite;
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.mobile-core-visual {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 2rem auto;
}

.mobile-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #00ff88 0%, rgba(0, 255, 136, 0.3) 50%, transparent 70%);
    border-radius: 50%;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 30px rgba(0, 255, 136, 0.5); }
    50% { box-shadow: 0 0 60px rgba(0, 255, 136, 0.8); }
}

.mobile-core-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: bold;
    font-size: 1.5rem;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
}

.mobile-sensors {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotate-sensors 15s linear infinite;
}

@keyframes rotate-sensors {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.mobile-sensor {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fbbf24;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
}

.mobile-sensor:nth-child(1) { top: 10%; left: 50%; }
.mobile-sensor:nth-child(2) { top: 50%; right: 10%; }
.mobile-sensor:nth-child(3) { bottom: 10%; left: 50%; }
.mobile-sensor:nth-child(4) { top: 50%; left: 10%; }
.mobile-sensor:nth-child(5) { top: 25%; right: 25%; }
.mobile-sensor:nth-child(6) { bottom: 25%; left: 25%; }

.mobile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.mobile-stat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.mobile-stat-value {
    color: #00ff88;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Roboto Mono', monospace;
}

.mobile-stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .threat-monitor-section {
        padding: 60px 0;
    }
    
    .threat-monitor-section .section-title {
        font-size: 2rem;
    }
    
    /* Hide canvas on mobile */
    .world-map-canvas {
        display: none;
    }
    
    /* Show mobile version */
    .mobile-threat-view {
        display: block;
    }
    
    .mobile-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        font-size: 0.9rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .monitor-wrapper {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .mobile-core-visual {
        width: 150px;
        height: 150px;
    }
    
    .mobile-core {
        width: 80px;
        height: 80px;
    }
    
    .mobile-core-text {
        font-size: 1.2rem;
    }
    
    .mobile-stats-grid {
        grid-template-columns: 1fr;
    }
}