/* Network Path Analyzer Styles */

:root {
    --primary-color: #00ff41;
    --secondary-color: #008f11;
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a1a;
    --text-primary: #00ff41;
    --text-secondary: #ffffff;
    --border-color: #333;
    --error-color: #ff4444;
    --warning-color: #ffaa00;
    --success-color: #00ff41;
}

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

body {
    font-family: 'Courier New', monospace;
    background: var(--bg-dark);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    min-height: 100vh;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    border-bottom: 2px solid var(--border-color);
}

.header-content h1 {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 0 0 20px var(--primary-color);
}

.header-content p {
    font-size: 1.2em;
    margin-bottom: 20px;
    opacity: 0.8;
}

.domain-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.domain {
    font-size: 1.5em;
    color: var(--primary-color);
    font-weight: bold;
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    background: rgba(0, 255, 65, 0.1);
}

.status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.status.online {
    background: var(--success-color);
    color: var(--bg-dark);
}

.status.checking {
    background: var(--warning-color);
    color: var(--bg-dark);
    animation: pulse 2s infinite;
}

/* Analysis Grid */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.analysis-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.analysis-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.analysis-card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    background: rgba(0, 255, 65, 0.1);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    color: var(--primary-color);
    font-size: 1.2em;
}

.card-header h3 i {
    margin-right: 10px;
}

.card-content {
    padding: 20px;
}

/* Buttons */
.analyze-btn, .path-controls button, .monitoring-controls button {
    background: var(--primary-color);
    color: var(--bg-dark);
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.analyze-btn:hover, .path-controls button:hover, .monitoring-controls button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.path-controls, .monitoring-controls {
    display: flex;
    gap: 10px;
}

/* Connection Overview */
.connection-status {
    text-align: center;
    padding: 20px;
}

/* DNS Chain */
.dns-chain {
    max-height: 300px;
    overflow-y: auto;
}

.dns-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: rgba(0, 255, 65, 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 5px;
}

.dns-type {
    color: var(--primary-color);
    font-weight: bold;
}

.dns-value {
    font-family: monospace;
    font-size: 0.9em;
}

/* Network Map */
.network-map {
    height: 500px;
    position: relative;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 255, 65, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 65, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, rgba(0, 255, 65, 0.02) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0, 255, 65, 0.02) 25%, transparent 25%);
    background-size: 50px 50px, 50px 50px, 20px 20px, 20px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0, 255, 65, 0.1);
}

.network-map canvas {
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px;
}

.path-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.network-node {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
}

.network-node:hover {
    transform: scale(1.2);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.8);
}

.network-node i {
    color: var(--bg-dark);
    font-size: 1.2em;
}

.connection-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent, var(--primary-color));
    animation: dataFlow 2s infinite;
}

@keyframes dataFlow {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* Server Details */
.server-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(0, 255, 65, 0.05);
    border-radius: 5px;
}

.label {
    font-weight: bold;
    color: var(--primary-color);
}

.value {
    font-family: monospace;
    color: var(--text-secondary);
}

/* Geographic Analysis */
.geo-analysis {
    text-align: center;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.location-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 255, 65, 0.05);
    border-radius: 5px;
}

.location-item i {
    color: var(--primary-color);
    width: 20px;
}

/* Performance Metrics */
.performance-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: rgba(0, 255, 65, 0.05);
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

.metric-label {
    font-size: 0.9em;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.metric-value {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--text-secondary);
    font-family: monospace;
}

/* Monitoring Display */
.monitoring-display {
    text-align: center;
}

#latencyChart {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 20px;
}

.monitoring-stats {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

.stat-label {
    font-size: 0.9em;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.2em;
    font-weight: bold;
    font-family: monospace;
}

/* Navigation */
.navigation {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-card);
    color: var(--primary-color);
    text-decoration: none;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 255, 65, 0.4);
}

.nav-btn i {
    font-size: 1.1em;
}

/* Footer */
.footer {
    margin-top: 60px;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    background: transparent;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content p {
    color: var(--text-secondary);
    opacity: 0.7;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--primary-color);
    font-size: 1.5em;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-secondary);
    transform: translateY(-2px);
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

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

/* 3D Visualization Modal Styles */
.node-modal, .node-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.modal-content, .modal-content-3d {
    background: var(--bg-card);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 30px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
    animation: slideIn 0.3s ease;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(0, 255, 65, 0.2);
    border-radius: 50%;
    transform: scale(1.1);
}

.node-info {
    margin-top: 20px;
}

.info-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 255, 65, 0.1);
    border-radius: 5px;
    border-left: 3px solid var(--primary-color);
}

.info-section h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.info-section p {
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.4;
}

.modal-actions {
    text-align: center;
    margin-top: 20px;
}

.modal-actions button {
    background: var(--primary-color);
    color: var(--bg-dark);
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.modal-actions button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 65, 0.3);
}

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

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Wi-Fi Detection Styles */
.wifi-info {
    background: rgba(0, 136, 255, 0.1);
    border-left: 3px solid #0088ff;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
}

.wifi-info h4 {
    color: #0088ff;
    margin-bottom: 10px;
}

.wifi-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.wifi-detail-item {
    background: rgba(0, 136, 255, 0.05);
    padding: 10px;
    border-radius: 3px;
    border: 1px solid rgba(0, 136, 255, 0.2);
}

.wifi-detail-label {
    font-weight: bold;
    color: #0088ff;
    font-size: 0.9em;
}

.wifi-detail-value {
    color: var(--text-secondary);
    font-family: monospace;
}

/* Responsive Design */
@media (max-width: 768px) {
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 10px;
    }
    
    .header-content h1 {
        font-size: 2em;
    }
    
    .domain-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .navigation {
        position: static;
        margin-top: 40px;
        flex-direction: row;
        justify-content: center;
    }
    
    .performance-metrics {
        grid-template-columns: 1fr;
    }
    
    .monitoring-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .network-map {
        height: 300px;
    }
    
    .modal-content, .modal-content-3d {
        margin: 20px;
        max-width: calc(100% - 40px);
        max-height: calc(100% - 40px);
    }
    
    .wifi-details {
        grid-template-columns: 1fr;
    }
}

/* Floating Terminal Button */
.floating-terminal-btn {
    position: fixed;
    bottom: 30px;
    left: 30px; /* Positioned on the left instead of right */
    z-index: 1000;
    animation: terminalPulse 2s ease-in-out infinite;
}

.terminal-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #00ff41 0%, #008f11 100%);
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 2px 10px rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 3px solid rgba(0, 255, 65, 0.15);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.terminal-fab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.terminal-fab:hover::before {
    transform: translateX(100%);
}

.terminal-fab:hover {
    transform: translateY(-8px) scale(1.15);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.3),
        inset 0 2px 15px rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #00ff41 0%, #008f11 50%, #00ff88 100%);
}

.terminal-icon {
    font-size: 28px;
    color: #000;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 1;
    position: relative;
    animation: iconBounce 2s ease-in-out infinite;
}

.terminal-tooltip {
    position: absolute;
    left: 85px; /* Positioned to the right of the button since it's on the left */
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    color: #00ff41;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 2px solid rgba(0, 255, 65, 0.3);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 120px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.terminal-tooltip::before {
    content: '';
    position: absolute;
    left: -8px; /* Arrow pointing from left side */
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid rgba(0, 0, 0, 0.95);
}

.terminal-tooltip::after {
    content: '🚀';
    position: absolute;
    right: -5px;
    top: -8px;
    font-size: 12px;
    animation: rocketFloat 2s ease-in-out infinite;
}

.terminal-fab:hover .terminal-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(10px);
}

/* Animations */
@keyframes terminalPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 65, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 255, 65, 0);
    }
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes rocketFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Mobile responsiveness for floating button */
@media (max-width: 768px) {
    .floating-terminal-btn {
        bottom: 20px;
        left: 20px;
    }
    
    .terminal-fab {
        width: 60px;
        height: 60px;
    }
    
    .terminal-icon {
        font-size: 24px;
    }
    
    .terminal-tooltip {
        font-size: 12px;
        padding: 8px 12px;
        min-width: 100px;
        left: 75px;
    }
}

/* Node Modal Styles */
.node-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

.node-modal .modal-content {
    background: var(--bg-card);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
    animation: modalSlideIn 0.3s ease;
}

.node-modal h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5em;
    text-shadow: 0 0 10px var(--primary-color);
}

.node-modal p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.node-modal button {
    background: var(--primary-color);
    color: var(--bg-dark);
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.node-modal button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Connection Details Styles */
.connection-details {
    padding: 20px;
    background: rgba(0, 255, 65, 0.1);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.connection-details h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2em;
    text-align: center;
}

.connection-details p {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.connection-details strong {
    color: var(--primary-color);
    min-width: 150px;
}

/* Animation Keyframes */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Status Indicator Improvements */
.status.online {
    background: var(--primary-color);
    color: var(--bg-dark);
    animation: pulse 2s ease-in-out infinite;
}

.status.checking {
    background: var(--warning-color);
    color: var(--bg-dark);
    animation: pulse 2s ease-in-out infinite;
}

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

/* 2D Network Path Visualization - Chain/Graph Structure */
.network-path-2d {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    padding: 40px 20px;
    overflow: visible;
    min-height: 400px;
    position: relative;
    background: 
        radial-gradient(ellipse at center, rgba(0,255,65,0.05) 0%, transparent 70%),
        linear-gradient(90deg, rgba(0,255,65,0.03) 1px, transparent 1px),
        linear-gradient(rgba(0,255,65,0.03) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    border-radius: 10px;
    border: 1px solid rgba(0,255,65,0.1);
}

.network-node-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    min-width: 120px;
    z-index: 2;
}

/* Chain Layout Positioning */
.network-node-container:nth-child(1) { top: 20px; left: 50%; transform: translateX(-50%); }
.network-node-container:nth-child(2) { top: 80px; left: 25%; }
.network-node-container:nth-child(3) { top: 140px; left: 75%; }
.network-node-container:nth-child(4) { top: 200px; left: 30%; }
.network-node-container:nth-child(5) { top: 260px; left: 70%; }
.network-node-container:nth-child(6) { top: 320px; left: 40%; }
.network-node-container:nth-child(7) { top: 380px; left: 50%; transform: translateX(-50%); }

.network-node {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.network-node:hover {
    transform: scale(1.2);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
    z-index: 10;
}

.node-icon {
    font-size: 28px;
    color: #000;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.5));
}

.node-label {
    margin-top: 12px;
    text-align: center;
    font-size: 12px;
    color: var(--text-primary);
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0,0,0,0.7);
    max-width: 100px;
    line-height: 1.2;
}

/* Chain Connection Lines */
.chain-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.connection-line {
    position: absolute;
    height: 3px;
    background: linear-gradient(90deg, rgba(0,255,65,0.6), rgba(0,255,65,0.8), rgba(0,255,65,0.6));
    border-radius: 2px;
    transform-origin: left center;
    box-shadow: 0 0 10px rgba(0,255,65,0.4);
    animation: connectionPulse 2s ease-in-out infinite;
}

@keyframes connectionPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Data Flow Particles on Connections */
.data-packet {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #00ff41;
    box-shadow: 0 0 8px #00ff41;
    top: 50%;
    transform: translateY(-50%);
    animation: flowAlongPath 4s linear infinite;
}

@keyframes flowAlongPath {
    0% { 
        left: 0%;
        opacity: 0;
        transform: translateY(-50%) scale(0.5);
    }
    10% { 
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    90% { 
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    100% { 
        left: 100%;
        opacity: 0;
        transform: translateY(-50%) scale(0.5);
    }
}

/* Pulse animation for active connections */
.connection-line::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 7px;
    background: linear-gradient(90deg, transparent, rgba(0,255,65,0.6), transparent);
    border-radius: 3px;
    animation: connectionSweep 3s ease-in-out infinite;
}

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

/* Hover Details Tooltip */
.node-hover-details {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid;
    border-radius: 8px;
    padding: 12px;
    min-width: 200px;
    color: #fff;
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 20;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    margin-bottom: 10px;
}

.network-node:hover .node-hover-details {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

.hover-detail-item {
    display: flex;
    justify-content: space-between;
    margin: 3px 0;
    padding: 2px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.hover-detail-item:last-child {
    border-bottom: none;
}

.hover-detail-key {
    font-weight: bold;
    opacity: 0.8;
}

.hover-detail-value {
    font-family: 'Courier New', monospace;
    color: inherit;
}

/* Responsive adjustments for chain layout */
@media (max-width: 768px) {
    .network-path-2d {
        min-height: 350px;
    }
    
    .network-node {
        width: 60px;
        height: 60px;
    }
    
    .node-icon {
        font-size: 20px;
    }
    
    .node-hover-details {
        min-width: 150px;
        font-size: 10px;
    }
}

/* Node details modal */
.node-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00ff41;
    border-radius: 10px;
    padding: 20px;
    z-index: 10000;
    max-width: 600px;
    width: 90%;
    color: #00ff41;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
    animation: modalFadeIn 0.3s ease-out;
    max-height: 80vh;
    overflow-y: auto;
}

.node-details-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #00ff41;
}

.node-details-header h3 {
    margin: 0;
    color: #00ff41;
    font-size: 20px;
}

.node-description {
    color: #ccc;
    margin: 5px 0;
}

.node-location {
    color: #00ff41;
    font-style: italic;
    margin: 5px 0;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 5px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
}

.detail-key {
    color: #ccc;
    font-weight: bold;
}

.detail-value {
    color: #00ff41;
    font-family: 'Courier New', monospace;
}

.node-actions {
    margin-top: 20px;
    display: flex;
    justify-content: space-around;
}

.action-btn {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid #00ff41;
    color: #00ff41;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(0, 255, 65, 0.2);
    transform: translateY(-2px);
}

/* DNS Chain Visualization */
.dns-resolution-chain {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
}

.dns-step {
    display: flex;
    align-items: center;
    margin: 5px 0;
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
}

.dns-step-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 255, 65, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #00ff41;
}

.dns-step-details {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dns-step-name {
    font-size: 14px;
    color: var(--text-primary);
}

.dns-step-status {
    font-size: 12px;
    color: #00ff41;
    font-family: 'Courier New', monospace;
}

.dns-step-time {
    color: #aaa;
    font-size: 12px;
}

.dns-step-arrow {
    color: #00ff41;
    font-size: 14px;
    width: 100%;
    text-align: center;
    margin: 5px 0;
}

.final-step {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.3);
}

/* Progress indicator styles */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    backdrop-filter: blur(5px);
}

.progress-overlay {
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00ff41;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 255, 65, 0.3);
    animation: progressPulse 2s ease-in-out infinite;
}

.progress-box {
    min-width: 300px;
}

.progress-message {
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid #00ff41;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff41, #00cc33);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 1.5s linear infinite;
}

.progress-percentage {
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
}

@keyframes progressPulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
    }
    50% {
        box-shadow: 0 0 50px rgba(0, 255, 65, 0.5);
    }
}

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

/* Enhanced button animations */
.control-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.control-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 65, 0.4);
}

.control-button:active {
    transform: translateY(0);
}

.control-button.working {
    background: linear-gradient(45deg, #ff8800, #ffaa00);
    border-color: #ff8800;
    animation: buttonWorking 1s ease-in-out infinite;
}

.control-button.complete {
    background: linear-gradient(45deg, #00ff41, #00cc33);
    border-color: #00ff41;
}

@keyframes buttonWorking {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 136, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 136, 0, 0.8);
    }
}