/* 自定义样式 */
a{text-decoration: none;}


.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #667eea  100%);
    color: white;
    padding: 100px 0;
    margin-bottom: 50px;
}

.code-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e9ecef;
}

.code-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.code-card pre {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 15px;
    max-height: 200px;
    overflow: auto;
}

.code-card code {
    font-size: 0.9rem;
}

.language-badge {
    position: absolute;
    top: 15px;
    right: 15px;
}

.category-card {
    text-align: center;
    transition: transform 0.2s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-success { background-color: #198754 !important; }
.bg-primary { background-color: #0d6efd !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-info { background-color: #0dcaf0 !important; }
.bg-secondary { background-color: #6c757d !important; }
.bg-dark { background-color: #212529 !important; }

.btn-outline-success { color: #198754; border-color: #198754; }
.btn-outline-primary { color: #0d6efd; border-color: #0d6efd; }
.btn-outline-warning { color: #ffc107; border-color: #ffc107; }
.btn-outline-info { color: #0dcaf0; border-color: #0dcaf0; }
.btn-outline-secondary { color: #6c757d; border-color: #6c757d; }
.btn-outline-dark { color: #212529; border-color: #212529; }

.btn-outline-success:hover { background-color: #198754; border-color: #198754; }
.btn-outline-primary:hover { background-color: #0d6efd; border-color: #0d6efd; }
.btn-outline-warning:hover { background-color: #ffc107; border-color: #ffc107; color: #000; }
.btn-outline-info:hover { background-color: #0dcaf0; border-color: #0dcaf0; color: #000; }
.btn-outline-secondary:hover { background-color: #6c757d; border-color: #6c757d; }
.btn-outline-dark:hover { background-color: #212529; border-color: #212529; }

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .code-card pre {
        max-height: 150px;
    }
}

/* 代码高亮调整 */
.hljs {
    background: transparent !important;
    padding: 0 !important;
    
    
    
}


/* 分类卡片样式 */
.category-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
}

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

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: transform 0.3s ease;
}

.category-card:hover .icon-circle {
    transform: scale(1.1);
}

/* 颜色类扩展 */
.bg-success { background-color: #198754 !important; }
.bg-primary { background-color: #0d6efd !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-info { background-color: #0dcaf0 !important; }
.bg-secondary { background-color: #6c757d !important; }
.bg-danger { background-color: #dc3545 !important; }
.bg-dark { background-color: #212529 !important; }

/* 按钮样式 */
.btn-outline-success { 
    color: #198754; 
    border-color: #198754; 
}
.btn-outline-primary { 
    color: #0d6efd; 
    border-color: #0d6efd; 
}
.btn-outline-warning { 
    color: #ffc107; 
    border-color: #ffc107; 
}
.btn-outline-info { 
    color: #0dcaf0; 
    border-color: #0dcaf0; 
}
.btn-outline-secondary { 
    color: #6c757d; 
    border-color: #6c757d; 
}
.btn-outline-danger { 
    color: #dc3545; 
    border-color: #dc3545; 
}
.btn-outline-dark { 
    color: #212529; 
    border-color: #212529; 
}

/* 悬停效果 */
.btn-outline-success:hover { 
    background-color: #198754; 
    border-color: #198754; 
    color: white;
}
.btn-outline-primary:hover { 
    background-color: #0d6efd; 
    border-color: #0d6efd; 
    color: white;
}
.btn-outline-warning:hover { 
    background-color: #ffc107; 
    border-color: #ffc107; 
    color: #000;
}
.btn-outline-info:hover { 
    background-color: #0dcaf0; 
    border-color: #0dcaf0; 
    color: #000;
}
.btn-outline-secondary:hover { 
    background-color: #6c757d; 
    border-color: #6c757d; 
    color: white;
}
.btn-outline-danger:hover { 
    background-color: #dc3545; 
    border-color: #dc3545; 
    color: white;
}
.btn-outline-dark:hover { 
    background-color: #212529; 
    border-color: #212529; 
    color: white;
}

/* 卡片标题样式 */
.card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .icon-circle {
        width: 60px;
        height: 60px;
    }
    
    .icon-circle .bi {
        font-size: 1.5rem !important;
    }
    
    .category-card .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}
/* 代码预览区域样式 */
        .code-preview-container {
            max-height: 1000px;
            overflow-y: auto;
            margin-bottom: 15px;
            border: 1px solid #e9ecef;
            border-radius: 4px;
            background-color: #f8f9fa;
        }
        .code-preview-container pre {
            margin: 0;
            padding: 10px;
            background: transparent !important;
        }
        .code-preview-container code {
            background: transparent !important;
            white-space: pre-wrap;
            word-break: break-all;
        }
        /* 可点击区域悬停效果 */
        .card-clickable-area {
            text-decoration: none;
            color: inherit;
            display: block;
            padding: 8px;
            margin: -8px;
            border-radius: 4px;
            transition: background-color 0.2s;
        }
        .card-clickable-area:hover {
            background-color: rgba(0,0,0,0.02);
            text-decoration: none;
            color: inherit;
        }
        /* 滚动条样式 */
        .code-preview-container::-webkit-scrollbar {
            width: 8px;
        }
        .code-preview-container::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }
        .code-preview-container::-webkit-scrollbar-thumb {
            background: #c1c1c1;
            border-radius: 4px;
        }
        .code-preview-container::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }
        /* 卡片悬停效果 */
        .code-card {
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .code-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        
        
        
  .trending-hero {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 4rem 0;
        margin-bottom: 3rem;
    }
    .trending-badge {
        position: absolute;
        top: -10px;
        right: -10px;
        background: linear-gradient(45deg, #FF6B6B, #FF8E53);
        color: white;
        padding: 8px 12px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: bold;
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
        z-index: 10;
    }
    .trending-card {
        border: 2px solid #e9ecef;
        border-radius: 15px;
        box-shadow: 0 5px 25px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
        overflow: hidden;
        background: white;
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    .trending-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 40px rgba(0,0,0,0.15);
        border-color: #667eea;
    }
    .trending-card .card-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 1.5rem;
    }
    .trending-stats {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        color: white;
        border-radius: 10px;
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    .stat-item {
        text-align: center;
    }
    .stat-number {
        font-size: 2rem;
        font-weight: bold;
        margin-bottom: 0.5rem;
    }
    .stat-label {
        font-size: 0.9rem;
        opacity: 0.9;
    }
    .language-trend {
        background: rgba(255,255,255,0.1);
        backdrop-filter: blur(10px);
        border-radius: 10px;
        padding: 1rem;
        margin-bottom: 1rem;
        transition: all 0.3s ease;
    }
    .language-trend:hover {
        background: rgba(255,255,255,0.2);
        transform: translateX(5px);
    }
    .trending-filter {
        background: white;
        border-radius: 15px;
        padding: 1.5rem;
        box-shadow: 0 5px 20px rgba(0,0,0,0.08);
        margin-bottom: 2rem;
        border: 1px solid #e9ecef;
    }
    .hot-tag {
        background: linear-gradient(45deg, #FF6B6B, #FF8E53);
        color: white;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.8rem;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
        display: inline-block;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    .hot-tag:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
        color: white;
    }
    .trending-gradient {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    .code-preview-trending {
        max-height: 200px;
        overflow-y: auto;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e9ecef;
        margin: 1rem 0;
        flex-shrink: 0;
    }
    .code-preview-trending pre {
        margin: 0;
        padding: 1rem;
        background: transparent !important;
    }
    .code-preview-trending code {
        background: transparent !important;
        white-space: pre-wrap;
        word-break: break-all;
    }
    .trending-avatar {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: linear-gradient(45deg, #667eea, #764ba2);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: bold;
        font-size: 0.8rem;
        flex-shrink: 0;
    }
    .card-content-wrapper {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    .card-header-section {
        margin-bottom: 1rem;
    }
    .card-body-content {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    .card-footer-section {
        margin-top: auto;
        padding-top: 1rem;
        border-top: 1px solid #e9ecef;
        flex-shrink: 0;
    }
    
    
    
.code-preview-container {
            max-height: 1000px;
            overflow-y: auto;
            margin-bottom: 15px;
            border: 1px solid #e9ecef;
            border-radius: 6px;
            background-color: #f8f9fa;
        }
        .code-preview-container pre {
            margin: 0;
            padding: 12px;
            background: transparent !important;
        }
        .code-preview-container code {
            background: transparent !important;
            white-space: pre-wrap;
            word-break: break-all;
            font-size: 0.85rem;
        }
        /* 可点击区域样式 */
        .card-clickable-area {
            text-decoration: none;
            color: inherit;
            display: block;
            padding: 8px;
            margin: -8px;
            border-radius: 6px;
            transition: background-color 0.2s ease;
        }
        .card-clickable-area:hover {
            background-color: rgba(0, 123, 255, 0.05);
            text-decoration: none;
            color: inherit;
        }
        /* 自定义滚动条 */
        .code-preview-container::-webkit-scrollbar {
            width: 6px;
        }
        .code-preview-container::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 3px;
        }
        .code-preview-container::-webkit-scrollbar-thumb {
            background: #c1c1c1;
            border-radius: 3px;
        }
        .code-preview-container::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }
        /* 卡片悬停效果 */
        .code-card {
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .code-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }