/* ==========================================================================
   主题美化：首页多功能 Banner (高级增强版)
   适配说明：适用于 Zibll 子主题，已深度优化层级与移动端体验
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 字体图标库 (Iconfont)
   -------------------------------------------------------------------------- */
@font-face {
    font-family: 'iconfont';
    src: url('//at.alicdn.com/t/c/font_4660907_obo8au1r4bj.woff2?t=1724284380698') format('woff2'),
         url('//at.alicdn.com/t/c/font_4660907_obo8au1r4bj.woff?t=1724284380698') format('woff'),
         url('//at.alicdn.com/t/c/font_4660907_obo8au1r4bj.ttf?t=1724284380698') format('truetype');
}

/* --------------------------------------------------------------------------
   2. 全局结构与布局基础
   -------------------------------------------------------------------------- */
#home_top {
    max-width: 1400px;
    margin: auto;
    margin-top: 0.5rem;
    padding: 0 1.5rem;
    width: 100%;
}

@media screen and (max-width: 768px) {
    #home_top {
        padding: 0;
        margin-top: 0;
    }
}

.recent-top-post-group {
    border-radius: 12px;
    overflow: hidden;
    overflow-x: auto;
    width: 100%;
    margin-bottom: 0;
}

.recent-post-top {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: scroll;
}
.recent-post-top::-webkit-scrollbar {
    display: none; /* 隐藏滚动条 */
}

/* --------------------------------------------------------------------------
   3. 左侧：Banner 区域 (文字 + 动态图标)
   -------------------------------------------------------------------------- */
#bannerGroup {
    display: flex;
}

div#banners {
    display: none; /* 移动端默认隐藏 */
}

@media screen and (min-width: 1200px) {
    div#bannerGroup {
        width: calc(100% - 600px - 2rem);
        margin-right: 0.5rem;
        height: calc(328px + 0.5rem);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    div#banners {
        display: flex;
        width: 100%;
        height: 76%;
        background: var(--bywind-card-bg);
        margin-bottom: 0.5rem;
        border: var(--style-border);
        border-radius: 12px;
        position: relative;
        box-shadow: var(--bywind-shadow-border);
        flex-direction: column;
        overflow: hidden;
        transition: 0.3s;
        clip-path: inset(0 0 0 0 round 12px);
    }
    div#banners:hover {
        box-shadow: var(--bywind-shadow-main);
    }
}

/* 大标题与副标题 */
.banners-title {
    top: 2rem;
    left: 1.5rem;
    position: absolute;
    display: flex;
    flex-direction: column;
    z-index: 2; /* 确保标题不被遮挡 */
}
.banners-title-big {
    font-size: 36px;
    line-height: 1;
    font-weight: bold;
    margin-bottom: 8px;
}
.banners-title-small {
    font-size: 12px;
    line-height: 1;
    color: var(--bywind-secondtext);
    margin-top: 8px;
    margin-bottom: 0.5rem;
}

/* 悬停“随便逛逛”按钮 */
#banner-hover {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backdrop-filter: blur(15px) !important;
    padding-left: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transition: cubic-bezier(0.71, 0.15, 0.16, 1.15) 0.6s;
    z-index: 5;
}
#banners:hover #banner-hover {
    opacity: 1;
    padding-left: 2rem;
    background: #4259efc9;
    backdrop-filter: blur(15px);
    transition: 0.3s;
    background-size: 200%;
    cursor: pointer;
}
.bannerText {
    color: #fff;
    font-size: 4rem;
    line-height: 4rem;
    font-weight: bold;
    margin-top: 20px;
}

/* --------------------------------------------------------------------------
   4. 动画模块：无限滚动的分类标签阵列
   -------------------------------------------------------------------------- */
.tags-group-all {
    display: flex;
    transform: rotate(-30deg); /* 倾斜角度制造动感 */
}
.tags-group-wrapper {
    margin-top: 5rem;
    display: flex;
    flex-wrap: nowrap;
    animation: rowup 60s linear infinite; /* 无缝滚动动画 */
}
.tags-group-icon-pair {
    margin-left: 1rem;
}
.tags-group-icon-pair .tags-group-icon:nth-child(even) {
    margin-top: 1rem;
    transform: translate(-60px); /* 偶数项错位 */
}
.tags-group-icon {
    width: 120px;
    height: 120px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--bywind-shadow-blackdeep);
}
.tags-group-icon img {
    width: 60%;
}
@keyframes rowup {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   5. 中间：分类按钮组 (网站源码、子比美化等)
   -------------------------------------------------------------------------- */
.recent-post-top .categoryGroup {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 200px;
}
.categoryGroup .categoryItem:nth-child(3) {
    display: none; /* 移动端隐藏第三个 */
}
.categoryItem {
    overflow: hidden;
    transform: scale(1);
    transition: all 0.8s cubic-bezier(0.65, 0.15, 0.37, 1.19);
    height: 48%;
    border-radius: 12px;
}
a.categoryButton {
    height: 100%;
    width: 100%;
    background: rgba(255, 255, 255, 0.67);
    border-radius: 12px;
    display: inline-block;
    text-align: left;
    line-height: 4em;
    font-weight: 800;
    font-size: 16px;
    color: #FFF;
    transition: all 0.8s;
    position: relative;
    overflow: hidden;
}
a.categoryButton:hover {
    background-position: 100% 0;
}
.categoryButtonText {
    padding-left: 21px;
}
a.categoryButton i {
    font-size: 12rem;
    opacity: 0.3;
    position: absolute;
    right: 15px;
    top: 10%;
    transition: 0.3s;
    width: 100px;
    text-align: center;
    filter: blur(2px);
}
.categoryItem:hover i {
    opacity: 0.8;
    transform: scale(1.03) rotate(0);
    font-size: 4rem;
    filter: blur(0);
}
/* 按钮渐变色库 */
a.categoryButton.wniui_one { background: linear-gradient(to right, #358bff, #15c6ff); background-size: 200%; }
a.categoryButton.wniui_two { background: linear-gradient(to right, #f65, #ffbf37); background-size: 200%; }
a.categoryButton.wniui_three { background: linear-gradient(to right, #18e7ae, #1eebeb); background-size: 200%; }

@media screen and (min-width: 1200px) {
    .recent-post-top .categoryGroup { flex-direction: row; height: 24%; }
    .categoryItem { width: calc(100% / 3 - 0.33rem); height: 100%; margin-right: 0.5rem; }
    .categoryItem:last-child { margin-right: 0; }
    .categoryItem:hover { width: 50%; }
    .categoryGroup .categoryItem:nth-child(3) { display: flex; }
}

/* --------------------------------------------------------------------------
   6. 右侧：今日卡片展示位 (清透无遮罩版)
   -------------------------------------------------------------------------- */
.topGroup {
    display: flex;
}
.topGroup .todayCard {
    display: none; /* 移动端隐藏 */
}

@media screen and (min-width: 1200px) {
    .topGroup {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        height: calc(328px + 0.5rem);
        align-content: space-between;
        width: calc(600px + 1.5rem);
        position: relative;
    }
    
    .topGroup .todayCard {
        position: absolute;
        width: calc(600px + 1rem);
        height: 100%;
        z-index: 1;
        top: 0;
        left: 0;
        background: var(--bywind-card-bg);
        border-radius: 12px;
        margin-left: 0.5rem;
        overflow: hidden;
        transition: 0.3s;
        display: flex;
        cursor: pointer;
    }

    /* 🌟 核心修改：将大面积的黑色渐变遮罩彻底隐藏，还背景图一个清透！ */
    .topGroup .todayCard::after {
        display: none; 
    }

    /* 文字容器定位优化 */
    .topGroup .todayCard .todayCard-info {
        position: absolute;
        bottom: 2.5rem !important; 
        left: 2.5rem !important;
        z-index: 2; 
        max-width: 70%;
        transition: 0.3s;
    }

    /* 🌟 核心修改：三层纯文字阴影爆发（近景锐化+中景扩散+远景光晕） */
    .topGroup .todayCard .todayCard-info .todayCard-tips {
        color: #ffffff !important;
        font-weight: 800 !important;
        font-size: 1.4rem !important; 
        margin-bottom: 0.5rem;
        opacity: 0.95;
        /* 只给文字底部加阴影，不污染背景图 */
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 5px 15px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 0, 0, 0.4) !important;
    }
    .topGroup .todayCard .todayCard-info .todayCard-title {
        color: #ffffff !important;
        font-weight: 800 !important;
        font-size: 2.4rem !important; 
        line-height: 1.2;
        /* 只给文字底部加阴影，不污染背景图 */
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 5px 15px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 0, 0, 0.4) !important;
    }

    /* 卡片背景图 */
    .topGroup .todayCard .todayCard-cover {
        position: absolute;
        min-width: 100%;
        min-height: 100%;
        top: 0;
        left: 0;
        background-size: cover;
        z-index: -1;
        transition: 0.3s;
    }
}