/*
Theme Name: FX
Theme URI: https://example.com/fx-theme
Author: 百家
Author URI: https://example.com
Description: FX 是一个现代化的响应式 WordPress 主题，专为算命网站设计，具有优雅的页眉、自定义菜单和多语言支持。
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fx
Tags: custom-header, custom-menu, custom-logo, responsive-layout, translation-ready
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 200vh;
    padding-top: 0;
    background-color: #0B0C33;
}

/* 页眉样式 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    background-color: transparent;
}

/* 跟随滚动模式 - 默认 */
header.header-scroll.scrolled {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 固定模式 - 始终显示背景 */
header.header-fixed {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 隐藏模式 - 向下滚动时隐藏 */
header.header-hide.scrolled-down {
    transform: translateY(-100%);
}

header.header-hide.scrolled-up {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    position: relative;
}

/* Logo */
.logo {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    text-decoration: none;
    z-index: 1001;
    display: flex;
    align-items: center;
    height: 25px;
    line-height: 25px;
}

.logo img {
    height: 25px;
    width: auto;
    object-fit: contain;
    max-width: 100%;
}

header.scrolled .logo {
    color: #ffffff;
}

/* 桌面端导航菜单 */
.nav-menu {
    display: flex;
    gap: 40px;
    list-style: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
}

.nav-menu li {
    display: flex;
    align-items: center;
}

.nav-menu li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #D3AF37;
    transition: width 0.3s ease;
}

.nav-menu li a:hover {
    color: #D3AF37;
}

.nav-menu li a:hover::after {
    width: 100%;
}

/* 右侧图标区域 */
.header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1001;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 25px;
    color: #ffffff;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.icon-btn:hover {
    color: #D3AF37;
    text-decoration: none;
}

.icon-btn::after {
    display: none !important;
}

.icon-btn i {
    font-size: 25px;
}

/* 多语言下拉菜单 */
.language-dropdown {
    position: relative;
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.language-dropdown.active .language-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.language-menu-list li {
    margin: 0;
    padding: 0;
}

.language-menu-list li a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.language-menu-list li:first-child a {
    border-radius: 8px 8px 0 0;
}

.language-menu-list li:last-child a {
    border-radius: 0 0 8px 8px;
}

.language-menu-list li a:hover {
    background-color: #f5f5f5;
    color: #D3AF37;
}

.language-menu-list li a::after {
    display: none !important;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 25px;
    color: #ffffff;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
    text-decoration: none;
}

.mobile-menu-btn:hover {
    color: #D3AF37;
    text-decoration: none;
}

.mobile-menu-btn::after {
    display: none !important;
}

.mobile-menu-btn i {
    font-size: 25px;
}

/* 移动端侧边菜单 */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #050619;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    z-index: 1002;
    overflow-y: auto;
    padding-bottom: 90px;
}

.mobile-sidebar.active {
    right: 0;
}

.mobile-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-sidebar-header h3 {
    font-size: 18px;
    color: #ffffff;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #ffffff;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #D3AF37;
}

.mobile-nav-menu {
    list-style: none;
    padding: 20px 0;
}

.mobile-nav-menu li a {
    display: block;
    padding: 15px 20px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav-menu li a:hover {
    color: #D3AF37;
}


/* 侧边栏底部登录按钮 */
.mobile-sidebar-footer {
    position: fixed;
    bottom: 0;
    right: -280px;
    width: 280px;
    padding: 20px;
    background: rgba(5, 6, 25, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: right 0.3s ease;
    z-index: 1003;
}

.mobile-sidebar-footer.active {
    right: 0;
}

.login-btn,
.user-center-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.login-btn:hover,
.user-center-link:hover {
    background: rgba(211, 175, 55, 0.1);
    border-color: #D3AF37;
    color: #D3AF37;
    text-decoration: none;
}

.login-btn i,
.user-center-link i {
    font-size: 20px;
}

.user-center-link::after {
    display: none !important;
}

/* 移动端语言下拉菜单 */
.mobile-language-dropdown {
    position: relative;
    display: none;
}

.mobile-icon-btn {
    background: none;
    border: none;
    font-size: 25px;
    color: #ffffff;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-icon-btn:hover {
    color: #D3AF37;
}

.mobile-icon-btn i {
    font-size: 25px;
}

.mobile-language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1005;
}

.mobile-language-dropdown.active .mobile-language-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-language-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-language-menu-list li {
    margin: 0;
    padding: 0;
}

.mobile-language-menu-list li a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-language-menu-list li:first-child a {
    border-radius: 8px 8px 0 0;
}

.mobile-language-menu-list li:last-child a {
    border-radius: 0 0 8px 8px;
}

.mobile-language-menu-list li a:hover {
    background-color: #f5f5f5;
    color: #D3AF37;
}

.mobile-language-menu-list li a::after {
    display: none !important;
}

/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(0 0 0 / 80%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    backdrop-filter: blur(5px);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 手机端购物车图标 */
.mobile-cart-btn {
    display: none;
}

.mobile-header-right {
    display: none;
}

/* 登录/注册弹窗 */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.auth-modal.active {
    display: flex;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.auth-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
}

.auth-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-close-btn:hover {
    color: #333;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.auth-tab.active {
    color: #D3AF37;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #D3AF37;
}

.auth-form-container {
    display: none;
}

.auth-form-container.active {
    display: block;
}

.auth-form-container h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #D3AF37;
    box-shadow: 0 0 0 3px rgba(211, 175, 55, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.forgot-password,
.terms-link {
    color: #D3AF37;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover,
.terms-link:hover {
    color: #b89530;
    text-decoration: underline;
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: #D3AF37;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.auth-submit-btn:hover:not(:disabled) {
    background: #b89530;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 175, 55, 0.3);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-submit-btn .btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-submit-btn.loading .btn-text {
    display: none;
}

.auth-submit-btn.loading .btn-loading {
    display: flex;
}

/* 加载动画 */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 错误提示 */
.auth-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
}

.auth-error.show {
    display: block;
}

.auth-success {
    background: #efe;
    border: 1px solid #cfc;
    color: #3c3;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
}

.auth-success.show {
    display: block;
}


/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .header-icons {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        text-decoration: none;
    }

    .mobile-cart-btn {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        color: #ffffff;
        cursor: pointer;
        padding: 5px;
        transition: color 0.3s ease;
        text-decoration: none;
    }

    .mobile-cart-btn:hover {
        color: #D3AF37;
        text-decoration: none;
    }

    .mobile-cart-btn::after {
        display: none !important;
    }

    .mobile-cart-btn i {
        font-size: 24px;
    }
    
    .mobile-language-dropdown {
        display: block;
    }

    .header-container {
        padding: 10px 15px;
    }
    
    .logo {
        height: 24px;
        line-height: 24px;
        font-size: 20px;
    }
    
    .logo img {
        height: 24px;
    }

    .mobile-header-right {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .mobile-menu-btn {
        font-size: 24px;
        padding: 5px;
    }
    
    .mobile-menu-btn i {
        font-size: 24px;
    }
    
    .mobile-icon-btn {
        font-size: 24px;
        padding: 5px;
    }
    
    .mobile-icon-btn i {
        font-size: 24px;
    }
    
    .auth-modal-content {
        padding: 30px 20px;
    }
    
    .auth-form-container h2 {
        font-size: 20px;
    }
}

/* 内容区域样式 */
.content {
    padding-top: 100px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 30px;
    padding-right: 30px;
}

.content h1 {
    margin-bottom: 20px;
    color: #ffffff;
}

.content h2 {
    color: #ffffff;
}

.content p {
    line-height: 1.6;
    color: #cccccc;
    margin-bottom: 20px;
}

/* Elementor 兼容性样式 */
.elementor-page-content {
    padding-top: 85px; /* 页眉高度 */
    width: 100%;
}

.elementor-page .content {
    max-width: 100%;
    padding: 0;
}

/* Elementor Canvas 模板（无页眉页脚） */
.elementor-template-canvas {
    padding-top: 0 !important;
}

.elementor-template-canvas header,
.elementor-template-canvas footer {
    display: none !important;
}

/* Elementor 页面隐藏标题 */
.elementor-page-hide-title .entry-header {
    display: none;
}

/* 确保 Elementor 编辑器正常工作 */
.elementor-editor-active header {
    position: relative !important;
}

/* Elementor Library 模板（Header/Footer） */
.elementor-library-template {
    width: 100%;
    margin: 0;
    padding: 0;
}

.post-type-elementor_library .content {
    padding: 0;
    max-width: 100%;
    width: 100%;
}

.post-type-elementor_library .entry-content {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Elementor 编辑器预览 */
.elementor-editor-active .elementor-library-template {
    min-height: 100vh;
}

/* Elementor 全宽内容 */
.elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 1200px;
}

.elementor-section.elementor-section-full_width > .elementor-container {
    width: 100%;
    max-width: 100%;
}

/* 移动端 Elementor 调整 */
@media (max-width: 768px) {
    .elementor-page-content {
        padding-top: 60px;
    }
    
    .content {
        padding-top: 75px;
    }
}

