/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 变量定义 */
:root {
    /* 白天模式变量 */
    --bg-primary: #ffffff;
    --bg-secondary: #f9f9f9;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --accent-color: #637293;
    --accent-hover: #546181;
    --accent-light: #7c89a7;
    --accent-dark: #424d6b;
    --border-color: #e0e0e0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius: 8px;
}

/* 夜间模式变量 */
.dark-mode {
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --text-primary: #ffffff;
    --text-secondary: #b0bec5;
    --accent-color: #7c89a7;
    --accent-hover: #8f9bb6;
    --accent-light: #637293;
    --accent-dark: #546181;
    --border-color: #333333;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 基础样式 */
html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    /* 强制防止水平滚动 */
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* 确保页面内容不会超出视口宽度 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 确保容器不会导致溢出 */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
    overflow: hidden;
}

/* 移除所有元素的最大宽度限制，确保内容不会溢出 */
section, header, footer {
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* 强制图片响应式 */
img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航 */
header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo span {
    margin-left: 10px;
}

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

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}

nav ul li a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.theme-button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    padding: 10px;
    border-radius: 50%;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-button:hover {
    background-color: var(--bg-secondary);
    transform: rotate(15deg);
}

/* 英雄区域 */
.hero {
    padding: 120px 0 80px;
    background-color: var(--bg-secondary);
    width: 100%;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
    margin-bottom: 40px;
}

.hero-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 调整11.png图片样式 */
.hero-image img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 10px;
    color: var(--accent-color);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.version {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.tagline {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.download-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.download-btn {
    padding: 12px 24px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.download-btn.primary {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(99, 114, 147, 0.25);
    border-radius: 12px;
}

.download-btn.primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent-color));
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 18px rgba(99, 114, 147, 0.35);
}

.download-btn.primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 3px 10px rgba(99, 114, 147, 0.3);
}

.download-btn.primary::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer 2s infinite;
    opacity: 0;
}

.download-btn.primary:hover::before {
    opacity: 1;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.download-btn.secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 12px;
}

.download-btn.secondary:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 114, 147, 0.3);
}

.download-btn.large {
    padding: 18px 36px;
    font-size: 20px;
    font-weight: 600;
    border-radius: 14px;
    gap: 12px;
    min-width: 200px;
}

/* 功能特点 */
.features {
    padding: 80px 0;
}

.features h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
    color: var(--text-primary);
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 30px;
    background-color: var(--bg-secondary);
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--accent-light);
}

.feature-item h3 {
    margin: 20px 0 10px;
    font-size: 20px;
    color: var(--text-primary);
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 下载区域 */
.download-section {
    padding: 80px 0;
    background-color: var(--bg-secondary);
    text-align: center;
}

.download-section h2 {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.download-section p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 16px;
}

.download-info {
    margin-top: 40px;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 25px;
    background-color: var(--bg-primary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.download-info p {
    margin-bottom: 15px;
    font-weight: 500;
}

.download-info ul {
    list-style: none;
    padding-left: 0;
}

.download-info ul li {
    margin-bottom: 10px;
}

.download-info ul li a {
    color: var(--accent-color);
    text-decoration: none;
    transition: text-decoration 0.3s ease;
}

.download-info ul li a:hover {
    text-decoration: underline;
}

/* 关于我们 */
.about {
    padding: 80px 0;
}

.about h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 页脚 */
footer {
    background-color: var(--bg-secondary);
    padding: 60px 0 40px;
    border-top: 1px solid var(--border-color);
}

.footer-links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.link-group {
    min-width: 200px;
    margin-bottom: 30px;
}

.link-group h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 10px;
}

.link-group h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.link-group ul {
    list-style: none;
    padding-left: 0;
}

.link-group ul li {
    margin-bottom: 10px;
}

.link-group ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
}

.link-group ul li a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

.icp-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 10px;
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid transparent;
}

.icp-link:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 重置容器宽度，确保完全适应屏幕 */
    .container {
        width: 100% !important;
        padding: 0 10px !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
    
    /* 确保内容不会导致溢出 */
    .hero .container {
        flex-direction: column;
        text-align: center;
        padding: 0 10px !important;
    }
    
    .hero h1 {
        font-size: 36px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .tagline {
        font-size: 20px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .download-buttons {
        justify-content: center;
        width: 100%;
    }
    
    .feature-list {
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    nav ul {
        display: none;
    }
    
    header .container {
        justify-content: space-between;
        width: 100%;
        padding: 0 10px !important;
    }
    
    /* 调整图片容器，确保不会溢出 */
    .hero-image {
        width: 100%;
        padding: 0 10px;
    }
    
    .hero-image img {
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    /* 针对小屏幕设备的加强修复 */
    * {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    html, body {
        position: relative;
        width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .hero {
        padding: 100px 0 60px;
        width: 100% !important;
        overflow: hidden !important;
    }
    
    .hero h1 {
        font-size: 28px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .features h2,
    .download-section h2,
    .about h2 {
        font-size: 28px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .download-btn {
        width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* 确保所有内容块都不会溢出 */
    .feature-item,
    .download-info,
    .about-content {
        width: 100%;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 安全特性 */
[rel="noopener noreferrer"] {
    /* 确保外部链接安全 */
    target-new: tab;
}

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

.feature-item,
.hero-content,
.hero-image {
    animation: fadeIn 0.8s ease-out;
}

/* 焦点样式 */
button:focus,
.a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* 选择文本样式 */
::selection {
    background-color: var(--accent-color);
    color: white;
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}