:root {
    --primary-color: #165DFF;
    --primary-dark: #0F3AAA;
    --primary-light: #4080FF;
    --secondary-color: #FF7D00;
    --text-color: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --bg-color: #F5F7FA;
    --white: #FFFFFF;
    --border-color: #E5E6EB;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
}

.logo-text {
    color: var(--white);
}

.logo-accent {
    color: var(--secondary-color);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    display: block;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.15);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    list-style: none;
    padding: 8px 0;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    transition: var(--transition);
}

.dropdown-menu li a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    display: flex;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.search-input {
    border: none;
    background: transparent;
    padding: 8px 12px;
    color: var(--white);
    outline: none;
    width: 180px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-btn {
    border: none;
    background: var(--secondary-color);
    color: var(--white);
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.search-btn:hover {
    background: #E66F00;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 80px 20px;
    text-align: center;
}

.hero-slider {
    max-width: 800px;
    margin: 0 auto;
}

.slide {
    color: var(--white);
}

.slide h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
}

.slide p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
}

.hero-btn {
    display: inline-block;
    padding: 14px 40px;
    background: var(--secondary-color);
    color: var(--white);
    font-weight: 600;
    border-radius: var(--radius-lg);
    font-size: 16px;
    transition: var(--transition);
}

.hero-btn:hover {
    background: #E66F00;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 125, 0, 0.3);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 60px 20px;
    text-align: center;
}

.page-header-content h1 {
    color: var(--white);
    font-size: 36px;
    margin-bottom: 8px;
}

.page-header-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

/* Main Content */
.main-content {
    min-width: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    position: relative;
    padding-left: 16px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

.see-more {
    color: var(--primary-color);
    font-weight: 500;
}

.see-more:hover {
    color: var(--primary-dark);
}

/* Article Cards */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.article-thumbnail {
    width: 300px;
    flex-shrink: 0;
    overflow: hidden;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-thumbnail img {
    transform: scale(1.05);
}

.article-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.article-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.article-category {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.article-date {
    color: var(--text-lighter);
    font-size: 14px;
}

.article-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-excerpt {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 16px;
    flex: 1;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-color);
    color: var(--text-light);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary-color);
    color: var(--white);
}

.article-stats {
    display: flex;
    gap: 16px;
    color: var(--text-lighter);
    font-size: 14px;
}

/* Article Detail */
.article-detail {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.article-breadcrumb {
    color: var(--text-lighter);
    font-size: 14px;
    margin-bottom: 24px;
}

.article-breadcrumb a {
    color: var(--primary-color);
}

.article-title-detail {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.4;
}

.article-meta-detail {
    display: flex;
    gap: 24px;
    color: var(--text-lighter);
    font-size: 14px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.article-tags-detail {
    display: flex;
    gap: 10px;
    margin-bottom: 32px;
}

.article-content-detail {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
}

.article-content-detail p {
    margin-bottom: 20px;
}

.article-content-detail h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 40px 0 20px;
    color: var(--text-color);
}

.article-content-detail ul,
.article-content-detail ol {
    margin-bottom: 20px;
    padding-left: 28px;
}

.article-content-detail li {
    margin-bottom: 10px;
}

.article-content-detail blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    background: var(--bg-color);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 30px 0;
}

.article-footer-detail {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-btn {
    padding: 8px 20px;
    background: var(--bg-color);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.share-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Related Posts */
.related-posts {
    margin-top: 40px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.related-posts h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-card {
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.related-card:hover {
    transform: translateY(-4px);
}

.related-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    margin-bottom: 12px;
    border-radius: var(--radius-md);
}

.related-card h4 {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

/* Comments Section */
.comments-section {
    margin-top: 40px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.comments-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
}

.comment-form {
    margin-bottom: 40px;
}

.comment-form h4 {
    font-size: 16px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
}

.submit-btn {
    padding: 12px 32px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background: var(--primary-dark);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.comment {
    display: flex;
    gap: 16px;
}

.comment-avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: var(--text-color);
}

.comment-date {
    color: var(--text-lighter);
    font-size: 13px;
}

.comment-content p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.comment-actions {
    display: flex;
    gap: 16px;
}

.reply-btn,
.like-btn {
    color: var(--text-lighter);
    font-size: 13px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: var(--transition);
}

.reply-btn:hover,
.like-btn:hover {
    color: var(--primary-color);
}

/* Resources Section */
.resource-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.resource-grid {
    display: grid;
    gap: 24px;
}

.resource-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 24px;
    transition: var(--transition);
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.resource-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.resource-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.resource-info {
    flex: 1;
}

.resource-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.resource-desc {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.resource-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.resource-type {
    background: var(--bg-color);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.resource-size,
.resource-downloads {
    color: var(--text-lighter);
    font-size: 13px;
}

.download-btn {
    padding: 10px 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22, 93, 255, 0.3);
}

/* Sidebar */
.sidebar {
    min-width: 0;
}

.sidebar-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-left: 12px;
}

.sidebar-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 2px;
}

.hot-posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hot-post {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.hot-number {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #FF9500 100%);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hot-post:nth-child(1) .hot-number,
.hot-post:nth-child(2) .hot-number,
.hot-post:nth-child(3) .hot-number {
    background: linear-gradient(135deg, #FF4D4F 0%, #FF7875 100%);
}

.hot-info {
    flex: 1;
    min-width: 0;
}

.hot-info h4 {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-info span {
    color: var(--text-lighter);
    font-size: 12px;
}

/* Ad Card */
.ad-card {
    background: linear-gradient(135deg, #FFF7E6 0%, #FFF0D9 100%);
}

.ad-content {
    text-align: center;
}

.ad-label {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    margin-bottom: 12px;
}

.ad-content img {
    width: 100%;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.ad-content p {
    color: var(--text-light);
    font-size: 14px;
}

/* Category List */
.category-list {
    list-style: none;
}

.category-list li {
    border-bottom: 1px solid var(--border-color);
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    color: var(--text-color);
    transition: var(--transition);
}

.category-list li a:hover {
    color: var(--primary-color);
}

.category-list .count {
    color: var(--text-lighter);
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud .tag {
    padding: 6px 14px;
}

/* About Author */
.about-author {
    text-align: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.about-author h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.about-author p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-link {
    padding: 6px 16px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-btn {
    padding: 10px 16px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* Footer */
.footer {
    background: #1D2129;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 40px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-section h4 {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
    font-size: 14px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--white);
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-btn {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-size: 13px;
    transition: var(--transition);
}

.social-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    padding: 24px 20px;
    font-size: 14px;
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .article-card {
        flex-direction: column;
    }

    .article-thumbnail {
        width: 100%;
        height: 200px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 56px;
    }

    .logo a {
        font-size: 20px;
    }

    .search-box {
        display: none;
    }

    .hero {
        padding: 50px 20px;
    }

    .slide h1 {
        font-size: 28px;
    }

    .slide p {
        font-size: 16px;
    }

    .article-detail {
        padding: 24px;
    }

    .article-title-detail {
        font-size: 24px;
    }

    .resource-card {
        flex-direction: column;
    }

    .resource-icon {
        width: 60px;
        height: 60px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 24px 16px;
    }

    .section-title {
        font-size: 20px;
    }

    .article-content {
        padding: 16px;
    }

    .article-title {
        font-size: 18px;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .article-stats {
        gap: 12px;
    }
}
