/* 全局样式重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #7FFFD4;
    --secondary-color: #6FE0C0;
    --accent-color: #7FFFD4;
    --text-color: #333;
    --light-text: #666;
    --background-color: #f5f6fa;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #E6E6FA;
    --secondary-color: #d8d8f5;
    --accent-color: #E6E6FA;
    --text-color: #f5f5f5;
    --light-text: #cccccc;
    --background-color: #121212;
    --white: #1e1e1e;
}

/* 确保导航栏在暗黑模式下也更新 */
[data-theme="dark"] .navbar {
    background-color: var(--white);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* 确保按钮在暗黑模式下可见 */
[data-theme="dark"] .theme-toggle {
    background-color: var(--primary-color);
    color: var(--text-color);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary-color: #E6E6FA;
        --secondary-color: #d8d8f5;
        --accent-color: #E6E6FA;
        --text-color: #f5f5f5;
        --light-text: #cccccc;
        --background-color: #121212;
        --white: #1e1e1e;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Logo样式 */
.logo-img {
    height: 120px;
    width: auto;
    transition: all 0.3s ease;
    margin: 10px 0;
}

@media (max-width: 768px) {
    .logo-img {
        height: 100px;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 80px;
    }
}

/* 导航栏样式 */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

/* 暗黑模式切换按钮 */
.theme-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 1000;
    border: none;
    font-size: 20px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    padding: 10px 0;
}

.logo-img {
    height: 80px;
    width: auto;
    display: block;
    transition: all 0.3s ease;
    margin: 10px 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.nav-group:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -20px;
    height: 60%;
    width: 1px;
    background-color: rgba(0, 0, 0, 0.1);
}

/* 特性与下载链接特殊间距 */
.nav-group:nth-child(2) a {
    padding: 8px 12px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: 4px;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary-color);
    background-color: rgba(74, 144, 226, 0.1);
}

.github-link {
    background-color: var(--secondary-color);
    color: var(--white) !important;
}

.github-link:hover {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
}

/* Hero Section 样式 */
.hero {
    padding: 160px 0 100px;
    background: url('../images/png.jpg') no-repeat center center;
    background-size: cover;
    color: var(--white);
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--black);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* 特性部分样式 */
.features {
    padding: 100px 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
    color: var(--secondary-color);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.feature-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.feature-card p {
    color: var(--light-text);
}

.feature-desc {
    margin-top: 15px;
    text-align: left;
    padding-left: 20px;
}

.feature-desc p {
    color: var(--text-color);
    font-size: 14px;
    margin-bottom: 8px;
    position: relative;
}

.feature-desc p::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

[data-theme="dark"] .feature-desc p {
    color: var(--light-text);
}

/* 功能详情部分样式 */
.feature-details {
    padding: 80px 0;
    background-color: var(--background-color);
}

.feature-details .container {
    max-width: 1200px;
    margin: 0 auto;
}

.feature-details-grid {
    display: block;
    margin-top: 40px;
}

.feature-detail {
    margin-bottom: 80px;
    padding: 20px;
}

.feature-detail:last-child {
    margin-bottom: 0;
}

.feature-content {
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .feature-detail {
        margin-bottom: 50px;
        padding: 15px;
    }
    
    .feature-content,
    .feature-content.reverse {
        flex-direction: column;
    }
    
    .feature-image {
        height: 250px;
        margin-bottom: 20px;
    }
}

.feature-detail {
    background: var(--white);
    padding: 0;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}

.feature-content {
    display: flex;
    align-items: center;
    min-height: 300px;
}

.feature-content.reverse {
    flex-direction: row-reverse;
}

.feature-image {
    flex: 1;
    height: 100%;
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-text {
    flex: 1;
    padding: 40px;
}

.feature-text h3 {
    margin-top: 0;
}

@media (max-width: 768px) {
    .feature-content,
    .feature-content.reverse {
        flex-direction: column;
    }
    
    .feature-image {
        width: 100%;
        height: 200px;
    }
    
    .feature-text {
        padding: 20px;
    }
}

.feature-detail:hover {
    transform: translateY(-5px);
}

.feature-detail h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 20px;
}

.feature-detail ul {
    list-style: none;
    padding-left: 0;
}

.feature-detail li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.feature-detail li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

[data-theme="dark"] .feature-detail {
    background: var(--dark-card-bg);
}

[data-theme="dark"] .feature-detail li {
    color: var(--light-text);
}

/* 下载部分样式 */
.download {
    padding: 100px 0;
    background-color: var(--background-color);
}

.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.download-card {
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.download-card:hover {
    transform: translateY(-5px);
}

.download-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.download-card p {
    margin-bottom: 25px;
    color: var(--light-text);
}

.btn-download {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-download:hover {
    background-color: var(--secondary-color);
}

/* 页脚样式 */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 80px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.footer-section a {
    display: block;
    color: var(--white);
    opacity: 0.8;
    text-decoration: none;
    margin-bottom: 10px;
    transition: var(--transition);
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span:nth-child(1) {
    top: 0;
}

.mobile-menu-toggle span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-toggle span:nth-child(3) {
    bottom: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-group {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }

    .nav-group:not(:last-child)::after {
        display: none;
    }

    .navbar .container {
        flex-direction: row;
        height: 70px;
        padding: 0 20px;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero-content h1 {
        font-size: 32px;
        line-height: 1.3;
    }

    .hero-content p {
        font-size: 18px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-card {
        padding: 25px;
    }

    .feature-details-grid {
        margin-top: 30px;
    }

    .feature-content,
    .feature-content.reverse {
        flex-direction: column;
    }

    .feature-image {
        height: 200px;
        margin-bottom: 20px;
    }

    .feature-text {
        padding: 25px;
    }

    .download-options {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .download-card {
        padding: 30px;
    }

    .btn-download {
        padding: 15px 25px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .feature-card h3 {
        font-size: 20px;
    }

    .feature-detail h3 {
        font-size: 18px;
    }

    .download-card h3 {
        font-size: 20px;
    }
}

.tech-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

/* 技术栈样式 */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tech-tag {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}