:root {
    --home-page-background: url("../../models/images/homepage/夜晚星球2.PNG") center center / cover no-repeat;
}

html[data-scene-mode="home"] {
    --viewport-background: var(--home-page-background);
}

.home-page.active {
    display: block;
}

.home-page {
    overflow: hidden;
    background: transparent;
}

.home-sky {
    position: relative;
    width: 100%;
    height: 100%;
    padding:
        calc(14px + var(--safe-top-offset))
        calc(22px + var(--safe-right-offset))
        calc(4px + var(--safe-bottom-offset))
        calc(22px + var(--safe-left-offset));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--home-page-background);
}

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

.home-world-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 8px 0 8px;
}

.home-world {
    width: 100%;
    height: 100%;
    min-height: 520px;
}

.home-scene-actions {
    position: absolute;
    left: 50%;
    bottom: calc(116px + var(--safe-bottom-offset));
    transform: translateX(-50%);
    z-index: 3;
    width: min(79vw, 410px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 16px;
}

.home-scene-action {
    appearance: none;
    border: none;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 0;
    padding: 0;
    display: block;
    cursor: pointer;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.22));
    transition: transform 0.22s ease, filter 0.22s ease;
    transform: translateY(6px);
}

.home-scene-action:hover {
    transform: translateY(4px) scale(1.02);
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.26));
}

.home-scene-action-chat {
    background-image: url("../../models/images/homepage/文字聊天.png");
    transform: translateY(-24px);
}

.home-scene-action-voice {
    background-image: url("../../models/images/homepage/语音聊天.png");
}

.home-scene-action-video {
    background-image: url("../../models/images/homepage/视频聊天.png");
    transform: translateY(-24px);
}

.home-scene-action-chat:hover,
.home-scene-action-video:hover {
    transform: translateY(-26px) scale(1.02);
}

.home-scene-action-icon,
.home-scene-action-text {
    display: none;
}

.home-bottom-nav {
    position: relative;
    z-index: 2;
    width: min(92vw, 540px);
    height: 76px;
    margin: 12px auto 0;
    padding: 8px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(218, 210, 242, 0.68);
    box-shadow:
        0 12px 30px rgba(19, 13, 72, 0.35),
        inset 0 1px 15px rgba(255, 255, 255, 0.36);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
}

.home-nav-item {
    appearance: none;
    border: 0;
    background: transparent;
    color: rgba(74, 61, 112, 0.72);
    padding: 4px 0;
    border-radius: 24px;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-weight: 800;
    transition: color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.home-nav-item.active,
.home-nav-item:hover {
    color: #705092;
    background:
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.6), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(235, 182, 245, 0.32));
    box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.24), 0 0 18px rgba(255, 185, 232, 0.24);
}

.home-nav-item:focus {
    outline: none;
}

.home-nav-icon {
    font-size: 25px;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.45));
}

.home-nav-text {
    font-size: 14px;
    font-weight: 800;
}

@media (max-width: 700px) {
    .home-sky {
        padding:
            calc(10px + var(--safe-top-offset))
            calc(14px + var(--safe-right-offset))
            calc(4px + var(--safe-bottom-offset))
            calc(14px + var(--safe-left-offset));
    }

    .home-world-wrap {
        padding: 2px 0 6px;
    }

    .home-world {
        min-height: 420px;
    }

    .home-scene-actions {
        width: min(81vw, 316px);
        bottom: calc(98px + var(--safe-bottom-offset));
        gap: 12px;
    }

    .home-scene-action {
        filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.2));
    }

    .home-scene-action-chat,
    .home-scene-action-video {
        transform: translateY(-16px);
    }

    .home-scene-action-chat:hover,
    .home-scene-action-video:hover {
        transform: translateY(-18px) scale(1.02);
    }

    .home-bottom-nav {
        width: calc(100vw - 44px);
        max-width: 540px;
        height: 72px;
        padding: 8px;
        margin-top: 10px;
    }

    .home-nav-icon {
        font-size: 22px;
    }

    .home-nav-text {
        font-size: 13px;
    }
}
