html,
body,
#app {
    min-height: 100%;
    margin: 0;
    background: #0a0a0c;
}

html.app-shell-home-entry,
html.app-shell-home-entry body,
html.app-shell-home-entry #app {
    background:
        radial-gradient(circle at 18% 16%, rgba(102, 126, 234, 0.18), transparent 32%),
        radial-gradient(circle at 86% 10%, rgba(118, 75, 162, 0.16), transparent 30%),
        linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 30%, #0f0f2e 60%, #0a0a1a 100%);
}

.app-shell-loading {
    position: fixed;
    inset: 0;
    z-index: 9001;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    color: #ffffff;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        sans-serif;
    background:
        radial-gradient(circle at 22% 18%, rgba(104, 112, 255, 0.22), transparent 34%),
        radial-gradient(circle at 78% 26%, rgba(34, 211, 238, 0.14), transparent 32%),
        linear-gradient(135deg, #070810 0%, #101426 48%, #080a12 100%);
}

html.app-shell-home-entry .app-shell-loading {
    color: #ffffff;
    background:
        radial-gradient(circle at 18% 16%, rgba(102, 126, 234, 0.18), transparent 32%),
        radial-gradient(circle at 86% 10%, rgba(118, 75, 162, 0.16), transparent 30%),
        linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 30%, #0f0f2e 60%, #0a0a1a 100%);
}

.app-shell-brand {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0;
}

.app-shell-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.68);
}

html.app-shell-home-entry .app-shell-subtitle {
    color: rgba(255, 255, 255, 0.68);
}

.app-shell-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(255, 255, 255, 0.18);
    border-top-color: #70e0ff;
    border-radius: 50%;
    animation: app-shell-spin 0.8s linear infinite;
}

html.app-shell-home-entry .app-shell-spinner {
    border-color: rgba(255, 255, 255, 0.18);
    border-top-color: #70e0ff;
}

#home-activity-boot-gate {
    display: none;
}

html.home-activity-boot-pending #home-activity-boot-gate {
    position: fixed;
    inset: 0;
    z-index: 9002;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    background:
        radial-gradient(circle at 16% 16%, rgba(59, 130, 246, 0.24), transparent 32%),
        radial-gradient(circle at 86% 10%, rgba(168, 85, 247, 0.2), transparent 30%),
        linear-gradient(145deg, #0a0a1a 0%, #171a3d 48%, #0f0f2e 100%);
    color: #f8fafc;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html.home-activity-boot-pending #home-activity-boot-gate span {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 900;
    letter-spacing: 0.04em;
}

html.home-activity-boot-pending #home-activity-boot-gate small {
    color: rgba(226, 232, 240, 0.68);
    font-size: 0.82rem;
}

/*
 * 首页由预渲染 HTML 提供首屏内容，客户端接管时会重新创建节点。
 * 入口动画会让标题和核心操作区再次从透明态出现，放大刷新闪烁。
 * 首页首屏固定展示最终状态，其他页面及后续交互不受影响。
 */
html.app-shell-home-entry .hero-title-enter,
html.app-shell-home-entry .hero-section-enter {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    will-change: auto;
}

html.app-shell-home-entry .hero-bg .orb,
html.app-shell-home-entry .hero-grid {
    animation: none !important;
    will-change: auto;
}

@keyframes app-shell-spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 20px;
}

.loading-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: currentColor;
    border-radius: 50%;
    animation: loading-dots-blink 1.4s infinite both;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loading-dots-blink {
    0% { opacity: 0.2; transform: scale(0.8); }
    20% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0.2; transform: scale(0.8); }
}
