/* V50.10 首页双特效星尘背景增强版：保留真球/包裹墙/自动切换，增强可见星尘和柔光背景，不使用视频、不加照片白边/模糊。 */
.home-page,
.home-page * {
    box-sizing: border-box;
}

.home-page {
    --home-card-bg: rgba(255, 255, 255, 0.74);
    --home-card-border: rgba(255, 255, 255, 0.78);
    --home-text: #2d2230;
    --home-muted: rgba(45, 34, 48, 0.62);
    --home-accent: #f1729b;
    --home-accent-2: #b88cff;
    color: var(--home-text);
    min-height: 100%;
    padding: 6px 10px 92px;
}

.home-content {
    width: min(1320px, 100%);
    margin: 0 auto;
}

.home-card {
    position: relative;
    overflow: hidden;
    min-height: min(900px, calc(100dvh - 96px));
    padding: clamp(10px, 1.4vw, 18px);
    border: 1px solid var(--home-card-border);
    border-radius: 30px;
    background: linear-gradient(145deg, rgba(255, 250, 253, 0.84), rgba(249, 244, 255, 0.66));
    box-shadow: none;
    backdrop-filter: none;
}

.home-card::before,
.home-card::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 999px;
    filter: none;
}

.home-card::before,
.home-card::after {
    display: none;
}

.home-effect-toolbar {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.home-effect-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.home-effect-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 19px;
    letter-spacing: 0.02em;
}

.home-effect-kicker {
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: rgba(45, 34, 48, 0.56);
    font-size: 12px;
    line-height: 1;
}

.home-effect-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.home-effect-toggle,
.home-effect-auto {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    color: rgba(45, 34, 48, 0.7);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 9px 13px;
    box-shadow: none;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.home-effect-toggle:hover,
.home-effect-auto:hover {
    transform: translateY(-1px);
}

.home-effect-toggle.is-active,
.home-effect-auto.is-active {
    border-color: rgba(255, 255, 255, 0.96);
    background: linear-gradient(135deg, rgba(241, 114, 155, 0.94), rgba(184, 140, 255, 0.9));
    color: #fff;
    box-shadow: none;
}

.home-effect-hint {
    position: relative;
    z-index: 5;
    display: inline-flex;
    max-width: 100%;
    margin-bottom: 12px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    color: var(--home-muted);
    font-size: 13px;
}

.home-sphere-section {
    position: relative;
    z-index: 2;
    overflow: hidden;
    min-height: clamp(620px, calc(100dvh - 205px), 820px);
    height: clamp(620px, calc(100dvh - 205px), 820px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 26px;
    background:
        radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.86) 0 8%, transparent 30%),
        radial-gradient(circle at 16% 18%, rgba(255, 167, 210, 0.58), transparent 38%),
        radial-gradient(circle at 86% 22%, rgba(173, 142, 255, 0.52), transparent 38%),
        radial-gradient(circle at 52% 92%, rgba(255, 220, 240, 0.62), transparent 44%),
        linear-gradient(155deg, rgba(255, 241, 249, 0.98), rgba(244, 234, 255, 0.94) 54%, rgba(255, 236, 247, 0.96));
    box-shadow: none;
    isolation: isolate;
}

.home-sphere-section::before,
.home-sphere-section::after {
    content: "";
    position: absolute;
    inset: -18%;
    z-index: 0;
    pointer-events: none;
    background-repeat: repeat;
    will-change: transform, opacity;
}

.home-sphere-section::before {
    opacity: 0.78;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.96) 0 1.7px, transparent 2.8px),
        radial-gradient(circle, rgba(255, 151, 205, 0.64) 0 1.6px, transparent 2.8px),
        radial-gradient(circle, rgba(151, 116, 255, 0.54) 0 1.4px, transparent 2.6px);
    background-size: 58px 58px, 92px 92px, 138px 138px;
    background-position: 8px 12px, 34px 46px, 70px 18px;
    animation: homeStarDustFloat 30s linear infinite;
}

.home-sphere-section::after {
    opacity: 0.58;
    background-image:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.94) 0 2.2px, transparent 3.7px),
        radial-gradient(circle at center, rgba(255, 171, 214, 0.42) 0 2.4px, transparent 4.6px),
        radial-gradient(circle at center, rgba(188, 158, 255, 0.34) 0 2.6px, transparent 5px);
    background-size: 112px 112px, 174px 174px, 246px 246px;
    background-position: 38px 82px, 116px 40px, 18px 24px;
    animation: homeStarDustDrift 46s linear infinite;
}

@keyframes homeStarDustFloat {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-48px, -64px, 0); }
}

@keyframes homeStarDustDrift {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(30px, -34px, 0) scale(1.015); }
    100% { transform: translate3d(58px, -70px, 0) scale(1); }
}

.home-sphere-viewport {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    filter: none;
    cursor: grab;
    background:
        radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.46), transparent 24%),
        radial-gradient(circle at 78% 72%, rgba(255, 183, 220, 0.30), transparent 28%),
        radial-gradient(circle at 50% 50%, rgba(180, 147, 255, 0.18), transparent 42%);
    perspective: 640px;
    transform-style: preserve-3d;
}

.home-sphere-viewport.is-dragging {
    cursor: grabbing;
}

.home-sphere-viewport[data-mode="sphere"]::before,
.home-sphere-viewport[data-mode="tunnel"]::before {
    display: none;
}

.home-sphere-viewport[data-mode="tunnel"]::before {
    display: none;
}

.home-sphere-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 20;
    transform: translate(-50%, -50%);
    width: max-content;
    max-width: calc(100% - 44px);
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: rgba(45, 34, 48, 0.62);
    font-size: 14px;
    box-shadow: 0 12px 32px rgba(93, 67, 91, 0.13);
}

.sphere-photo-node {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    transform-origin: center center;
    transition: none;
    contain: layout paint style;
    backface-visibility: hidden;
}

.sphere-photo-node[data-mode="sphere"] {
    border-radius: 20px;
}

.sphere-photo-node[data-mode="tunnel"] {
    border-radius: 18px;
    box-shadow: none;
}

.sphere-photo-node.is-back {
    filter: none;
}

.sphere-photo-node:active {
    filter: none;
}

.sphere-photo-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    filter: none;
    opacity: 1;
    transform: translateZ(0);
}

.sphere-photo-glow {
    display: none;
}

.home-status {
    display: none;
}

.home-photo-preview {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(18, 18, 22, 0.72);
    backdrop-filter: none;
}

.home-photo-preview-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(92vw, 1000px);
    height: min(88vh, 820px);
    padding: 0;
    touch-action: none;
}

.home-photo-preview-frame {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    line-height: 0;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.home-photo-preview-frame img {
    display: block;
    max-width: min(92vw, 1000px);
    max-height: 88vh;
    border-radius: 0;
    object-fit: contain;
    box-shadow: none;
    user-select: none;
    -webkit-user-select: none;
}

.home-photo-preview-close,
.home-photo-preview-nav {
    position: absolute;
    z-index: 22;
    appearance: none;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    color: #3f4350;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.home-photo-preview-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 30;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 22px;
    line-height: 42px;
}

.home-photo-preview-nav {
    top: 50%;
    width: 46px;
    height: 66px;
    border-radius: 999px;
    font-size: 42px;
    line-height: 62px;
    transform: translateY(-50%);
}

.home-photo-preview-prev {
    left: 18px;
}

.home-photo-preview-next {
    right: 18px;
}

.home-sphere-viewport[data-mode="sphere"] .sphere-photo-node {
    border-radius: 20px;
}

.home-sphere-viewport[data-mode="tunnel"] .sphere-photo-node {
    border-radius: 18px;
}

.home-sphere-viewport[data-mode="sphere"]::after,
.home-sphere-viewport[data-mode="tunnel"]::after {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .home-sphere-section::before,
    .home-sphere-section::after {
        animation: none;
    }
}

@media (max-width: 768px) {
    .home-page {
        padding: 8px 10px 92px;
    }

    .home-card {
        min-height: calc(100dvh - 102px);
        padding: 9px;
        border-radius: 24px;
    }

    .home-effect-toolbar {
        align-items: center;
        flex-direction: row;
        justify-content: center;
        gap: 7px;
        margin-bottom: 8px;
    }

    .home-effect-actions {
        width: 100%;
        justify-content: center;
        gap: 7px;
    }

    .home-effect-toggle,
    .home-effect-auto {
        padding: 8px 11px;
        font-size: 12px;
    }

    .home-effect-hint {
        display: none;
    }

    .home-sphere-section {
        min-height: clamp(430px, calc(100dvh - 180px), 560px);
        height: clamp(430px, calc(100dvh - 180px), 560px);
        border-radius: 28px;
    }

    .home-sphere-section::before {
        opacity: 0.70;
        background-size: 54px 54px, 86px 86px, 128px 128px;
    }

    .home-sphere-section::after {
        opacity: 0.50;
    }

    .sphere-photo-node {
        border-width: 0;
        border-radius: 16px;
    }

    .home-photo-preview {
        padding: 10px;
    }

    .home-photo-preview-stage {
        width: min(94vw, 1000px);
        height: min(84vh, 820px);
        padding: 0;
    }

    .home-photo-preview-frame img {
        max-width: 94vw;
        max-height: 82vh;
        border-radius: 0;
    }

    .home-photo-preview-nav {
        top: 50%;
        bottom: auto;
        width: 44px;
        height: 52px;
        font-size: 34px;
        line-height: 48px;
        transform: translateY(-50%);
    }

    .home-photo-preview-prev {
        left: 8px;
    }

    .home-photo-preview-next {
        right: 8px;
    }

    .home-photo-preview-close {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 21px;
        line-height: 38px;
    }
}
