/* ========== 基础样式 ========== */
#home_top {
    font-family: iconfont;
    max-width: var(--mian-max-width, 1400px);
    margin: auto;
    margin-top: .5rem;
    padding: 0 1.5rem;
    width: 100%;
}

.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;
}

/* ========== Banner 区 ========== */
#bannerGroup {
    display: flex;
}

div#banners {
    display: none;
}

.banners-title {
    top: 2rem;
    left: 1.5rem;
    position: absolute;
    display: flex;
    flex-direction: column;
}

.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;
    background: var(--body-bg-color);
    color: var(--bywind-white);
    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;
}

.bannerText {
    font-size: 4rem;
    line-height: 4rem;
    font-weight: bold;
}

/* ========== 分类按钮 ========== */
.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 .8s cubic-bezier(.39, .575, .565, 1);
    transform: scale(1);
    overflow: hidden;
}

a.categoryButton i {
    transform: scale(1.0) rotate(15deg);
}

a.categoryButton:after {
    top: 45px;
    width: 1rem;
    left: 21px;
    height: 2px;
    background: #fff;
    content: "";
    border-radius: 1px;
    position: absolute;
}

.categoryButtonText {
    padding-left: 21px;
}

a.categoryButton i {
    font-size: 4rem;
    opacity: .3;
    position: absolute;
    right: 15px;
    top: 10%;
    transition: 0.3s;
    width: 100px;
    text-align: center;
    filter: blur(2px);
}

.categoryItem:hover i {
    opacity: .8;
    transition: .8s;
    transition-delay: .15s;
    transform: scale(1.03) rotate(0);
    font-size: 4rem;
    filter: blur(0);
}

a.categoryButton.bikan {
    background: linear-gradient(to right, #358bff, #15c6ff);
    background-size: 200%;
}

a.categoryButton.remen {
    background: linear-gradient(to right, #f65, #ffbf37);
    background-size: 200%;
}

a.categoryButton.shiyong {
    background: linear-gradient(to right, #18e7ae, #1eebeb);
    background-size: 200%;
}

a.categoryButton:hover {
    background-position: 100% 0;
}

/* ========== 关于我卡片 ========== */
.topGroup {
    display: flex;
}

.topGroup .todayCard {
    display: none;
}

.todayCard-cover {
    position: absolute;
    min-width: 100%;
    min-height: 100%;
    top: 0;
    left: 0;
    background-size: cover;
    z-index: -1;
    transition: 0.3s;
}

.banner-button-text a {
    color: #fff;
    font-weight: 700;
}

.banner-button-text {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    z-index: 1;
    transition: .3s;
    cursor: pointer;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: 40px;
    width: 118px;
    justify-content: center;
}

.banner-button-text:hover {
    background-color: var(--theme-color);
}

/* ========== 滚动图标 ========== */
.tags-group-icon {
    width: 120px;
    height: 120px;
    border-radius: 30px;
}

.tags-group-all {
    display: flex;
    transform: rotate(-30deg);
    -webkit-transform: rotate(-30deg);
    -moz-transform: rotate(-30deg);
    -ms-transform: rotate(-30deg);
    -o-transform: rotate(-30deg);
}

.tags-group-wrapper {
    margin-top: 5rem;
    display: flex;
    flex-wrap: nowrap;
    animation: rowup 60s linear infinite;
}

.tags-group-icon-pair .tags-group-icon:nth-child(even) {
    margin-top: 1rem;
    transform: translate(-60px);
}

.tags-group-icon-pair {
    margin-left: 1.5rem;
    margin-top: 2rem;
}

.tags-group-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 66px;
    font-weight: 700;
    box-shadow: var(--bywind-shadow-blackdeep);
}

.tags-group-icon img {
    width: 60%;
    height: 60%;
}

@keyframes rowup {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* icon 字体 */
.icon-star-smile-fill::before { content: "\e699"; }
.icon-fire-fill::before { content: "\e630"; }
.icon-book-mark-fill::before { content: "\e606"; }


/* ================================================ */
/* ========== 桌面端 ≥1300px（完整版） ========== */
/* ================================================ */
@media screen and (min-width:1300px) {
    .recent-post-top {
        overflow-x: visible;
    }

    .recent-top-post-group {
        overflow: visible;
        overflow-x: visible;
    }

    /* 左右双栏布局 */
    .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;
    }

    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(--body-bg-color);
        margin-bottom: 0.5rem;
        border: var(--style-border);
        border-radius: 12px;
        overflow: hidden;
        position: relative;
        box-shadow: 0 3px 8px 6px rgba(7, 17, 27, 0.09);
        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);
    }

    div#banners:hover #banner-hover {
        color: #Fff;
        opacity: 1;
        padding-left: 2rem;
        background: #4259efc9;
        backdrop-filter: blur(50px);
        -webkit-backdrop-filter: blur(50px);
        -webkit-backface-visibility: hidden;
        -webkit-transform-style: preserve-3d;
        transition: 0.3s;
        background-size: 200%;
        cursor: pointer;
    }

    #banners #banner-hover i {
        font-size: 80px;
        opacity: 0.4;
    }

    /* 分类按钮横向排列 */
    .recent-post-top .categoryGroup {
        flex-direction: row;
        height: 24%;
    }

    .categoryItem {
        width: calc(100% / 3 - .33rem);
        height: 100%;
        margin-right: .5rem;
    }

    .categoryItem:last-child {
        margin-right: 0;
    }

    .categoryItem:hover {
        width: 50%;
    }

    .categoryGroup .categoryItem:nth-child(3) {
        display: flex;
    }

    a.categoryButton:active {
        transform: scale(0.97);
    }

    .categoryItem:hover i {
        transform: scale(1.03) rotate(0);
    }

    /* about 卡片 */
    .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;
        pointer-events: all;
    }

    .topGroup .todayCard::after {
        position: absolute;
        content: '';
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
    }

    .topGroup .todayCard .todayCard-info {
        position: absolute;
        bottom: 2rem;
        left: 2rem;
        z-index: 2;
        color: var(--bywind-white);
        max-width: 60%;
        transition: 0.3s;
    }

    .topGroup .todayCard .todayCard-info .todayCard-title {
        font-size: 28px;
        font-weight: bold;
        line-height: 36px;
        color: #fff;
    }

    .topGroup .banner-button-group {
        position: absolute;
        right: 2rem;
        bottom: 2rem;
        display: flex;
        transition: 0.3s;
    }

    .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;
    }
}


/* ================================================ */
/* ========== 平板端 768px-1300px ========== */
/* ================================================ */
@media screen and (min-width:768px) and (max-width:1300px) {
    #home_top {
        padding: 0 0.5rem;
        margin-top: 0.3rem;
    }

    .recent-post-top {
        flex-direction: column;
        overflow-x: visible;
    }

    .recent-top-post-group {
        overflow: visible;
        border-radius: 8px;
    }

    /* banner 区完整显示但缩小 */
    #bannerGroup {
        width: 100%;
        display: flex;
        flex-direction: column;
        margin-bottom: 0.5rem;
    }

    div#banners {
        display: flex;
        width: 100%;
        height: 220px;
        background: var(--body-bg-color);
        margin-bottom: 0.5rem;
        border: var(--style-border);
        border-radius: 12px;
        overflow: hidden;
        position: relative;
        box-shadow: 0 3px 8px 6px rgba(7, 17, 27, 0.09);
        flex-direction: column;
    }

    .banners-title {
        top: 1.5rem;
        left: 1.2rem;
    }

    .banners-title-big {
        font-size: 28px;
        margin-bottom: 4px;
    }

    .banners-title-small {
        font-size: 11px;
        margin-top: 4px;
    }

    .bannerText {
        font-size: 2.5rem;
        line-height: 2.5rem;
    }

    #banner-hover:hover {
        opacity: 1;
        padding-left: 1.5rem;
        background: #4259efc9;
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        transition: 0.3s;
        cursor: pointer;
        color: #fff;
    }

    /* 滚动图标缩小 */
    .tags-group-icon {
        width: 80px;
        height: 80px;
        border-radius: 20px;
    }

    .tags-group-icon img {
        width: 55%;
        height: 55%;
    }

    .tags-group-wrapper {
        margin-top: 3rem;
    }

    .tags-group-icon-pair {
        margin-left: 1rem;
        margin-top: 1.2rem;
    }

    .tags-group-icon-pair .tags-group-icon:nth-child(even) {
        margin-top: 0.6rem;
        transform: translate(-40px);
    }

    /* 分类按钮横向 */
    .recent-post-top .categoryGroup {
        flex-direction: row;
        height: auto;
        min-width: auto;
        gap: 0.5rem;
    }

    .categoryItem {
        width: calc(100% / 3 - 0.33rem);
        height: 60px;
        border-radius: 10px;
    }

    .categoryGroup .categoryItem:nth-child(3) {
        display: flex;
    }

    a.categoryButton {
        font-size: 14px;
        line-height: 60px;
        border-radius: 10px;
    }

    a.categoryButton i {
        font-size: 2.5rem;
        right: 10px;
        top: 5%;
        width: 60px;
    }

    a.categoryButton:after {
        top: 32px;
        left: 16px;
    }

    .categoryButtonText {
        padding-left: 16px;
    }

    .categoryItem:hover {
        transform: scale(1.02);
    }

    /* about 卡片上移 */
    .topGroup {
        width: 100%;
        margin-top: 0.5rem;
    }

    .topGroup .todayCard {
        display: flex;
        position: relative;
        width: 100%;
        height: 180px;
        background: var(--bywind-card-bg);
        border-radius: 12px;
        overflow: hidden;
        cursor: pointer;
    }

    .topGroup .todayCard .todayCard-info {
        position: absolute;
        bottom: 1.5rem;
        left: 1.5rem;
        z-index: 2;
        color: var(--bywind-white);
        max-width: 65%;
    }

    .topGroup .todayCard .todayCard-info .todayCard-title {
        font-size: 22px;
        font-weight: bold;
        line-height: 28px;
        color: #fff;
    }

    .topGroup .banner-button-group {
        position: absolute;
        right: 1.5rem;
        bottom: 1.5rem;
        display: flex;
    }

    .banner-button-text {
        height: 36px;
        width: 108px;
        font-size: 13px;
    }
}


/* ================================================ */
/* ========== 手机端 ≤768px ========== */
/* ================================================ */
@media screen and (max-width:768px) {
    #home_top {
        padding: 0;
        margin-top: 0;
    }

    #home_top .recent-top-post-group,
    .recent-top-post-group {
        border-radius: 12px !important;
        background: var(--bywind-background);
        overflow: hidden !important;
        box-shadow: 0 2px 8px rgba(7, 17, 27, 0.06);
    }

    .recent-post-top {
        flex-direction: column;
        overflow-x: visible;
        padding: 0.5rem;
    }

    /* banner 区 - 垂直布局 */
    #bannerGroup {
        width: 100%;
        display: flex;
        flex-direction: column;
        margin-bottom: 0.3rem;
        padding: 0;
    }

    div#banners {
        display: flex;
        width: 100%;
        height: 180px;
        background: var(--body-bg-color);
        margin-bottom: 0.3rem;
        border-radius: 12px;
        overflow: hidden;
        position: relative;
        box-shadow: 0 2px 6px rgba(7, 17, 27, 0.08);
        flex-direction: column;
    }

    .banners-title {
        top: 1rem;
        left: 1rem;
    }

    .banners-title-big {
        font-size: 22px;
        margin-bottom: 2px;
    }

    .banners-title-small {
        font-size: 10px;
        margin-top: 2px;
        margin-bottom: 0;
    }

    .bannerText {
        font-size: 0.85rem;
        line-height: 1.2;
    }

    /* 手机端隐藏遮罩，改为右下角浮动按钮 */
    #banner-hover {
        position: absolute !important;
        bottom: 0.8rem !important;
        right: 0.8rem !important;
        left: auto !important;
        top: auto !important;
        width: auto !important;
        height: auto !important;
        max-width: 120px;
        opacity: 1 !important;
        padding: 0.4rem 0.8rem;
        background: rgba(66, 89, 239, 0.85) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 20px;
        cursor: pointer;
        color: #fff;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 0.75rem;
        white-space: nowrap;
        transition: none !important;
        z-index: 10;
    }

    /* 禁止手机端banners hover触发遮罩 */
    div#banners:hover #banner-hover,
    div#banners #banner-hover:hover {
        position: absolute !important;
        bottom: 0.8rem !important;
        right: 0.8rem !important;
        left: auto !important;
        top: auto !important;
        width: auto !important;
        height: auto !important;
        opacity: 1 !important;
        background: rgba(66, 89, 239, 0.85) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        padding: 0.4rem 0.8rem;
        border-radius: 20px;
        color: #fff;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
    }

    /* 滚动图标 - 手机端缩小 */
    .tags-group-icon {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }

    .tags-group-icon img {
        width: 50%;
        height: 50%;
    }

    .tags-group-wrapper {
        margin-top: 2rem;
        animation: rowup 40s linear infinite;
    }

    .tags-group-icon-pair {
        margin-left: 0.6rem;
        margin-top: 0.6rem;
    }

    .tags-group-icon-pair .tags-group-icon:nth-child(even) {
        margin-top: 0.4rem;
        transform: translate(-30px);
    }

    .tags-group-all {
        transform: rotate(-25deg);
        -webkit-transform: rotate(-25deg);
    }

    /* 分类按钮 - 横向排列 */
    .recent-post-top .categoryGroup {
        flex-direction: row;
        height: auto;
        min-width: auto !important;
        margin-bottom: 0.3rem;
        margin-left: 0 !important;
        max-height: none;
        overflow: visible;
        position: static;
        gap: 0.3rem;
        padding: 0;
        width: 100%;
    }

    .categoryItem {
        flex: 1 1 0;
        min-width: 0;
        height: 48px;
        border-radius: 8px;
        box-shadow: none !important;
    }

    .categoryGroup .categoryItem:nth-child(3) {
        display: flex;
    }

    a.categoryButton {
        font-size: 13px;
        line-height: 48px;
        border-radius: 8px;
    }

    a.categoryButton i {
        display: none;
    }

    a.categoryButton:after {
        top: 28px;
        left: 12px;
    }

    .categoryButtonText {
        padding-left: 12px;
    }

    .categoryItem:hover {
        transform: scale(1.02);
    }

    .categoryItem:hover i {
        display: none;
    }

    /* about 卡片 - 全宽 */
    .topGroup {
        width: 100%;
        margin-top: 0.3rem;
        padding: 0;
    }

    .topGroup .todayCard {
        display: flex;
        position: relative;
        width: 100%;
        height: 140px;
        background: var(--bywind-card-bg);
        border-radius: 8px;
        overflow: hidden;
        cursor: pointer;
    }

    .topGroup .todayCard .todayCard-info {
        position: absolute;
        bottom: 1rem;
        left: 1rem;
        z-index: 2;
        color: var(--bywind-white);
        max-width: 70%;
    }

    .topGroup .todayCard .todayCard-info .todayCard-title {
        font-size: 18px;
        font-weight: bold;
        line-height: 24px;
        color: #fff;
    }

    .topGroup .banner-button-group {
        position: absolute;
        right: 1rem;
        bottom: 1rem;
        display: flex;
    }

    .banner-button-text {
        height: 32px;
        width: 90px;
        font-size: 12px;
        border-radius: 16px;
    }
}


/* ================================================ */
/* ========== 微信二维码样式 ========== */
/* ================================================ */

.wechat-trigger-btn {
    background: rgba(7, 193, 96, 0.75) !important;
    margin-right: 8px;
    gap: 4px;
    cursor: pointer;
}
.wechat-trigger-btn:hover {
    background: rgba(7, 193, 96, 0.95) !important;
}

.wechat-qrcode-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    z-index: 10;
    align-items: center;
    justify-content: center;
}
.wechat-qrcode-overlay.active {
    display: flex;
}

.wechat-qrcode-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px 20px 16px;
    text-align: center;
    position: relative;
    max-width: 280px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: wechatFadeIn 0.3s ease;
}

@keyframes wechatFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.wechat-qrcode-close {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}
.wechat-qrcode-close:hover {
    background: #f0f0f0;
    color: #333;
}

.wechat-qrcode-img {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    border: 1px solid #eee;
    padding: 4px;
    background: #fff;
}

.wechat-qrcode-tip {
    margin-top: 12px;
    font-size: 14px;
    color: #07c160;
    font-weight: 600;
}

.wechat-id-copy {
    margin-top: 6px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
    transition: color 0.2s;
}
.wechat-id-copy:hover {
    color: #333;
}
.wechat-id-copy .copy-hint {
    color: #07c160;
    font-size: 11px;
    margin-left: 4px;
}

.wechat-open-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 28px;
    background: #07c160;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.wechat-open-btn:hover {
    background: #06ad56;
    color: #fff;
    text-decoration: none;
}

/* 移动端长按提示（桌面端隐藏） */
.wechat-qrcode-mobile-tip {
    display: none;
    margin-bottom: 8px;
    font-size: 13px;
    color: #07c160;
    font-weight: 500;
    background: rgba(7, 193, 96, 0.08);
    padding: 6px 12px;
    border-radius: 8px;
}

/* 移动端适配：显示长按提示，隐藏打开微信按钮 */
@media (max-width: 768px) {
    .wechat-qrcode-mobile-tip {
        display: block;
    }
    .wechat-open-btn-wrapper {
        display: none;
    }
}

/* 暗色主题适配 */
body.dark-theme .wechat-qrcode-card {
    background: #2a2a2a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
body.dark-theme .wechat-qrcode-close:hover {
    background: #3a3a3a;
    color: #ddd;
}
body.dark-theme .wechat-id-copy {
    color: #aaa;
}
body.dark-theme .wechat-id-copy:hover {
    color: #ddd;
}
body.dark-theme .wechat-qrcode-img {
    border-color: #444;
    background: #fff;
}
