/* ===== Pillar Category Pages Styles ===== */
/* 四大分类页面专用样式：Algorithm, Code Execution, Finance, Math */

/* Enhanced Category Header Animation */
.category-header {
    animation: categoryFadeIn 0.8s ease-out;
}

@keyframes categoryFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-icon {
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Category-Specific Accent Colors */
.category-header.code-bg .category-icon {
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
}

.category-header.algo-bg .category-icon {
    box-shadow: 0 10px 40px rgba(14, 165, 233, 0.4);
}

.category-header.finance-bg .category-icon {
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4);
}

.category-header.math-bg .category-icon {
    box-shadow: 0 10px 40px rgba(245, 158, 11, 0.4);
}

/* Enhanced Tool Category Cards */
.tool-category-card {
    animation: cardSlideUp 0.6s ease-out;
    animation-fill-mode: both;
}

.tool-category-card:nth-child(1) { animation-delay: 0.1s; }
.tool-category-card:nth-child(2) { animation-delay: 0.2s; }
.tool-category-card:nth-child(3) { animation-delay: 0.3s; }
.tool-category-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tool Category Icon Gradients by Type */
.tool-category-card .tool-category-icon.code {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.tool-category-card .tool-category-icon.algo {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
}

.tool-category-card .tool-category-icon.finance {
    background: linear-gradient(135deg, #10b981, #059669);
}

.tool-category-card .tool-category-icon.math {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

/* Enhanced Hover Effects */
.tool-category-card:hover .tool-category-icon {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.tool-category-card:hover .tool-category-icon i {
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Feature List Enhancement */
.tool-features li {
    opacity: 0;
    animation: featureFadeIn 0.5s ease forwards;
}

.tool-features li:nth-child(1) { animation-delay: 0.3s; }
.tool-features li:nth-child(2) { animation-delay: 0.4s; }
.tool-features li:nth-child(3) { animation-delay: 0.5s; }

@keyframes featureFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Related Guide Section Enhancement */
.related-guide-section {
    animation: sectionFadeIn 0.8s ease-out 0.5s;
    animation-fill-mode: both;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.related-guide-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.related-guide-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.related-guide-card:hover::before {
    left: 100%;
}

.related-guide-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Breadcrumb Enhancement for Category Pages */
.breadcrumb-section {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

/* Category Stats (Optional Enhancement) */
.category-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.category-stat {
    text-align: center;
}

.category-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    display: block;
}

.category-stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .category-stats {
        gap: 1.5rem;
    }
    
    .category-stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .tool-category-card {
        flex-direction: column;
    }
    
    .tool-category-icon {
        width: 100%;
        min-width: auto;
        padding: 2rem;
    }
}

/* Print Styles */
@media print {
    .category-header {
        background: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
