/* ============================================
   鲍鱼盒子 - 主题样式
   ============================================ */

/* ---- 设计变量 ---- */
:root {
    --c-main: #6366f1;
    --c-main-deep: #4f46e5;
    --c-purple: #8b5cf6;
    --c-gold: #f59e0b;
    --c-gold-bg: #fef3c7;
    --c-emerald: #059669;
    --c-night: #1e293b;
    --c-slate: #64748b;
    --c-frost: #f1f5f9;
    --c-snow: #ffffff;
    --r-lg: 24px;
    --r-md: 14px;
    --r-sm: 10px;
    --sh-card: 0 8px 40px rgba(0, 0, 0, 0.18);
    --sh-btn: 0 4px 16px rgba(0, 0, 0, 0.12);
    --ff: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

/* ---- 重置 ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--ff);
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
    background: linear-gradient(160deg, var(--c-main) 0%, var(--c-purple) 100%);
    background-attachment: fixed;
    line-height: 1.6;
    color: var(--c-night);
}

/* ---- 面包屑 ---- */
.path {
    position: absolute;
    top: 12px;
    left: 20px;
    z-index: 10;
}

.path__items {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.path__step {
    color: rgba(255, 255, 255, 0.65);
}

.path__step + .path__step::before {
    content: "/";
    margin-right: 6px;
    color: rgba(255, 255, 255, 0.4);
}

.path__step--now {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* ---- 外层容器 ---- */
.shell {
    width: 100%;
    max-width: 460px;
}

.box {
    background: var(--c-snow);
    border-radius: var(--r-lg);
    padding: 42px 36px 32px;
    box-shadow: var(--sh-card);
}

/* ---- 头部 ---- */
.head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 32px;
}

.head__icon {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    object-fit: cover;
}

.head h1 {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--c-night);
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-bottom: 4px;
}

.head__tag {
    font-size: 0.95rem;
    color: var(--c-slate);
    font-weight: 400;
}

/* ---- 卡密类型区 ---- */
.badge {
    background: linear-gradient(135deg, #fef9e7 0%, #fef3c7 100%);
    border: 2px solid var(--c-gold);
    border-radius: var(--r-md);
    padding: 22px 20px;
    margin-bottom: 28px;
    text-align: center;
}

.badge__title {
    color: #b45309;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 12px;
}

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

.badge__item {
    font-size: 1.25rem;
    font-weight: 700;
    color: #b45309;
    background: var(--c-snow);
    padding: 8px 16px;
    border-radius: var(--r-sm);
    letter-spacing: 0.5px;
}

.badge__dot {
    color: #d97706;
    font-size: 1.4rem;
    font-weight: 300;
}

.badge__desc {
    color: #92400e;
    font-size: 0.82rem;
    margin-top: 4px;
}

/* ---- 下载按钮 ---- */
.btns {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 320px;
    padding: 18px 40px;
    border: none;
    border-radius: var(--r-md);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--c-snow);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.25s ease;
    outline: none;
    font-family: var(--ff);
    letter-spacing: 0.3px;
}

.btn:active {
    transform: scale(0.97);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-btn);
}

.btn--android {
    background: var(--c-main);
}

.btn--android:hover {
    background: var(--c-main-deep);
}

.btn--ios {
    background: var(--c-night);
}

.btn--ios:hover {
    background: #0f172a;
}

.btn__icon {
    font-size: 1.5rem;
    line-height: 1;
}

/* ---- 卡密中心入口 ---- */
.entry {
    margin-bottom: 8px;
}

.entry__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: var(--r-md);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--c-snow);
    background: var(--c-emerald);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.25s ease;
    outline: none;
    font-family: var(--ff);
    letter-spacing: 0.3px;
}

.entry__btn:active {
    transform: scale(0.97);
}

.entry__btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-btn);
    background: #047857;
}

.entry__icon {
    font-size: 1.4rem;
    line-height: 1;
}

/* ---- 折叠面板 ---- */
.fold {
    margin-top: 30px;
    text-align: center;
}

.fold__switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--c-frost);
    color: var(--c-slate);
    border: 1px solid #e2e8f0;
    padding: 10px 28px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--ff);
    transition: background 0.3s, color 0.3s;
    outline: none;
}

.fold__switch:hover {
    background: #e2e8f0;
    color: var(--c-night);
}

.fold__caret {
    font-size: 0.7rem;
    transition: transform 0.25s;
}

.fold__inner {
    display: none;
    margin-top: 26px;
    text-align: left;
    padding: 28px 26px;
    background: #fafbfc;
    border-radius: var(--r-sm);
    border: 1px solid #e8ecf1;
}

/* ---- 功能介绍 ---- */
.desc {
    margin-bottom: 32px;
}

.desc h2 {
    font-size: 1.25rem;
    color: var(--c-night);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--c-main);
    display: inline-block;
}

.desc__lead {
    color: var(--c-slate);
    font-size: 0.9rem;
    line-height: 1.9;
    margin-bottom: 20px;
}

.desc h3 {
    font-size: 1rem;
    color: var(--c-main);
    margin-top: 22px;
    margin-bottom: 8px;
    position: relative;
    padding-left: 16px;
}

.desc h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 16px;
    background: var(--c-main);
    border-radius: 3px;
}

.desc p {
    color: var(--c-slate);
    font-size: 0.88rem;
    line-height: 1.85;
}

/* ---- 常见问题 ---- */
.quiz h2 {
    font-size: 1.25rem;
    color: var(--c-night);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--c-emerald);
    display: inline-block;
}

.quiz__unit {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px dashed #e5e7eb;
}

.quiz__unit:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.quiz h3 {
    font-size: 0.98rem;
    color: var(--c-night);
    margin-bottom: 8px;
    font-weight: 600;
}

.quiz p {
    color: var(--c-slate);
    font-size: 0.86rem;
    line-height: 1.85;
}

/* ---- 底部 ---- */
.tail {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #e8ecf1;
    text-align: center;
}

.tail__a {
    color: var(--c-main);
    text-decoration: none;
}

.tail__a:hover {
    text-decoration: underline;
}

.tail__link {
    color: #94a3b8;
    font-size: 0.78rem;
    letter-spacing: 0.3px;
}

.tail__contact {
    color: #94a3b8;
    font-size: 0.72rem;
    margin-top: 6px;
}

/* ---- Toast ---- */
.popup {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-120px);
    background: var(--c-night);
    color: var(--c-snow);
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.popup--on {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ============================================
   响应式
   ============================================ */

@media (max-width: 380px) {
    .box {
        padding: 30px 18px 24px;
    }

    .head h1 {
        font-size: 1.7rem;
    }

    .head__icon {
        width: 58px;
        height: 58px;
    }

    .badge__item {
        font-size: 1rem;
        padding: 6px 12px;
    }

    .btn {
        font-size: 1rem;
        padding: 15px 16px;
    }

    .fold__inner {
        padding: 20px 16px;
    }
}

@media (min-width: 768px) {
    body {
        padding: 40px;
    }

    .box {
        padding: 50px 48px 40px;
    }

    .head h1 {
        font-size: 2.4rem;
    }

    .head__icon {
        width: 84px;
        height: 84px;
    }

    .btn {
        font-size: 1.15rem;
        padding: 20px 48px;
    }

    .desc p,
    .quiz p {
        font-size: 0.92rem;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(160deg, #312e81 0%, #4c1d95 100%);
    }
}
