* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary-color: #4a6fa5;
    --secondary-color: #6b8cbc;
    --accent-color: #ff7e5f;
    --text-color: #333;
    --light-text: #666;
    --lighter-text: #888;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #eaeaea;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 0 20px;
}

/* å¤´éƒ¨æ ·å¼ */
header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--accent-color);
}

nav {
    display: flex;
    align-items: center;
}

.nav-main {
    display: flex;
    list-style: none;
    gap: 30px;
    margin-right: 20px;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 5px 0;
    position: relative;
    display: flex;
    align-items: center;
}

nav a:hover {
    color: var(--primary-color);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

.active {
    color: var(--primary-color);
}

/* ä¸‹æ‹‰èœå•æ ·å¼ */
.dropdown {
    position: relative;
}

.dropdown-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    padding: 5px 15px;
    border-radius: 5px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-btn:hover {
    background-color: rgba(74, 111, 165, 0.1);
    color: var(--primary-color);
}

.dropdown-btn i {
    font-size: 0.8rem;
    transition: var(--transition);
}

.dropdown-btn.active i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--card-bg);
    box-shadow: var(--shadow-hover);
    border-radius: 8px;
    min-width: 180px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1000;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background-color: rgba(74, 111, 165, 0.05);
    color: var(--primary-color);
    padding-left: 25px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* ä¸»è¦å†…å®¹åŒºåŸŸ - å·¦å³å¸ƒå±€ */
main {
    padding: 40px 0;
    min-height: calc(100vh - 280px);
}

.main-content {
    display: flex;
    gap: 40px;
}

.left-column {
    flex: 4;
}

.right-column {
    flex: 2;
}

.page-header {
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.page-header p {
    color: var(--light-text);
    font-size: 1.1rem;
}

/* 纵向缩略图文章列表样式 - 统一长宽 */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 50px;
}

/* tuwen B*/
.article-tw-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    min-height: 240px;
    align-items: stretch;
}

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

.article-tw-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--accent-color);
    opacity: 0;
    transition: var(--transition);
}

.article-tw-card:hover::before {
    opacity: 1;
}

.article-thumbnail {
    width: 280px; /* 固定宽度 */
    min-width: 280px; /* 确保最小宽度 */
    overflow: hidden;
    position: relative;
    cursor: pointer;
    flex-shrink: 0; /* 防止缩小 */
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-tw-card:hover .article-thumbnail img {
    transform: scale(1.05);
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.article-thumbnail:hover .thumbnail-overlay {
    opacity: 1;
}

.thumbnail-overlay i {
    color: white;
    font-size: 2.5rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-header {
    margin-bottom: 15px;
}

.article-header h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--text-color);
    line-height: 1.3;
}

.article-header h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.article-header h2 a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.article-header h2 a:hover {
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    color: var(--lighter-text);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.article-meta i {
    margin-right: 5px;
}

.article-excerpt {
    color: var(--light-text);
    margin-bottom: 20px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
/* tuwen E*/

.article-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.article-detail {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

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

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--accent-color);
    opacity: 0;
    transition: var(--transition);
}

.article-card:hover::before {
    opacity: 1;
}
.article-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
}



.tag {
    background-color: #f0f4ff;
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.tag:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* æ–‡ç« å†…å®¹æ ·å¼ */
.article-content {
    line-height: 1.8;
    color: var(--text-color);
    font-size: 1.05rem;
}

.article-content h2 {
    font-size: 1.8rem;
    margin: 30px 0 15px;
    color: var(--text-color);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.article-content h3 {
    font-size: 1.5rem;
    margin: 25px 0 12px;
    color: var(--text-color);
}

.article-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.article-content ul, .article-content ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

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

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 25px 0;
    font-style: italic;
    color: var(--light-text);
    background-color: rgba(74, 111, 165, 0.05);
    padding: 15px 20px;
    border-radius: 0 5px 5px 0;
}

.article-content pre {
    background-color: #f5f7fa;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    border-left: 3px solid var(--accent-color);
}

.article-content code {
    background-color: #f5f7fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--accent-color);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

/* æ–‡ç« åº•éƒ¨ä¿¡æ¯ */
.article-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

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

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-color);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-details h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.author-details p {
    color: var(--light-text);
    font-size: 0.9rem;
}

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

.action-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--light-text);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-btn:hover {
    background-color: #f0f4ff;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ç›¸å…³æ–‡ç« åˆ—è¡¨ */
.related-articles {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
}

.related-articles h2 {
    font-size: 1.6rem;
    margin-bottom: 25px;
    color: var(--text-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-articles h2 i {
    color: var(--accent-color);
}

.related-articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.related-article {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 20px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.related-article:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.related-article h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.related-article h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.related-article h3 a:hover {
    color: var(--primary-color);
}

.related-article-meta {
    display: flex;
    justify-content: space-between;
    color: var(--lighter-text);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.related-article-excerpt {
    color: var(--light-text);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* å³ä¾§è¾¹æ æ ·å¼ */
.sidebar-section {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 30px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.sidebar-section:hover {
    box-shadow: var(--shadow-hover);
}

.sidebar-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.sidebar-section:hover::before {
    transform: scaleX(1);
}

.sidebar-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-title i {
    color: var(--accent-color);
}

/* ä¾§è¾¹æ æ–‡ç« åˆ—è¡¨ */
.sidebar-article {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
}

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

.sidebar-article:hover {
    padding-left: 10px;
}

.sidebar-article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.sidebar-article:hover::before {
    height: 100%;
}

.sidebar-article h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    position: relative;
    padding-left: 5px;
}

.sidebar-article h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.sidebar-article h3 a:hover {
    color: var(--primary-color);
}

.sidebar-article-meta {
    display: flex;
    justify-content: space-between;
    color: var(--lighter-text);
    font-size: 0.85rem;
    margin-bottom: 10px;
    padding-left: 5px;
}

.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-tag {
    background-color: rgba(74, 111, 165, 0.1);
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.sidebar-tag:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* 缩略图预览模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 10001;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-info {
    padding: 20px;
    background-color: var(--card-bg);
}

.modal-info h3 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.modal-info p {
    color: var(--light-text);
    font-size: 0.95rem;
}

/* 页脚样式 */
footer {
    background-color: var(--text-color);
    color: #ddd;
    padding: 50px 0 20px;
    width: 100%;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.footer-section p {
    margin-bottom: 20px;
    line-height: 1.7;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.copyright, .copyright a {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* å“åº”å¼è®¾è®¡ */
@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }

    .article-thumbnail {
        width: 250px;
        min-width: 250px;
    }
    
    .articles-list {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 992px) {
    .article-tw-card {
        flex-direction: column;
        min-height: auto;
    }

    .article-thumbnail {
        width: 100%;
        min-width: 100%;
        height: 220px; /* 固定高度，确保对齐 */
    }

    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .article-detail {
        padding: 30px;
    }

    .article-header h1 {
        font-size: 1.9rem;
    }

    .related-articles-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 0;
    }

    .logo {
        margin-bottom: 15px;
    }

    nav {
        width: 100%;
        justify-content: space-between;
    }

    .nav-main {
        display: none;
    }

    .nav-main.active {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0;
        margin: 15px 0;
    }

    .nav-main li {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-btn {
        width: 100%;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        padding-left: 20px;
    }

    .dropdown-menu.active {
        display: block;
    }

    .mobile-menu-btn {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .article-detail {
        padding: 25px;
    }

    .article-header h1 {
        font-size: 1.7rem;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-actions {
        width: 100%;
        justify-content: space-between;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
}

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

    .page-header h1 {
        font-size: 1.6rem;
    }

    .article-header h1 {
        font-size: 1.5rem;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .article-thumbnail {
        height: 180px; /* 固定高度，确保对齐 */
    }
    .pagination {
        flex-wrap: wrap;
    }

    .modal-content {
        max-width: 95%;
    }
}