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

/* 根变量 */
:root {
    --topbar-height: 64px;
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* 基础样式 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--gradient-primary);
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: var(--topbar-height);
}

/* 背景视频容器 */
.bg-video {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    background: #000;
}

.bg-video video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: brightness(0.9) saturate(1.05);
}

.bg-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.25));
    z-index: 1;
}

.bg-video img {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: brightness(0.9) saturate(1.05);
}

/* 内置浏览器提示（移除） */

/* 背景动画 */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* 顶部栏 */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: rgba(255,255,255,0.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.18);
    z-index: 1000;
}

.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
}

.topbar-icon i { font-size: 22px; color: #fff; }
.topbar-title { color: #fff; font-weight: 700; font-size: 18px; }
.topbar-subtitle { color: rgba(255,255,255,0.9); font-size: 12px; }
.topbar-text { display: flex; flex-direction: column; line-height: 1.2; }

.container {
    padding-top: 32px;
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (max-width: 600px) {
    :root { --topbar-height: 56px; }
    .container { padding-top: 24px; }
}

/* 居中主要模块宽度 */
.product-selector,
.features-section {
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* 让首个模块与顶部栏保持可见间距 */
.product-selector { margin-top: 12px; }

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    left: 80%;
    animation-delay: -5s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: -10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 70%;
    animation-delay: -15s;
}

.shape-5 {
    width: 140px;
    height: 140px;
    top: 40%;
    left: 5%;
    animation-delay: -8s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.3;
    }
    100% {
        transform: translateY(0px) rotate(360deg);
        opacity: 0.7;
    }
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo .icon {
    width: 3rem;
    height: 3rem;
    color: #fff;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.025em;
}

.subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 产品选择器 */
.product-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.product-card {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
    contain: paint;
    text-decoration: none;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.product-card:hover::before {
    left: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    background: rgba(255, 255, 255, 0.28);
}

.product-card.active {
    background: rgba(255, 255, 255, 0.24);
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.product-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: rgba(255,255,255,0.6);
}

.product-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-icon .text-icon {
    font-weight: 700;
    font-size: 1.5rem;
    color: #374151;
}

.product-card[data-product="aibao"] .product-icon { }

.product-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.product-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-badge.new {
    background: var(--secondary-color);
}

/* 下载区域 */
.download-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1.5rem;
    padding: 2.5rem;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.download-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.download-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.download-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.download-card {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.download-card:hover::before {
    transform: scaleX(1);
}

.download-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.ios-card::before {
    background: var(--gradient-primary);
}

.android-card::before {
    background: var(--gradient-success);
}

.windows-card::before {
    background: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.platform-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    box-shadow: var(--shadow-md);
}

.ios-card .platform-icon {
    background: var(--gradient-primary);
}

.android-card .platform-icon {
    background: var(--gradient-success);
}

.windows-card .platform-icon {
    background: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
}

.platform-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.platform-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.card-content {
    margin-bottom: 1.5rem;
}

.version-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.version {
    font-weight: 600;
    color: var(--text-primary);
}

.size {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.requirements {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.requirements i {
    color: var(--success-color);
}

.download-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
    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.2), transparent);
    transition: left 0.5s ease;
}

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

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

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

.windows-btn {
    background: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.download-btn:active {
    transform: translateY(0);
}

/* 功能特色 */
.features-section {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.features-section h3 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.feature-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
    contain: paint;
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-item .icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 1rem;
    color: transparent;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
}

.feature-item h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    margin: 5% auto;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideInUp 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h2 .icon { color: var(--primary-color); width: 1.25em; height: 1.25em; }

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--light-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

.install-steps {
    margin-bottom: 1.5rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.step:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 2rem;
    height: 2rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.warning-box {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.warning-box i {
    color: #f59e0b;
    font-size: 1.25rem;
}

.warning-box p {
    color: #92400e;
    font-size: 0.875rem;
    margin: 0;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.confirm-download-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.confirm-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.confirm-download-btn:active {
    transform: translateY(0);
}

/* 平台选择弹窗样式 */
.platform-modal .modal-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.platform-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.platform-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-primary);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
}

.platform-btn i {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.platform-btn .label {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.platform-btn .label strong {
    font-weight: 600;
}

.platform-btn .label span {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.platform-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.platform-btn.ios { border-color: rgba(99, 102, 241, 0.35); }
.platform-btn.android { border-color: rgba(16, 185, 129, 0.35); }
.platform-btn.windows { border-color: rgba(16, 110, 190, 0.35); }
.platform-btn.web { border-color: rgba(59, 130, 246, 0.35); }
.platform-btn.web i { color: #2563eb; }

@media (max-width: 600px) {
    .platform-options { grid-template-columns: 1fr; }
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.5rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .product-selector {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .download-section {
        padding: 1.5rem;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

/* 移动端降低重绘：禁用卡片光带动画和悬浮位移 */
@media (hover: none) {
    .product-card::before { display: none; }
    .product-card:hover { transform: none; box-shadow: var(--shadow-lg); }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo h1 {
        font-size: 1.75rem;
    }
    
    .download-header h2 {
        font-size: 1.5rem;
    }
    
    .features-section h3 { font-size: 1.5rem; }
    .features-grid { grid-template-columns: 1fr; }
}