/*
 * Modern News Website Styles
 * 设计理念：深色主题 + 紫色强调色，卡片式布局，现代化UI
 */

:root {
    --primary-color: #6C63FF;
    --secondary-color: #FF6584;
    --dark-bg: #0F0F0F;
    --card-bg: #1A1A1A;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --border-color: #2A2A2A;
    --hover-color: #2A2A2A;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
a{
    color: var(--text-primary);
    text-decoration: none;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 导航栏 - 汉堡菜单 */
.header {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 0 10px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -1px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.nav-menu {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 8px 12px;
    border-radius: 6px;
}

.nav-menu a:hover {
    color: var(--primary-color);
    background: var(--hover-color);
}

/* 主容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* 首页特殊布局 */
.hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.hero-main {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.hero-main:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.2);
}

.hero-main img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.hero-content {
    padding: 20px;
}

.hero-badge {
    background: var(--secondary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.hero-title {
    font-size: 28px;
    margin: 10px 0;
    line-height: 1.3;
}

.hero-meta {
    color: var(--text-secondary);
    font-size: 14px;
}

.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hero-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
    flex: 1;
}

.hero-card:hover {
    transform: translateX(5px);
}

.hero-card img {
    width: 100%;
    object-fit: cover;
}

.hero-card-content {
    padding: 15px;
}

.hero-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* 文章网格系统 */
.section-title {
    font-size: 24px;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

/* 文章卡片变体 */
.article-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.15);
}

.article-card.highlight {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--card-bg) 0%, #252525 100%);
}

.article-card.featured {
    background: linear-gradient(135deg, #1A1A1A 0%, #2A1A3A 100%);
    border: 1px solid var(--primary-color);
}

.article-card.minimal {
    border: none;
    background: transparent;
}

.article-card.minimal:hover {
    background: var(--hover-color);
    transform: translateX(5px);
}

.article-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-image {
    transform: scale(1.05);
}

.article-content {
    padding: 15px;
}

.article-category {
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.article-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.article-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
}

.article-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

/* 详情页样式 */
.detail-container {
    max-width: 800px;
    margin: 0 auto;
}

.detail-header {
    margin-bottom: 30px;
    text-align: center;
}

.detail-title {
    font-size: 36px;
    line-height: 1.2;
    margin: 20px 0;
}

.detail-meta {
    color: var(--text-secondary);
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.detail-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin: 20px 0;
}

.detail-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-primary);
}

.detail-content p {
    margin-bottom: 20px;
}

.detail-content h2 {
    margin: 30px 0 15px;
    color: var(--primary-color);
}

.detail-content blockquote {
    border-left: 4px solid var(--secondary-color);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-secondary);
}

/* 分类页样式 */
.category-header {
    text-align: center;
    margin: 30px 0;
}

.category-title {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.category-description {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* 法律页面样式 */
.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 15px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.legal-title {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.legal-content {
    line-height: 1.8;
    color: var(--text-primary);
    padding: 0 20px;
}

.legal-content h1 {
    font-size: 32px;
    margin: 30px 0 20px;
    color: var(--primary-color);
    text-align: center;
}

.legal-content h2 {
    font-size: 24px;
    margin: 25px 0 15px;
    color: var(--primary-color);
}

.legal-content h3 {
    font-size: 20px;
    margin: 25px 0 10px;
    color: var(--secondary-color);
}

.legal-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.legal-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.legal-content ul li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.legal-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.legal-content a:hover {
    color: var(--secondary-color);
}

.legal-content .title {
    margin: 20px 0;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.legal-content .mm {
    color: var(--secondary-color);
    font-weight: bold;
}

.legal-content .table-of-contents {
    background: var(--hover-color);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.legal-content .table-of-contents h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.legal-content .table-of-contents a {
    display: block;
    margin: 5px 0;
    color: var(--primary-color);
}

/* 移动端法律页面优化 */
@media (max-width: 768px) {
    .legal-container {
        padding: 20px 10px;
        margin: 10px;
    }
        
    .legal-content {
        padding: 0 10px;
    }
        
    .legal-title {
        font-size: 26px;
    }
        
    .legal-content h1 {
        font-size: 26px;
    }
        
    .legal-content h2 {
        font-size: 20px;
    }
        
    .legal-content h3 {
        font-size: 18px;
    }
        
    .legal-content .table-of-contents a {
        padding: 8px 0;
        line-height: 1.5;
    }
}

/* 页脚 */
.footer {
    background: var(--card-bg);
    padding: 10px;

}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
    }

    .article-card.highlight {
        grid-column: span 1;
    }

    .hero-main img {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--dark-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 20px 0;
        border-bottom: 1px solid var(--border-color);
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu a {
        display: block;
        padding: 15px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .hero-main img,
    .detail-image {
        height: 250px;
    }

    .detail-title {
        font-size: 28px;
    }

    /* 移动端边距限制 */
    .container {
        padding: 10px 5px;
    }

    .article-card,
    .hero-main,
    .hero-card {
        border-radius: 8px;
    }

    .article-content,
    .hero-content,
    .hero-card-content {
        padding: 5px 8px;
    }
    .hero-section,.articles-grid,.detail-header{
        margin-bottom: 5px;
    }
    .section-title,.category-header{
        margin: 5px 0 0;
        padding: 0;
    }
    p,.category-title,#news-type{
        margin-bottom: 0 !important;
    }
    .detail-title,.detail-image{
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 20px;
    }

    .hero-title {
        font-size: 22px;
    }

    .article-title {
        font-size: 16px;
    }

    .detail-title {
        font-size: 24px;
    }

    .detail-content {
        font-size: 16px;
    }

    .hero-main img,
    .detail-image {
        height: 200px;
    }
}

/* 动画和交互效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.loading-skeleton {
    background: linear-gradient(90deg, var(--card-bg) 25%, var(--hover-color) 50%, var(--card-bg) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* 工具类 */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }

/* 搜索框 */
.search-container {
    position: relative;
    margin-left: 20px;
}

.search-input {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 15px;
    border-radius: 20px;
    width: 200px;
    transition: width 0.3s;
}

.search-input:focus {
    width: 250px;
    outline: none;
    border-color: var(--primary-color);
}
footer a{
    color: var(--text-secondary);
}
@media (max-width: 768px) {
    .search-container {
        margin: 10px 0;
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    .search-input:focus {
        width: 100%;
    }
    #load-more-btn{
        margin-top: 5px !important;
    }
}
