/* ========== 文档主容器：固定高度 + flex 列布局 ========== */
.docs-main {
    position: relative;
    height: calc(100vh - 64px);      /* 固定高度 = 视口高度 - header */
    display: flex;
    flex-direction: column;
    background-color: transparent !important;
    overflow-y: auto;                /* 内容过多时滚动 */
}

/* ========== 背景壁纸层（全屏覆盖） ========== */
.main-lk {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    z-index: 0;
    pointer-events: none;
}

@media (min-width: 960px) {
    .main-lk { background-image: url('../scp/naizhi.png'); }
}
@media (max-width: 959px) {
    .main-lk { background-image: url('../scp/nai.jpg'); }
}

/* ========== 所有内容层位于背景之上 ========== */
.docs-content,
.docs-footer-nav,
.docs-p {
    position: relative;
    z-index: 1;
}

/* ========== 内容区：flex 实现水平和垂直双居中 ========== */
.docs-content {
    flex: 1;                       /* 占满剩余空间（除去底部 nav 和版权） */
    display: flex;
    flex-direction: column;
    justify-content: center;       /* 垂直居中 */
    align-items: center;           /* 水平居中 */
    width: 100%;
    /* 关键：覆盖 docs.css 中的干扰样式 */
    padding: 0 !important;
    max-width: none !important;
}

/* ========== 下载卡片样式 ========== */
.docs-form {
    width: 90%;
    max-width: 860px;
    margin: 0;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(255, 255, 255, 0.12) inset;
    padding: 2rem 1.8rem;
    text-align: center;
}

.docs-form .form-title h1 {
    font-size: 2rem;
    color: #2b8163;
    margin: 0;
}

/* 移动端卡片适配 */
@media (max-width: 959px) {
    .docs-form {
        width: calc(100% - 32px);
        padding: 1.5rem 1rem;
    }
    .docs-form .form-title h1 {
        font-size: 1.6rem;
    }
}

/* ========== 底部翻页按钮 ========== */
.docs-footer-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    margin-bottom: 32px;
    gap: 24px;
}

.docs-footer-nav .page-btn {
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(255, 255, 255, 0.12) inset;
    color: #1f2937;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.docs-footer-nav .page-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(43, 129, 99, 0.35);
    color: #2b8163;
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(255, 255, 255, 0.15) inset;
}

/* 桌面端：按钮组宽度限制居中 */
@media (min-width: 960px) {
    .docs-footer-nav {
        max-width: 860px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        flex-direction: row;
        justify-content: space-between;
    }
    .docs-footer-nav .prev { text-align: left; margin-right: auto; }
    .docs-footer-nav .next { text-align: right; margin-left: auto; }
}

/* 移动端：按钮垂直排列 */
@media (max-width: 959px) {
    .docs-footer-nav {
        flex-direction: column;
        gap: 16px;
        margin-top: 40px;
        margin-bottom: 28px;
        max-width: 100%;
    }
    .docs-footer-nav .page-btn {
        width: 100%;
        flex-direction: column;
    }
    .docs-footer-nav .prev { align-items: flex-start; text-align: left; }
    .docs-footer-nav .next { align-items: flex-end; text-align: right; }
    .docs-footer-nav .page-btn span:first-child { font-size: 0.875rem; }
}

/* 版权信息 */
.docs-p {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: #2B8163;
    user-select: none;
}

/* 辅助类 */
.original-pagination-hidden { display: none !important; }
.main-form { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 64px); padding: 2rem 1rem; color: #fff; }
.main-form header.form { width: 100%; max-width: 900px; }

/* ========== 下载卡片内部布局（左右两栏） ========== */
.docs-form .form-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

/* 左侧内容区：占剩余宽度 */
.docs-form .form-left {
    flex: 2;
    min-width: 200px;
}

/* 右侧图片区 */
.docs-form .form-right {
    flex: 1;
    text-align: center;
}

.docs-form .form-right img {
    width: 100%;
    max-width: 180px;
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.docs-form .form-right img:hover {
    transform: scale(1.05);
}

/* 标题样式（卡片上面） */
.docs-form .form-title h1 {
    font-size: 2rem;
    color: #2b8163;
    margin: 0 0 0.5rem 0;
    text-align: left;
}

/* 版本号：靠右显示 */
.docs-form .form-version {
    text-align: right;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    color: #6c757d;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
    padding-bottom: 0.5rem;
}

/* 按钮组：水平排列，间隙均匀 */
.docs-form .form-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0 2rem 0;
    justify-content: flex-start;
}

.docs-form .download-btn,
.docs-form .tool-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1f2937;
}

/* 正式版按钮强调 */
.docs-form .download-btn.stable {
    background: rgba(43, 129, 99, 0.7);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

.docs-form .download-btn.beta {
    background: rgba(255, 193, 7, 0.7);
    color: #2c2c2c;
}

.docs-form .download-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(0.1);
}

.docs-form .tool-btn {
    background: rgba(108, 117, 125, 0.6);
    color: white;
}

.docs-form .download-btn:hover,
.docs-form .tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* 协议区域 */
.docs-form .form-agreement {
    margin-top: 1rem;
    font-size: 0.85rem;
    text-align: center;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 40px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #e9ecef;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2b8163;
}

.checkbox-label a {
    color: #2b8163;
    text-decoration: none;
    font-weight: 500;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* 移动端响应式：改为上下排列 */
@media (max-width: 768px) {
    .docs-form .form-container {
        flex-direction: column-reverse; /* 图片在上，内容在下 */
    }

    .docs-form .form-right img {
        max-width: 120px;
        margin-bottom: 1rem;
    }

    .docs-form .form-title h1 {
        text-align: center;
        font-size: 1.8rem;
    }

    .docs-form .form-version {
        text-align: center;
    }

    .docs-form .form-group {
        justify-content: center;
    }

    .docs-form .form-agreement {
        text-align: center;
    }
}