* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --accent-color: #14b8a6;
    --bg-color: #fafafa;
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-color)
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

.main-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm)
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.site-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary)
}

.primary-nav {
    display: flex
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 8px
}

.nav-list a {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease
}

.nav-list a:hover {
    background: var(--primary-color);
    color: #fff
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px
}

.breadcrumb {
    margin: 30px 0 20px
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    gap: 8px;
    flex-wrap: wrap
}

.breadcrumb-list li {
    font-size: 14px;
    color: var(--text-secondary)
}

.breadcrumb-list a {
    color: var(--primary-color);
    text-decoration: none
}

.breadcrumb-list a:hover {
    text-decoration: underline
}

.breadcrumb-list .active {
    color: var(--text-primary)
}

.breadcrumb-list li:not(:last-child)::after {
    content: "/";
    margin-left: 8px;
    color: var(--text-muted)
}

.layout-grid {
    display: grid;
    grid-template-columns: 70% 28%;
    gap: 40px;
    margin: 30px 0
}

.content-area {
    min-width: 0
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-primary);
    line-height: 1.3
}

.ad-slot {
    width: 100%;
    min-height: 100px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    margin-bottom: 30px
}

.ad-slot-full {
    grid-column: 1/-1;
    width: 100%;
    min-height: 100px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    margin: 30px 0
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px
}

.article-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color)
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg)
}

.card-image {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    background: #f3f4f6
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease
}

.article-card:hover .card-image img {
    transform: scale(1.05)
}

.card-body {
    padding: 20px
}

.article-tag {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.article-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease
}

.article-title a:hover {
    color: var(--primary-color)
}

.article-summary {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.article-info {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 15px
}

.featured-section {
    padding: 50px 0;
    background: linear-gradient(180deg, var(--bg-color) 0%, #f0f0ff 100%)
}

.section-title-wrapper {
    text-align: center;
    margin-bottom: 40px
}

.section-title-wrapper h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    position: relative;
    display: inline-block
}

.title-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0 auto;
    border-radius: 2px
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px
}

.featured-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color)
}

.featured-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl)
}

.featured-img-wrapper {
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.featured-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease
}

.featured-card:hover .featured-img-wrapper img {
    transform: scale(1.08)
}

.featured-content {
    padding: 24px
}

.category-badge {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--secondary-color), #f472b6);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 20px;
    text-decoration: none;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px
}

.featured-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3
}

.featured-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease
}

.featured-title a:hover {
    color: var(--primary-color)
}

.featured-excerpt {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.featured-meta {
    font-size: 14px;
    color: var(--text-muted)
}

.latest-section {
    padding: 60px 0
}

.latest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px
}

.latest-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color)
}

.latest-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg)
}

.latest-img {
    aspect-ratio: 4 / 3;
    background: #f3f4f6
}

.latest-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease
}

.latest-card:hover .latest-img img {
    transform: scale(1.05)
}

.latest-content {
    padding: 18px
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px
}

.sidebar-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color)
}

.sidebar-heading {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--text-primary);
    position: relative
}

.sidebar-heading::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--secondary-color)
}

.author-card {
    text-align: center
}

.author-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 3px solid var(--primary-color)
}

.author-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px
}

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

.author-title a:hover {
    color: var(--primary-color)
}

.author-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6
}

.featured-list {
    display: flex;
    flex-direction: column;
    gap: 16px
}

.featured-item {
    display: flex;
    gap: 12px;
    align-items: flex-start
}

.featured-thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0
}

.featured-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4
}

.featured-text a {
    color: var(--text-primary);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.featured-text a:hover {
    color: var(--primary-color)
}

.sidebar-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px
}

.sidebar-links li {
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px
}

.sidebar-links li:last-child {
    border-bottom: none;
    padding-bottom: 0
}

.sidebar-links a {
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    transition: color 0.2s ease
}

.sidebar-links a:hover {
    color: var(--primary-color)
}

.post-time {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: 8px
}

.pagination-wrapper {
    margin-top: 40px;
    display: flex;
    justify-content: center
}

.pagination {
    display: flex;
    list-style: none;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center
}

.page-item {
    display: flex
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    background: var(--card-bg);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-weight: 500;
    transition: all 0.2s ease
}

.page-link:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color)
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #fff;
    border-color: var(--primary-color)
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed
}

.dots {
    background: transparent;
    border: none;
    color: var(--text-muted)
}

.article-detail {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color)
}

.article-header {
    margin-bottom: 30px
}

.article-header h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 20px;
    max-height: 150px;
    overflow: hidden
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color)
}

.author-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500
}

.author-link:hover {
    color: var(--primary-color)
}

.author-link img {
    width: 35px;
    height: 35px;
    border-radius: 100%;
}

.meta-date,
.meta-views {
    font-size: 14px;
    color: var(--text-muted)
}

.article-body {
    font-size: 0.985rem;
    letter-spacing: 0.2px;
    color: #171717;
    line-height: 1.75;
    margin-bottom: 30px
}

.article-body p {
    margin-bottom: 1.5em
}

.article-body h2,
.article-body h3,
.article-body h4 {
    margin-top: 2em;
    margin-bottom: 1em;
    color: var(--text-primary)
}

.article-body img {
    max-width: 100%;
    margin: 20px auto;
}

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

.article-body a:hover {
    text-decoration: underline
}

.author-box {
    display: flex;
    gap: 20px;
    background: linear-gradient(135deg, #f0f0ff, #fff5f5);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
    border: 1px solid var(--border-color)
}

.author-box img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0
}

.author-info h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px
}

.author-info h4 a {
    color: var(--text-primary);
    text-decoration: none
}

.author-info h4 a:hover {
    color: var(--primary-color)
}

.author-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6
}

.share-section {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    padding: 20px;
    background: #f9fafb;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color)
}

.share-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm)
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary-color)
}

.related-section {
    margin-top: 40px
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px
}

.related-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color)
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg)
}

.related-card .card-image {
    padding-top: 65%
}

.related-card .card-body {
    padding: 16px
}

.related-card .article-title {
    font-size: 16px;
    margin-bottom: 8px
}

.author-hero {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    color: #fff
}

.author-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 24px;
    border: 4px solid rgba(255, 255, 255, 0.3)
}

.author-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px
}

.author-bio {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto
}

.author-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    line-height: 1.8;
    color: var(--text-primary)
}

.author-articles {
    margin-top: 40px
}

.author-articles .section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-primary)
}


.article-card-mini {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color)
}

.article-card-mini:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg)
}

.article-card-mini .article-title {
    font-size: 16px;
    margin-bottom: 12px
}

.archive-page {
    padding: 40px 0
}

.archive-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color)
}

.archive-page .articles-grid {
    grid-template-columns: 1fr;
    gap: 16px
}

.archive-page .article-card {
    border: none;
    box-shadow: none;
    padding: 0
}

.archive-page .article-card:hover {
    transform: none;
    box-shadow: none
}

.archive-page .article-title {
    font-size: 18px;
    margin-bottom: 8px
}

.site-footer {
    background: linear-gradient(135deg, #1f2937, #374151);
    color: #fff;
    padding: 40px 0;
    margin-top: auto
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease
}

.footer-links a:hover {
    color: #fff
}

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    z-index: 999
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible
}

.scroll-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl)
}

@media (max-width: 1024px) {
    .layout-grid {
        grid-template-columns: 100%;
        gap: 30px
    }

    .sidebar {
        order: 2
    }
}

@media (max-width: 768px) {
    .author-photo {
        margin: auto;
    }

    .main-header {
        position: relative;
    }

    .header-inner {
        height: 55px
    }

    .site-logo {
        font-size: 20px
    }

    .nav-toggle {
        display: block
    }

    .primary-nav {
        position: fixed;
        top: 55px;
        left: 0;
        right: 0;
        background: var(--card-bg);
        box-shadow: var(--shadow-lg);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease
    }

    .primary-nav.open {
        max-height: 400px
    }

    .nav-list {
        flex-direction: column;
        padding: 20px
    }

    .nav-list a {
        padding: 12px 16px;
        border-radius: var(--radius-sm)
    }

    .page-title {
        font-size: 24px
    }

    .articles-grid {
        grid-template-columns: 1fr
    }

    .featured-grid {
        grid-template-columns: 1fr
    }

    .latest-grid {
        grid-template-columns: 1fr
    }

    .article-header h1 {
        font-size: 22px;
        margin-bottom: 15px
    }

    .article-meta {
        gap: 12px;
        flex-wrap: nowrap
    }

    .meta-date,
    .meta-views {
        white-space: nowrap
    }

    .article-detail {
        padding: 24px 20px
    }

    .author-box {
        flex-direction: column;
        text-align: center
    }

    .related-grid {
        grid-template-columns: 1fr
    }

    .author-hero {
        padding: 40px 20px
    }

    .author-avatar {
        width: 80px;
        height: 80px
    }

    .author-name {
        font-size: 24px
    }

    .author-content {
        padding: 24px 20px
    }

    .articles-grid {
        grid-template-columns: 1fr
    }

    .archive-content {
        padding: 24px 20px
    }

    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 20px
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px
    }

    .section-title-wrapper h2 {
        font-size: 28px
    }

    .article-card,
    .featured-card,
    .latest-card {
        border-radius: var(--radius-md)
    }

    .sidebar-card {
        padding: 20px
    }
}