body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
}

.header h1 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    font-size: 1.75rem;
}

.nav-menu {
    max-width: 1200px;
    margin: 1rem auto 0;
    display: flex;
    gap: 2rem;
    padding: 0 2rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 1rem;
    font-weight: 300;
}

.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.overview {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.stat-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    min-height: 115px;
    display: flex;
    flex-direction: column;
}

.stat-card h3 {
    margin: 0 0 0.5rem 0;
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 2.2rem;
}

.benchmark-name {
    display: block;
    font-size: 0.75rem;
    color: #868e96;
    text-transform: none;
    font-weight: normal;
    letter-spacing: normal;
    margin-top: 0.15rem;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: bold;
    margin: auto 0 0 0;
    color: #2c3e50;
    align-self: center;
}

.stat-value.success {
    color: #28a745;
}

.benchmarks, .trends-table-section, .detailed-results, .statistics, 
.chart-section, .trends, .detailed-header, .external-analysis {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table-container {
    overflow-x: auto;
    margin-top: 1.5rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.loading-message {
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.confidence-cell {
    font-family: monospace;
    font-size: 0.9rem;
}

.chart-container {
    margin-top: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 400px;
    position: relative;
}

/* Performance Grade Classes */
.grade-a-plus {
    color: #00c851;
    font-weight: bold;
}

.grade-a {
    color: #28a745;
    font-weight: bold;
}

.grade-b {
    color: #ffc107;
    font-weight: bold;
}

.grade-c {
    color: #ff8800;
    font-weight: bold;
}

.grade-d {
    color: #dc3545;
    font-weight: bold;
}

.grade-f {
    color: #c30000;
    font-weight: bold;
}

/* Performance Score Badges */
.performance-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

.performance-badge.excellent {
    background-color: #d4edda;
    color: #155724;
}

.performance-badge.good {
    background-color: #d1ecf1;
    color: #0c5460;
}

.performance-badge.average {
    background-color: #fff3cd;
    color: #856404;
}

.performance-badge.poor {
    background-color: #f8d7da;
    color: #721c24;
}

.footer {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 3rem;
    border-top: 1px solid #dee2e6;
}

.footer p {
    margin: 0.5rem 0;
}

.visualizer-container {
    margin-top: 1rem;
    height: calc(100vh - 300px); /* Adjust for header and footer */
    min-height: 500px;
    max-height: 900px;
    display: flex;
    flex-direction: column;
}

.jmh-visualizer iframe,
#jmh-visualizer-frame {
    background: white;
    width: 100%;
    height: 100%;
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    min-height: 500px;
}

#visualizer-error h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

#visualizer-error ol {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        margin: 1rem;
        padding: 0 1rem;
    }
}