.all-formulas-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.formulas-search-container {
    margin-bottom: 30px;
}

.search-box {
    position: relative;
    max-width: 400px;
    margin-bottom: 20px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

#formulas-search {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#formulas-search:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.category-filter {
    padding: 10px 20px;
    border: 2px solid #e1e5e9;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.category-filter:hover {
    border-color: #4a90e2;
    color: #4a90e2;
}

.category-filter.active {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.category-filter i {
    margin-right: 5px;
}

.formulas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.formula-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.formula-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.formula-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.formula-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

.formula-category {
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #666;
}

.formula-content {
    margin-bottom: 20px;
}

.formula-equation {
    font-size: 20px;
    font-weight: 600;
    color: #4a90e2;
    margin-bottom: 10px;
    font-family: 'Cambria Math', 'Latin Modern Math', STIX, serif;
}

.formula-description {
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.formula-actions {
    display: flex;
    justify-content: flex-end;
}

.copy-formula {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #666;
}

.copy-formula:hover {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.copy-formula.copied {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ccc;
}

.no-results h3 {
    margin: 0 0 10px 0;
    color: #666;
}

.no-results p {
    margin: 0;
    color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .formulas-grid {
        grid-template-columns: 1fr;
    }
    
    .category-filters {
        justify-content: center;
    }
    
    .category-filter {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .all-formulas-container {
        padding: 15px;
    }
    
    .formula-card {
        padding: 15px;
    }
    
    .formula-equation {
        font-size: 18px;
    }
}