@import url('modules/base.css');
@import url('modules/header.css');
@import url('modules/content.css');
@import url('modules/footer.css');

html {
    scroll-behavior: smooth;
}

::selection {
    background: var(--primary-color);
    color: white;
}

html {
    scroll-behavior: smooth;
}

::selection {
    background: var(--primary-color);
    color: white;
}

/* 页面内容样式 */
.page-content {
    background: var(--background-white);
    border-radius: var(--border-radius-2xl);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.page-content h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 24px 0 12px;
}

.page-content p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 12px;
}

.page-content ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.page-content li {
    margin-bottom: 8px;
    color: var(--text-light);
    line-height: 1.5;
}

/* 文章详情页 */
.article-detail {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.article-detail-image {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: var(--border-radius-2xl) var(--border-radius-2xl) 0 0;
    display: block;
}

.article-detail-header {
    background: var(--background-white);
    border-radius: 0 0 var(--border-radius-2xl) var(--border-radius-2xl);
    padding: 28px 32px;
    border: 1px solid var(--border-color);
    border-top: none;
}

.article-detail-category {
    display: inline-block;
    padding: 4px 14px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 16px;
    margin-bottom: 16px;
    text-decoration: none;
    width: fit-content;
}

.article-detail-category:hover {
    text-decoration: none;
    color: white;
}

.article-detail-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 12px;
}

.article-detail-subtitle {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.article-detail-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
}

.author-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.author-bio {
    font-size: 13px;
    color: var(--text-light);
}

.article-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 8px 18px;
    border: 1px solid var(--border-color);
    background: var(--background-white);
    border-radius: var(--border-radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.article-content {
    background: var(--background-white);
    border-radius: var(--border-radius-2xl);
    padding: 32px;
    border: 1px solid var(--border-color);
    margin-top: 24px;
    line-height: 1.8;
    font-size: 15px;
    color: var(--text-dark);
}

.article-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 28px 0 16px;
}

.article-content p {
    margin-bottom: 16px;
}

.article-content ul {
    margin: 16px 0;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-related {
    margin-top: 24px;
}

.article-related-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--secondary-color);
}

.related-articles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-article-card {
    background: var(--background-white);
    border-radius: var(--border-radius-lg);
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.related-article-card:hover {
    border-color: var(--primary-light);
    transform: translateX(4px);
}

.related-article-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.4;
}

.related-article-title a:hover {
    color: var(--primary-color);
}

.related-article-category {
    font-size: 12px;
    color: var(--secondary-color);
    font-weight: 500;
}

.category-page-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.category-page-title .total-count {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 400;
}

/* 轮播图样式 */
.carousel-wrapper {
    margin: 12px 0;
}

.carousel-container {
    position: relative;
    background: var(--background-light);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.carousel-slides {
    position: relative;
    min-height: 240px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    flex-direction: column;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--border-radius-md);
    margin-bottom: 8px;
}

.carousel-slide-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.carousel-slide-time {
    font-size: 12px;
    color: var(--text-light);
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
    background: var(--background-white);
    border-top: 1px solid var(--border-color);
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--primary-color);
    width: 24px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .page-content {
        padding: 20px;
    }

    .page-title {
        font-size: 20px;
    }

    .category-page-title {
        font-size: 18px;
    }

    .carousel-slide img {
        height: 140px;
    }

    .article-detail-image {
        height: 220px;
        border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
    }

    .article-detail-header {
        padding: 20px;
    }

    .article-detail-title {
        font-size: 20px;
    }

    .article-detail-subtitle {
        font-size: 14px;
    }

    .article-detail-meta {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .article-actions {
        width: 100%;
    }

    .action-btn {
        flex: 1;
        justify-content: center;
        text-align: center;
    }

    .article-content {
        padding: 20px;
        font-size: 14px;
    }
}
