/* 基础样式 */
:root {
    --primary: #8a2be2;
    --secondary: #5d3fd3;
    --accent: #ff6b6b;
    --light: #f8f9fa;
    --dark: #1e1e2e;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --border-radius: 16px;
    --shadow: 0 8px 20px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --section-bg: #ffffff;
    --body-bg: linear-gradient(135deg, #f9f7ff 0%, #e6f0ff 100%);
    --text-color: #333;
    --header-bg: linear-gradient(135deg, var(--primary), var(--secondary));
    --card-bg: #ffffff;
}

/* 深色模式变量 */
[data-theme="dark"] {
    --primary: #9d6bff;
    --secondary: #7c5cf0;
    --accent: #ff7b7b;
    --light: #1a1a2e;
    --dark: #f0f0f0;
    --gray: #a0a0a0;
    --light-gray: #2d2d44;
    --section-bg: #252540;
    --body-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --text-color: #f0f0f0;
    --header-bg: linear-gradient(135deg, #1a1a2e, #252540);
    --card-bg: #2d2d44;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    transition: background-color 0.6s, color 0.6s, border-color 0.6s;
}

body {
    background: var(--body-bg);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 60px;
    background-attachment: fixed;
    background-size: cover;
    position: relative;
    overflow-x: hidden;
}

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

/* 主题切换按钮 */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#theme-switcher {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-color);
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    font-size: 1.2rem;
}

#theme-switcher:hover {
    transform: rotate(15deg) scale(1.2rem);
}

/* 回到顶部按钮 */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    z-index: 100;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
}

#back-to-top.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

#back-to-top:hover {
    background: var(--secondary);
    transform: translateY(-5px) scale(1.05);
}

#back-to-top i {
    font-size: 1.2rem;
}

/* 主题切换动画覆盖层 */
#theme-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--section-bg);
    opacity: 0;
    visibility: hidden;
    z-index: 9998;
    transition: opacity 0.4s ease, visibility 0.4s;
    pointer-events: none;
}

/* 头部样式 */
header {
    background: var(--header-bg);
    color: white;
    padding: 40px 0;
    text-align: center;
    border-radius: 0 0 30px 30px;
    box-shadow: var(--shadow);
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    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" viewBox="0 0 100 100" preserveAspectRatio="none"><polygon points="0,100 100,0 100,100" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 100% 100%;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.logo {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    margin-bottom: 20px;
    transition: var(--transition);
}

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

.logo img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.app-title {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 3px 8px rgba(0,0,0,0.2);
    margin-bottom: 10px;
    background: linear-gradient(to right, #ffffff, #e0e0ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.app-tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 25px;
    font-weight: 300;
}

.app-meta {
    margin: 15px 0 30px;
    font-size: 1.1rem;
    opacity: 0.9;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.app-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 50px;
}

.download-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.download-btn {
    background: white;
    color: var(--primary);
    border: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.5s;
}

.download-btn:hover::before {
    left: 100%;
}

.download-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.download-btn i {
    font-size: 1.3rem;
}

/* 内容区域样式 */
.section {
    background: var(--section-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 40px;
    margin-bottom: 40px;
    transition: var(--transition);
    animation: fadeIn 0.6s ease-out forwards;
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.section-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-gray);
    display: flex;
    align-items: center;
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 3px;
}

.section-title i {
    margin-right: 15px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.8rem;
}

/* 截图区域 - 左右滑动 */
.screenshots-container {
    position: relative;
    margin: 30px 0;
}

.screenshots {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding: 10px 0 30px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.screenshots::-webkit-scrollbar {
    display: none;
}

.screenshot-item {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 280px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    transition: var(--transition);
    position: relative;
}

.screenshot-item::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    opacity: 0;
    transition: var(--transition);
}

.screenshot-item:hover::after {
    opacity: 1;
}

.screenshot-item img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.screenshot-item:hover img {
    transform: scale(1.03);
}

.screenshot-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.screenshot-nav-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--light-gray);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.screenshot-nav-btn.active {
    background: var(--primary);
    transform: scale(1.3);
}

/* 软件介绍区域 */
.intro-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.intro-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--gray);
}

.highlight {
    color: var(--primary);
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.feature-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-top: 3px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), transparent);
    opacity: 0.05;
    z-index: 0;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.feature-card i {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
    position: relative;
    z-index: 1;
}

.feature-card p {
    color: var(--gray);
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

/* 更新日志 */
.changelog {
    background: var(--card-bg);
    border-left: 4px solid var(--secondary);
    padding: 30px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    position: relative;
    overflow: hidden;
}

.changelog::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(var(--primary-rgb), 0.03));
    z-index: 0;
}

.version {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--light-gray);
    position: relative;
    z-index: 1;
}

.version:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.version-title {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.version-title i {
    margin-right: 12px;
    color: var(--accent);
    font-size: 1.3rem;
}

.version-date {
    font-size: 0.95rem;
    color: var(--gray);
    margin-left: 15px;
    font-weight: normal;
}

.features {
    padding-left: 30px;
    list-style-type: disc;
}

.features li {
    margin-bottom: 12px;
    position: relative;
    color: var(--text-color);
    line-height: 1.7;
}

/* 下载选项 */
.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    margin-top: 20px;
}

.download-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 35px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--light-gray);
}

.download-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
}

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

.download-card i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 25px;
}

.download-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.download-card p {
    color: var(--gray);
    margin-bottom: 25px;
    flex-grow: 1;
}

.qr-code {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.qr-code img {
    width: 160px;
    height: 160px;
    display: block;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 40px 0 30px;
    color: var(--gray);
    font-size: 0.95rem;
    margin-top: 50px;
    position: relative;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: var(--light-gray);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 25px;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

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

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

footer a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 1.2rem;
    box-shadow: 0 5px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-5px);
    color: var(--primary);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* 高亮效果 */
#download-section.highlight,
#qr-card.highlight {
    animation: highlight 1.5s ease;
}

@keyframes highlight {
    0% { box-shadow: 0 0 0 0 rgba(138, 43, 226, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(138, 43, 226, 0); }
}

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

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.section {
    animation: fadeIn 0.6s ease-out forwards;
}

.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.3s; }
.section:nth-child(5) { animation-delay: 0.4s; }

.logo {
    animation: float 4s ease-in-out infinite;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .app-title {
        font-size: 2.4rem;
    }
    
    .download-btn {
        padding: 14px 35px;
    }
}

@media (max-width: 768px) {
    .app-title {
        font-size: 2rem;
    }
    
    .section {
        padding: 30px;
    }
    
    .download-options {
        grid-template-columns: 1fr;
    }
    
    .screenshot-item {
        width: 260px;
    }
}

@media (max-width: 576px) {
    header {
        padding: 30px 0;
    }
    
    .app-title {
        font-size: 1.8rem;
    }
    
    .app-tagline {
        font-size: 1rem;
    }
    
    .app-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .download-btns {
        flex-direction: column;
        gap: 15px;
    }
    
    .download-btn {
        width: 100%;
    }
    
    .section {
        padding: 25px 20px;
    }
    
    .section-title {
        font-size: 1.7rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .screenshot-item {
        width: 240px;
        height: auto;
    }
    
    .screenshot-item img {
        height: 450px;
    }
}