/* 🛡️ PROTECTED VISIBILITY MATRIX STYLES - UNAUTHORIZED ACCESS MONITORED */
/* ⚠️  Cybersecurity Professional Code - Obfuscated for Security */
:root {
    /* Encoded color scheme - Decoded at runtime */
    --_0xa1: #88FFBB;           /* Primary brand color */
    --_0xb2: #88FFBB;           /* Secondary brand color */
    --_0xc3: #4FF4FF;           /* Accent color */
    --_0xd4: #ffa500;           /* Warning state */
    --_0xe5: #ff4444;           /* Critical state */
    --_0xf6: #0a0a0a;          /* Background base */
    --_0x07: #292929;           /* Panel background */
    --_0x18: #3a3a3a;           /* Border color */
    --_0x29: #e0e0e0;           /* Primary text */
    --_0x3a: #888888;           /* Dimmed text */
    
    /* Typography protection */
    --_font_a: 'JetBrains Mono', monospace;
    --_font_b: 'Inter', sans-serif;
}

/* Anti-inspection CSS */
.inspector-detected { 
    position: fixed !important; 
    top: 0 !important; 
    left: 0 !important; 
    width: 100vw !important; 
    height: 100vh !important; 
    background: #000 !important; 
    z-index: 99999 !important; 
    color: #ff0000 !important; 
    font-size: 50px !important; 
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    content: "🛡️ SECURITY VIOLATION DETECTED" !important; 
}

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

body {
    font-family: var(--_font_a);
    background: var(--_0xf6);
    color: var(--_0x29);
    overflow-x: hidden; /* Only prevent horizontal scroll */
    overflow-y: auto; /* Allow vertical scrolling */
    min-height: 100vh;
    /* Remove user-select: none for mobile compatibility */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    position: relative; /* Fix for iOS positioning issues */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#visibility-dashboard {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Use min-height instead of fixed height */
    background: linear-gradient(45deg, var(--_0xf6) 0%, #0d1117 100%);
    /* Remove anti-debug protection that breaks mobile scrolling */
    position: relative;
    width: 100%;
    overflow: visible; /* Allow content to scroll */
}

/* Status Bar */
.status-bar {
    background: var(--_0x07);
    border-bottom: 2px solid var(--_0xa1);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(136, 255, 187, 0.3);
}

.noc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.noc-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--_0xa1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.noc-logo img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse-status 2s ease-in-out infinite;
}

.status-indicator.online {
    background: var(--_0xa1);
    box-shadow: 0 0 10px var(--_0xa1);
}

.timestamp {
    color: var(--_0x29-dim);
    font-size: 0.8rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    flex: 1;
    gap: 1px;
    background: var(--_0x18);
}

/* Panel Styles */
.topology-panel,
.monitoring-panel,
.alerts-panel {
    background: var(--_0x07);
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Only prevent horizontal overflow */
    overflow-y: auto; /* Allow vertical scrolling within panels */
}

.panel-header {
    background: var(--_0x18);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--_0xa1);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.panel-header h3 {
    flex: 1;
    color: var(--_0xa1);
}

.panel-header i {
    color: var(--_0xc3);
    font-size: 1.1rem;
}

/* Topology Panel */
.topology-controls {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    background: rgba(136, 255, 187, 0.1);
    border: 1px solid var(--_0xa1);
    color: var(--_0xa1);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-family: var(--_font_a);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: var(--_0xa1);
    color: var(--_0xf6);
    box-shadow: 0 0 8px var(--_0xa1);
}

.network-canvas {
    position: relative;
    flex: 1;
    padding: 2rem;
    overflow: hidden;
    background: 
        radial-gradient(circle at 20% 80%, rgba(136, 255, 187, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(79, 244, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(136, 255, 187, 0.05) 0%, transparent 50%);
}

.network-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}

.network-node:hover {
    transform: scale(1.1);
    z-index: 10;
}

.node-status {
    background: var(--_0x07);
    border: 2px solid var(--_0xa1);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 15px rgba(136, 255, 187, 0.4);
}

.node-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-bottom: 2px;
}

.node-indicator.healthy {
    background: var(--_0xa1);
    animation: pulse-node 1.5s ease-in-out infinite;
}

.node-indicator.critical {
    background: var(--_0xc3);
    animation: pulse-node 1.5s ease-in-out infinite;
}

.node-metrics {
    font-size: 0.6rem;
    color: var(--_0x29);
    font-weight: 600;
}

.node-label {
    margin-left: 1rem;
    text-align: left;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
}

.node-label i {
    color: var(--_0xc3);
    font-size: 1.2rem;
}

.node-label span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--_0x29);
    text-transform: uppercase;
    text-align: left;
    line-height: 1.2;
    min-width: 120px;
}

/* Connection Lines */
.connection-line {
    position: absolute;
    top: 60px; /* Start from bottom of node */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Perfect centering */
    width: 2px; /* Vertical line width */
    height: 120px; /* Length of connection line */
    background: linear-gradient(180deg, var(--_0xa1), transparent);
    opacity: 0.6;
    z-index: 1;
}

/* Hide connection line on the last node */
.network-node:last-child .connection-line {
    display: none;
}

/* Monitoring Panel */
.metrics-container {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.metric-card {
    background: rgba(0, 16, 16, 0.6);
    border: 1px solid var(--_0x18);
    border-radius: 8px;
    padding: 1rem;
    backdrop-filter: blur(10px);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--_0x18);
}

.metric-header h4 {
    color: var(--_0xc3);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.metric-status {
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.metric-status.healthy {
    background: rgba(136, 255, 187, 0.2);
    color: var(--_0xa1);
    border: 1px solid var(--_0xa1);
}

/* Skills Metrics */
.skill-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skill-category {
    border: 1px solid var(--_0x18);
    border-radius: 6px;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.category-name {
    color: var(--_0xb2);
    font-weight: 600;
    font-size: 0.8rem;
}

.skill-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    max-width: 200px;
}

.skill-bar > div {
    height: 4px;
    background: var(--_0x18);
    border-radius: 2px;
    flex: 1;
    position: relative;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--_0xa1), var(--_0xc3));
    border-radius: 2px;
    transition: width 1s ease;
    animation: skill-glow 2s ease-in-out infinite alternate;
}

.skill-percentage {
    color: var(--_0xa1);
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 35px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.skill-tag {
    background: rgba(79, 244, 255, 0.1);
    border: 1px solid var(--_0xc3);
    color: var(--_0xc3);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 500;
}

.skill-more {
    color: var(--_0x29-dim);
    font-size: 0.6rem;
    font-style: italic;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.project-node {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--_0x18);
    border-radius: 6px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-node:hover {
    border-color: var(--_0xc3);
    box-shadow: 0 0 10px rgba(79, 244, 255, 0.3);
    transform: translateY(-2px);
}

.project-status {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.project-status.operational {
    background: rgba(136, 255, 187, 0.2);
    border: 1px solid var(--_0xa1);
    color: var(--_0xa1);
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.project-name {
    color: var(--_0x29);
    font-weight: 600;
    font-size: 0.8rem;
}

.project-status-text {
    color: var(--_0x29-dim);
    font-size: 0.6rem;
    text-transform: uppercase;
}

.project-metrics {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: auto;
}

.metric-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--_0xc3);
    animation: pulse-dot 1s ease-in-out infinite;
}

/* Alerts Panel */
.alerts-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-counter {
    background: var(--_0xe5);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.alerts-feed {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
}

.alert-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border-left: 3px solid;
    transition: all 0.3s ease;
}

.alert-item.info {
    border-left-color: var(--_0xc3);
}

.alert-item.success {
    border-left-color: var(--_0xa1);
}

.alert-item.warning {
    border-left-color: var(--_0xd4);
}

.alert-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.alert-item.info .alert-indicator {
    background: var(--_0xc3);
    animation: pulse-alert 1.5s ease-in-out infinite;
}

.alert-item.success .alert-indicator {
    background: var(--_0xa1);
}

.alert-item.warning .alert-indicator {
    background: var(--_0xd4);
    animation: pulse-alert 1.5s ease-in-out infinite;
}

.alert-content {
    flex: 1;
}

.alert-title {
    color: var(--_0x29);
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.alert-message {
    color: var(--_0x29-dim);
    font-size: 0.7rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.alert-time {
    color: var(--_0x29-dim);
    font-size: 0.6rem;
    font-style: italic;
}

/* Contact Panel */
.contact-panel {
    margin-top: auto;
    background: rgba(0, 16, 16, 0.6);
    margin: 1rem;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--_0x18);
}

.contact-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--_0xb2);
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border: 1px solid var(--_0x18);
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-item:hover {
    border-color: var(--_0xa1);
    background: rgba(136, 255, 187, 0.1);
}

.contact-item i {
    color: var(--_0xc3);
    font-size: 1rem;
}

.contact-item span {
    flex: 1;
    font-size: 0.8rem;
    color: var(--_0x29);
}

.connection-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--_0xa1);
    animation: pulse-connection 2s ease-in-out infinite;
}

/* Bottom Status */
.bottom-status {
    background: var(--_0x07);
    border-top: 2px solid var(--_0xa1);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.performance-indicators {
    display: flex;
    gap: 2rem;
}

.indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.indicator .label {
    color: var(--_0x29-dim);
    font-weight: 600;
    min-width: 50px;
}

.progress-bar {
    width: 60px;
    height: 6px;
    background: var(--_0x18);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--_0xa1), var(--_0xc3));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.indicator .value {
    color: var(--_0xa1);
    font-weight: 600;
    min-width: 35px;
}

.system-info {
    color: var(--_0x29-dim);
    font-size: 0.7rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--_0x07);
    border: 2px solid var(--_0xa1);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(136, 255, 187, 0.4);
}

.modal-header {
    background: var(--_0x18);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--_0xa1);
}

.modal-header h3 {
    color: var(--_0xa1);
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: var(--_0x29);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--_0xe5);
    color: white;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Time Range Selector */
.time-range select {
    background: var(--_0x07);
    border: 1px solid var(--_0x18);
    color: var(--_0x29);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-family: var(--_font_a);
    font-size: 0.8rem;
}

/* Animations */
@keyframes pulse-status {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

@keyframes pulse-node {
    0%, 100% { opacity: 1; box-shadow: 0 0 5px currentColor; }
    50% { opacity: 0.7; box-shadow: 0 0 15px currentColor; }
}

@keyframes pulse-alert {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes pulse-connection {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

@keyframes skill-glow {
    0% { box-shadow: 0 0 5px rgba(136, 255, 187, 0.5); }
    100% { box-shadow: 0 0 15px rgba(136, 255, 187, 0.8); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1.5fr 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto; /* Remove fixed height */
    }
    
    .performance-indicators {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .system-info {
        display: none;
    }
    
    /* Fix main scrolling behavior */
    body {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    #visibility-dashboard {
        overflow: visible !important;
        height: auto !important;
        min-height: 100vh; /* Ensure full height */
    }
    
    /* Fix panel scrolling on mobile - remove individual panel scrollbars */
    .topology-panel,
    .monitoring-panel,
    .alerts-panel {
        overflow-y: visible !important; /* Remove individual panel scrolling */
        overflow-x: hidden !important;
        height: auto !important; /* Let content determine height */
        min-height: 400px; /* Minimum height for usability */
    }
    
    /* Fix network canvas for mobile - ensure all career nodes are visible */
    .network-canvas {
        overflow: hidden !important; /* Prevent scroll conflicts but keep content visible */
        height: auto !important;
        min-height: 650px !important; /* Optimized height to fit all nodes without excess gap */
        max-height: none !important; /* Remove height restriction - let it expand for full journey */
        flex: none !important; /* Remove flex expansion on mobile */
        padding: 1.5rem 1rem 1rem 1rem !important; /* Reduced bottom padding to eliminate gap */
        position: relative; /* Ensure proper positioning for connection lines */
        touch-action: pan-y !important; /* Allow vertical scrolling but prevent other touch gestures */
    }
    
    /* Ensure connection lines are visible on mobile */
    .connection-line {
        z-index: 1 !important;
        opacity: 0.8 !important; /* Make them more visible on mobile */
        height: 100px !important; /* Slightly shorter for mobile compactness */
    }
    
    /* Optimize topology panel for mobile - ensure full career journey visibility */
    .topology-panel {
        max-height: none !important; /* Remove height restriction */
        overflow: visible !important; /* Allow content to be fully visible */
        min-height: 700px !important; /* Reduced to match canvas height and eliminate excess gap */
    }
    
    /* Optimize career nodes for mobile */
    .network-node {
        transform: scale(0.85) !important; /* Slightly smaller for better mobile fit */
        touch-action: manipulation !important; /* Allow touch interactions on nodes */
    }
    
    .network-node:hover {
        transform: scale(0.95) !important; /* Subtle hover effect on mobile */
    }
    
    /* Fix node status for mobile - better centering */
    .node-status {
        width: 45px !important;
        height: 45px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Center node metrics text properly */
    .node-metrics {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    .node-metrics .metric {
        font-size: 0.7rem !important;
        line-height: 1 !important;
    }
    
    /* Fix node labels for mobile */
    .node-label {
        font-size: 0.75rem !important;
        min-width: 90px !important;
        text-align: center !important;
        margin-top: 0.5rem !important;
    }
    
    .node-label span {
        display: block !important;
        text-align: center !important;
        line-height: 1.2 !important;
    }
}
    
    .project-card {
        touch-action: manipulation;
    }
    
    /* Ensure content doesn't get cut off */
    .panel-content {
        padding-bottom: 2rem; /* Extra space at bottom */
    }
    
    /* iOS specific fixes */
    html {
        -webkit-text-size-adjust: 100%;
        height: 100%;
    }
    
    /* Smooth scrolling performance */
    * {
        -webkit-transform: translate3d(0,0,0);
        transform: translate3d(0,0,0);
    }
}
