/* ==================== PERFORMANCE PAGE STYLES ==================== */

.big-o-section {
    padding: 3rem 0;
    background: white;
}

.section-description {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

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

.big-o-card {
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    color: white;
    transition: all var(--transition-base);
}

.big-o-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.big-o-card.excellent {
    background: linear-gradient(135deg, #10b981, #059669);
}

.big-o-card.good {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.big-o-card.fair {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.big-o-card.moderate {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.big-o-card.bad {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.big-o-card.terrible {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.big-o-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.big-o-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.big-o-card p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.big-o-card .example {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

/* Chart Container */
.chart-container {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.chart-container h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

/* Complexity Section */
.complexity-section {
    padding: 3rem 0;
    background: var(--light-bg);
}

.complexity-table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

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

.complexity-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.complexity-table th,
.complexity-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--light-border);
}

.complexity-table th {
    font-weight: 700;
    font-size: 0.95rem;
}

.complexity-table td:first-child {
    text-align: left;
    font-weight: 600;
}

.complexity-table tbody tr {
    transition: background var(--transition-base);
}

.complexity-table tbody tr:hover {
    background: var(--light-bg);
}

.complexity {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
}

.complexity.excellent {
    background: #10b981;
}

.complexity.good {
    background: #3b82f6;
}

.complexity.fair {
    background: #8b5cf6;
}

.complexity.moderate {
    background: #f59e0b;
}

.complexity.bad {
    background: #f97316;
}

.table-note {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 1rem;
    font-size: 0.95rem;
}

/* Sorting Section */
.sorting-section {
    padding: 3rem 0;
    background: white;
}

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

.algorithm-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--light-border);
    transition: all var(--transition-base);
}

.algorithm-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.algorithm-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.complexity-info {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.complexity-info div {
    padding: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.algorithm-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Search Section */
.search-section {
    padding: 3rem 0;
    background: var(--light-bg);
}

.comparison-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.comparison-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.comparison-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-header i {
    font-size: 2rem;
}

.card-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.card-content {
    padding: 2rem;
}

.big-metric {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: var(--radius-md);
}

.big-metric.excellent {
    color: #10b981;
}

.big-metric.good {
    color: #3b82f6;
}

.card-content p {
    font-weight: 600;
    color: var(--text-primary);
    margin: 1rem 0 0.5rem;
}

.card-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.card-content ul li {
    padding: 0.25rem 0 0.25rem 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.card-content ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

/* Tips Section */
.tips-section {
    padding: 3rem 0;
    background: white;
}

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

.tip-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
    transition: all var(--transition-base);
}

.tip-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.tip-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    margin-bottom: 1rem;
}

.tip-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tip-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Responsive */
@media (max-width: 768px) {
    .big-o-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .big-o-value {
        font-size: 1.5rem;
    }
    
    .complexity-table {
        font-size: 0.875rem;
    }
    
    .complexity-table th,
    .complexity-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .big-metric {
        font-size: 2rem;
    }
}