/* ======================== */
/* CSS Variables & Reset    */
/* ======================== */

/* Cloud Services Styles */
.category-btn {
    padding: 8px 16px;
    background: #3a3a4e;
    border: 1px solid #555;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background: #4a4a5e;
}

.category-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

.cloud-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin: 20px;
}

.service-card {
    background: #2a2a3e;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    color: white;
    transition: all 0.3s ease;
}

.service-card:hover {
    background: #3a3a4e;
    border-color: #555;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.service-title h4 {
    margin: 0;
    font-size: 1.1em;
    color: white;
}

.service-provider {
    font-size: 0.85em;
    color: #aaa;
}

.service-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

.service-details {
    margin-bottom: 12px;
    font-size: 0.9em;
}

.service-details > div {
    margin-bottom: 4px;
}

.service-metrics {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.metric {
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.75em;
    color: #aaa;
    margin-bottom: 2px;
}

.metric-value {
    display: block;
    font-weight: bold;
    font-size: 0.9em;
}

.service-last-test {
    margin-bottom: 12px;
    font-size: 0.8em;
    color: #aaa;
}

.service-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.service-actions .btn {
    flex: 1;
    min-width: auto;
    padding: 6px 8px;
    font-size: 0.8em;
}

.no-services {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #aaa;
    font-size: 1.1em;
}

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

.stat-card {
    background: #2a2a3e;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: white;
}

.stat-card h4 {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    color: #aaa;
    text-transform: uppercase;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary);
}

/* Modal Enhancements */
.modal-content {
    max-width: 500px;
    width: 90%;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Chart Container Enhancements */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.chart-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    min-height: 300px;
}

.chart-canvas-container {
    position: relative;
    width: 100%;
    height: 250px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.chart-canvas-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Responsive charts for smaller screens */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .chart-canvas-container {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .chart-container {
        padding: 10px;
        min-height: 250px;
    }
    
    .chart-canvas-container {
        height: 180px;
    }
}

/* Enhanced Button Styles */
.btn-sm {
    padding: 4px 8px;
    font-size: 0.8em;
}

.btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

.btn-warning {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    border-color: #d39e00;
}

.btn-success {
    background: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background: #218838;
    border-color: #1e7e34;
}

/* ======================== */
/* CSS Variables & Reset    */
/* ======================== */
:root {
    --primary: #007bff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --dark: #1a1a1a;
    --light: #f8f9fa;
    --border: #e5e7eb;
    --text: #333;
    --sidebar-width: 250px;
    --header-height: 80px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text);
}

/* ======================== */
/* Layout Components        */
/* ======================== */
.container {
    display: flex;
    height: 100vh;
    background: white;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: white;
    padding: 1.5rem;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.version {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background: var(--primary);
}

.nav-icon {
    font-size: 1.25rem;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: var(--light);
}

.content-section {
    display: none;
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.header-title {
    font-size: 2rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

/* ======================== */
/* UI Components            */
/* ======================== */

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: var(--dark);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Status Cards */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.status-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-card.success {
    border-left: 4px solid var(--success);
}

.status-card.warning {
    border-left: 4px solid var(--warning);
}

.status-card.danger {
    border-left: 4px solid var(--danger);
}

.status-card.info {
    border-left: 4px solid var(--info);
}

.status-label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.status-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.status-change {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.status-change.positive {
    color: var(--success);
}

.status-change.negative {
    color: var(--danger);
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text);
}

/* Progress Bar */
.progress-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.progress-fill {
    height: 30px;
    background: linear-gradient(90deg, var(--primary), var(--info));
    border-radius: 15px;
    transition: width 0.3s ease;
}

#progressPercent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: white;
    z-index: 2;
}

.progress-text {
    margin-top: 1rem;
    text-align: center;
    color: #666;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    min-height: 200px;
}

/* Terminal Control Center */
.terminal-control-center {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: #1a1a1a;
    border-top: 3px solid #007bff;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    resize: vertical;
    min-height: 150px;
    max-height: 70vh;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

/* Terminal Toolbar */
.terminal-toolbar {
    background: linear-gradient(90deg, #2a2a2a, #1f1f1f);
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
    cursor: ns-resize;
    user-select: none;
    min-height: 50px;
}

.terminal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1rem;
}

.terminal-icon {
    font-size: 1.2rem;
}

.terminal-status {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-family: Arial, sans-serif;
}

/* Terminal Main Controls */
.terminal-main-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-btn {
    background: linear-gradient(145deg, #007bff, #0056b3);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.terminal-btn:hover {
    background: linear-gradient(145deg, #0056b3, #004085);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.terminal-divider {
    width: 1px;
    height: 30px;
    background: #555;
    margin: 0 8px;
}

/* Terminal Advanced Controls */
.terminal-advanced-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.terminal-select {
    background: #333;
    border: 1px solid #555;
    color: #ccc;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.terminal-btn-small {
    background: transparent;
    border: 1px solid #555;
    color: #ccc;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.terminal-btn-small:hover {
    background: #444;
    border-color: #777;
}

/* Terminal Content Area */
.terminal-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.terminal-output {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    background: linear-gradient(135deg, #1a1a1a 0%, #111 100%);
}

/* Terminal Input Area */
.terminal-input-area {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #222;
    border-top: 1px solid #333;
    gap: 10px;
}

.terminal-prompt {
    color: #007bff;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    white-space: nowrap;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    outline: none;
    padding: 5px 0;
}

.terminal-input::placeholder {
    color: #666;
}

/* Terminal Stats Bar */
.terminal-stats-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 6px 15px;
    background: #0f0f0f;
    border-top: 1px solid #333;
    font-family: Arial, sans-serif;
    font-size: 0.75rem;
}

.terminal-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-label {
    color: #888;
}

.stat-value {
    color: #00ff00;
    font-weight: bold;
}

/* Icon-only buttons */
.btn-icon {
    background: var(--secondary, #6c757d);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    opacity: 0.9;
}

/* Adjust main content for terminal control center */
.main-content {
    padding-bottom: 320px; /* Space for enhanced terminal */
}

.console-copy-btn {
    position: fixed;
    bottom: 165px; /* Position above console content */
    right: 20px;
    background: rgba(76, 175, 80, 0.9);
    border: 1px solid #4caf50;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    color: white;
    font-size: 12px;
    font-family: Arial, sans-serif;
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.console-copy-btn:hover {
    background: rgba(76, 175, 80, 0.3);
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

.console-copy-btn.copied {
    background: #4caf50;
    color: white;
}

.console-line {
    padding: 0.25rem 0;
    display: flex;
    gap: 1rem;
}

.console-timestamp {
    color: #888;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.close-btn:hover {
    color: #333;
}

/* 🥇 GOLD STANDARD: Discovery Wizard Styling */
.log-wizard {
    color: #FFD700 !important;
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 3px solid #FFD700;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.wizard-progress {
    background: linear-gradient(90deg, #FFD700, #FFA500);
    height: 4px;
    border-radius: 2px;
    margin: 5px 0;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.console-level {
    font-weight: bold;
    text-transform: uppercase;
}

.console-level.info {
    color: #17a2b8;
}

.console-level.success {
    color: #28a745;
}

.console-level.warning {
    color: #ffc107;
}

.console-level.error {
    color: #dc3545;
}

/* Results Container */
.results-container {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.results-container h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.result-item {
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
    transition: all 0.3s ease;
}

.result-item:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.result-item.error {
    border-left-color: var(--danger);
}

/* Control Grid */
.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.control-grid label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.close-btn:hover {
    color: var(--danger);
}

/* Alert System */
#alertContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.alert.success {
    border-left: 4px solid var(--success);
}

.alert.warning {
    border-left: 4px solid var(--warning);
}

.alert.error {
    border-left: 4px solid var(--danger);
}

.alert.info {
    border-left: 4px solid var(--info);
}

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

/* Test Controls */
.test-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.test-controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.test-controls select {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
}

/* Vulnerability Cards */
.vulnerability-card {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.vulnerability-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.severity-badge {
    background: #ff9800;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 12px;
}

/* ======================== */
/* Enhanced Traceroute      */
/* ======================== */

.enhanced-traceroute-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.traceroute-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--text);
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.topology-canvas-container {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#topologyCanvas {
    display: block;
    max-width: 100%;
    height: auto;
    cursor: crosshair;
}

.traceroute-legend {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
    padding: 0.75rem;
    background: var(--light);
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.traceroute-stats {
    margin-top: 1.5rem;
}

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

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Console styling for traceroute output */
.console-container {
    background: #1a1a1a;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    padding: 1rem;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    margin: 1rem 0;
}

.console-line {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.console-level {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-right: 0.5rem;
    text-transform: uppercase;
}

.console-level.info {
    background: var(--info);
    color: white;
}

.console-level.success {
    background: var(--success);
    color: white;
}

.console-level.warning {
    background: var(--warning);
    color: var(--dark);
}

.console-level.error {
    background: var(--danger);
    color: white;
}

/* Network topology specific styling */
.topology-node {
    cursor: pointer;
    transition: all 0.3s ease;
}

.topology-node:hover {
    filter: brightness(1.2);
}

.topology-connection {
    transition: all 0.3s ease;
}

.topology-connection:hover {
    filter: brightness(1.3);
    stroke-width: 4px !important;
}

/* Animation effects */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulsing {
    animation: pulse 2s infinite;
}

/* Tooltip styling */
.topology-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    pointer-events: none;
    z-index: 1000;
    max-width: 200px;
}

/* Enhanced visualization modes */
.mode-consolidated .topology-connection {
    opacity: 0.8;
}

.mode-individual .topology-connection {
    opacity: 1;
}

.mode-tree .topology-connection {
    stroke-dasharray: 5, 5;
    opacity: 0.6;
}

/* Responsive design for enhanced traceroute */
@media (max-width: 768px) {
    .traceroute-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .traceroute-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #topologyCanvas {
        height: 300px;
    }
    
    .legend-item {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .traceroute-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
}