/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* 基础样式与渐变背景 */
body {
    background: linear-gradient(135deg, #f0f8ff 0%, #e8f4f8 100%);
    color: #333;
    line-height: 1.5;
    overflow-x: hidden;
    padding-bottom: 20px;
}

:root {
    --main-color: #fc0a20;
    --main-light: #ff3a4d;
    --main-glow: 0 0 12px rgba(252, 10, 32, 0.6);
    --gray-color: #666;
    --light-gray: #f5f7fa;
    --dark-gray: #eef2f7;
    --border-color: rgba(252, 10, 32, 0.1);
    --border-radius: 12px;
    --card-shadow: 0 4px 20px rgba(252, 10, 32, 0.08);
    --card-glow: 0 0 8px rgba(252, 10, 32, 0.1);
}

/* 动画 */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 容器 */
.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
    position: relative;
}

/* 板块样式 */
.section {
    animation: slideUp 0.4s ease forwards;
    background: var(--dark-gray);
    border-radius: var(--border-radius);
    padding: 28px 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
    opacity: 0;
}

.section:nth-child(1) {
    animation-delay: 0.1s;
}

.section:nth-child(2) {
    animation-delay: 0.2s;
}

.section:nth-child(3) {
    animation-delay: 0.3s;
}

.section:nth-child(4) {
    animation-delay: 0.4s;
}

.section:nth-child(5) {
    animation-delay: 0.5s;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 24px;
    color: var(--main-color);
    position: relative;
    padding-left: 16px;
    display: block;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--main-color), var(--main-light));
    border-radius: 2px;
    box-shadow: var(--main-glow);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: linear-gradient(90deg, var(--main-color), var(--main-light));
    color: #fff;
    box-shadow: var(--main-glow);
}

.btn-primary:hover {
    animation: hover-scale 0.3s ease forwards;
    box-shadow: 0 0 18px rgba(252, 10, 32, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--main-color);
    border: 1px solid var(--main-color);
    margin-top: 12px;
    box-shadow: 0 0 8px rgba(252, 10, 32, 0.1);
    width: 100%;
}

.btn-secondary:hover {
    background: rgba(252, 10, 32, 0.05);
    box-shadow: var(--main-glow);
}

.btn-disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* 顶部公告 */
.notice-bar {
    background: var(--dark-gray);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    overflow: hidden;
    white-space: nowrap;
}

.notice-text {
    display: inline-flex;
    align-items: center;
    color: var(--main-color);
    font-size: 14px;
    animation: marquee 15s linear infinite;
}

.notice-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

/* 头部 */
.header {
    text-align: center;
    padding: 32px 24px;
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 15px;
    box-shadow: var(--main-glow);
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.copy-link {
    color: var(--main-color);
    cursor: pointer;
    text-decoration: underline;
}

.active {
    font-size: 15px;
    text-align: center;
}

.active>a {
    color: var(--main-color);
    text-decoration: none;
}

/* 核心亮点网格 */
.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.feature-item {
    background: var(--light-gray);
    padding: 20px 16px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-color: var(--main-color);
    box-shadow: var(--main-glow);
    transform: translateY(-5px);
}

.feature-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    width: 120%;
    height: 100%;
    object-fit: contain;
}

.feature-text {
    font-size: 14px;
}

/* 下载选项 */
.download-options {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.download-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(50% - 10px);
    min-width: 140px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--light-gray);
    transition: all 0.3s ease;
}

.download-item:hover {
    box-shadow: var(--main-glow);
}

.download-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    background: var(--dark-gray);
    padding: 8px;
    border-radius: 16px;
}

.download-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.download-text {
    margin: 2px 0 10px;
}

/* 安装说明 */
.guide-item {
    margin-bottom: 24px;
    border-bottom: 1px dashed #e0e0e0;
    padding-bottom: 24px;
}

.guide-item:last-child {
    border-bottom: none;
}

.guide-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.guide-content {
    font-size: 14px;
    color: var(--gray-color);
    line-height: 1.8;
}

.guide-content ul {
    margin-left: 20px;
    margin-top: 8px;
}

/* 修复：模态框 - 完全垂直居中且不挡内容 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    /* 垂直居中 */
    justify-content: center;
    /* 水平居中 */
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    width: 100%;
    max-width: 450px;
    max-height: 85vh;
    /* 确保不超出屏幕高度 */
    overflow-y: auto;
    /* 内容过多可滚动 */
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.modal-header {
    font-size: 18px;
    font-weight: bold;
    color: var(--main-color);
    margin-bottom: 12px;
}

.modal-img {
    width: 100%;
    height: auto;
    margin: 16px 0;
    border-radius: 8px;
    border: 1px solid #eee;
}

.modal-close {
    margin-top: 12px;
    padding: 12px;
    background: var(--light-gray);
    border: 1px solid #f8b4b9;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* 修复：复制成功提示 Toast - 真正的页面居中 */
.copy-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* 屏幕中心 */
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    z-index: 10000;
    text-align: center;
    display: none;
    animation: popIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* 响应式适配 */
@media (min-width: 768px) {
    .features {
        grid-template-columns: repeat(4, 1fr);
    }

    .download-item {
        flex: none;
        width: calc(33.33% - 11px);
    }
}

@media (max-width: 480px) {
    .download-item {
        width: 100%;
    }
}