/* ==========================================================================
   star Launch —— 启动页（index.html）
   仅保留启动页需要的样式：顶部导航、渐变标题、鼠标星点画布、进入提示
   ========================================================================== */

:root {
    --bg: #2d2e2f;
    --bg-nav: rgba(30, 31, 32, 0.9);
    --shadow-nav: rgba(0, 0, 0, 0.4);
    --fg: #ffffff;
    --accent: #4ef8b1;
    --hud-fg: rgba(255, 255, 255, 0.45);
    --nav-h: 60px;
}

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

body {
    margin: 0;
    min-height: 100vh;
    padding-top: var(--nav-h);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-color: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---------------------------- 顶部导航 ---------------------------- */
nav {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--nav-h);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-nav);
    box-shadow: 0 2px 8px var(--shadow-nav);
    z-index: 100;
}

.nav-star {
    margin-right: auto;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--fg);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.nav-star:hover {
    opacity: 0.75;
}

/* ---------------------------- 主标题 ---------------------------- */
#zbt {
    position: relative;
    z-index: 1;
    margin: auto;
    padding: 0 1.5rem;
    text-align: center;
    font-size: clamp(30px, 7vw, 56px);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.5px;

    background-image: linear-gradient(90deg, #4ef8b1, #cd4e4e, #5df0b3);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;

    /* 入场浮起 + 渐变持续流动 */
    animation: titleIn 1s cubic-bezier(0.16, 1, 0.3, 1) both,
        flow 6s linear infinite;
}

@keyframes flow {
    from { background-position: 0% 50%; }
    to   { background-position: 200% 50%; }
}

@keyframes titleIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* 不支持背景裁剪文字的浏览器，退回纯色，避免“标题消失” */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    #zbt {
        color: var(--accent);
        background-image: none;
        animation: titleIn 1s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
}

/* ------------------------- 鼠标星点画布 ------------------------- */
#mouse-trail {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* 不拦截鼠标事件 */
    z-index: 0;
}

/* ---------------------------- 进入提示 ---------------------------- */
.splash-hud {
    position: fixed;
    right: 32px;
    bottom: 26px;
    z-index: 120;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: var(--hud-fg);
    font-family: inherit;
    animation: hudIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

@keyframes hudIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* 底部进度条：把倒计时变成看得见的时间 */
.splash-bar {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 120;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #4ef8b1, #5df0b3);
    box-shadow: 0 0 10px rgba(78, 248, 177, 0.55);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 0.22s linear;
    pointer-events: none;
}

.splash-count {
    font-variant-numeric: tabular-nums; /* 数字等宽，倒计时不抖动 */
    letter-spacing: 0.5px;
}

.splash-skip {
    padding: 6px 14px;
    font: inherit;
    font-size: 13px;
    color: var(--hud-fg);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.splash-skip:hover {
    color: var(--fg);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.06);
}

.splash-skip:disabled {
    opacity: 0.4;
    cursor: default;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ---------------------------- 站务 / 备案信息 ---------------------------- */
/* 首页必须能直接看到备案号，样式沿用导航与 HUD 的低调灰，不抢主标题 */
.splash-beian {
    position: fixed;
    left: 1.5rem;
    bottom: 1.5rem;
    z-index: 118;
    font-size: 12px;
    line-height: 1.75;
    color: var(--hud-fg);
    animation: hudIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both;
}

.splash-beian p {
    margin: 0;
}

.splash-beian a {
    color: var(--hud-fg);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.splash-beian a:hover {
    color: var(--fg);
    border-bottom-color: currentColor;
}

/* ---------------------------- 过渡遮罩 ---------------------------- */
#fade-mask {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background-color: var(--bg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

#fade-mask.active {
    opacity: 1;
    pointer-events: all;
}

/* ---------------------------- 无障碍 ---------------------------- */
@media (prefers-reduced-motion: reduce) {
    #zbt {
        animation: none;
        background-position: 50% 50%;
    }

    .splash-hud {
        animation: none;
    }

    .splash-beian {
        animation: none;
    }

    /* 进度条仍然表示进度，但不再做平滑推进 */
    .splash-bar {
        transition: none;
    }

    #fade-mask {
        transition-duration: 0.01ms;
    }
}

@media (max-width: 480px) {
    .splash-hud {
        right: 16px;
        bottom: 16px;
        gap: 10px;
    }

    /* 小屏上把备案信息抬到倒计时提示上方，避免两栏挤在一起 */
    .splash-beian {
        left: 16px;
        right: 16px;
        bottom: 62px;
        font-size: 11px;
    }
}
