:root {
    --primary-color: #5C2D91;
    --accent-color: #007bff;
    --text-color: #333;
    --white-color: #fff;
    --light-bg: #f8f9fa;
    --border-color: #eee;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; line-height: 1.6; color: var(--text-color); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.btn { display: inline-block; padding: 10px 25px; border-radius: 50px; font-weight: bold; text-decoration: none; transition: 0.3s; }
.btn-primary { background: var(--primary-color); color: #fff; }
.btn-secondary { background: #fff; color: var(--primary-color); border: 1px solid var(--primary-color); margin-top: 15px;}
.disabled{pointer-events: none; cursor: default;}
html { scroll-behavior: smooth; }

/* Header - 白色背景，垂直居中 */
.header { background: #fff; height: 80px; display: flex; align-items: center; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.header .container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { display: flex; align-items: center; font-size: 1.5rem; font-weight: bold; color: var(--primary-color); }
.logo img { height: 35px; margin-right: 10px; }
.logo-des {margin: 15px 0;}
.nav-menu ul { list-style: none; display: flex; align-items: center; }
.nav-menu ul li { margin-left: 30px; }
.nav-menu ul li a { text-decoration: none; color: #555; font-weight: 500; }
.nav-menu ul li a:hover { color: var(--primary-color); }
.nav-menu ul li a.btn-primary{color: #fff !important;}
.hamburger-menu { display: none; font-size: 1.5rem; cursor: pointer; }

/* Hero Section - 左图右文 */
.hero-section { background: var(--primary-color); color: #fff; padding: 100px 0; }
.hero-section .container { display: flex; align-items: center; gap: 50px; }
.hero-image { flex: 1; }
.hero-image img { width: 100%; max-width: 500px; border-radius: 10px; }
.hero-content { flex: 1; }
.hero-content h1 { font-size: 2.8rem; margin-bottom: 20px; line-height: 1.3; }
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; }
.download-buttons .btn { margin-right: 15px; }

/* Features */
.features-section { padding: 80px 0; text-align: center; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 50px; }
.feature-card { padding: 40px; background: #fff; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); transition: 0.3s; }
.feature-card:hover { transform: translateY(-10px); }
.feature-card i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 20px; }
.container-title{margin-bottom: 10px;}

/* Pricing - 切换显示 */
.pricing-section { padding: 80px 0; background: var(--light-bg); text-align: center; }
.pricing-toggle { display: inline-flex; padding: 5px; border-radius: 50px; margin: 20px 35px; }
.pricing-toggle button { border: none; padding: 10px 25px; border-radius: 50px; cursor: pointer; font-weight: bold; background: transparent; transition: 0.3s; }
.pricing-toggle button.active { background: var(--primary-color); color: #fff; }
.pricing-content { display: flex; justify-content: center; }
.pricing-card { display: none; width: 100%; max-width: 400px; background: #fff; padding: 50px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.pricing-card.active { display: block; animation: fadeIn 0.5s; }
.pricing-card.active .price-off { font-size: 24px; color: #f17215; }
.pricing-card.featured { border: 2px solid var(--primary-color); }
.price { font-size: 3rem; font-weight: bold; color: var(--primary-color); margin: 20px 0; }
.old-price {font-size: 1rem; color: #666; text-decoration: line-through; font-weight: normal; }
.pricing-card ul { list-style: none; margin-bottom: 30px; text-align: left; }
.pricing-card ul li { margin-bottom: 10px; padding-left: 25px; position: relative; }
.pricing-card ul li::before { content: '✓'; position: absolute; left: 0; color: var(--primary-color); font-weight: bold; }

/* Download - 一行4个 */
.download-app-section { padding: 80px 0; text-align: center; }
.app-download-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.app-card { padding: 30px; background: #fff; border: 1px solid #eee; border-radius: 15px; transition: 0.3s; }
.app-card:hover { border-color: var(--primary-color); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.app-card i { font-size: 3rem; color: var(--primary-color); margin-bottom: 15px; }

/* Testimonials - 滚动特效 */
.testimonials-section { padding: 80px 0; text-align: center; overflow: hidden; }
.testimonial-slider { max-width: 800px; margin: 0 auto; position: relative; }
.testimonial-track { display: flex; transition: transform 0.5s ease-in-out; width: 100%; }
.testimonial-item { min-width: 100%; padding: 40px; opacity: 0; transition: opacity 0.5s; }
.testimonial-item.active { opacity: 1; }
.testimonial-item p { font-size: 1.2rem; font-style: italic; margin-bottom: 20px; }
.testimonial-avatars { margin-top: 30px; display: flex; justify-content: center; gap: 15px; }
.avatar { width: 60px; height: 60px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: 0.3s; opacity: 0.6; }
.avatar.active { border-color: var(--primary-color); opacity: 1; transform: scale(1.2); }

/* Footer */
.footer { background: #1a1a2e; color: #fff; padding: 60px 0 30px; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; margin-bottom: 40px; }
.footer-col h4 { margin-bottom: 20px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #aaa; text-decoration: none; }
.footer-bottom { text-align: center; border-top: 1px solid #333; padding-top: 20px; color: #777; }

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color); /* 使用您定义的深紫色 */
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

/* 当页面滚动后显示的类 */
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--accent-color); /* 悬停时变为蓝色 */
    transform: translateY(-5px);
}

/* --- 通用布局与面包屑 --- */
.archive-main, .single-main { background: #fcfcfc; }
.breadcrumbs { padding: 15px 0; font-size: 14px; color: #888; border-bottom: 1px solid #eee; margin-bottom: 30px; }
.breadcrumbs a { color: #666; text-decoration: none; transition: 0.3s; }
.breadcrumbs a:hover { color: var(--primary-color); }

/* --- 文章列表页 (archive.php) 网格布局 --- */
.archive-header { text-align: center; margin-bottom: 40px; }
.archive-title { font-size: 32px; color: #333; margin-bottom: 10px; position: relative; display: inline-block; }
.archive-title::after { content: ''; display: block; width: 50px; height: 3px; background: var(--primary-color); margin: 10px auto 0; }

.article-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 25px; 
    margin-bottom: 50px;
}

.grid-item { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: 0.3s; border: 1px solid #f0f0f0; }
.grid-item:hover { transform: translateY(-8px); box-shadow: 0 12px 30px rgba(0,0,0,0.1); }

.post-thumbnail { display: block; height: 180px; overflow: hidden; position: relative; }
.post-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.grid-item:hover .post-thumbnail img { transform: scale(1.1); }
.no-thumb { background: #eee; display: flex; align-items: center; justify-content: center; }

.post-content { padding: 20px; }
.post-meta-top { font-size: 12px; color: #999; margin-bottom: 10px; }
.post-title { font-size: 18px; margin-bottom: 12px; line-height: 1.4; height: 50px; overflow: hidden; }
.post-title a { color: #333; text-decoration: none; transition: 0.3s; }
.post-title a:hover { color: var(--primary-color); }
.post-excerpt { font-size: 14px; color: #666; line-height: 1.6; height: 66px; overflow: hidden; margin-bottom: 15px; }
.read-more-link { font-size: 14px; color: var(--primary-color); font-weight: bold; text-decoration: none; }

/* 分页样式 */
.pagination-wrapper { text-align: center; margin-top: 40px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 10px; }
.pagination .page-numbers { padding: 8px 16px; border: 1px solid #ddd; border-radius: 4px; color: #666; text-decoration: none; }
.pagination .page-numbers.current { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* --- 文章详情页 (single.php) 左右布局 --- */
.content-layout { display: flex; gap: 40px; align-items: flex-start; }
.main-content { flex: 1; min-width: 0; background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 2px 20px rgba(0,0,0,0.03); }
.sidebar { width: 320px; flex-shrink: 0; position: sticky; top: 100px; }

.entry-header { margin-bottom: 30px; border-bottom: 1px solid #f0f0f0; padding-bottom: 20px; }
.entry-title { font-size: 32px; line-height: 1.3; margin-bottom: 15px; color: #222; }
.entry-meta { font-size: 14px; color: #999; display: flex; gap: 20px; }
.entry-meta i { margin-right: 5px; color: var(--primary-color); }

/* 目录导航样式 */
.article-toc { 
    background: #f9f9f9; 
    border-left: 4px solid var(--primary-color); 
    padding: 20px; 
    margin-bottom: 30px; 
    display: none; 
}
.toc-title { font-weight: bold; margin-bottom: 10px; color: #333; }
.toc-list { list-style: none; padding: 0; }
.toc-list li { margin-bottom: 8px; }
.toc-list a { color: #666; text-decoration: none; font-size: 14px; }
.toc-list a:hover { color: var(--primary-color); text-decoration: underline; }

/* --- 正文内容标签美化 --- */
.entry-content { font-size: 17px; line-height: 1.8; color: #3c3c3c; }
.entry-content p { margin-bottom: 25px; }
.entry-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 20px 0; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.entry-content ul, .entry-content ol { margin-bottom: 25px; padding-left: 20px; }
.entry-content li { margin-bottom: 10px; }
.entry-content a { color: var(--primary-color); text-decoration: none; border-bottom: 1px solid transparent; transition: 0.3s; }
.entry-content a:hover { border-bottom-color: var(--primary-color); }

.entry-content blockquote { 
    background: #f0f7ff; 
    border-left: 5px solid var(--accent-color); 
    padding: 20px 30px; 
    margin: 30px 0; 
    font-style: italic; 
    color: #555;
    position: relative;
}
.entry-content blockquote::before { content: '"'; position: absolute; left: 10px; top: 0; font-size: 40px; color: rgba(0,0,0,0.05); }

.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: 25px; border: 1px solid #eee; }
.entry-content th, .entry-content td { padding: 12px 15px; border: 1px solid #eee; text-align: left; }
.entry-content th { background: #f8f9fa; font-weight: bold; }
.entry-content tr:nth-child(even) { background: #fafafa; }

/* 相关推荐 */
.related-posts { margin-top: 50px; padding-top: 30px; border-top: 1px solid #eee; }
.section-title { font-size: 22px; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-item a { text-decoration: none; color: #333; }
.related-item h4 { font-size: 14px; margin-top: 10px; line-height: 1.4; height: 40px; overflow: hidden; }
.placeholder-thumb { background: #eee; height: 120px; border-radius: 6px; }
.related-item img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; }

/* 侧边栏小工具 */
.widget { background: #fff; padding: 25px; border-radius: 12px; box-shadow: 0 2px 15px rgba(0,0,0,0.03); margin-bottom: 30px; }
.widget-title { font-size: 18px; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-color); display: inline-block; }
.widget ul { list-style: none; padding: 0; }
.widget li { margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dashed #eee; }
.widget li:last-child { border: none; margin: 0; padding: 0; }
.widget li a { display: flex; justify-content: space-between; text-decoration: none; color: #444; font-size: 14px; }
.widget li a:hover .post-title { color: var(--primary-color); }
.widget .post-date { color: #bbb; font-size: 12px; margin-left: 10px; flex-shrink: 0; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 1200px) {
    .article-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
    .hero-section .container { flex-direction: column; text-align: center; }
    .app-download-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr; text-align: center; }
    .content-layout { flex-direction: column; }
    .sidebar { width: 100%; position: static; }
    .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav-menu { display: none; position: absolute; top: 80px; left: 0; width: 100%; background: #fff; padding: 20px; box-shadow: 0 5px 10px rgba(0,0,0,0.1); }
    .nav-menu.active { display: block; }
    .nav-menu ul { flex-direction: column; }
    .nav-menu ul li { margin: 10px 0; }
    .hamburger-menu { display: block; }
    .hero-content h1 { font-size: 2rem; }
    .app-download-grid { grid-template-columns: 1fr; }
    .main-content { padding: 20px; }
    .entry-title { font-size: 24px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .article-grid { grid-template-columns: 1fr; }
}
