/*
 * 现代资讯网站样式表
 * 设计理念：深色主题 + 强对比色，卡片式布局，动态交互
 */

/* ===== 基础重置与变量 ===== */
:root {
    --primary-color: #0a0a0a;
    --secondary-color: #1a1a1a;
    --accent-color: #ff3366;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #333333;
    --hover-color: #2a2a2a;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
p{
    margin-bottom: 0 !important;
}
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--primary-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== 排版 ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

p {
    margin-bottom: 1em;
}

/* ===== 布局容器 ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 头部导航 ===== */
header {
    background-color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent-color);
}

/* 桌面导航 */
.desktop-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.desktop-nav a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.desktop-nav a:hover::after {
    width: 100%;
}

.desktop-nav a:hover {
    color: var(--accent-color);
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 移动菜单 */
.mobile-menu {
    display: none;
    background-color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.mobile-menu.active {
    display: block;
    max-height: 500px;
}

.mobile-nav {
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    display: flex;
}

.mobile-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

/* ===== 主要内容区域 ===== */
main {
    padding: 30px 0;
    min-height: 70vh;
}

/* ===== 首页布局 ===== */
.hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
    min-height: 500px;
}

.hero-main {
    background: linear-gradient(135deg, #222 0%, #111 100%);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.hero-main:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 51, 102, 0.2);
}

.hero-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

.hero-main-content {
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    z-index: 2;
}

.hero-main .category {
    background: var(--accent-color);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 15px;
}

.hero-main h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    line-height: 1.1;
}

.hero-main .meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    gap: 15px;
}

.hero-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-card {
    background: var(--secondary-color);
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hero-card:hover {
    background: var(--hover-color);
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.hero-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.hero-card .meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: auto;
}

/* 文章网格系统 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* 文章卡片基础样式 */
.article-card {
    background: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(255, 51, 102, 0.15);
}

.article-card.image-top .image-container {
    height: 200px;
    background: #2a2a2a;
    overflow: hidden;
}

.article-card.image-top .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .image-container img {
    transform: scale(1.05);
}

.article-card.content-only {
    padding: 25px;
}

.article-card.featured {
    grid-column: span 1;
}

.article-card.featured .content {
    padding: 30px;
}

.article-card.featured h3 {
    font-size: 1.8rem;
    line-height: 1.2;
}

.article-card.minimal {
    border-left: 3px solid var(--accent-color);
    border-radius: 0;
    background: transparent;
}

.article-card.minimal:hover {
    background: var(--hover-color);
    transform: translateX(5px);
}

.article-card.video-card {
    position: relative;
}

.article-card.video-card::before {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 51, 102, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 2;
    opacity: 0;
    transition: var(--transition);
}

.article-card.video-card:hover::before {
    opacity: 1;
}

.article-card.trending {
    border-top: 3px solid var(--accent-color);
}

.article-card.breaking {
    background: linear-gradient(135deg, #2a0a15 0%, #1a0a0f 100%);
    border: 1px solid rgba(255, 51, 102, 0.3);
}

.article-card.breaking .category {
    background: var(--accent-color);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
}

/* 文章内容区域 */
.content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content .category {
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.meta {
    display: flex;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid var(--border-color);
}

/* 特色区域 */
.featured-section {
    background: var(--secondary-color);
    padding: 40px 0;
    margin: 40px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

/* 针对特色文章的特别样式 */
.article-card.featured {
    min-width: 0; /* 允许弹性收缩 */
}

/* 确保图片容器适应父容器 */
.article-card.featured .image-container {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
}

/* 针对特色文章的响应式布局 */
.featured-grid .article-card.featured {
    grid-column: span 1;
}

/* 分类页面样式 */
.category-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.category-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.category-filter {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

/* 详情页样式 */
.detail-article {
    background: var(--secondary-color);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.detail-header {
    padding: 40px;
    border-bottom: 1px solid var(--border-color);
}

.detail-header h1 {
    font-size: 2.8rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.detail-meta {
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    align-items: center;
}

.detail-meta .author {
    color: var(--text-primary);
    font-weight: 600;
}

.detail-content {
    padding: 40px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.detail-content p {
    margin-bottom: 1.5em;
}

.detail-content h2 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    font-size: 1.8rem;
}

.detail-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
    margin: 2em 0;
    font-style: italic;
    color: var(--text-secondary);
}

.detail-content img {
    width: 100%;
    border-radius: 8px;
    margin: 2em 0;
}

/* 侧边栏 */
.sidebar {
    background: var(--secondary-color);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
    margin-top: 30px;
}

.sidebar h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.2rem;
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-list li:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

/* 法律页面 */
.legal-content {
    background: var(--secondary-color);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.legal-content h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.legal-content p, .legal-content ul {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.legal-content ul {
    padding-left: 25px;
}

.legal-content li {
    margin-bottom: 8px;
}

/* 页脚 */
footer {
    background: var(--secondary-color);
    padding: 10px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

/* 法律页面样式 */
.privacy, .Terms {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.7;
}

.privacy h2, .Terms h1 {
    color: var(--accent-color);
    margin-bottom: 20px;
    text-align: center;
    font-size: 2rem;
}

.privacy h3, .Terms h3 {
    color: var(--accent-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.privacy p, .Terms p {
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.privacy .title, .Terms .title {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--secondary-color);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.privacy .mm, .Terms .mm {
    background: rgba(255, 51, 102, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent-color);
    font-weight: 500;
}

.privacy a, .Terms a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

.privacy a:hover, .Terms a:hover {
    color: #ff6699;
    text-decoration: underline;
}

.privacy ul, .Terms ul {
    padding-left: 25px;
    margin: 15px 0;
}

.privacy li, .Terms li {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.privacy table, .Terms table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
}

.privacy table th, .Terms table th,
.privacy table td, .Terms table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.privacy table th, .Terms table th {
    background: rgba(255, 51, 102, 0.1);
    color: var(--accent-color);
}

.privacy .last-updated, .Terms .last-updated {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.privacy .toc, .Terms .toc {
    background: var(--secondary-color);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

.privacy .toc h3, .Terms .toc h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
}

.privacy .toc a, .Terms .toc a {
    display: block;
    margin: 8px 0;
    padding: 8px 12px;
    border-radius: 4px;
    transition: var(--transition);
}

.privacy .toc a:hover, .Terms .toc a:hover {
    background: var(--hover-color);
    padding-left: 15px;
}

.privacy .section, .Terms .section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.privacy .section:last-child, .Terms .section:last-child {
    border-bottom: none;
}

.privacy strong, .Terms strong {
    color: var(--text-primary);
}

.privacy b, .Terms b {
    color: var(--text-primary);
    font-weight: 600;
}

.footer-section h4 {
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background: var(--accent-color);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background: #e62e58;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 51, 102, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background: var(--accent-color);
    color: white;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.load-more {
    text-align: center;
    margin: 40px 0;
}

/* 交互效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulse {
    animation: pulse 2s infinite;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e62e58;
}

/* ===== 响应式设计 ===== */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }

    .hero-section {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .featured-grid {
        grid-template-columns: 1fr 1fr;
    }

    .article-card.featured {
        grid-column: span 1;
    }

    .article-card.featured h3 {
        font-size: 1.5rem;
    }

    .desktop-nav {
        gap: 20px;
    }
}

/* 移动设备 (小于768px) */
@media (max-width: 768px) {
    /* 移动端边距优化 */
    .container,
    .detail-header,
    .detail-content,
    .legal-content,
    .header .container {
        padding-left: 5px;
        padding-right: 5px;
    }

    main {
        padding: 15px 0;
    }

    /* 导航 */
    .desktop-nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* 排版 */
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }

    /* 首页布局 */
    .hero-section {
        gap: 15px;
    }

    .hero-main-content {
        padding: 20px;
    }

    .hero-main h2 {
        font-size: 1.5rem;
    }

    .hero-side {
        gap: 15px;
    }

    .hero-card {
        padding: 15px;
    }

    /* 文章网格 */
    .article-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 5px;
    }
    .hero-section,h2,h1{
        margin-bottom: 5px !important;
    }
    .category-header{
        margin-bottom: 5px;
        padding-bottom: 5px;
    }
    .featured-section {
        margin: 5px 0;
        padding: 5px 0;
    }
    #load-more-btn{
        margin-top: 5px !important;
    }
    .load-more{
        margin: 5px 0 !important;
    }
    .article-card.featured {
        grid-column: span 1;
    }

    .article-card.featured .content {
        padding: 20px;
    }

    .article-card.featured h3 {
        font-size: 1.4rem;
    }

    .featured-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* 内容区域 */
    .content {
        padding: 15px;
    }

    .content h3 {
        font-size: 1.1rem;
    }

    .meta {
        font-size: 0.8rem;
        gap: 10px;
    }

    /* 详情页 */
    .detail-header {
        padding: 20px;
    }

    .detail-header h1 {
        font-size: 1.8rem;
    }

    .detail-content {
        padding: 20px;
        font-size: 1rem;
    }

    .detail-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* 侧边栏 */
    .sidebar {
        padding: 20px;
        margin-top: 20px;
    }

    /* 法律页面 */
    .legal-content {
        padding: 20px;
    }

    /* 页脚 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* 按钮 */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* 移动端优化 */
    .article-card,
    .hero-card,
    .detail-article,
    .legal-content,
    .sidebar {
        border-radius: 8px;
    }
}

/* 超小设备 (小于480px) */
@media (max-width: 480px) {
    .container {
        padding-left: 5px;
        padding-right: 5px;
    }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }

    .hero-main h2 {
        font-size: 1.3rem;
    }

    .detail-header h1 {
        font-size: 1.5rem;
    }

    .category-filter {
        gap: 8px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* 打印样式 */
@media print {
    header, footer, .hamburger, .mobile-menu, .sidebar, .category-filter, .load-more {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .detail-article, .legal-content {
        border: none;
        background: white;
    }

    .detail-content {
        color: black;
    }
}

/* 无障碍优化 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 焦点样式 */
a:focus, button:focus, .article-card:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* 深色模式检测 */
@media (prefers-color-scheme: light) {
    :root {
        --primary-color: #ffffff;
        --secondary-color: #f8f8f8;
        --text-primary: #1a1a1a;
        --text-secondary: #666666;
        --border-color: #e0e0e0;
        --hover-color: #f0f0f0;
    }

    body {
        background-color: var(--primary-color);
        color: var(--text-primary);
    }

    .hero-main {
        background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    }

    .hero-main::before {
        background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.9) 100%);
    }

    .article-card.breaking {
        background: linear-gradient(135deg, #fff0f3 0%, #ffe5ec 100%);
    }
}
