/* Formula Pages Styles */

/* General Formula Sections */
.formulas-section {
    padding: 20px 0;
}

.section-title {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.section-desc {
    color: #7f8c8d;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 30px;
}

/* Formula Grid Layouts */
.formulas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

/* Formula Class Cards */
.formula-class-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 25px;
    transition: all 0.3s ease;
    border: 1px solid #e8ecef;
}

.formula-class-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.class-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.class-icon {
    font-size: 2.5rem;
    margin-right: 15px;
}

.class-title {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.class-description {
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.6;
}

.subjects-list ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.subjects-list li {
    display: inline-block;
    background: #e9ecef;
    padding: 4px 12px;
    border-radius: 15px;
    margin: 3px;
    font-size: 0.9rem;
    color: #495057;
}

.btn-formula {
    width: 100%;
    padding: 12px;
    font-weight: 500;
    border-radius: 8px;
}

/* Subject Cards */
.subject-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    padding: 20px;
    transition: all 0.3s ease;
}

.subject-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.subject-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.subject-icon {
    font-size: 2rem;
    margin-right: 10px;
}

.subject-title {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    flex-grow: 1;
}

.formula-count {
    background: #e9ecef;
    color: #495057;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.subject-description {
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.5;
}

.chapters-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.chapter-tag {
    background: #f8f9fa;
    color: #495057;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    border: 1px solid #dee2e6;
}

.chapter-tag.more {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.btn-subject {
    width: 100%;
    padding: 10px;
    font-weight: 500;
}

/* Chapter Cards */
.chapter-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    padding: 20px;
    transition: all 0.3s ease;
}

.chapter-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.chapter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.chapter-icon {
    font-size: 1.8rem;
    margin-right: 10px;
}

.chapter-title {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    flex-grow: 1;
}

.difficulty-badge {
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.formula-count-display {
    text-align: center;
    margin-bottom: 15px;
}

.count-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #007bff;
}

.count-label {
    font-size: 0.9rem;
    color: #6c757d;
}

.key-formulas ul {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.key-formulas li {
    padding: 3px 0;
    color: #495057;
    font-size: 0.9rem;
}

.key-formulas li:before {
    content: "•";
    color: #007bff;
    margin-right: 8px;
}

.btn-chapter {
    width: 100%;
    padding: 10px;
    font-weight: 500;
}

/* Formula Display */
.formula-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #e8ecef;
}

.formula-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.formula-name {
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.copy-formula {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.formula-equation {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    text-align: center;
    border: 1px solid #e9ecef;
}

.equation-display {
    font-size: 1.2rem;
    color: #2c3e50;
}

.formula-description {
    margin: 15px 0;
}

.formula-variables ul,
.formula-applications ul {
    margin: 10px 0;
    padding-left: 20px;
}

.formula-variables li,
.formula-applications li {
    margin: 5px 0;
    line-height: 1.5;
}

.formula-example {
    background: #e8f4fd;
    border-left: 4px solid #007bff;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.formula-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.derivation-section,
.examples-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    border: 1px solid #e9ecef;
}

/* Quick Access Section */
.quick-access-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
}

.quick-access-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    height: 100%;
}

.quick-access-card h4 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.quick-access-card ul {
    list-style: none;
    padding: 0;
}

.quick-access-card li {
    margin: 8px 0;
}

.quick-access-card a {
    color: #007bff;
    text-decoration: none;
    font-size: 0.95rem;
}

.quick-access-card a:hover {
    text-decoration: underline;
}

/* Popular Formulas */
.popular-formulas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.popular-formula-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    padding: 18px;
    transition: all 0.3s ease;
}

.popular-formula-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.usage-badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.usage-badge.very-high {
    background: #d4edda;
    color: #155724;
}

.usage-badge.high {
    background: #fff3cd;
    color: #856404;
}

.formula-meta {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.subject-tag,
.class-tag {
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
}

.subject-tag {
    background: #e7f3ff;
    color: #0056b3;
}

.class-tag {
    background: #f0f0f0;
    color: #495057;
}

/* Study Tips */
.study-tips-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tip-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
}

.tip-card h4 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.tip-card p {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Related Resources */
.resources-grid {
    margin-top: 25px;
}

.resource-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    margin-bottom: 20px;
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.resource-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.resource-card h4 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.resource-card p {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Formula Tools */
.formula-tools-section {
    background: #e8f4fd;
    border-radius: 12px;
    padding: 25px;
}

.tool-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 15px;
}

.tool-card h4 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* Study Tips with Numbers */
.tips-container {
    margin-top: 20px;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tip-number {
    background: #007bff;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 15px;
    flex-shrink: 0;
}

.tip-content h5 {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 5px;
}

.tip-content p {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Quick Reference */
.quick-reference-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
}

.quick-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.quick-ref-item {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.quick-formula {
    display: block;
    margin-top: 5px;
    color: #007bff;
    font-family: 'Courier New', monospace;
}

/* Responsive Design */
@media (max-width: 768px) {
    .formulas-grid,
    .subjects-grid,
    .chapters-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .formula-actions {
        flex-direction: column;
    }
    
    .formula-actions .btn {
        margin-bottom: 5px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-ref-grid {
        grid-template-columns: 1fr;
    }
    
    .popular-formulas-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .formula-card,
    .subject-card,
    .chapter-card {
        padding: 15px;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .class-icon,
    .subject-icon {
        font-size: 1.5rem;
    }
    
    .formula-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Print Styles */
@media print {
    .formula-actions,
    .copy-formula,
    .btn,
    .resource-card .btn {
        display: none !important;
    }
    
    .formula-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .section-title {
        color: #000 !important;
    }
}
