/*
Theme Name:     B2子主题
Theme URI:      http: //7b2.com/
Description:    Child theme for the B2 PRO
Author:         子主题模版
Author URI:     http: //7b2.com/
Template:       b2
Version:        0.1.5
*/

/*下面是您自己DIY的css样式代码*/

/* 调整按钮容器位置 */
.gg-button {
    text-align: center;
    margin: 20px auto;
    display: block;
    width: fit-content;
}

/* 重新设计的按钮样式 */
.gg-button .button {
    /* 基础样式 */
    text-align: center;
    display: inline-block;
    padding: 10px 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-indent: -10px;
    line-height: 1.5;
    
    /* 配色方案 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

/* 悬停效果 */
.gg-button .button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

/* 点击效果 */
.gg-button .button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

/* 按钮内文字的过渡效果 */
.gg-button .button span {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

/* 可选：添加点击波纹效果 */
.gg-button .button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.gg-button .button:active::before {
    width: 300px;
    height: 300px;
}

/* =========================================
   Tubelight Navbar Styles (Moved from header.php)
   ========================================= */
:root {
    --header-bg: rgba(255, 255, 255, 0.85);
    --header-border: rgba(0, 0, 0, 0.1);
    --text-primary: rgba(0, 0, 0, 0.8);
    --text-hover: rgba(0, 0, 0, 1);
    --hover-glow: rgba(0, 0, 0, 0.05);
    --active-bg: rgba(0, 0, 0, 0.08);
    --light-gradient: linear-gradient(to bottom, #2a2a2a, #1a1a1a);
    --light-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --glow-1: rgba(0, 0, 0, 0.15);
    --dropdown-bg: rgba(255, 255, 255, 0.95);
    --dropdown-border: rgba(0, 0, 0, 0.1);
    --button-bg: rgba(0, 0, 0, 0.8);
    --button-hover: rgba(0, 0, 0, 1);
}

html.b2dark {
    --header-bg: rgba(0, 0, 0, 0.85);
    --header-border: rgba(255, 255, 255, 0.1);
    --text-primary: rgba(255, 255, 255, 0.8);
    --text-hover: rgba(255, 255, 255, 1);
    --hover-glow: rgba(255, 255, 255, 0.08);
    --active-bg: rgba(255, 255, 255, 0.12);
    --light-gradient: linear-gradient(to bottom, #f5f5f5, #e0e0e0);
    --light-shadow: 0 2px 12px rgba(255, 255, 255, 0.4);
    --glow-1: rgba(255, 255, 255, 0.25);
    --dropdown-bg: rgba(20, 20, 20, 0.95);
    --dropdown-border: rgba(255, 255, 255, 0.15);
    --button-bg: rgba(255, 255, 255, 0.9);
    --button-hover: rgba(255, 255, 255, 1);
}

/* Reset B2 Header Styles */
.site-header {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding-top: 10px;
}

.header-banner {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: auto !important;
    pointer-events: none; 
    width: 100% !important;
    margin: 0 !important;
}

body .site-header, 
#page .site-header {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    pointer-events: none; 
    padding: 0 !important;
    width: 100% !important;
}

.site-header-in {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    pointer-events: none;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* The Pill Container */
.header-banner-content {
    pointer-events: auto;
    background: var(--header-bg) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--header-border) !important;
    border-radius: 9999px !important;
    padding: 0.8rem 2rem !important; 
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    transition: all 0.3s ease;
    height: auto !important;
    flex-shrink: 0 !important;
    width: 100% !important; 
    margin: 0 !important;
    float: none !important;
    max-width: none !important;
}

/* Wrapper Layout */
.header-banner .wrapper,
.site-header .wrapper {
    margin-right: auto !important;
    float: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    right: auto !important;
    position: relative !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    gap: 50px; /* 新增：子元素间距 */
}

@media (max-width: 768px) {
    .header-banner-content {
        width: 95% !important;
        padding: 0.5rem 1rem !important;
    }
}

.header-banner-left, 
.header-banner-right {
    display: flex !important;
    align-items: center !important;
    height: 100%;
}

.header-banner-left {
    gap: 35px;
}

.header-logo, 
.header-logo .logo, 
.logo-link {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    line-height: 1 !important;
}

.ym-menu, .ym-menu ul {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.header-banner-right {
    gap: 15px;
}

.top-search-icon, 
.user-tools-item,
.header-login-button,
.login-button {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
}

/* Menu Items - Optimized Visual Layer without Spacing Change */
.ym-menu ul li a {
    position: relative;
    padding: 0.5rem 1.2rem !important; /* Reverted to original compact padding */
    margin: 0 !important; /* Removed extra margin */
    border-radius: 9999px;
    color: var(--text-primary) !important;
    font-weight: 600;
    transition: all 0.3s ease;
    background: transparent;
    overflow: visible !important;
}

/* Hover & Active states are handled in header.php for dynamic colors, 
   but basic layout is here */

/* Hover Glow Effect - Expanded Visual Layer Only */
.hover-glow {
    position: absolute;
    inset: -12px -18px; /* Further expanded vertical and horizontal glow */
    border-radius: 9999px;
    background: radial-gradient(circle at center, var(--hover-glow) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
    filter: blur(5px); /* Soften edges further */
    transform: scale(1.15); /* Scale up a bit more */
}

.ym-menu ul li a:hover .hover-glow {
    opacity: 1;
}

/* Top Light Effect */
.top-light {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    pointer-events: none;
    z-index: 100;
}

.top-light::before {
    content: '';
    position: absolute;
    top: -6px;
    width: 32px;
    height: 4px;
    background: var(--light-gradient);
    border-radius: 2px 2px 0 0;
    animation: lightOn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    box-shadow: var(--light-shadow);
}

.top-light::after {
    content: '';
    position: absolute;
    top: -16px;
    width: 48px;
    height: 24px;
    background: radial-gradient(ellipse at center, var(--glow-1) 0%, transparent 70%);
    filter: blur(6px);
    animation: subtleGlow 2s ease-in-out infinite;
}

@keyframes lightOn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes subtleGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Dropdowns - Global Styling & Reset (Ultimate Frosted Glass) */
.ym-menu .sub-menu,
.menu .sub-menu,
.sub-menu,
.ym-menu ul.sub-menu,
.b2-menu-3 .sub-menu {
    position: absolute !important; 
    background: rgba(255, 255, 255, 0.65) !important; /* Slightly more transparent for glass feel */
    border: 1px solid rgba(255, 255, 255, 0.5) !important; /* Subtle border */
    border-radius: 16px !important; /* Match main pill radius feel */
    box-shadow: 
        0 10px 40px -5px rgba(0, 0, 0, 0.1), /* Soft Ambient Shadow */
        0 4px 12px -2px rgba(0, 0, 0, 0.05) !important; /* Detailed Shadow */
    backdrop-filter: blur(24px) saturate(160%) !important; /* Enhanced blur */
    -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
    padding: 10px !important;
    
    /* Positioning & Gap */
    top: 100% !important;
    margin-top: 12px !important; /* Reduced from 18px to move box up */
    display: block !important;
    
    /* Animation */
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(8px) scale(0.98) !important; /* Start slightly higher */
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    /* Layout Overrides */
    width: max-content !important;
    min-width: 150px !important;
    left: 50% !important;
    z-index: 9999 !important;
}

/* Ensure Parent is Relative for Positioning */
.ym-menu ul li,
.ym-menu li,
.menu-item {
    position: relative !important;
    overflow: visible !important; 
}

/* Show on Hover */
.ym-menu li:hover > .sub-menu,
.menu li:hover > .sub-menu,
li:hover > .sub-menu,
.ym-menu li:hover > ul.sub-menu,
.menu-item-has-children:hover > .sub-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) scale(1) !important;
}

/* Bridge to prevent closing when crossing gap */
.ym-menu .sub-menu::before,
.menu .sub-menu::before,
.sub-menu::before,
.ym-menu ul.sub-menu::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: -20px !important; /* Adjusted for smaller gap (was -30px) */
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 140% !important; 
    height: 30px !important; /* Adjusted for smaller gap (was 40px) */
    background: transparent !important;
    z-index: 10000 !important; 
    clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%); 
}

/* Ensure List Items are transparent so glass works */
.ym-menu .sub-menu li,
.menu .sub-menu li,
.sub-menu li {
    background: transparent !important;
    border: none !important;
    display: block !important;
    margin: 0 !important;
    padding: 2px 0 !important; /* Spacing between items */
}

/* Sub-menu Links - Typography & Hover */
.ym-menu .sub-menu li a,
.menu .sub-menu li a,
.sub-menu li a {
    color: rgba(0, 0, 0, 0.75) !important; /* Soft Black for readability */
    padding: 10px 18px !important;
    display: block !important;
    border-radius: 10px !important; /* Rounded inner items */
    font-size: 14px !important;
    font-weight: 500 !important;
    text-align: center !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
    text-shadow: 0 1px 0 rgba(255,255,255,0.2) !important;
}

.ym-menu .sub-menu li a:hover,
.sub-menu li a:hover {
    background: rgba(0, 0, 0, 0.04) !important; /* Very subtle hover bg */
    transform: translateY(-1px); /* Micro float */
    color: var(--b2-color-main, #0066ff) !important; /* Fallback to blue if var missing */
    /* Note: PHP dynamic color injection in header.php handles specific color match */
}

/* Dark Mode Support - Deep Frosted */
html.b2dark .ym-menu .sub-menu,
html.b2dark .sub-menu,
html.b2dark .ym-menu ul.sub-menu {
     background: rgba(20, 20, 20, 0.75) !important; /* Dark Glass */
     border: 1px solid rgba(255, 255, 255, 0.08) !important;
     box-shadow: 0 10px 40px -5px rgba(0, 0, 0, 0.4) !important;
}

html.b2dark .ym-menu .sub-menu li a,
html.b2dark .sub-menu li a {
    color: rgba(255, 255, 255, 0.85) !important;
    text-shadow: none !important;
}

html.b2dark .ym-menu .sub-menu li a:hover,
html.b2dark .sub-menu li a:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

/* Logo & Icons */
.logo-link img, .logo img {
    height: 32px !important;
    width: auto !important;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease !important;
}

.logo-link img:hover, .logo img:hover {
    transform: scale(1.1) !important;
    filter: brightness(1.2);
}

.logo-link img:active, .logo img:active {
    transform: scale(0.9) rotate(-5deg) !important;
    filter: contrast(1.2);
    transition-duration: 0.05s !important;
}

/* User & Search Areas */
.top-search-icon, .user-tools-item {
    color: var(--text-primary) !important;
}

.login-button button {
    border-radius: 9999px !important;
}

.ym-menu ul li a span {
    position: relative;
    z-index: 1;
}

/* Fix B2 theme dot/indicator overlapping text */
.ym-menu ul li a::after {
    top: auto !important;
    bottom: -5px !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    transform: none !important;
    position: absolute !important;
}

/* Optimize performance */
.site-header-in {
     will-change: transform;
     transform: translateZ(0);
}

/* Scroll behavior */
.site.up .site-header-in,
.site-header-in.up {
    transform: translateY(-150px) !important;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.site .site-header-in,
.site-header-in {
     transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* Responsive Optimizations */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .header-banner-content {
        width: 92% !important;
        padding: 0.8rem 1.5rem !important;
        margin: 0 auto !important;
    }
    
    .header-banner .wrapper,
    .site-header .wrapper {
         width: 100% !important;
         max-width: none !important;
    }
    
    .ym-menu ul li a {
        padding: 0.5rem 0.8rem !important;
        font-size: 14px !important;
    }

    .header-banner-right {
        gap: 8px !important;
        margin-right: 15px !important;
    }

    .login-button .btn {
        padding: 0 10px !important;
        height: 28px !important;
        line-height: 28px !important;
        font-size: 12px !important;
    }
    
    .login-button .button {
        padding: 0 10px !important;
        height: 28px !important;
        line-height: 28px !important;
        font-size: 12px !important;
    }
    
    .login-button .button svg {
        width: 14px !important;
        height: 14px !important;
        margin-right: 3px !important;
    }
}

@media screen and (max-width: 768px) {
    .header-banner, 
    .site-header, 
    .site-header-in,
    .header-banner-content {
        display: none !important;
    }
}

/* Fix Login Eye Position - Optimized */
.login-form-item {
    position: relative !important;
}

.login-form-item .login-eye {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 5px !important;
    bottom: auto !important;
    height: 30px !important;
    width: 30px !important;
    min-width: unset !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 10 !important;
    cursor: pointer !important;
    outline: none !important;
}

.login-form-item .login-eye:hover,
.login-form-item .login-eye:active,
.login-form-item .login-eye:focus {
    background: transparent !important;
    box-shadow: none !important;
    transform: translateY(-50%) !important;
}

.login-form-item .login-eye i {
    font-size: 16px !important;
    color: #ccc !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.login-form-item .login-eye:hover i {
    color: #999 !important;
}

.login-form-item input {
    padding-right: 35px !important;
}

/* Fix Social Login Buttons Centering */
.login-social-button-bottom > div {
    justify-content: center !important;
    width: 100% !important;
}

.login-social-button-bottom div:first-child {
    text-align: center !important;
    margin-bottom: 10px !important;
}

.login-social-button-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
}

.login-social-button {
    text-align: center !important;
}

/* =========================================
   Menu Dropdown Indicator & Animations
   ========================================= */

/* Add Dropdown Arrow Indicator */
.menu-item-has-children > a {
    padding-right: 28px !important; /* Make space for arrow */
    position: relative;
}

/* Using ::before to avoid conflict with B2 theme's ::after usage */
.menu-item-has-children > a::before {
    content: '';
    position: absolute;
    right: 8px; /* Moved right by 2px (from 10px to 8px) */
    top: 50%;
    width: 4px; /* Smaller size (from 6px) */
    height: 4px; /* Smaller size (from 6px) */
    border-right: 1.5px solid currentColor; /* Thinner line (from 2px) */
    border-bottom: 1.5px solid currentColor; /* Thinner line (from 2px) */
    transform: translateY(-65%) rotate(45deg); /* Down arrow */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
    opacity: 0.5;
    pointer-events: none;
    z-index: 10;
    margin-top: 0;
}

/* Hover State - Rotate Arrow */
.menu-item-has-children:hover > a::before {
    transform: translateY(-25%) rotate(225deg); /* Up arrow (180deg rotation) */
    opacity: 1;
    border-color: inherit;
}

/* Enhanced Submenu Animation (Refining existing transition) */
.ym-menu .sub-menu,
.menu .sub-menu,
.sub-menu {
    transform-origin: top center;
    /* Ensure smooth transition for height/opacity/transform */
    transition: 
        opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.35s;
}

/* Ensure hover state triggers the animation correctly */
.ym-menu li:hover > .sub-menu,
.menu li:hover > .sub-menu,
li:hover > .sub-menu {
    transition-delay: 0s; /* Instant start */
}

/* Mobile Compatibility Adjustment (If menu is visible on mobile) */
@media (max-width: 768px) {
    .menu-item-has-children > a {
        padding-right: 40px !important; /* Larger touch area */
    }
    .menu-item-has-children > a::before {
        right: 15px;
        width: 8px;
        height: 8px;
        border-width: 2px;
    }
}

/* Fix Login Button Text Centering */
.login-button .btn, 
.header-login-button .btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    text-align: center !important;
}

.login-button .btn strong,
.header-login-button .btn strong {
    display: inline-block !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Remove any potential floats or absolute positioning on the text itself */
    float: none !important;
    position: relative !important;
    z-index: 5; /* Ensure text is above background effects */
}
