/*
Theme Name:     xiamu-b2子主题
Theme URI:      http://xiamuz.com
Description:    
Author:         xiamuz
Author URI:     http://xiamuz.com/
Template:       b2
Version:        2.0
*/

/* -----------------------------------------------------------------------------
 * 现代化顶部Banner重构
 * -------------------------------------------------------------------------- */
/* 全局背景开关 */
html,
body.b2-global-background {
    min-height: 100%;
}

body.b2-global-background {
    background-color: #0f172a !important;
    background-image:
        radial-gradient(1200px circle at 10% 20%, rgba(59, 130, 246, 0.16), transparent 45%),
        radial-gradient(900px circle at 80% 0%, rgba(16, 185, 129, 0.18), transparent 46%),
        radial-gradient(1100px circle at 50% 70%, rgba(14, 165, 233, 0.14), transparent 50%),
        linear-gradient(135deg, #0b1224 0%, #0d1326 50%, #0f172a 100%) !important;
    background-attachment: fixed !important;
    background-size: cover;
    position: relative;
}

/* 确保内容容器透明，露出背景 */
body.b2-global-background .site,
body.b2-global-background .site-content,
body.b2-global-background #page,
body.b2-global-background .wrapper {
    background: transparent !important;
}

/* 头部保持遮挡性与可读性 */
body.b2-global-background .site-header,
body.b2-global-background .site-header-in {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.72) 60%, rgba(15, 23, 42, 0.55) 100%) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* 顶部收缩动画（社交顶部无二级菜单场景）提速 */
.social-top.social-no-sub .site-header-in {
    transition: transform .16s ease, background-color .22s ease-out !important;
}
.social-top.social-no-sub .site.up .site-header-in {
    transition: transform .16s ease, background-color .22s ease-out !important;
}


body.b2-modern-header-banner .site-header{
    padding-top: 20px;
    background: none !important;
    box-shadow: none !important;
}

body.b2-modern-header-banner .site-header-in {
    background: none !important;
    box-shadow: none !important;
}


/* General card styles for both header types */
body.b2-modern-header-banner .header-banner,
body.b2-modern-header-banner .header .top-style {
    margin: -20px auto;
    width: calc(100% - 40px);
    max-width: 1200px;
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    transition: all 0.3s ease;
    padding: 0 20px; /* Apply padding directly to the card */
    position: relative;
}

/* Remove conflicting padding from inner containers */
body.b2-modern-header-banner .header-banner-content {
    padding: 0;
}

/* Adjust menu item padding for consistency */
body.b2-modern-header-banner .header-banner-left .menu li a,
body.b2-modern-header-banner .top-menu .menu-li a {
    padding: 20px 16px;
}

body.b2-modern-header-banner .header-banner-left {
    background: none !important;
}

body.b2-modern-header-banner .top-search form {
    border-radius: 999px;
    overflow: hidden;
}

body.b2-modern-header-banner .top-search input,
body.b2-modern-header-banner .top-search .top-search-select,
body.b2-modern-header-banner .top-search-button button {
    border-radius: 999px;
}

/* Hide the extra top bar on non-homepage layouts */
/* -----------------------------------------------------------------------------
 * 顶部用户弹层优化
 * -------------------------------------------------------------------------- */

/* 加大圆角 */
body.b2-enhanced-user-menu .top-user-box-drop {
    border-radius: 16px;
}

body.b2-enhanced-user-menu .top-user-info-box {
    border-radius: 12px;
}

body.b2-enhanced-user-menu .top-user-info-box-name img.avatar {
    border-radius: 12px;
}

body.b2-enhanced-user-menu .top-user-box-drop li a {
    border-radius: 8px;
}

body.b2-enhanced-user-menu .top-user-info-box .user-w-gold > div {
    border-radius: 8px;
}

body.b2-enhanced-user-menu .top-user-info-box .user-w-rw {
    border-radius: 8px;
}

/* -----------------------------------------------------------------------------
 * 文章打赏入口美化（外部容器 + 中心按钮）
 * -------------------------------------------------------------------------- */
body.b2-reward-beautify .reward-entry-outer {
    margin-top: 30px;
    margin-bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: center;
}

body.b2-reward-beautify .reward-entry-outer #content-ds {
    position: relative;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
}

body.b2-reward-beautify .content-ds p,
body.b2-reward-beautify .content-ds-count {
    display: none;
}

body.b2-reward-beautify #con {
    width: auto !important;
    height: auto !important;
    margin: 0;
    padding: 0;
    background: none;
}

body.b2-reward-beautify #tube-con,
body.b2-reward-beautify #people {
    display: none !important;
}

body.b2-reward-beautify .content-ds-button {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    width: auto;
    display: flex;
    justify-content: center;
}

body.b2-reward-beautify #TA-con {
    position: static !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 160px;
    padding: 12px 30px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

body.b2-reward-beautify #TA-con:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

body.b2-reward-beautify #TA-con:active {
    transform: translateY(0);
    background: #f3f4f6;
}

body.b2-reward-beautify #text-con {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
}

body.b2-reward-beautify #TA {
    font-size: 15px;
    color: inherit;
    font-weight: 500;
}

body.b2-reward-beautify #text-con i {
    color: #ef4444;
    font-size: 18px;
    margin-top: 1px;
}

body.b2-reward-beautify ul.content-ds-users {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

@keyframes b2FadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.b2-reward-beautify ul.content-ds-users li {
    margin: 0;
    transition: transform 0.2s ease;
    animation: b2FadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

body.b2-reward-beautify ul.content-ds-users li:hover {
    transform: translateY(-4px);
    z-index: 10;
}

body.b2-reward-beautify ul.content-ds-users li img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

body.b2-reward-beautify ul.content-ds-users.has-users {
    display: flex !important;
}

body.b2-reward-beautify ul.content-ds-users.reward-limit {
    position: relative;
    padding-right: 0;
}

body.b2-reward-beautify ul.content-ds-users.reward-limit li:nth-child(n + 6):not(.reward-more) {
    display: none !important;
}

body.b2-reward-beautify ul.content-ds-users .reward-more {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.b2-reward-beautify ul.content-ds-users .reward-more:hover {
    background: #e5e7eb;
    color: #374151;
    transform: translateY(-2px);
}

body.b2-reward-beautify ul.content-ds-users .reward-collapse {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.b2-reward-beautify ul.content-ds-users .reward-collapse:hover {
    background: #e5e7eb;
    color: #374151;
    transform: translateY(-2px);
}

body.b2-reward-beautify ul.content-ds-users .reward-collapse svg {
    display: block;
}

body.b2-reward-beautify .ds-box .modal-content.b2-radius {
    background-image: none !important;
}

.b2-home-card-radius .post-list-item:not(.item-post-style-1),
.b2-home-card-radius .post-list .box.b2-radius {
    border-radius: 18px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.b2-home-card-radius .post-list-item:not(.item-post-style-1):hover,
.b2-home-card-radius .post-list .box.b2-radius:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.home-ads-module {
    padding: 20px;
}

.home-ads-module.placeholder {
    background: #f9fafb;
    border: 1px dashed rgba(15, 23, 42, 0.2);
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

.home-ads-module.custom {
    padding: 0;
}

.ads-text-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.ads-text-grid .ads-grid-item {
    display: flex;
    align-items: center;
    padding: 18px;
    padding-right: 56px;
    border-radius: 12px;
    border: 1px solid rgba(15,23,42,0.08);
    background: #fff;
    box-shadow: 0 10px 25px rgba(15,23,42,0.05);
    transition: transform .2s ease, box-shadow .2s ease;
    text-decoration: none;
    color: inherit;
}

.ads-text-grid .ads-grid-item strong {
    font-size: 16px;
    color: #111827;
}

.ads-text-grid .ads-grid-item span {
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
}

.ads-text-grid .ads-grid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(15,23,42,0.12);
}
.ads-grid-item .ads-grid-main {
    display: flex;
    align-items: center;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.ads-module-field {
    display: block !important;
}

.ads-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.ads-image-item {
    position: relative;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(15,23,42,0.12);
    background: #000;
}

.ads-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ads-image-item span {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.ads-image-item:hover {
    transform: translateY(-3px);
}

.ads-join-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 1px solid rgba(37,99,235,0.4);
    background: rgba(37,99,235,0.9);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    padding: 4px 12px;
    cursor: pointer;
    z-index: 2;
    transition: opacity .15s;
}

.ads-grid-item,
.ads-image-item {
    position: relative;
}

.ads-grid-item:hover .ads-join-btn,
.ads-image-item:hover .ads-join-btn {
    opacity: 0.9;
}

.ads-modal {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ads-modal.show {
    display: flex;
}

.ads-modal-content {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    padding: 24px;
    position: relative;
    box-shadow: 0 30px 60px rgba(15,23,42,0.2);
}

.ads-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
}

.ads-modal h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.ads-modal-tip {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

.ads-modal .ads-field {
    margin-bottom: 12px;
}

.ads-modal label {
    font-size: 13px;
    color: #4b5563;
    display: block;
    margin-bottom: 4px;
}

.ads-modal input {
    width: 100%;
    border: 1px solid rgba(15,23,42,0.15);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
}

.ads-modal .ads-submit {
    width: 100%;
    border: none;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
}

.ads-modal .ads-fields-image {
    display: none;
}

.ads-modal.image-mode .ads-fields-image {
    display: block;
}

.ads-modal.image-mode .ads-fields-text {
    display: none;
}

@media (max-width: 768px) {
    body.b2-reward-beautify .reward-entry-outer {
        margin-top: 14px;
    }

    body.b2-reward-beautify .reward-entry-outer #content-ds,
    body.b2-reward-beautify .content-ds-button {
        width: 100%;
        max-width: 100%;
    }

    body.b2-reward-beautify #TA-con {
        width: 100%;
        min-width: 0;
    }

    body.b2-reward-beautify ul.content-ds-users {
        gap: 6px;
    }

    body.b2-reward-beautify #TA {
        font-size: 11px;
    }

    body.b2-reward-beautify #text-con i {
        font-size: 18px;
    }

    .social-top .logo img {
        height: 25px !important;
    }
}
.ads-grid-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(37,99,235,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #2563eb;
    font-size: 18px;
    overflow: hidden;
}

.ads-grid-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.ads-grid-text {
    display: flex;
    flex-direction: column;
}

.b2child-ads-panel {
    background: #fff;
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(15,23,42,0.05);
}
.b2child-ads-panel .b2child-ads-reset {
    margin-bottom: 16px;
}
.b2child-ads-panel table.widefat {
    margin-top: 10px;
}
.b2child-order-actions form {
    display: inline-block;
    margin-right: 8px;
}
.b2child-order-actions form:last-child {
    margin-right: 0;
}

/* -----------------------------------------------------------------------------
 * 登录弹窗美化（UI 团队实现）
 * -------------------------------------------------------------------------- */
body.b2-login-popup-beautify .login-box-content {
    background-color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2) !important;
    border-radius: 24px !important;
    padding: 40px !important;
}

/* 移除原有的背景图（如果有） */
body.b2-login-popup-beautify .login-box-content {
    background-image: none !important;
}

/* 标题栏 */
body.b2-login-popup-beautify .login-logo {
    margin-bottom: 24px;
}

/* 标签优化 (修复重叠) */
body.b2-login-popup-beautify .login-box-content p {
    margin-bottom: 8px !important;
    font-size: 14px;
    color: #4b5563;
    font-weight: 500;
    line-height: 1.5;
}

/* 输入框 */
body.b2-login-popup-beautify .login-box-content input {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    height: 48px !important;
    padding-left: 16px !important;
    color: #1f2937 !important;
    transition: all 0.3s ease;
    box-shadow: none !important;
    margin-bottom: 0 !important;
}

body.b2-login-popup-beautify .login-box-content input:focus {
    background: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15) !important;
}

/* 密码查看眼睛图标优化 (去除突兀的蓝色背景) */
body.b2-login-popup-beautify .login-box-content .login-form-item span {
    background: transparent !important;
    box-shadow: none !important;
    color: #9ca3af !important;
    top: 50% !important;
    transform: translateY(-50%);
    height: auto !important;
    width: auto !important;
    right: 16px !important;
    padding: 0 !important;
}
body.b2-login-popup-beautify .login-box-content .login-form-item span i {
    font-size: 18px !important;
}

/* 登录按钮 */
body.b2-login-popup-beautify .login-box-content .button {
    height: 48px !important;
    border-radius: 99px !important;
    background: linear-gradient(to right, #3b82f6, #2563eb) !important;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4) !important;
    border: none !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    transition: all 0.2s ease !important;
    margin-top: 16px !important;
}

body.b2-login-popup-beautify .login-box-content .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.5) !important;
}

/* 验证码按钮等 */
body.b2-login-popup-beautify .login-box-content .b2-radius {
    border-radius: 8px !important;
}

/* 底部链接 & 记住我 */
body.b2-login-popup-beautify .login-bottom-text {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
body.b2-login-popup-beautify .login-bottom-text a {
    color: #6b7280;
    transition: color 0.2s;
    font-size: 13px;
}
body.b2-login-popup-beautify .login-bottom-text a:hover {
    color: #3b82f6;
}

/* 社交登录区域 */
body.b2-login-popup-beautify .login-box-content .social-login-title {
    color: #6b7280 !important;
    font-size: 13px !important;
    margin-bottom: 12px !important;
}
