/* 现代化UI统一样式 - 统一所有页面风格 */

/* 基础变量 */
:root {
    --primary-color: #4e73df;
    --secondary-color: #224abe;
    --accent-color: #1cc88a;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gradient-primary: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    --gradient-accent: linear-gradient(135deg, #1cc88a 0%, #17a673 100%);
    --gradient-warning: linear-gradient(135deg, #f6c23e 0%, #f4b619 100%);
    --gradient-danger: linear-gradient(135deg, #e74a3b 0%, #c0392b 100%);
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    --box-shadow-hover: 0 15px 30px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: #333;
    line-height: 1.6;
}

/* 导航栏 */
.navbar {
    background: var(--gradient-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 600;
    color: white !important;
}

.nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
}

/* 页面头部 */
.page-header, .hero-banner {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.page-title, .hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-subtitle, .hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 筛选栏 */
.filter-bar {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.filter-label {
    font-weight: 500;
    margin-right: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    background: #e9ecef;
    color: #495057;
    border: none;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 卡片样式 */
.card-modern, .article-card, .software-card, .product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.card-modern:hover, .article-card:hover, .software-card:hover, .product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.card-image, .article-image, .software-image, .product-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: var(--transition);
}

.card-modern:hover .card-image,
.article-card:hover .article-image,
.software-card:hover .software-image {
    transform: scale(1.05);
}

.card-body, .article-body, .software-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title, .article-title, .software-title, .product-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #333;
}

.card-title a, .article-title a, .software-title a {
    color: #333;
    text-decoration: none;
    transition: var(--transition);
}

.card-title a:hover, .article-title a:hover, .software-title a:hover {
    color: var(--primary-color);
}

/* 按钮样式 */
.btn-modern {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1.25rem;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-primary-modern {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary-modern:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 115, 223, 0.3);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
}

/* 角标样式 */
.corner-ribbon {
    position: absolute;
    top: 10px;
    right: -30px;
    transform: rotate(45deg);
    padding: 5px 40px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ribbon-blue {
    background: var(--gradient-primary);
}

.ribbon-red {
    background: var(--gradient-danger);
}

.ribbon-green {
    background: var(--gradient-accent);
}

/* 元数据样式 */
.card-meta, .article-meta, .product-meta-grid {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6c757d;
    font-size: 0.85rem;
}

.meta-item {
    text-align: center;
}

.meta-value {
    display: block;
    font-weight: 600;
    color: #333;
}

.meta-label {
    font-size: 0.75rem;
    color: #6c757d;
}

/* 标签样式 */
.card-tags, .article-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e9ecef;
    color: #495057;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.article-type-tutorial { background: var(--primary-color); color: white; }
.article-type-news { background: var(--accent-color); color: white; }
.article-type-guide { background: var(--warning-color); color: white; }
.article-type-video { background: var(--danger-color); color: white; }

/* 分页样式 */
.pagination-container {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.page-link {
    color: var(--primary-color);
    border-radius: var(--border-radius);
    margin: 0 0.25rem;
    transition: var(--transition);
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.empty-state i {
    font-size: 4rem;
    color: #e9ecef;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #495057;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* 页脚样式 */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    background: #212529;
    padding: 1rem 0;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

/* 面包屑导航 */
.breadcrumb {
    background: transparent;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .page-title, .hero-title {
        font-size: 1.8rem;
    }
    
    .filter-bar {
        padding: 1rem;
    }
    
    .card-image, .article-image, .software-image, .product-img {
        height: 150px;
    }
    
    .page-header, .hero-banner {
        padding: 2rem 0;
    }
}

/* 特性卡片 */
.feature-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #333;
}

.feature-description {
    color: #6c757d;
    margin-bottom: 1rem;
}

/* 统计数据样式 */
.hero-stats {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
}

.hero-stat {
    text-align: center;
    color: white;
}

.hero-stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.hero-stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 动画效果 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* 加载动画 */
.skeleton-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
}

.skeleton-thumb {
    width: 100%;
    height: 180px;
    background: #e9ecef;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.skeleton-line {
    height: 1rem;
    background: #e9ecef;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}