/* ==========================================================================
   全新自适应架构 CSS (Apple 风格)
   规则要求：移动端必须使用 rpx (此处用 rem 映射)，严禁使用 px 进行布局
   ========================================================================== */

   :root {
    /* 
     * 自适应核心换算：
     * 移动端 (设计稿 750rpx): 100vw = 750rpx => 1vw = 7.5rpx => 13.33333vw = 100rpx
     * 所以在移动端，我们设定 1rem = 13.33333vw，此时 1rem 完美等同于 100rpx。
     * 所有布局尺寸只需写 rem (例如 40rpx 写为 0.4rem)。
     */
    --base-font-size: 13.33333vw; 

    /* 颜色变量 */
    --color-bg: #ffffff;
    --color-text: #1d1d1f;
    --color-text-secondary: #86868b;
    --color-primary: #0066cc;
    --color-primary-hover: #0077ed;
    --color-bg-gray: #f5f5f7;
    --color-nav-bg: rgba(255, 255, 255, 0.85);
    --color-nav-border: rgba(0, 0, 0, 0.08);
    
    /* 字体 */
    --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Pad 端及以上屏幕自适应 (限制最大比例，防止无限放大) */
@media (min-width: 768px) {
    :root {
        /* 平板端适度缩小比例 */
        --base-font-size: 6.5vw; 
    }
}

@media (min-width: 1024px) {
    :root {
        /* PC 端固定基准，1rem 相当于 PC 上的 50px 的视觉效果 */
        --base-font-size: 50px; 
    }
}

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

html {
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    font-size: var(--base-font-size);
    background-color: var(--color-bg);
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
    font-size: 0.32rem; /* 基础字号 32rpx */
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease, opacity 0.3s ease;
}

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

/* ==========================================================================
   排版与通用容器
   ========================================================================== */
.container {
    width: 100%;
    max-width: 20rem; /* 最大宽度 2000rpx (PC端相当于 1000px) */
    margin: 0 auto;
    padding: 0 0.4rem; /* 左右边距 40rpx */
}

.text-center { text-align: center; }
.mt-1 { margin-top: 0.4rem; }
.mt-2 { margin-top: 0.8rem; }
.mt-3 { margin-top: 1.2rem; }
.mb-1 { margin-bottom: 0.4rem; }
.mb-2 { margin-bottom: 0.8rem; }
.mb-3 { margin-bottom: 1.2rem; }

/* ==========================================================================
   按钮样式
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.24rem 0.48rem; /* 24rpx 48rpx */
    border-radius: 9.8rem; /* 大圆角 */
    font-size: 0.32rem; /* 32rpx */
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 0.02rem solid transparent; /* 2rpx 边框 */
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: scale(1.02);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: #fff;
}

/* ==========================================================================
   导航栏 (毛玻璃)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 1.2rem; /* 120rpx */
    background-color: var(--color-nav-bg);
    backdrop-filter: saturate(180%) blur(0.4rem); /* 40rpx */
    -webkit-backdrop-filter: saturate(180%) blur(0.4rem);
    border-bottom: 0.02rem solid var(--color-nav-border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.16rem; /* 16rpx */
    font-size: 0.36rem; /* 36rpx */
    font-weight: 600;
    letter-spacing: -0.01rem;
}

.nav-brand img {
    width: 0.9rem; /* 80rpx (原 56rpx 放大约 1.4 倍) */
    height: 0.9rem; /* 80rpx */
    border-radius: 0.16rem; /* 16rpx 增加圆角比例 */
}

.nav-menu {
    display: none;
    gap: 0.64rem; /* 64rpx */
    align-items: center;
}

.nav-link {
    font-size: 0.28rem; /* 28rpx */
    font-weight: 400;
    opacity: 0.8;
}

.nav-link:hover, .nav-link.active {
    opacity: 1;
    color: var(--color-primary);
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 0.48rem; /* 48rpx */
    height: 0.32rem; /* 32rpx */
    cursor: pointer;
}

.nav-toggle span {
    width: 100%;
    height: 0.04rem; /* 4rpx */
    background-color: var(--color-text);
    border-radius: 0.04rem;
    transition: all 0.3s ease;
}

/* 移动端菜单 */
.mobile-nav {
    position: fixed;
    top: 1.2rem;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--color-bg);
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-nav.active {
    height: calc(100vh - 1.2rem);
    padding-top: 0.8rem;
}

.mobile-link {
    font-size: 0.48rem;
    font-weight: 500;
    margin-bottom: 0.64rem;
    opacity: 0;
    transform: translateY(0.4rem);
    transition: all 0.4s ease;
}

.mobile-nav.active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-nav.active .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-nav.active .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* ==========================================================================
   首页排版 (Hero & Features)
   ========================================================================== */
.hero {
    padding-top: 2.4rem;
    padding-bottom: 1.6rem;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('/img/login-background-BtXirYMW.jpg') no-repeat center center;
    background-size: cover;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7); /* 半透明遮罩以保证文字可读性 */
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 1.2rem; /* 120rpx */
    font-weight: 700;
    letter-spacing: -0.02rem;
    margin-bottom: 0.24rem;
    background: linear-gradient(90deg, #1d1d1f, #434345);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 0.48rem; /* 48rpx */
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-bottom: 0.64rem;
    max-width: 12rem;
}

.hero-image-wrap {
    margin-top: 0.8rem;
    width: 100%;
    max-width: 8rem;
    border-radius: 0.48rem;
    overflow: hidden;
    box-shadow: 0 0.8rem 1.6rem rgba(0,0,0,0.1);
}

/* 网格特性展示 */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.64rem; /* 64rpx */
    padding: 1.6rem 0;
}

.feature-card {
    background-color: var(--color-bg-gray);
    border-radius: 0.48rem; /* 48rpx */
    padding: 0.8rem 0.64rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-0.08rem);
}

.feature-card-title {
    font-size: 0.56rem;
    font-weight: 600;
    margin-bottom: 0.32rem;
    white-space: nowrap;
}

.feature-card-desc {
    font-size: 0.32rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* 全宽特色区块 */
.feature-split {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.6rem 0;
    gap: 0.8rem;
}

.feature-split-content {
    text-align: center;
    max-width: 10rem;
}

.feature-split-title {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.32rem;
}

/* ==========================================================================
   表单与申请页面
   ========================================================================== */
.page-header {
    padding: 2.4rem 0 1.2rem;
    text-align: center;
    background-color: var(--color-bg-gray);
}

.page-title {
    font-size: 0.96rem;
    font-weight: 700;
    margin-bottom: 0.32rem;
}

.page-subtitle {
    font-size: 0.4rem;
    color: var(--color-text-secondary);
}

.apply-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding: 1.2rem 0;
}

.apply-info h3 {
    font-size: 0.64rem;
    margin-bottom: 0.32rem;
}

.apply-info p {
    font-size: 0.32rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.4rem;
    line-height: 1.6;
}

.form-box {
    background: #fff;
    padding: 0.8rem;
    border-radius: 0.48rem;
    box-shadow: 0 0.4rem 1.2rem rgba(0,0,0,0.06);
    border: 0.02rem solid #eaeaea;
}

.form-group {
    margin-bottom: 0.48rem;
}

.form-label {
    display: block;
    font-size: 0.28rem;
    font-weight: 600;
    margin-bottom: 0.16rem;
}

.form-control {
    width: 100%;
    padding: 0.32rem;
    font-size: 0.32rem;
    background-color: var(--color-bg-gray);
    border: 0.02rem solid transparent;
    border-radius: 0.24rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: #fff;
}

.form-alert {
    padding: 0.32rem;
    border-radius: 0.24rem;
    margin-bottom: 0.48rem;
    font-size: 0.28rem;
    display: none;
}
.form-alert.success { display: block; background: #e6f4ea; color: #1e8e3e; }
.form-alert.error { display: block; background: #fce8e6; color: #d93025; }

/* ==========================================================================
   文章系统
   ========================================================================== */
.article-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.64rem;
    padding: 1.2rem 0;
}

.article-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 0.32rem;
    padding: 0.64rem;
    border: 0.02rem solid #f0f0f0;
    transition: all 0.3s ease;
}

.article-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0.2rem 0.8rem rgba(0,102,204,0.1);
}

.article-badge {
    font-size: 0.24rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    margin-bottom: 0.24rem;
}

.article-title {
    font-size: 0.48rem;
    font-weight: 600;
    margin-bottom: 0.24rem;
    line-height: 1.4;
}

.article-desc {
    font-size: 0.32rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.48rem;
    flex-grow: 1;
}

.article-meta {
    font-size: 0.28rem;
    color: #a1a1a6;
    display: flex;
    justify-content: space-between;
}

/* 文章详情 */
.article-detail-wrap {
    max-width: 16rem;
    margin: 0 auto;
    padding: 1.2rem 0;
}

.article-header {
    text-align: center;
    border-bottom: 0.02rem solid #eaeaea;
    padding-bottom: 0.8rem;
    margin-bottom: 0.8rem;
}

.article-h1 {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.32rem;
    line-height: 1.3;
}

.article-info {
    font-size: 0.32rem;
    color: var(--color-text-secondary);
}

.article-body {
    font-size: 0.36rem;
    line-height: 1.8;
    color: var(--color-text);
}

.article-body p {
    margin-bottom: 0.48rem;
}

/* ==========================================================================
   底部 Footer
   ========================================================================== */
.footer {
    background-color: var(--color-bg-gray);
    padding: 1.2rem 0 0.64rem;
    margin-top: 1.2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 0.02rem solid #d2d2d7;
}

.footer-col h4 {
    font-size: 0.28rem;
    font-weight: 600;
    margin-bottom: 0.32rem;
    color: var(--color-text);
}

.footer-col a {
    display: block;
    font-size: 0.28rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.24rem;
}

.footer-col a:hover {
    color: var(--color-text);
}

.footer-bottom {
    text-align: center;
    font-size: 0.24rem;
    color: var(--color-text-secondary);
}

/* ==========================================================================
   响应式媒体查询 (针对 Pad 与 PC)
   ========================================================================== */
@media (min-width: 768px) {
    .nav-toggle { display: none; }
    .nav-menu { display: flex; }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .apply-layout {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    .article-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .article-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .feature-split {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
    }

    .feature-split-content {
        text-align: left;
    }

    .feature-split:nth-child(even) {
        flex-direction: row-reverse;
    }
}

/* ==========================================================================
   动画辅助
   ========================================================================== */
.fade-up {
    opacity: 0;
    transform: translateY(0.8rem);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }