/* Cyber Attack Map - Dark Cyber Theme */
/* Enhanced SOC Dashboard Styling */

:root {
    --cyber-black: #000000;
    --cyber-dark: #0a0f1a;
    --cyber-blue: #00d4ff;
    --cyber-cyan: #00f5d4;
    --cyber-purple: #7b2cbf;
    --cyber-pink: #f72585;
    --cyber-red: #ff3366;
    --cyber-orange: #ff6b35;
    --cyber-yellow: #ffd60a;
    --cyber-green: #00ff88;
    --cyber-white: #ffffff;
    --glass-bg: rgba(10, 15, 26, 0.85);
    --glass-border: rgba(0, 212, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    background: var(--cyber-black);
    color: var(--cyber-white);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Main Container */
#cybermap-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Map */
#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: var(--cyber-black);
}

/* Heatmap Canvas */
.heatmap-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 450;
    pointer-events: none;
}

/* Header */
.cyber-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
}

.cyber-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cyber-logo img {
    height: 40px;
}

.cyber-title {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--cyber-cyan), var(--cyber-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-btn, .control-btn {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--cyber-blue);
    padding: 8px 14px;
    border-radius: 4px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.control-btn.icon-only {
    padding: 8px 10px;
}

.header-btn:hover, .control-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--cyber-blue);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* Mode Indicator */
.mode-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-family: 'Orbitron', monospace;
    font-size: 11px;
}

.mode-label {
    color: rgba(255, 255, 255, 0.5);
}

.mode-value {
    font-weight: 700;
    color: var(--cyber-blue);
}

.mode-indicator.mode-live .mode-value {
    color: var(--cyber-green);
    text-shadow: 0 0 10px var(--cyber-green);
}

.mode-indicator.mode-live {
    border-color: var(--cyber-green);
    animation: modeGlow 2s infinite;
}

.mode-indicator.mode-simulation .mode-value {
    color: var(--cyber-yellow);
}

.mode-indicator.mode-simulation {
    border-color: var(--cyber-yellow);
}

@keyframes modeGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 255, 136, 0.3); }
    50% { box-shadow: 0 0 15px rgba(0, 255, 136, 0.5); }
}

/* Alert Badge */
.alert-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 51, 102, 0.2);
    border: 1px solid var(--cyber-red);
    border-radius: 20px;
    color: var(--cyber-red);
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    animation: alertPulse 1s infinite;
    cursor: pointer;
}

@keyframes alertPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Connection Status */
.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
    font-size: 11px;
    color: var(--cyber-green);
}

.connection-status.disconnected {
    background: rgba(255, 51, 102, 0.1);
    border-color: rgba(255, 51, 102, 0.3);
    color: var(--cyber-red);
}

.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyber-green);
    animation: statusPulse 2s infinite;
}

.connection-status.disconnected .connection-dot {
    background: var(--cyber-red);
    animation: none;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 5px var(--cyber-green); }
    50% { opacity: 0.5; box-shadow: 0 0 15px var(--cyber-green); }
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--cyber-white);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s;
}

.dropdown-content a:hover {
    background: rgba(0, 212, 255, 0.2);
    color: var(--cyber-cyan);
}

.dropdown-content a i {
    width: 16px;
    text-align: center;
}

.dropdown-content hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 5px 0;
}

/* Panels */
.stats-panel, .feed-panel {
    position: fixed;
    top: 80px;
    width: 280px;
    z-index: 100;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.stats-panel {
    left: 20px;
}

.feed-panel {
    right: 20px;
}

.panel-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-title {
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--cyber-cyan);
    text-transform: uppercase;
}

.panel-subtitle {
    font-size: 9px;
    color: var(--cyber-orange);
    display: flex;
    align-items: center;
    gap: 4px;
}

.panel-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
}

.panel-badge.active {
    background: rgba(0, 255, 136, 0.2);
    color: var(--cyber-green);
}

.panel-body {
    padding: 12px 16px;
}

/* Stats */
.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 36px;
    font-weight: 900;
    color: var(--cyber-cyan);
    text-shadow: 0 0 30px var(--cyber-cyan);
    text-align: center;
}

.stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-top: 8px;
}

/* Severity Bars */
.severity-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.severity-label {
    font-size: 11px;
    font-weight: 600;
    width: 60px;
}

.severity-label.critical { color: var(--cyber-red); }
.severity-label.high { color: var(--cyber-orange); }
.severity-label.medium { color: var(--cyber-yellow); }
.severity-label.low { color: var(--cyber-blue); }

.severity-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 10px;
}

.severity-fill {
    height: 100%;
    width: 0%;
    transition: width 0.5s ease-out;
}

.severity-fill.critical { background: linear-gradient(90deg, var(--cyber-red), #ff6699); }
.severity-fill.high { background: linear-gradient(90deg, var(--cyber-orange), #ff9966); }
.severity-fill.medium { background: linear-gradient(90deg, var(--cyber-yellow), #ffee66); }
.severity-fill.low { background: linear-gradient(90deg, var(--cyber-blue), #66ddff); }

.severity-count {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    width: 30px;
    text-align: right;
}

/* Simulation Panel */
.sim-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.sim-label {
    color: rgba(255, 255, 255, 0.6);
}

.action-btn.small {
    padding: 6px 12px;
    font-size: 11px;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

/* Country Rankings */
.country-rank-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.country-rank-item:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateX(5px);
}

.rank-position {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    margin-right: 10px;
}

.rank-position.top-1 { background: linear-gradient(135deg, #ffd700, #ff8c00); color: #000; }
.rank-position.top-2 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #000; }
.rank-position.top-3 { background: linear-gradient(135deg, #cd7f32, #8b4513); color: #fff; }

.country-info {
    flex: 1;
    margin: 0 10px;
}

.country-name {
    font-size: 12px;
    font-weight: 600;
}

.country-count {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--cyber-red);
}

/* Live Feed */
.feed-item {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    font-size: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    animation: feedSlideIn 0.3s ease-out;
}

@keyframes feedSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feed-icon {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 8px;
}

.feed-icon.critical { background: var(--cyber-red); box-shadow: 0 0 5px var(--cyber-red); }
.feed-icon.high { background: var(--cyber-orange); }
.feed-icon.medium { background: var(--cyber-yellow); }
.feed-icon.low { background: var(--cyber-blue); }

.feed-text {
    flex: 1;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Share Tech Mono', monospace;
}

.feed-time {
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Share Tech Mono', monospace;
    margin-left: 8px;
}

/* MITRE Techniques */
.mitre-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    transition: all 0.2s;
}

.mitre-item:hover {
    background: rgba(0, 212, 255, 0.1);
}

.mitre-badge {
    padding: 4px 8px;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 3px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    margin-right: 10px;
    color: var(--cyber-cyan);
}

.mitre-info {
    flex: 1;
}

.mitre-name {
    font-size: 11px;
    font-weight: 600;
}

.mitre-count {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 700;
    color: var(--cyber-orange);
}

/* Alert Popup */
.alert-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    animation: alertFadeIn 0.3s ease-out;
}

@keyframes alertFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.alert-popup-content {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.2), rgba(10, 15, 26, 0.95));
    border: 2px solid var(--cyber-red);
    border-radius: 12px;
    padding: 0;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 0 50px rgba(255, 51, 102, 0.5);
    animation: alertSlideIn 0.3s ease-out;
}

@keyframes alertSlideIn {
    from {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.alert-popup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(255, 51, 102, 0.3);
    border-bottom: 1px solid rgba(255, 51, 102, 0.5);
}

.alert-popup-header i {
    font-size: 24px;
    color: var(--cyber-red);
    animation: alertIconPulse 1s infinite;
}

@keyframes alertIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.alert-popup-header span {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--cyber-red);
    letter-spacing: 2px;
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.alert-close:hover {
    color: var(--cyber-white);
}

.alert-popup-body {
    padding: 20px;
}

.alert-detail {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-detail:last-child {
    border-bottom: none;
}

.alert-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.alert-value {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 600;
    color: var(--cyber-white);
    font-size: 13px;
}

.alert-popup-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
}

.alert-btn {
    background: linear-gradient(135deg, var(--cyber-red), var(--cyber-orange));
    border: none;
    color: var(--cyber-white);
    padding: 12px 32px;
    border-radius: 6px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.alert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 51, 102, 0.5);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: var(--cyber-blue);
    border-radius: 2px;
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* No Data Overlay */
.no-data-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    backdrop-filter: blur(5px);
}

.no-data-content {
    text-align: center;
    max-width: 500px;
    padding: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-data-content i.fa-satellite-dish {
    font-size: 64px;
    color: var(--cyber-blue);
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 0.6; 
        transform: scale(1);
        text-shadow: 0 0 20px var(--cyber-blue);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.05);
        text-shadow: 0 0 40px var(--cyber-blue);
    }
}

.no-data-content h3 {
    font-family: 'Orbitron', monospace;
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--cyber-cyan);
    letter-spacing: 2px;
}

.no-data-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.no-data-content .sub-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-bottom: 24px;
}

.no-data-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.action-btn {
    padding: 12px 24px;
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--cyber-blue);
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--cyber-blue);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--cyber-blue), var(--cyber-cyan));
    color: var(--cyber-black);
    border: none;
}

.action-btn.primary:hover {
    box-shadow: 0 0 30px rgba(0, 245, 212, 0.5);
}

.hint-text {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

.hint-text i {
    margin-right: 6px;
    color: var(--cyber-yellow);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-panel, .feed-panel {
        width: 240px;
    }
    
    .stat-value {
        font-size: 28px;
    }
}

@media (max-width: 992px) {
    .stats-panel {
        left: 10px;
        width: 220px;
    }
    
    .feed-panel {
        right: 10px;
        width: 220px;
    }
    
    .cyber-title {
        font-size: 14px;
        letter-spacing: 1px;
    }
    
    .header-btn:not(.icon-only) span {
        display: none;
    }
}

@media (max-width: 768px) {
    .cyber-header {
        flex-wrap: wrap;
        height: auto;
        padding: 10px;
    }
    
    .header-center {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    
    .stats-panel, .feed-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 40vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(calc(100% - 60px));
        transition: transform 0.3s ease;
    }
    
    .stats-panel:hover, .feed-panel:hover {
        transform: translateY(0);
    }
    
    .stats-panel {
        z-index: 101;
    }
    
    .feed-panel {
        z-index: 102;
        display: none;
    }
}

/* Large SOC Screen */
@media (min-width: 1920px) {
    .stats-panel, .feed-panel {
        width: 320px;
    }
    
    .stat-value {
        font-size: 48px;
    }
    
    .cyber-title {
        font-size: 24px;
    }
    
    .panel-title {
        font-size: 13px;
    }
}

/* 4K Display */
@media (min-width: 2560px) {
    .stats-panel, .feed-panel {
        width: 400px;
    }
    
    .stat-value {
        font-size: 56px;
    }
    
    .panel-section {
        margin-bottom: 16px;
    }
    
    .panel-body {
        padding: 16px 20px;
    }
}
