/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a2a3a;
    --secondary-color: #2a3b4d;
    --accent-color: #00b4d8;
    --accent-hover: #0096c7;
    --text-color: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border-color: #2a3b4d;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --danger-color: #f44336;
    --card-bg: rgba(26, 42, 58, 0.8);
    --bg-gradient: linear-gradient(135deg, #0a192f 0%, #1a2a3a 50%, #0a192f 100%);
}

body {
    font-family: 'Noto Serif SC', serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* 背景特效 */
.bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="20" cy="20" r="0.5" fill="white" opacity="0.8"/><circle cx="50" cy="30" r="0.7" fill="white" opacity="0.6"/><circle cx="80" cy="40" r="1" fill="white" opacity="0.9"/><circle cx="30" cy="70" r="0.5" fill="white" opacity="0.7"/><circle cx="70" cy="60" r="0.8" fill="white" opacity="0.5"/></svg>') repeat;
    animation: starsMove 200s linear infinite;
}

.clouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><path d="M50,80 Q70,60 90,80 T130,80 Q150,60 170,80" fill="none" stroke="rgba(100,200,255,0.1)" stroke-width="2"/><path d="M30,120 Q50,100 70,120 T110,120 Q130,100 150,120" fill="none" stroke="rgba(100,200,255,0.08)" stroke-width="2"/></svg>') repeat;
    opacity: 0.3;
    animation: cloudsMove 100s linear infinite;
}

.aurora {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(0, 180, 216, 0.05) 0%,
        rgba(142, 45, 226, 0.05) 25%,
        rgba(0, 180, 216, 0.05) 50%,
        rgba(142, 45, 226, 0.05) 75%,
        rgba(0, 180, 216, 0.05) 100%);
    animation: auroraShift 30s ease-in-out infinite alternate;
}

@keyframes starsMove {
    from { background-position: 0 0; }
    to { background-position: 1000px 1000px; }
}

@keyframes cloudsMove {
    from { background-position: 0 0; }
    to { background-position: 200px 200px; }
}

@keyframes auroraShift {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* 头部样式 */
.header {
    background: rgba(26, 42, 58, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px var(--shadow-color);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    animation: pulse 2s ease-in-out infinite;
}

.logo-text h1 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 5px;
}

.logo-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 导航栏 */
.nav-list {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
    background: rgba(0, 180, 216, 0.1);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* 英雄区域 */
.hero {
    padding: 60px 0;
    position: relative;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content {
    padding-right: 20px;
}

.hero-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 3.5rem;
    color: var(--text-color);
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-style: italic;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: 'Noto Serif SC', serif;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 180, 216, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.hero-image {
    position: relative;
}

.hero-img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: perspective(1000px) rotateY(-10deg);
    transition: transform 0.5s ease;
}

.hero-img:hover {
    transform: perspective(1000px) rotateY(0deg);
}

/* 主要内容布局 */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    padding: 40px 0;
}

.content-area {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 章节标题 */
.section-title {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-left: auto;
    font-weight: normal;
}

/* 特色文章 */
.featured-article {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.featured-image {
    position: relative;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-article:hover .featured-image img {
    transform: scale(1.05);
}

.article-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.featured-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.article-category {
    background: rgba(0, 180, 216, 0.2);
    color: var(--accent-color);
    padding: 3px 10px;
    border-radius: 12px;
}

.article-title {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-title a {
    color: inherit;
}

.article-title a:hover {
    color: var(--accent-color);
}

.article-excerpt {
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.btn-read-more {
    color: var(--accent-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: 4px;
    background: rgba(0, 180, 216, 0.1);
    transition: all 0.3s ease;
}

.btn-read-more:hover {
    background: rgba(0, 180, 216, 0.2);
    transform: translateX(5px);
}

.article-tags {
    display: flex;
    gap: 8px;
}

.tag {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* 文章网格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.article-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.article-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.7));
}

.article-content {
    padding: 20px;
}

.article-content .article-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.article-content .article-excerpt {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-right: 15px;
}

/* 加载更多按钮 */
.load-more-container {
    text-align: center;
    margin-top: 30px;
}

.btn-load-more {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 180, 216, 0.4);
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.widget {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.widget-title {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 0;
}

#searchInput {
    flex: 1;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 25px 0 0 25px;
    color: var(--text-color);
    outline: none;
}

#searchInput:focus {
    border-color: var(--accent-color);
}

.search-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: var(--accent-hover);
}

/* 作者信息 */
.author-info {
    text-align: center;
}

.author-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
}

.avatar-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--accent-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.author-name {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 8px;
}

.author-bio {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.author-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* 修真境界 */
.cultivation-levels {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.level {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.level:hover {
    background: rgba(0, 180, 216, 0.1);
    transform: translateX(5px);
}

.level.active {
    background: rgba(0, 180, 216, 0.2);
    border-left: 3px solid var(--accent-color);
}

.level-name {
    font-weight: 600;
    color: var(--text-color);
}

.level-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 标签云 */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-cloud .tag {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.tags-cloud .tag:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

/* 语录组件 */
.quote-content {
    padding: 15px 0;
    text-align: center;
}

.quote-text {
    font-size: 1.1rem;
    color: var(--text-color);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 10px;
}

.quote-author {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.quote-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.quote-prev,
.quote-next {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-prev:hover,
.quote-next:hover {
    background: var(--accent-color);
    color: white;
}

/* 页脚 */
.footer {
    background: rgba(10, 25, 47, 0.9);
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section {
    margin-bottom: 20px;
}

.footer-title {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.footer-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-note {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-style: italic;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-hover);
    transform: translateY(-5px);
}

/* 页面加载动画 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-icon {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 100%; }
    100% { width: 0%; }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        padding-right: 0;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .featured-article {
        grid-template-columns: 1fr;
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
    }
    
    .nav {
        display: none;
        width: 100%;
        margin-top: 15px;
    }
    
    .nav.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 10px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .section-subtitle {
        margin-left: 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .article-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}