/* 全局样式 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-text: #666;
    --lighter-text: #999;
    --bg-color: #fff;
    --light-bg: #f5f5f5;
    --border-color: #ddd;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* 黑暗模式变量 */
[data-theme="dark"] {
    --text-color: #f0f0f0;
    --light-text: #ccc;
    --lighter-text: #999;
    --bg-color: #1a1a1a;
    --light-bg: #2d2d2d;
    --border-color: #444;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #2980b9;
}

/* 黑暗模式切换按钮 */
.theme-toggle {
    position: absolute;
    right: 20px;
    bottom: 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
    z-index: 1000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
}

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

/* 头部导航 */
header {
    background-color: var(--bg-color);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    color: var(--text-color);
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    position: relative;
    margin-left: 20px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    padding: 10px 15px 10px 0;
    display: block;
    font-size: 1.1rem;
}

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

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-color);
    box-shadow: var(--box-shadow);
    min-width: 180px;
    display: none;
    z-index: 1000;
    border-radius: 4px;
    overflow: hidden;
}

nav ul li:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu li a {
    padding: 10px 15px;
    display: block;
    font-weight: 400;
}

.dropdown-menu li a:hover {
    background-color: var(--light-bg);
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    position: fixed;
    right: 30px;
    top: 30px;
    z-index: 1001;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    list-style: none;
    margin: 20px 0;
    font-size: 0.9rem;
    color: var(--light-text);
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    margin: 0 10px;
    color: var(--lighter-text);
}

.breadcrumb a {
    color: var(--light-text);
}

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

/* 英雄区域 */
.hero {
    background-color: var(--light-bg);
    padding: 50px 0;
    margin-bottom: 30px;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.hero p {
    font-size: 1.2rem;
    color: var(--light-text);
    max-width: 800px;
    margin: 0 auto;
}

/* 内容区域 */
.content-section {
    margin-bottom: 50px;
}

.content-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

.content-section h3 {
    font-size: 1.4rem;
    margin: 25px 0 15px;
    color: var(--text-color);
}

.content-section p {
    margin-bottom: 15px;
    color: var(--text-color);
}

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

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

/* 下载卡片 */
.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.download-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    padding: 20px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.download-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.download-card img {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    object-fit: contain;
}

.download-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    text-align: center;
}

.download-card p {
    flex-grow: 1;
    margin-bottom: 15px;
    color: var(--light-text);
}

.download-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.download-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: var(--transition);
    text-align: center;
}

.download-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: var(--box-shadow);
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background-color: var(--light-bg);
    font-weight: 600;
}

table tr:nth-child(even) {
    background-color: var(--light-bg);
}

table tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* 教程步骤 */
.tutorial-steps {
    margin: 30px 0;
}

.tutorial-step {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.tutorial-step:last-child {
    border-bottom: none;
}

.tutorial-step h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* 提示框 */
.note, .warning {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.note {
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 4px solid var(--primary-color);
}

.warning {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--danger-color);
}

/* FAQ样式 */
.faq-container {
    margin: 30px 0;
}

.faq-item {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    padding: 15px;
    background-color: var(--light-bg);
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.faq-question::after {
    content: "+";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

.faq-item.active .faq-question::after {
    content: "-";
}

.faq-answer {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 15px;
    max-height: 1000px;
}

/* 内容网格 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.card {
    background-color: var(--bg-color);
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* 价格表 */
.pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.pricing-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.pricing-card.featured {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.pricing-card.featured:hover {
    transform: translateY(-5px) scale(1.05);
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--light-text);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    text-align: left;
}

.pricing-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* 页脚 */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 50px 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: white;
}

.footer-section p {
    color: #bdc3c7;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section ul li a {
    color: #bdc3c7;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    nav {
        width: 100%;
        margin-top: 15px;
    }
    
    nav ul {
        flex-direction: column;
        display: none;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        margin: 0;
        width: 100%;
    }
    
    nav ul li a {
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        display: none;
        width: 100%;
        padding-left: 15px;
    }
    
    nav ul li:hover .dropdown-menu {
        display: none;
    }
    
    nav ul li.active .dropdown-menu {
        display: block;
    }
    
    .mobile-menu-btn {
        display: block;
        position: absolute;
        right: 30px;
        top: 30px;
        z-index: 1001;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .download-options, .content-grid, .pricing-table {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .pricing-card.featured:hover {
        transform: translateY(-5px);
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section {
    animation: fadeIn 0.5s ease-out;
}

/* 代码块样式 */
code {
    background-color: #f8f8f8;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    font-size: 0.9em;
    color: #e74c3c;
}

pre {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
}

pre code {
    background-color: transparent;
    padding: 0;
    color: #333;
}

/* 按钮样式 */
.btn-group {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-success {
    background-color: var(--success-color);
}

.btn-warning {
    background-color: var(--warning-color);
}

.btn-danger {
    background-color: var(--danger-color);
}

/* 图片画廊 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* 标签样式 */
.tag {
    display: inline-block;
    background-color: var(--light-bg);
    color: var(--light-text);
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px;
}

.tag:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 进度条 */
.progress {
    height: 8px;
    background-color: var(--light-bg);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
