/* 1. 基础变量：统一配色/尺寸，方便维护 */
:root {
    --grad-primary: linear-gradient(135deg, #667eea, #764ba2);
    --grad-android: linear-gradient(135deg, #20c997, #1aa873);
    --grad-ios: linear-gradient(135deg, #ff4d6d, #e83a59);
    --grad-tutorial: linear-gradient(135deg, #764ba2, #623aa2);
    --color-primary: #764ba2;
    --color-text: #2d3748;
    --color-text-light: #6b7280;
    --color-text-lighter: #9ca3af;
    --color-bg: #fff;
    --color-bg-light: #f8f9fa;
    --color-bg-hover: #f0f2ff;
    --color-danger: #ff6b6b;
    --shadow: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --radius: 24px;
    --radius-sm: 14px;
    --radius-xs: 8px;
}

/* 2. 基础重置：精简高效 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body {
    background: var(--grad-primary);
    min-height: 100vh;
    padding: 15px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* 3. 背景装饰：优化动画性能 */
.bg-circle {
    position: fixed;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    filter: blur(40px);
    animation: float 8s infinite ease-in-out;
    z-index: -1;
    transform: translateZ(0); /* 硬件加速 */
}
.bg1 { width: 200px; height: 200px; top: 10%; left: -50px; }
.bg2 { width: 250px; height: 250px; bottom: 15%; right: -80px; animation-delay: 2s; }
.bg3 { width: 180px; height: 180px; top: 60%; left: 20%; animation-delay: 4s; }
@keyframes float { 0% { transform: translate(0,0); } 50% { transform: translate(15px,15px); } 100% { transform: translate(0,0); } }

/* 4. 主体容器：响应式优化 */
.container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    background: var(--color-bg);
    border-radius: var(--radius);
    padding: 25px 18px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.top-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--grad-primary);
}

/* 5. 头部Logo：视觉优化 */
.header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}
.logo {
    font-size: 38px;
    font-weight: 700;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    color: transparent;
    display: inline-block;
    margin-bottom: 12px;
    position: relative;
}
.logo::after {
    content: '';
    display: block;
    width: 70%;
    height: 4px;
    background: var(--grad-primary);
    border-radius: 2px;
    margin: 10px auto 0;
    opacity: .7;
}

/* 6. 下载区域：交互增强 */
.download {
    text-align: center;
    margin-bottom: 25px;
}
.download-hot {
    display: inline-block;
    padding: 3px 12px;
    background: var(--grad-ios);
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(255,77,109,0.3);
    animation: pulse 2s infinite;
}
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
.download-desc {
    font-size: 15px;
    color: var(--color-text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
}
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    font-size: 21px;
    font-weight: 600;
    padding: 16px 0;
    border-radius: var(--radius-sm);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
    outline: none;
    border: none;
    cursor: pointer;
}
/* 按钮发光效果优化 */
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}
.btn:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
.btn:hover::after { left: 100%; }
.btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    opacity: 0.95;
    background: var(--grad-android) !important;
}
.btn-android { background: var(--grad-android); }
.btn-ios { background: var(--grad-ios); }
.btn-tutorial { background: var(--grad-tutorial); font-size: 19px; }
.ios-tip {
    font-size: 13px;
    color: var(--color-danger);
    margin-top: 10px;
    padding: 8px 15px;
    line-height: 1.5;
    text-align: left;
    background: #fef2f2;
    border-radius: var(--radius-xs);
    display: inline-block;
    max-width: 90%;
}

/* 7. 轮播图：体验优化（悬停暂停） */
.carousel {
    margin-bottom: 30px;
}
.carousel-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 18px;
    position: relative;
}
.carousel-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--grad-primary);
    border-radius: 3px;
    margin: 8px auto 0;
}
.carousel-wrapper {
    position: relative;
    max-width: 550px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    touch-action: pan-y;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
/* 轮播悬停暂停时隐藏指示器动画 */
.carousel-wrapper:hover .carousel-dots { opacity: 1; }
.carousel-inner {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9比例 */
    transition: transform 0.5s ease;
}
.carousel-item {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.carousel-item.active { opacity: 1; }
#carousel-item-0 { left: 0%; }
#carousel-item-1 { left: 100%; }
#carousel-item-2 { left: 200%; }
#carousel-item-3 { left: 300%; }
#carousel-item-4 { left: 400%; }
/* 图片优化：占位+懒加载 */
.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    background: #f0f0f0; /* 加载占位 */
    transition: opacity 0.3s ease;
}
.carousel-img.loaded { opacity: 1; }
.carousel-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}
.dot.active {
    background: #fff;
    width: 30px;
    border-radius: 15px;
}

/* 8. 功能列表：hover优化 */
.features {
    margin-bottom: 25px;
}
.features-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 18px;
    position: relative;
}
.features-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--grad-primary);
    border-radius: 3px;
    margin: 8px auto 0;
}
.features-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0 10px;
}
.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px 18px;
    background: var(--color-bg-light);
    border-radius: var(--radius-xs);
    line-height: 1.6;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background: var(--color-bg-hover);
}
.feature-icon {
    font-size: 18px;
    color: var(--color-primary);
    margin-top: 2px;
}
.feature-text strong {
    color: var(--color-primary);
}

/* 9. 分隔线/底部：精简样式 */
.divider {
    height: 1px;
    background: #eee;
    margin: 15px 0;
}
.footer {
    text-align: center;
    padding-top: 10px;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 14px;
    flex-wrap: wrap; /* 小屏换行兼容 */
}
.footer-link {
    color: var(--color-text-light);
    text-decoration: none;
    transition: all 0.2s;
    padding: 3px 5px;
    border-radius: 4px;
}
.footer-link:hover {
    color: var(--color-primary);
    background: var(--color-bg-hover);
}
.footer-legal {
    font-size: 12px;
    color: var(--color-text-lighter);
    line-height: 1.8;
    padding: 0 20px;
    margin-top: 8px;
}
.copyright {
    margin-bottom: 5px;
}

/* 10. 返回顶部：动画优化 */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(118,75,162,0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}
#backToTop.active {
    opacity: 1;
    visibility: visible;
}

/* 11. 微信/QQ提示遮罩：动画+视觉优化 */
.browser-tip-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 0 20px;
    box-sizing: border-box;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards; /* 淡入动画 */
}
@keyframes fadeIn { to { opacity: 1; } }
.browser-tip-content {
    text-align: center;
    max-width: 350px;
}
.browser-tip-icon {
    font-size: 80px;
    margin-bottom: 30px;
    animation: bounce 1s ease;
}
@keyframes bounce { 0% { transform: scale(0.8); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
.browser-tip-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: #fff;
}
.browser-tip-desc {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
    color: #eee;
}
.browser-tip-desc span {
    color: #4cd964;
    font-weight: 600;
}
.browser-tip-btn {
    padding: 12px 30px;
    background: var(--grad-primary);
    border: none;
    border-radius: var(--radius-xs);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(118,75,162,0.3);
}
.browser-tip-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(118,75,162,0.4);
}

/* 12. 响应式适配：小屏优化 */
@media (max-width: 375px) {
    .logo { font-size: 32px; }
    .btn { font-size: 19px; padding: 14px 0; }
    .btn-tutorial { font-size: 17px; }
    .carousel-title, .features-title { font-size: 20px; }
    .browser-tip-icon { font-size: 60px; }
    .browser-tip-title { font-size: 22px; }
    .browser-tip-desc { font-size: 16px; }
}
