/* Python案例库页面增强样式 */

/* 页面整体样式 - 橙色主题 */
.python-cases-container {
    background: linear-gradient(135deg, #fff8f0 0%, #fff3e0 50%, #ffe8cc 100%);
    min-height: 100vh;
    padding: 2rem 0;
    position: relative;
}

.python-cases-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ff9800" opacity="0.05"/><circle cx="75" cy="75" r="1" fill="%23f57c00" opacity="0.03"/><circle cx="45" cy="15" r="0.5" fill="%23ff9800" opacity="0.04"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
    z-index: 1;
}

.python-cases-content {
    position: relative;
    z-index: 2;
}

/* 主标题样式 */
.python-cases-title {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f57c00, #ff9800, #ffb74d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 0 4px 8px rgba(245, 124, 0, 0.1);
    position: relative;
}

.python-cases-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

/* 分类卡片样式 */
.category-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 152, 0, 0.1);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 16px rgba(255, 152, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ff9800, transparent);
    transition: left 0.6s ease;
}

.category-card:hover::before {
    left: 100%;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.15),
        0 8px 32px rgba(255, 152, 0, 0.2);
    border-color: rgba(255, 152, 0, 0.3);
}

.category-card .card-body {
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
}

.category-card .fas {
    color: #ff9800;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(255, 152, 0, 0.2));
}

.category-card:hover .fas {
    transform: scale(1.15) rotate(5deg);
    color: #f57c00;
    filter: drop-shadow(0 6px 12px rgba(255, 152, 0, 0.3));
}

.category-card h3 {
    color: #f57c00;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.category-card p {
    color: #616161;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* 案例卡片样式 */
.case-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 152, 0, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.case-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff9800, #ffb74d, #ff9800);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s ease;
}

.case-card:hover::after {
    transform: scaleX(1);
}

.case-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 152, 0, 0.2);
}

.case-card .card-body {
    padding: 2rem;
}

.case-card h3 {
    color: #f57c00;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.case-card p {
    color: #616161;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* 功能列表样式 */
.feature-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    padding: 0.4rem 0;
    transition: all 0.3s ease;
    color: #424242;
}

.feature-list li:hover {
    transform: translateX(5px);
    color: #f57c00;
}

.feature-list li i {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    color: white;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.3);
    flex-shrink: 0;
}

/* 增强按钮样式 - 橙色主题 */
.enhanced-btn-orange {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.enhanced-btn-orange::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.6s ease;
}

.enhanced-btn-orange:hover::before {
    left: 100%;
}

.enhanced-btn-orange:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4);
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, #f57c00, #ff9800);
}

.enhanced-btn-orange:active {
    transform: translateY(0) scale(0.98);
}

.enhanced-btn-orange-outline {
    background: transparent;
    border: 2px solid #ff9800;
    color: #ff9800;
    box-shadow: none;
}

.enhanced-btn-orange-outline:hover {
    background: #ff9800;
    color: white;
    border-color: #ff9800;
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.3);
}

/* 段落标题样式 */
.section-title {
    color: #f57c00;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    position: relative;
    padding-left: 1rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 4px;
    height: 2rem;
    background: linear-gradient(180deg, #ff9800, #ffb74d);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

/* 代码主题样式 */
.code-preview {
    background: rgba(45, 45, 45, 0.95);
    border: 1px solid rgba(255, 152, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    font-family: 'Fira Code', 'Consolas', monospace;
    color: #f5f5f5;
    position: relative;
    overflow: hidden;
}

.code-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff9800, #ffb74d, #ff9800);
}

.code-preview .language-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 152, 0, 0.8);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 数据可视化主题 */
.data-analysis-theme .fas {
    color: #2196f3;
}

.data-analysis-theme .category-card:hover .fas {
    color: #1976d2;
}

.web-development-theme .fas {
    color: #4caf50;
}

.web-development-theme .category-card:hover .fas {
    color: #388e3c;
}

.iot-theme .fas {
    color: #9c27b0;
}

.iot-theme .category-card:hover .fas {
    color: #7b1fa2;
}

/* 悬浮效果增强 */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 加载动画 - 橙色主题 */
@keyframes shimmer-orange {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.case-card.loading {
    background: linear-gradient(90deg, #fff3e0 25%, #ffe0b2 50%, #fff3e0 75%);
    background-size: 1000px 100%;
    animation: shimmer-orange 2s infinite linear;
}

/* 滚动动画 */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

/* 浮动装饰元素 - 橙色主题 */
.floating-decoration-orange {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 152, 0, 0.3);
    border-radius: 50%;
    animation: float-orange 8s ease-in-out infinite;
}

.floating-decoration-orange:nth-child(1) {
    top: 15%;
    left: 8%;
    animation-delay: 0s;
}

.floating-decoration-orange:nth-child(2) {
    top: 55%;
    right: 12%;
    animation-delay: 2.5s;
}

.floating-decoration-orange:nth-child(3) {
    bottom: 25%;
    left: 15%;
    animation-delay: 5s;
}

@keyframes float-orange {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    33% {
        transform: translateY(-15px) rotate(120deg);
        opacity: 0.6;
    }
    66% {
        transform: translateY(-25px) rotate(240deg);
        opacity: 0.4;
    }
}

/* 网格布局增强 */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .python-cases-title {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }
    
    .category-card .card-body,
    .case-card .card-body {
        padding: 1.5rem;
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .python-cases-title {
        font-size: 2rem;
    }
    
    .category-card .card-body,
    .case-card .card-body {
        padding: 1.25rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .code-preview {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

/* 标签云样式 */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tag {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 152, 0, 0.05));
    border: 1px solid rgba(255, 152, 0, 0.2);
    color: #f57c00;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.2), rgba(255, 152, 0, 0.1));
    border-color: rgba(255, 152, 0, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
}

/* 进度指示器 */
.difficulty-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.difficulty-indicator .label {
    font-size: 0.9rem;
    color: #616161;
    font-weight: 500;
}

.difficulty-stars {
    display: flex;
    gap: 2px;
}

.difficulty-star {
    width: 12px;
    height: 12px;
    background: #e0e0e0;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.difficulty-star.filled {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}

/* 交互式元素 */
.interactive-demo {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.05), rgba(255, 152, 0, 0.02));
    border: 2px dashed rgba(255, 152, 0, 0.3);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.interactive-demo:hover {
    border-style: solid;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 152, 0, 0.05));
    transform: scale(1.02);
}

.interactive-demo .icon {
    font-size: 3rem;
    color: #ff9800;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.interactive-demo:hover .icon {
    transform: scale(1.1) rotate(5deg);
    color: #f57c00;
} 