* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b9d;
    --secondary-color: #ffa8c5;
    --ios-color: #007aff;
    --android-color: #3ddc84;
    --bg-dark: #ffe5f0;
    --bg-darker: #ffd6e8;
    --text-primary: #333333;
    --text-secondary: #666666;
    --card-bg: rgba(255, 255, 255, 0.6);
    --card-border: rgba(255, 182, 193, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #ffe5f0 0%, #ffd6e8 50%, #ffc8e0 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 背景动画 */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(135deg, #ffe5f0 0%, #ffd6e8 30%, #ffc8e0 60%, #ffb8d9 100%);
    overflow: hidden;
}

.background-animation::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 182, 193, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    top: -250px;
    left: -250px;
    animation: float 20s ease-in-out infinite;
}

.background-animation::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 168, 197, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -200px;
    right: -200px;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* 容器 */
.container {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部 */
.header {
    text-align: center;
    padding: 40px 20px 30px;
    animation: fadeInDown 0.8s ease-out;
}

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

.logo-icon {
    font-size: 48px;
    animation: pulse 2s ease-in-out infinite;
}

.app-name {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 10px;
}

/* 主要内容 */
.main-content {
    flex: 1;
    padding-bottom: 40px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 下载区域 */
.download-section {
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

.download-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    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.1), transparent);
    transition: left 0.5s ease;
}

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

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.3);
    border-color: var(--primary-color);
}

.ios-btn:hover {
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.3);
    border-color: var(--ios-color);
}

.android-btn:hover {
    box-shadow: 0 10px 30px rgba(61, 220, 132, 0.3);
    border-color: var(--android-color);
}

.btn-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.btn-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.btn-label {
    font-size: 18px;
    font-weight: 600;
}

.btn-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-arrow {
    font-size: 24px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.download-btn:hover .btn-arrow {
    transform: translateY(5px);
    opacity: 1;
}

/* 教程区域 */
.tutorial-section {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Tab 切换按钮 */
.tutorial-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 6px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.tab-btn .tab-icon,
.tab-btn .tab-text {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.tab-btn.active {
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.tab-btn.active::before {
    opacity: 1;
}

.tab-btn.active .tab-icon,
.tab-btn.active .tab-text {
    color: #ffffff;
}

.tab-btn:not(.active):hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-icon {
    font-size: 20px;
}

.tab-text {
    font-size: 15px;
}

/* 移动端优化 */
@media (max-width: 480px) {
    .tab-text {
        font-size: 14px;
    }
    
    .tab-btn {
        padding: 10px 15px;
    }
    
    .tutorial-content {
        min-height: 350px;
    }
}

/* Tab 内容区域 */
.tutorial-content {
    position: relative;
    min-height: 400px;
}

.tutorial-panel {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tutorial-panel.active {
    display: block;
}

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

.tutorial-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.3s ease;
}

.tutorial-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--card-border);
}

.tutorial-icon {
    font-size: 28px;
}

.tutorial-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
    color: #ffffff;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

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

/* 图片教程容器 */
.tutorial-image-container {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--card-border);
    width: 100%;
    text-align: center;
}

.tutorial-image {
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    max-width: 70%;
    border-radius: 18px;
    transition: transform 0.3s ease;
    object-fit: contain;
    cursor: pointer;
}

.tutorial-image:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

/* 当图片没有 src 时隐藏 */
.tutorial-image[src=""],
.tutorial-image:not([src]) {
    display: none;
}

/* 当容器内没有有效图片时隐藏容器 */
.tutorial-image-container:empty {
    display: none;
}

/* 问题解答 */
.faq-container {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--card-border);
}

.faq-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.faq-item {
    margin-bottom: 18px;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-question {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.faq-answer {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-link {
    color: #ff6b9d;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 107, 157, 0.3);
    transition: all 0.3s ease;
}

.faq-link:hover {
    color: #ff8fab;
    border-bottom-color: rgba(255, 107, 157, 0.6);
}

.faq-link:active {
    color: #ff5a8a;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
    font-size: 12px;
}

/* 动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 响应式设计 */
@media (min-width: 768px) {
    .container {
        max-width: 800px;
        padding: 40px;
    }
    
    .download-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .download-btn {
        flex: 1;
        max-width: 300px;
    }
}

/* 加载动画 */
.download-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.download-btn.loading .btn-arrow {
    animation: bounce 1s ease-in-out infinite;
}

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

/* 网盘选择弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 240, 245, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(255, 107, 157, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
    border: 1px solid rgba(255, 182, 193, 0.3);
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 182, 193, 0.2);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 107, 157, 0.1);
    border-radius: 50%;
    font-size: 24px;
    color: #ff6b9d;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    background: rgba(255, 107, 157, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

.modal-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.cloud-drive-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cloud-drive-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 182, 193, 0.3);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
    font-family: inherit;
}

.cloud-drive-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.25);
    border-color: #ff6b9d;
    background: rgba(255, 255, 255, 0.95);
}

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

.drive-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.drive-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 移动端优化 */
@media (max-width: 480px) {
    .modal-content {
        max-width: 90%;
        border-radius: 20px;
    }
    
    .modal-header {
        padding: 18px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .cloud-drive-btn {
        padding: 16px 18px;
    }
    
    .drive-icon {
        font-size: 28px;
    }
    
    .drive-name {
        font-size: 16px;
    }
}

/* 图片预览弹窗 */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.image-preview-overlay.show {
    opacity: 1;
    visibility: visible;
}

.image-preview-container {
    position: relative;
    max-width: 95%;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.image-preview-overlay.show .image-preview-container {
    transform: scale(1);
}

.image-preview-img {
    max-width: 100%;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    user-select: none;
    -webkit-user-select: none;
}

.image-preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    font-size: 28px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    z-index: 10;
}

.image-preview-close:hover {
    background: rgba(255, 107, 157, 0.8);
    transform: rotate(90deg);
}

/* 移动端优化 */
@media (max-width: 480px) {
    .image-preview-container {
        max-width: 100%;
        max-height: 100vh;
    }
    
    .image-preview-img {
        max-height: 100vh;
        border-radius: 0;
    }
    
    .image-preview-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 24px;
        background: rgba(255, 107, 157, 0.8);
    }
}

/* Safari 图标通用样式（主下载页用） */
.safari-inline-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 4px;
}

.safari-inline-badge img.safari-icon-inline {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    vertical-align: middle;
}

