/* 大蓝圈主题-PC首页 - 社区主页专属样式。
   导航、下拉面板、按钮特效、点赞特效等共享样式见 shared.css（BlueoKit）。 */

/* ================= 1. 未登录欢迎语（后台可换行） ================= */
.bai-homes-page .bai-homes-guest-welcome {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    color: #1F2937;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* 站点最新注册用户/最近签到用户的头像叠放：悬停上浮，点击进主页。
   基础样式放在 shared.css，社区页也会复用。 */

/* ================= 2. 为你推荐 ================= */
.bai-homes-page .tab-container {
    position: relative;
}

/* 标题与菜单一组靠左，「查看全部」同一行靠右；空间不足时菜单横向滚动，不换行。 */
.bai-homes-page .bai-homes-recommend-head {
    gap: 32px;
}

.bai-homes-page .bai-homes-recommend-head > div {
    min-width: 0;
}

.bai-homes-page #baiHomesRecommendTabs {
    flex: 0 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.bai-homes-page #baiHomesRecommendTabs::-webkit-scrollbar {
    display: none;
}

.bai-homes-page .bai-homes-recommend-head .view-all-btn {
    flex: 0 0 auto;
}

.bai-homes-page .tab-slider {
    position: absolute;
    bottom: 0;
    height: 2px;
    background: #0052D9;
    border-radius: 4px 4px 0 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
}

/* 为你推荐：果冻直角 + AI 徽标。内边距给徽标和直角留出位置，
   6px 上下与左侧标题行同高，不额外撑高这一行。 */
.bai-homes-page #baiHomesRecommendSlider {
    display: none;
}

.bai-homes-page #baiHomesRecommendTabs .tab-item {
    position: relative;
    padding: 6px 8px;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.3s ease;
}

.bai-homes-page #baiHomesRecommendTabs .tab-item:hover,
.bai-homes-page #baiHomesRecommendTabs .tab-item.is-active {
    color: var(--ls-primary, #0052D9);
}

.bai-homes-page #baiHomesRecommendTabs .jelly-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2.5px solid var(--ls-primary, #0052D9);
    opacity: 0;
    pointer-events: none;
    transform: scale(0);
    transition: transform 0.5s cubic-bezier(0.34, 1.8, 0.64, 1),
                opacity 0.25s ease;
}

.bai-homes-page #baiHomesRecommendTabs .jelly-corner.tr {
    top: 0;
    right: 0;
    border-bottom: none;
    border-left: none;
    border-top-right-radius: 8px;
    transform-origin: bottom left;
}

.bai-homes-page #baiHomesRecommendTabs .jelly-corner.bl {
    bottom: 0;
    left: 0;
    border-top: none;
    border-right: none;
    border-bottom-left-radius: 8px;
    transform-origin: top right;
}

.bai-homes-page #baiHomesRecommendTabs .tab-item:hover .jelly-corner,
.bai-homes-page #baiHomesRecommendTabs .tab-item.is-active .jelly-corner {
    opacity: 1;
    transform: scale(1);
}

.bai-homes-page #baiHomesRecommendTabs .ai-badge {
    position: absolute;
    top: -1px;
    left: -12px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #eff6ff;
    border: 1.5px solid var(--ls-primary, #0052D9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: 900;
    color: var(--ls-primary, #0052D9);
    line-height: 1;
    opacity: 0;
    transform: scale(0) rotate(-20deg);
    transition: all 0.5s cubic-bezier(0.34, 2, 0.64, 1);
    pointer-events: none;
    z-index: 2;
}

.bai-homes-page #baiHomesRecommendTabs .tab-item.is-active .ai-badge {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    transition-delay: 0.1s;
}

.bai-homes-page #baiHomesRecommendTabs .tab-item:hover:not(.is-active) .ai-badge {
    opacity: 0;
    transform: scale(0) rotate(-20deg);
    transition-delay: 0s;
}

.bai-homes-page .content-card {
    height: 320px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    border: 1px solid #F3F4F6;
}

.bai-homes-page .content-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 82, 217, 0.08);
    border-color: rgba(0, 82, 217, 0.2);
}

/* ================= 3. 左侧逐字翻牌 ================= */
.bai-homes-page .char {
    display: inline-block;
    transform-origin: 50% 50% -20px;
    opacity: 0;
    transform: rotateX(-90deg);
    animation: baiHomesDropIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes baiHomesDropIn {
    0% {
        opacity: 0;
        transform: rotateX(-90deg) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: rotateX(0deg) translateY(0);
    }
}

/* ================= 4. 探索卡片 ================= */
.bai-homes-page .explore-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 82, 217, 0.15);
    z-index: 1;
    background: #fff;
}

.bai-homes-page .card-bg {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.bai-homes-page .card-bg-tools {
    background: linear-gradient(135deg, #0052D9 0%, transparent 100%);
}

.bai-homes-page .card-bg-art {
    background: linear-gradient(135deg, #EC4899 0%, transparent 100%);
}

.bai-homes-page .card-bg-llm {
    background: linear-gradient(135deg, #3B82F6 0%, transparent 100%);
}

.bai-homes-page .card-bg-flow {
    background: linear-gradient(135deg, #10B981 0%, transparent 100%);
}

.bai-homes-page .card-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(0, 82, 217, 0.15) 1px, transparent 1px);
    background-size: 10px 10px;
    opacity: 0.6;
}

.bai-homes-page .explore-card:hover {
    border-color: rgba(0, 82, 217, 0.4);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 82, 217, 0.15);
}

.bai-homes-page .explore-card:hover .card-bg {
    opacity: 0.25;
}

.bai-homes-page .explore-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.bai-homes-page .explore-card:hover::after {
    left: 150%;
}

.bai-homes-page .explore-icon {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bai-homes-page .explore-card.explore-hover:hover .explore-icon {
    transform: scale(1.18) rotate(-10deg);
}

/* 卡片改为「左图标/图片 + 右文案」，两边都纵向居中 */
.bai-homes-page .explore-card-inner {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
    min-width: 0;
}

.bai-homes-page .explore-card .explore-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 14px;
}

.bai-homes-page .explore-card .explore-icon .remix-icon {
    font-size: 48px;
    line-height: 1;
}

.bai-homes-page .explore-card .explore-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.bai-homes-page .explore-card .explore-icon .explore-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.bai-homes-page .explore-card-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.bai-homes-page .explore-badge {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 20;
}

/* 卡片右下角的进入箭头：只保留图标，颜色跟图标方块底色走，悬停整张卡片时向右滑一点 */
.bai-homes-page .explore-card-go {
    position: absolute;
    right: 14px;
    bottom: 12px;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bai-homes-page .explore-card-go .remix-icon {
    font-size: 20px;
    line-height: 1;
}

.bai-homes-page .explore-card:hover .explore-card-go {
    transform: translateX(6px);
}

/* 「去回答」的箭头跟探索卡片同一个悬停位移 */
.bai-homes-page .answer-btn .remix-icon {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bai-homes-page .content-card:hover .answer-btn .remix-icon {
    transform: translateX(6px);
}

/* ================= 5. 右侧背景与气泡 ================= */
.bai-homes-page #baiHomesParticleCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #111827 0%, #030712 100%);
}

.bai-homes-page .bai-homes-stage-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    /* 图片未加载/加载失败时保持与粒子画布一致的深底，白字仍然可读 */
    background: radial-gradient(circle at center, #111827 0%, #030712 100%);
}

/* 图片背景上仍要保证白色欢迎卡和气泡可读 */
.bai-homes-page .bai-homes-stage-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.18) 0%, rgba(3, 7, 18, 0.42) 100%);
    pointer-events: none;
}

/* 舞台底部：左侧热搜跑马灯，右侧在线/签到；两者同一套磨砂胶囊底。 */
.bai-homes-page .bai-homes-stage-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.bai-homes-page .bai-homes-hotbar {
    flex: 0 1 420px;
    min-width: 0;
}

.bai-homes-page .bai-homes-hotbar-icon {
    flex: 0 0 auto;
    margin-right: 8px;
    color: #FB923C;
    font-size: 15px;
}

.bai-homes-page .bai-homes-hotbar-viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
}

.bai-homes-page .bai-homes-hotbar-track {
    display: flex;
    width: max-content;
    animation: baiHomesHotMarquee 30s linear infinite;
}

.bai-homes-page .bai-homes-hotbar:hover .bai-homes-hotbar-track {
    animation-play-state: paused;
}

.bai-homes-page .bai-homes-hotbar-group {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-right: 20px;
}

.bai-homes-page .bai-homes-hot-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bai-homes-page .bai-homes-hot-item:hover {
    color: #FFFFFF;
}

.bai-homes-page .bai-homes-hot-rank {
    color: #60A5FA;
    font-size: 11px;
    font-weight: 700;
}

.bai-homes-page #baiHomesWelcomeCard {
    flex: 0 0 auto;
    margin-left: auto;
}

@keyframes baiHomesHotMarquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.bai-homes-page .bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 14px 8px 8px;
    border-radius: 24px;
    color: white;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    z-index: 20;
}

.bai-homes-page .bubble.show {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.bai-homes-page .bubble-avatar {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.bai-homes-page .bubble-avatar-text {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.22);
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.bai-homes-page .bubble-body {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.bai-homes-page .bubble-name {
    font-weight: 700;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bai-homes-page .bubble-action {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.85);
}

/* ================= 6. 自适应 ================= */

/* 气泡宽度不能超过舞台，窄屏时让动作文案自己省略，而不是顶出画布 */
.bai-homes-page .bubble {
    max-width: calc(100% - 20px);
}

.bai-homes-page .bubble-body {
    flex: 1 1 auto;
    overflow: hidden;
}

.bai-homes-page .bubble-name,
.bai-homes-page .bubble-action {
    flex: 0 1 auto;
    min-width: 0;
}

/* 主标题支持换行：单行仍占 140px，多行向下撑开 */
.bai-homes-page .bai-homes-title-wrap {
    height: auto;
    min-height: 140px;
}

.bai-homes-page .bai-homes-subtitle-wrap {
    height: auto;
    min-height: 60px;
}

.bai-homes-page .title-line {
    display: block;
}

@media (max-width: 1200px) {
    .bai-homes-page .bai-homes-title-wrap {
        height: auto;
        min-height: 140px;
    }

    .bai-homes-page .bai-homes-subtitle-wrap {
        height: auto;
        min-height: 60px;
    }
}

@media (max-width: 1023px) {
    .bai-homes-page .bai-homes-main {
        padding-left: 24px;
        padding-right: 24px;
        padding-top: 24px;
    }

    .bai-homes-page .bai-homes-hero {
        flex-direction: column;
        gap: 28px;
        margin-bottom: 40px;
    }

    .bai-homes-page .bai-homes-hero-copy {
        padding-top: 0;
        padding-right: 0;
    }

    .bai-homes-page #baiHomesStage {
        height: 400px;
    }

    .bai-homes-page .bai-homes-title-wrap {
        height: auto;
        min-height: 128px;
    }

    .bai-homes-page .bai-homes-subtitle-wrap {
        height: auto;
        min-height: 54px;
        margin-bottom: 28px;
    }

    .bai-homes-page .bai-homes-hero-actions {
        margin-bottom: 40px;
    }

    .bai-homes-page .bai-homes-explore-head {
        flex-wrap: wrap;
        row-gap: 12px;
    }

    .bai-homes-page .bai-homes-daily {
        flex-wrap: wrap;
        row-gap: 12px;
    }
}

@media (max-width: 767px) {
    .bai-homes-page .bai-homes-main {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 20px;
        padding-bottom: 48px;
    }

    .bai-homes-page #dynamic-title {
        font-size: 38px;
        line-height: 1.2;
    }

    .bai-homes-page #dynamic-subtitle {
        font-size: 15px;
    }

    .bai-homes-page .bai-homes-title-wrap {
        min-height: 92px;
    }

    .bai-homes-page .bai-homes-subtitle-wrap {
        min-height: 0;
    }

    .bai-homes-page #baiHomesStage {
        height: 340px;
        border-radius: 20px;
    }

    .bai-homes-page .bai-homes-hero-actions {
        flex-wrap: wrap;
        gap: 12px 24px;
        margin-bottom: 32px;
    }

    .bai-homes-page .bai-homes-hero-actions > * {
        margin-left: 0 !important;
    }

    .bai-homes-page .bai-homes-guest {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .bai-homes-page .bai-homes-guest > div > div {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    .bai-homes-page .bai-homes-recommend-head {
        gap: 10px;
    }

    .bai-homes-page .bai-homes-stage-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        bottom: 16px;
        left: 16px;
        right: 16px;
    }

    .bai-homes-page .bai-homes-hotbar {
        flex: 0 0 auto;
        width: 100%;
    }

    .bai-homes-page #baiHomesWelcomeCard {
        align-self: flex-end;
        margin-left: 0;
    }

    .bai-homes-page #baiHomesRecommendTabs .tab-item {
        flex: 0 0 auto;
    }

    .bai-homes-page #baiHomesWelcomeCard {
        max-width: 100%;
    }

    .bai-homes-page #baiHomesWelcomeCard > div:last-child {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .bai-homes-page #dynamic-title {
        font-size: 32px;
    }

    .bai-homes-page #baiHomesStage {
        height: 300px;
    }

    .bai-homes-page .bubble {
        font-size: 12px;
        padding: 7px 12px 7px 7px;
    }

    .bai-homes-page .bubble-avatar {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
    }

    .bai-homes-page .bubble-name {
        max-width: 72px;
    }

    .bai-homes-page .bubble-action {
        max-width: 130px;
    }
}