*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #303133;
    background: #f5f7fa;
    text-align: center;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

.page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px 40px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(40px, env(safe-area-inset-bottom));
}

.top {
    margin-top: 36px;
    padding-top: max(0px, env(safe-area-inset-top));
}

.title {
    color: #409EFF;
    font-weight: bold;
    font-size: clamp(26px, 6vw, 32px);
    letter-spacing: 1px;
}

.subtitle {
    color: #909399;
    margin-top: 10px;
    font-size: 14px;
}

.download {
    margin-top: 22px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    min-height: 44px;
    padding: 10px 28px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    border: none;
    background: #409EFF;
    color: #ffffff;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.35);
    transition: background 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.download-btn:active {
    background: #337ecc;
}

@media (hover: hover) {
    .download-btn:hover {
        background: #66b1ff;
        box-shadow: 0 6px 16px rgba(64, 158, 255, 0.4);
    }
}

.baidu-disk-btn {
    font-size: 14px;
    color: #606266;
    cursor: pointer;
    margin: 8px auto 0;
    padding: 6px 12px;
    display: block;
    width: fit-content;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.baidu-disk-btn:hover,
.baidu-disk-btn:active {
    color: #409EFF;
}

.content {
    max-width: 900px;
    margin: 28px auto 0;
    text-align: left;
}

.section-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #ebeef5;
}

.content-title {
    font-size: 18px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 3px solid #409EFF;
}

.content-text {
    margin-top: 8px;
    line-height: 1.75;
    color: #606266;
    font-size: 14px;
}

.content-text-image {
    display: block;
    width: 100%;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #ebeef5;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.top20 {
    margin-top: 20px;
}

.top10 {
    margin-top: 10px;
}

.footer {
    max-width: 900px;
    margin: 32px auto 0;
    padding-top: 20px;
    border-top: 1px solid #dcdfe6;
    text-align: center;
}

.footer a {
    text-decoration: none;
    color: #909399;
    font-size: 13px;
    transition: color 0.2s;
}

.footer a:hover {
    color: #409EFF;
}

.footer-item {
    margin-top: 6px;
}

.beian-logo {
    width: 14px;
    vertical-align: middle;
    margin-bottom: 2px;
}

/* timeline */
.timeline-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 3px solid #409EFF;
}

.timeline {
    position: relative;
    margin: 0;
    padding: 4px 0 0 28px;
    list-style: none;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(180deg, #409EFF 0%, #dcdfe6 35%, #dcdfe6 100%);
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    padding-bottom: 22px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -28px;
    top: 14px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #c0c4cc;
    z-index: 1;
}

.timeline-item--current .timeline-marker {
    background: #409EFF;
    border-color: #409EFF;
    box-shadow: 0 0 0 4px rgba(64, 158, 255, 0.18);
}

.timeline-content {
    background: #fafbfc;
    border: 1px solid #ebeef5;
    border-radius: 10px;
    padding: 14px 16px;
}

.timeline-item--current .timeline-content {
    background: #f5f9ff;
    border-color: #d9ecff;
}

.timeline-version {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
}

.timeline-date {
    font-size: 13px;
    color: #909399;
    margin-left: 8px;
}

.timeline-head {
    margin-bottom: 8px;
}

.current-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #409EFF;
    background: #ecf5ff;
    border-radius: 4px;
    vertical-align: middle;
}

.timeline-changelog {
    margin: 0;
    padding-left: 18px;
    color: #606266;
    font-size: 14px;
    line-height: 1.75;
}

.timeline-changelog li + li {
    margin-top: 2px;
}

.step-label {
    display: inline-block;
    margin-bottom: 8px;
    padding: 2px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #409EFF;
    background: #ecf5ff;
    border-radius: 4px;
}

/* buy */
.buy-section {
    text-align: center;
}

.buy-section .content-text {
    text-align: center;
}

.buy-section .content-text a,
.buy-section .content-text a:visited {
    color: #409EFF;
    text-decoration: none;
}

.buy-section .content-text a:hover {
    text-decoration: underline;
}

.buy-highlight {
    color: #409EFF;
    font-weight: 500;
}

.buy-qr-wrap {
    display: inline-block;
    margin-top: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #ebeef5;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.buy-qr-wrap img {
    display: block;
    width: 200px;
    max-width: 60vw;
    border-radius: 6px;
}

@media (min-width: 600px) {
    .page {
        padding: 0 24px 48px;
    }

    .section-card {
        padding: 28px 32px;
    }

    .timeline {
        padding-left: 32px;
    }

    .timeline-marker {
        left: -32px;
    }
}

/* dialog */
.dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.dialog-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.dialog-box {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 14px;
    padding: 28px 24px 22px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.9) translateY(10px);
    transition: transform 0.25s;
}

.dialog-overlay.is-open .dialog-box {
    transform: scale(1) translateY(0);
}

.dialog-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ecf5ff;
    border-radius: 50%;
    color: #409EFF;
}

.dialog-icon svg {
    width: 28px;
    height: 28px;
}

.dialog-title {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 600;
    color: #303133;
}

.dialog-message {
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.7;
    color: #606266;
}

.dialog-btn {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    color: #fff;
    background: #409EFF;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.dialog-btn:hover {
    background: #66b1ff;
}

.dialog-btn:active {
    background: #337ecc;
}

.dialog-btn:focus,
.dialog-btn:focus-visible {
    outline: none;
    box-shadow: none;
}

body.dialog-open {
    overflow: hidden;
}
