.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #4299e1 0%, #667eea 100%);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stat-card i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #4299e1 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: block;
}

.stat-card h3 {
    margin-bottom: 0.5rem;
    color: #718096;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card span {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    display: block;
    line-height: 1;
}

.stat-card.danger span {
    color: #e53e3e;
}

.stat-card.success span {
    color: #38a169;
}

.stat-card.warning span {
    color: #dd6b20;
}

.analysis-results {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.analysis-results h3 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.analysis-results h3::before {
    content: '';
    width: 4px;
    height: 1.5rem;
    background: linear-gradient(135deg, #4299e1 0%, #667eea 100%);
    margin-right: 0.75rem;
    border-radius: 2px;
}

.output-container {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 200px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    white-space: pre-wrap;
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-x: auto;
}

.output-container.success {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border-color: #9ae6b4;
    color: #22543d;
}

.output-container.error {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-color: #fbb6ce;
    color: #742a2a;
}

.no-data {
    color: #a0aec0;
    font-style: italic;
    text-align: center;
    padding: 2rem;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

.actions {
    text-align: center;
    margin-top: 2rem;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.model-card {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.model-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #4299e1 0%, #667eea 100%);
}

.model-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.model-card.full-width {
    grid-column: 1 / -1;
}

.model-card h3 {
    margin-bottom: 0.5rem;
    color: #2d3748;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.model-card h3 i {
    color: #4299e1;
    margin-right: 0.5rem;
}

.model-card p {
    color: #718096;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.model-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    resize: vertical;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
}

.model-form textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
    background: #ffffff;
}

.model-form textarea.error {
    border-color: #f56565;
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
}

.model-output {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    min-height: 100px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    white-space: pre-wrap;
    font-size: 0.8rem;
    line-height: 1.5;
    overflow-x: auto;
}

.model-output.success {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border-color: #9ae6b4;
    color: #22543d;
}

.model-output.error {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-color: #fbb6ce;
    color: #742a2a;
}

.monitor-controls {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.monitor-status {
    text-align: center;
    margin-bottom: 2rem;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    border-radius: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    font-weight: 500;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #f56565;
    margin-right: 0.75rem;
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 4px rgba(245, 101, 101, 0.2);
}

.status-indicator.connected .status-dot {
    background-color: #48bb78;
    box-shadow: 0 0 0 4px rgba(72, 187, 120, 0.2);
}

.status-indicator.paused .status-dot {
    background-color: #ed8936;
    box-shadow: 0 0 0 4px rgba(237, 137, 54, 0.2);
}

.network-data {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.network-data h3 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.network-data h3::before {
    content: '';
    width: 4px;
    height: 1.5rem;
    background: linear-gradient(135deg, #4299e1 0%, #667eea 100%);
    margin-right: 0.75rem;
    border-radius: 2px;
}

.network-log-container {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border: 1px solid #4a5568;
    border-radius: 8px;
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    color: #e2e8f0;
    font-size: 0.8rem;
    line-height: 1.4;
}

.network-log-container::-webkit-scrollbar {
    width: 8px;
}

.network-log-container::-webkit-scrollbar-track {
    background: #2d3748;
    border-radius: 4px;
}

.network-log-container::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

.network-log-container::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

.log-entry {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid #4a5568;
}

.log-entry.error {
    color: #f56565;
}

.log-entry.warning {
    color: #ed8936;
}

.log-entry.success {
    color: #48bb78;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .models-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .model-card {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-card span {
        font-size: 2rem;
    }
    
    .analysis-results,
    .network-data {
        padding: 1.5rem;
    }
    
    .output-container,
    .network-log-container {
        padding: 1rem;
        min-height: 150px;
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card i {
        font-size: 2rem;
    }
    
    .stat-card span {
        font-size: 1.5rem;
    }
    
    .analysis-results,
    .network-data,
    .model-card {
        padding: 1rem;
    }
    
    .monitor-controls {
        padding: 1rem;
    }
    
    .model-form textarea {
        min-height: 100px;
        padding: 0.75rem;
    }
}