@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;
}

/* 页面内容样式 */
.page-content {
    background: var(--background-surface);
    border-radius: var(--border-radius-xl);
    padding: 36px;
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: -0.01em;
}

.page-content h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 28px 0 14px;
    letter-spacing: -0.005em;
}

.page-content p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-regular);
    margin-bottom: 14px;
}

.page-content ul {
    margin-left: 20px;
    margin-bottom: 18px;
}

.page-content li {
    margin-bottom: 8px;
    color: var(--text-regular);
    line-height: 1.7;
}

/* 文章详情页 */
.article-detail {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.article-detail-image {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
    display: block;
}

.article-detail-header {
    background: var(--background-surface);
    border-radius: 0 0 var(--border-radius-xl) var(--border-radius-xl);
    padding: 36px 40px;
    border: 1px solid var(--border-color);
    border-top: none;
}

.article-detail-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--background-alt);
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    margin-bottom: 18px;
    text-decoration: none;
    width: fit-content;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.article-detail-category:hover {
    text-decoration: none;
    color: var(--primary-color);
}

.article-detail-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.25;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.article-detail-subtitle {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 24px;
}

.article-detail-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 700;
}

.author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.author-bio {
    font-size: 12px;
    color: var(--text-muted);
}

.article-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 9px 20px;
    border: 1px solid var(--border-color);
    background: var(--background-surface);
    border-radius: var(--border-radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-regular);
    cursor: pointer;
    transition: var(--transition-fast);
}

.action-btn:hover {
    border-color: var(--text-dark);
    color: var(--text-dark);
    background: var(--background-alt);
}

.action-btn.primary {
    background: var(--text-dark);
    color: white;
    border: 1px solid var(--text-dark);
}

.action-btn.primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.article-content {
    background: var(--background-surface);
    border-radius: var(--border-radius-xl);
    padding: 40px;
    border: 1px solid var(--border-color);
    margin-top: 28px;
    line-height: 1.85;
    font-size: 15px;
    color: var(--text-regular);
}

.article-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 32px 0 16px;
    letter-spacing: -0.01em;
}

.article-content p {
    margin-bottom: 18px;
}

.article-content ul {
    margin: 18px 0;
    padding-left: 22px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-related {
    margin-top: 28px;
}

.article-related-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.related-articles {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.related-article-card {
    background: transparent;
    border-radius: 0;
    padding: 14px 0;
    border: none;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.related-article-card:last-child {
    border-bottom: none;
}

.related-article-card:hover {
    padding-left: 8px;
}

.related-article-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.5;
}

.related-article-title a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.related-article-category {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.category-page-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text-dark);
    letter-spacing: -0.015em;
}

.category-page-title .total-count {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 8px;
}

/* 轮播图样式 - 极简风 */
.carousel-wrapper {
    margin: 0;
}

.carousel-container {
    position: relative;
    background: var(--background-surface);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.carousel-slides {
    position: relative;
    min-height: 260px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--border-radius-md);
    margin-bottom: 12px;
}

.carousel-slide-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 4px;
}

.carousel-slide-time {
    font-size: 11px;
    color: var(--text-muted);
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 12px 0;
    background: var(--background-surface);
    border-top: 1px solid var(--border-light);
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--text-dark);
    width: 20px;
    border-radius: 3px;
}

@media (max-width: 768px) {
    .page-content {
        padding: 16px;
    }

    .page-title {
        font-size: 19px;
    }

    .category-page-title {
        font-size: 18px;
    }

    .carousel-wrapper {
        margin: 0;
    }

    .carousel-container {
        border-radius: var(--border-radius-md);
    }

    .carousel-slides {
        min-height: 240px;
    }

    .carousel-slide {
        padding: 6px;
    }

    .carousel-slide img {
        height: 170px;
        border-radius: var(--border-radius-sm);
        margin-bottom: 6px;
    }

    .carousel-slide-title {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .carousel-slide-time {
        font-size: 11px;
    }

    .carousel-controls {
        padding: 8px 0;
        gap: 6px;
    }

    .carousel-dot {
        width: 5px;
        height: 5px;
    }

    .carousel-dot.active {
        width: 18px;
    }

    .article-detail-image {
        height: 200px;
        border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
    }

    .article-detail-header {
        padding: 20px 16px;
    }

    .article-detail-title {
        font-size: 21px;
        line-height: 1.3;
    }

    .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 16px;
        font-size: 14px;
    }
}
