:root {
    --primary: #4A90E2;
    --primary-dark: #357ABD;
    --bg: #f5f6fa;
    --card-bg: #ffffff;
    --text: #333;
    --text-muted: #666;
    --border: #e0e0e0;
}

/* 5列布局 */
.col-lg-2-5 {
    flex: 0 0 auto;
    width: 20%;
}
@media (max-width: 991.98px) {
    .col-lg-2-5 {
        width: 25%;
    }
}
@media (max-width: 767.98px) {
    .col-lg-2-5 {
        width: 50%;
    }
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: #ffffff;
    color: var(--text);
    min-height: 100vh;
}

/* Navbar */
.navbar-custom {
    background: #ffffff;
    padding: 0.8rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.navbar-custom .navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333 !important;
}
.navbar-custom .nav-link {
    color: #555 !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s;
}
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--primary) !important;
    background: rgba(74,144,226,0.08);
    border-radius: 8px;
}
.search-box {
    width: 280px;
}
.search-box .form-control {
    border-radius: 20px 0 0 20px;
    border: 1px solid #e0e0e0;
    padding: 0.6rem 1rem;
}
.search-box .btn {
    border-radius: 0 20px 20px 0;
    background: var(--primary);
    border: none;
}

/* Hero Banner */
.hero-banner {
    background: #ffffff;
    padding: 3rem 0;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}
.hero-banner h1 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}
.hero-banner .lead {
    color: #666;
}
.hero-search {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}
.hero-search .form-control {
    border-radius: 30px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
}
.hero-search .btn {
    border-radius: 30px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    background: var(--primary);
    border: none;
    margin-left: -40px;
    z-index: 1;
    white-space: nowrap;
    min-width: 80px;
    flex-shrink: 0;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    padding: 1.5rem 0;
}
.category-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    border-radius: 12px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}
.category-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    color: white;
}
.category-block i {
    font-size: 2.2rem;
    margin-bottom: 0.6rem;
}
.category-block span {
    font-weight: 500;
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    .category-block {
        padding: 1.2rem 0.5rem;
    }
    .category-block i {
        font-size: 1.5rem;
    }
    .category-block span {
        font-size: 0.85rem;
    }
}

/* Software Card */
.software-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e9ecef;
}
.software-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-color: var(--primary);
    background: #ffffff;
}
.software-card .logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    background: #f0f0f0;
}
.software-card .name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 1rem;
    margin-bottom: 0.3rem;
}
.software-card .version {
    color: var(--primary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.software-card .intro {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 推荐软件红色斜带 */
.software-card.recommended {
    position: relative;
    overflow: hidden;
}
.software-card.recommended::before {
    content: '推荐';
    position: absolute;
    top: 12px;
    right: -30px;
    background: #ff4757;
    color: white;
    padding: 2px 35px;
    font-size: 12px;
    transform: rotate(45deg);
    z-index: 1;
    font-weight: 500;
}

/* 卡片标签 */
.software-card .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.software-card .card-tags .badge {
    font-size: 0.7rem;
    font-weight: 400;
    padding: 3px 8px;
}

/* Section */
.section-title {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-title .more {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
}

/* Footer */
.footer {
    background: #ffffff;
    color: #666;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid #e0e0e0;
}
.footer h5 {
    color: #333;
    margin-bottom: 1rem;
}
.footer a {
    color: #666;
    text-decoration: none;
}
.footer a:hover {
    color: var(--primary);
}

/* Tags */
.tag-badge {
    background: #f0f2f5;
    color: var(--text);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
}
.tag-badge:hover {
    background: var(--primary);
    color: white;
}
.tag-badge.active {
    background: var(--primary);
    color: white;
}

/* Software Detail */
.software-header {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.software-header .logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
    background: #f0f0f0;
}
.software-header .name {
    font-size: 1.8rem;
    font-weight: 700;
}
.software-header .version {
    color: var(--primary);
}
.download-btn {
    background: var(--primary);
    color: white;
    border-radius: 10px;
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s;
}
.download-btn:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
}
.download-btn.backup {
    background: #6c757d;
}
.download-btn.backup:hover {
    background: #5a6268;
}

.content-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.content-card h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 3px;
    color: var(--text);
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* Admin */
.admin-sidebar {
    background: #16213e;
    min-height: 100vh;
    padding: 0;
}
.admin-sidebar .logo {
    padding: 20px;
    background: #1a1a2e;
    color: white;
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: var(--primary);
}
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.stat-card .icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

/* Article Card */
.article-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e9ecef;
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: var(--primary);
    background: #ffffff;
}
.article-card .cover {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}
.article-card .title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-card .meta {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: auto;
}

/* Article Detail */
.article-detail {
    background: white;
    border-radius: 12px;
    padding: 2rem;
}
.article-detail h1 {
    font-size: 1.8rem;
    font-weight: 700;
}
.article-intro {
    font-size: 1.05rem;
    color: #555;
    border-left: 4px solid var(--primary);
}
.article-content {
    line-height: 1.8;
}
.article-content h1, .article-content h2, .article-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}
.article-content p {
    margin-bottom: 1rem;
}
.article-content img {
    max-width: 100%;
    border-radius: 8px;
}
.article-content pre {
    background: #f4f4f4;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}
.article-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
}
.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    color: #666;
    margin: 1rem 0;
}
