/* ============================================
   Base CSS - 全局基础样式
   包含：变量、重置、Header、Footer、通用组件
   ============================================ */

/* ========== 全局变量 ========== */
:root {
    --bg-dark: #120f1e;
    --bg-body: #12121a;
    --bg-panel: #1a1626;
    --bg-card: #1c1829;
    --bg-card-alt: #1e1e2d;
    --bg-inner: #252535;
    --primary: #fd3147;
    --accent: #ff3366;
    --primary-hover: #e02f4e;
    --text-main: #ffffff;
    --text-muted: #d9d9d9;
    --text-gray: #9ca3af;
    --border-line: #333;
    --border-color: #2d2d3f;
    --price-old: #777;
    --font-family: 'Oxanium', 'Inter', -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* ========== 基础重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.6;
    min-height: 100vh;
    padding: 0px;
    margin: 0px !important;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

/* ========== 通用容器 ========== */
.container {
    max-width: 1400px;
    margin: 50px auto;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
}

/* ========== 通用按钮 ========== */
.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 15px 25px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.3s ease;
    float: left;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ========== Header 导航栏 ========== */
header {
    position: absolute;
    width: 100%;
    top: 0;
    height: 130px;
    z-index: 100;
}

#header {
    background-color: transparent;
    height: 130px;
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#header.scrolled {
    background-color: #1b1026;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 130px;
    margin: 0 2%;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    letter-spacing: -1px;
}

.logo img {
    width: 234px;
    height: 60px;
    display: block;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-item {
    position: relative;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-item:hover {
    color: var(--primary);
}

.nav-item .tag {
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    line-height: 1;
}

.nav-item image,
.nav-item img {
    width: 12px;
    height: 12px;
    vertical-align: middle;
}

.nav-right {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 1.2rem;
}

.nav-right a {
    color: var(--text-muted);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.nav-right a:hover {
    color: var(--primary);
}

.nav-right a img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

/* 货币选择器 */
.currency-selector {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.currency-selector:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--primary);
}

.currency-english {
    margin-right: 2px;
}

.currency-text {
    margin: 0 2px;
}

/* 桌面端货币选择器 */
.currency-desktop {
    display: flex;
}

/* 移动端货币选择器 */
.currency-mobile {
    display: none;
}

/* 购物车图标 */
.cart-link {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 移动端汉堡按钮 */
.menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-main);
}

/* 移动端图标 */
.mobile-icons {
    display: none;
    align-items: center;
    gap: 15px;
}

.mobile-icon-link {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-icon-link img {
    width: 24px;
    height: 24px;
}

/* 语言选择器特殊样式 */
.nav-right>a:first-child {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 购物车图标文字间距 */
.nav-right>a:last-child {
    gap: 8px;
}

/* PC 二级菜单 */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-panel);
    padding: 0px 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    border-top: 1px solid var(--border-line);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.mega-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: flex;
    pointer-events: auto;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    flex: 3;
    border-right: 1px solid var(--border-line);
    padding: 20px 40px 20px 40px;
}

.game-column h3 {
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 15px;
    font-weight: 700;
}

.game-column li {
    height: 30px;
    line-height: 30px;
    display: block;
}

.game-column a {
    height: 30px;
    line-height: 30px;
    font-size: 14px;
    color: var(--text-muted);
    display: block;
}

.game-column a:hover {
    color: var(--accent);
}

.all-games-btn {
    grid-column: span 4;
    text-align: right;
}

.all-games-btn a {
    display: inline-block;
    background-color: var(--accent);
    color: #fff;
    padding: 10px 30px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}

.all-games-btn a:hover {
    opacity: 0.9;
}

.hot-games-section {
    flex: 2;
    padding-left: 40px;
    background-color: #231d35;
}

.hot-games-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
    font-weight: 700;
    height: 70px;
    line-height: 70px;
    text-align: center;
}

.hot-games-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.hot-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 180px;
    cursor: pointer;
}

.hot-card img {
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease;
}

.hot-card:hover img {
    transform: scale(1.05);
}

.hot-card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    font-weight: 700;
    font-size: 20px;
    text-align: center;
}

/* 移动端菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-panel);
    padding: 30px 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 200;
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

.menu-close {
    font-size: 24px;
    text-align: right;
    cursor: pointer;
    margin-bottom: 30px;
}

.mobile-nav-item {
    display: block;
    font-size: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: pointer;
}

.mobile-nav-item:hover {
    color: var(--primary);
}

.mobile-submenu {
    display: none;
    padding-left: 15px;
    font-size: 14px;
}

.mobile-submenu li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.mobile-submenu li:hover {
    color: var(--primary);
}

.mobile-nav-item.has-sub::after {
    content: " ▼";
    font-size: 12px;
    float: right;
}

/* 遮罩层 */
.mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    display: none;
}

.mask.active {
    display: block;
}

/* ========== Footer 页脚 ========== */
footer {
    background: #1b1026;
    padding: 60px 0 0;
    margin-top: 80px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h5 {
    color: var(--text-main);
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

/* 社交媒体链接 */
.social-links li a img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Contact 区域 */
.footer-contact {
    margin-bottom: 50px;
}

.footer-contact h5 {
    color: var(--text-main);
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-info a {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s ease;
}

.contact-info a:hover {
    color: var(--primary);
}

.contact-info a img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* 底部版权和支付 */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 0;
}

.footer-bottom .footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: var(--text-gray);
    font-size: 0.85rem;
    line-height: 1.6;
}

.payment-methods {
    display: flex;
    gap: 8px;
    align-items: center;
}

.payment-methods img {
    height: 28px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}

/* ========== 购物车样式 ========== */

/* 购物车图标 */
.header-cart-wrap {
    position: fixed;
    top: 150px;
    right: 30px;
    z-index: 997;
}

.cart-icon {
    cursor: pointer;
    position: relative;
    color: var(--text-main);
    background: var(--bg-panel);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cart-icon:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.cart-icon:hover .cart-count {
    background: #fff;
    color: var(--primary);
}

/* 购物车遮罩层 */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 购物车面板 */
.cart-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 400px;
    height: 100%;
    background: var(--bg-panel);
    z-index: 2001;
    padding: 25px;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
}

.cart-panel.active {
    right: 0;
}

/* 购物车头部 */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

/* 关闭按钮 */
.close-cart {
    cursor: pointer;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 5px;
    transition: color 0.2s;
}

.close-cart:hover {
    color: var(--primary);
}

/* 购物车商品列表 */
.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

/* 滚动条样式 */
.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* 空购物车提示 */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
}

.cart-empty svg {
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 15px;
}

.cart-empty p {
    font-size: 1rem;
    margin: 0;
}

/* 购物车商品项 */
.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 8px;
}

.cart-item img {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    background: #000;
}

/* 商品详情 */
.item-details {
    flex: 1;
}

.item-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
    color: var(--text-main);
}

.item-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* 商品价格 */
.item-price {
    color: var(--primary);
    font-weight: bold;
    font-size: 0.9rem;
    position: absolute;
    top: 15px;
    right: 15px;
}

/* 删除按钮 */
.remove-item {
    position: absolute;
    bottom: 15px;
    right: 15px;
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    transition: color 0.2s;
}

.remove-item:hover {
    color: #ff4444;
}

/* 购物车底部 */
.cart-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

/* 全局购物车 - 小计行 */
.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.cart-total-price {
    color: #ff4757;
    font-size: 1.3rem;
    font-weight: 700;
}

/* g3.html 购物车 - 总价行 */
.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--text-main);
}

.total-price {
    color: #ff4757;
    font-size: 1.3rem;
    font-weight: 700;
}

/* 全局购物车 - 结算按钮 */
.cart-checkout-btn {
    width: 100%;
    background: #ff4757;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-family: var(--font-family);
}

.cart-checkout-btn:hover {
    background: #ff6677;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

/* g3.html 购物车 - 结算按钮 */
.checkout-btn {
    width: 100%;
    padding: 14px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-family);
}

.checkout-btn:hover {
    background: #ff6677;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

/* 全局购物车 - 查看购物车链接 */
.cart-view-cart-btn {
    display: block;
    text-align: center;
    color: var(--text-muted);
    text-decoration: underline;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
    padding: 8px 0;
}

.cart-view-cart-btn:hover {
    color: var(--text-main);
}

/* 继续购物 */
.continue-shopping {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s;
}

.continue-shopping:hover {
    color: #ff4757;
}

/* 全局购物车 - 继续购物按钮 */
.cart-continue-btn {
    display: inline-block;
    color: #ff4757;
    text-decoration: underline;
    font-weight: 600;
    font-size: 1rem;
    transition: opacity 0.2s;
    margin-top: 10px;
}

.cart-continue-btn:hover {
    opacity: 0.8;
    color: #ff6677;
}

/* 空购物车文本 */
.cart-empty-text {
    font-size: 1.1rem;
    margin: 0 0 15px 0;
    color: var(--text-muted);
}

/* 空购物车 SVG */
.cart-empty svg {
    margin-bottom: 20px;
    opacity: 0.3;
    color: var(--text-muted);
}

/* 购物车遮罩层 */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.cart-panel.active ~ .cart-overlay,
.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========== 货币和语言选择弹窗 ========== */
.currency-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.currency-modal-overlay.active {
    display: flex;
}

.currency-modal {
    background: #1a1626;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.currency-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.currency-modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.currency-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.currency-modal-close:hover {
    color: var(--primary);
}

.currency-modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.currency-modal-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.currency-modal-row label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    min-width: 120px;
}

.custom-select {
    flex: 1;
    position: relative;
}

.custom-select select {
    width: 100%;
    background: #252535;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 12px 40px 12px 15px;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    appearance: none;
    transition: border-color 0.2s;
}

.custom-select select:focus {
    border-color: var(--primary);
}

.custom-select::after {
    content: '▼';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 12px;
    pointer-events: none;
}

.currency-modal-footer {
    display: flex;
    gap: 15px;
}

.btn-cancel,
.btn-save {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background: #354052;
    color: var(--text-main);
}

.btn-cancel:hover {
    background: #404d61;
}

.btn-save {
    background: var(--primary);
    color: #fff;
}

.btn-save:hover {
    background: var(--primary-hover);
}

/* ========== 返回顶部按钮 ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.4);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(255, 59, 92, 0.5);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ========== 页面导航栏 (Breadcrumb Nav) ========== */
.main {
    width: 100%;
}

.main-container {
    padding-top: 130px;
}

.main-nav {
    width: 100%;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    margin-bottom: 50px;
    text-align: center;

}

.main-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1f1b2e;
    opacity: 0.3;
    z-index: 0;
}

.main-nav>* {
    position: relative;
    z-index: 1;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb .separator {
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb .current {
    color: #fff;
    font-weight: 500;
}

.main-nav h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: 1px;
}

@media (max-width: 768px) {

    .container{
        width: 100%;
        margin: 10px auto;
        padding: 0px 10px;
    }

    .main-container {
        padding-top: 80px;
    }

    /* form-section 移动端内边距 */
    .form-section {
        padding: 10px;
    }

    /* 防止移动端按钮点击时页面缩放 */
    button,
    input[type="button"],
    input[type="submit"],
    .qty-btn,
    .btn {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {

    #header {
        height: 70px;
    }

    .nav-flex {
        height: 70px;
        margin: 0 15px;
    }

    .nav-left {
        gap: 10px;
    }

    .menu-btn {
        display: block;
        font-size: 22px;
    }

    .logo img {
        width: 140px;
        height: 36px;
    }

    .navbar,
    .nav-right {
        display: none;
    }

    .currency-desktop {
        display: none;
    }

    .currency-mobile {
        display: flex;
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .currency-mobile img {
        width: 18px;
        height: 18px;
    }

    .mobile-icons {
        display: flex;
    }

    .mobile-icon-link img {
        width: 22px;
        height: 22px;
    }

    .cart-badge {
        width: 16px;
        height: 16px;
        font-size: 10px;
        top: -6px;
        right: -6px;
    }

    .navbar,
    .mega-menu {
        display: none !important;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        padding: 0 15px;
    }

    .footer-bottom .footer-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .payment-methods {
        justify-content: center;
        flex-wrap: wrap;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }

    .cart-panel {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-container {
        padding: 0 20px;
    }

    .mobile-menu {
        width: 100%;
    }

    .payment-methods {
        gap: 5px;
    }

    .payment-methods img {
        height: 24px;
    }
}

/* ========== 隐私协议弹窗 ========== */
.privacy-cookie-modal {
    position: fixed;
    bottom: -100%;
    right: 30px;
    width: 420px;
    max-width: calc(100vw - 60px);
    background: #1a1626;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    z-index: 2999;
    padding: 30px;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
}

.privacy-cookie-modal.active {
    bottom: 30px;
    opacity: 1;
    transform: translateY(0);
}

.privacy-cookie-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.privacy-cookie-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    line-height: 1.3;
}

.privacy-cookie-text {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.privacy-cookie-link {
    color: #ff4757;
    text-decoration: underline;
    font-weight: 500;
    transition: opacity 0.2s;
}

.privacy-cookie-link:hover {
    opacity: 0.8;
    color: #ff6677;
}

.privacy-cookie-btn {
    background: #ff4757;
    color: #fff;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-family);
    align-self: flex-start;
    margin-top: 8px;
}

.privacy-cookie-btn:hover {
    background: #ff6677;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .privacy-cookie-modal {
        right: 15px;
        left: 15px;
        width: auto;
        bottom: -100%;
        padding: 24px;
    }

    .privacy-cookie-modal.active {
        bottom: 15px;
    }

    .privacy-cookie-title {
        font-size: 1.2rem;
    }

    .privacy-cookie-text {
        font-size: 0.95rem;
    }

    .privacy-cookie-btn {
        width: 100%;
        align-self: stretch;
    }
}

/* ========== 搜索面板 ========== */
.search-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    overflow-y: auto;
    backdrop-filter: blur(5px);
}

.search-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-panel {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
}

.search-panel-header {
    position: relative;
    margin-bottom: 40px;
}

.search-panel-input {
    width: 100%;
    background: #1e2235;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    padding: 18px 60px 18px 24px;
    border-radius: 12px;
    font-size: 1.3rem;
    font-family: var(--font-family);
    outline: none;
    transition: all 0.2s;
}

.search-panel-input:focus {
    border-color: rgba(255, 71, 87, 0.6);
    background: #252a3a;
}

.search-panel-input::placeholder {
    color: var(--text-muted);
}

.search-panel-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.search-panel-close:hover {
    color: var(--text-main);
}

.search-panel-content {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.search-game-category {
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-game-category:last-child {
    border-bottom: none;
}

.search-game-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 15px;
}

.search-game-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.search-game-link {
    color: #ff4757;
    text-decoration: underline;
    font-size: 1rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.search-game-link:hover {
    opacity: 0.8;
    color: #ff6677;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-panel {
        padding: 30px 15px;
    }

    .search-panel-input {
        padding: 15px 50px 15px 20px;
        font-size: 1.1rem;
    }

    .search-game-title {
        font-size: 1.3rem;
    }

    .search-game-links {
        gap: 10px;
    }

    .search-game-link {
        font-size: 0.95rem;
    }
}

/* ========== 搜索框和下拉面板 ========== */
.header-search-wrapper {
    position: relative;
    margin: 0 20px;
}

.search-trigger-box {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.search-quick-input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    padding: 12px 45px 12px 18px;
    border-radius: 8px;
    font-size: 1rem;
    width: 240px;
    outline: none;
    transition: all 0.2s;
    font-family: var(--font-family);
}

.search-quick-input:focus,
.search-quick-input:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.search-quick-input::placeholder {
    color: var(--text-muted);
}

.search-icon-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    pointer-events: none;
}

.search-icon-btn img {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

/* 下拉搜索面板 */
.search-dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 600px;
    background: #1a1626;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 2000;
    max-height: 70vh;
    overflow-y: auto;
}

.search-dropdown-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.search-dropdown-content {
    padding: 16px;
}

.search-dropdown-category {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.search-dropdown-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.search-dropdown-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}

.search-dropdown-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-dropdown-link {
    color: #ff4757;
    text-decoration: underline;
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.2s, color 0.2s;
}

.search-dropdown-link:hover {
    opacity: 0.8;
    color: #ff6677;
}

/* 移动端搜索弹窗 */
.mobile-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    overflow-y: auto;
}

.mobile-search-modal.active {
    opacity: 1;
    visibility: visible;
}

.mobile-search-content {
    max-width: 100%;
    padding: 20px;
    min-height: 100vh;
}

.mobile-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-search-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.mobile-search-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.mobile-search-close:hover {
    color: var(--text-main);
}

.mobile-search-input-wrapper {
    position: relative;
    margin-bottom: 25px;
}

.mobile-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    padding: 14px 50px 14px 16px;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-family);
    outline: none;
    transition: all 0.2s;
}

.mobile-search-input:focus {
    border-color: rgba(255, 71, 87, 0.5);
    background: rgba(255, 255, 255, 0.12);
}

.mobile-search-input::placeholder {
    color: var(--text-muted);
}

.mobile-search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.mobile-search-btn:hover {
    color: var(--text-main);
}

.mobile-search-categories {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-search-category {
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-search-category:last-child {
    border-bottom: none;
}

.mobile-search-game-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}

.mobile-search-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-search-link {
    color: #ff4757;
    text-decoration: underline;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 4px 8px;
    background: rgba(255, 71, 87, 0.1);
    border-radius: 4px;
    transition: all 0.2s;
}

.mobile-search-link:hover {
    background: rgba(255, 71, 87, 0.2);
    color: #ff6677;
}

/* 桌面端隐藏搜索面板 */
@media (min-width: 769px) {
    .mobile-search-modal,
    .mobile-login-modal {
        display: none;
    }
}

/* 移动端隐藏桌面搜索框 */
@media (max-width: 768px) {
    .header-search-wrapper {
        display: none;
    }
}

/* 移动端登录弹窗 */
.mobile-login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    overflow-y: auto;
}

.mobile-login-modal.active {
    opacity: 1;
    visibility: visible;
}

.mobile-login-content {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px 20px;
    min-height: 100vh;
}

.mobile-login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.mobile-login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.mobile-login-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.mobile-login-close:hover {
    color: var(--text-main);
}

.mobile-login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-form-label {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 500;
}

.mobile-form-required {
    color: #ff4757;
    margin-left: 4px;
}

.mobile-form-input {
    width: 100%;
    background: #252138;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-family);
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.mobile-form-input:focus {
    border-color: rgba(255, 71, 87, 0.5);
    background: #2a2640;
}

.mobile-form-input::placeholder {
    color: var(--text-muted);
}

.mobile-form-remember {
    margin-top: -8px;
}

.mobile-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.mobile-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ff4757;
}

.mobile-checkbox-label {
    font-size: 1rem;
    color: var(--text-main);
    cursor: pointer;
}

.mobile-login-btn {
    width: 100%;
    background: #ff4757;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-family);
}

.mobile-login-btn:hover {
    background: #ff6677;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

.mobile-form-links {
    text-align: center;
}

.mobile-form-link {
    color: var(--text-main);
    text-decoration: underline;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.mobile-form-link:hover {
    color: #ff4757;
}

.mobile-form-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

.mobile-form-signup {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.mobile-signup-link {
    color: #ff4757;
    text-decoration: underline;
    font-weight: 600;
}

.mobile-signup-link:hover {
    color: #ff6677;
}

/* 桌面端登录弹窗 */
.desktop-login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.desktop-login-modal.active {
    opacity: 1;
    visibility: visible;
}

.desktop-login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.desktop-login-content {
    position: relative;
    background: #1a1626;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 35px 40px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.desktop-login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.desktop-login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.desktop-login-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.desktop-login-close:hover {
    color: var(--text-main);
}

.desktop-login-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.desktop-form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.desktop-form-label {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 500;
}

.desktop-form-required {
    color: #ff4757;
    margin-left: 4px;
}

.desktop-form-input {
    width: 100%;
    background: #252138;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-family);
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.desktop-form-input:focus {
    border-color: rgba(255, 71, 87, 0.5);
    background: #2a2640;
}

.desktop-form-input::placeholder {
    color: var(--text-muted);
}

.desktop-form-remember {
    margin-top: -8px;
}

.desktop-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.desktop-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ff4757;
}

.desktop-checkbox-label {
    font-size: 1rem;
    color: var(--text-main);
    cursor: pointer;
}

.desktop-login-btn {
    width: 100%;
    background: #ff4757;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-family);
}

.desktop-login-btn:hover {
    background: #ff6677;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

.desktop-form-links {
    text-align: center;
}

.desktop-form-link {
    color: var(--text-main);
    text-decoration: underline;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.desktop-form-link:hover {
    color: #ff4757;
}

.desktop-form-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

.desktop-form-signup {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.desktop-signup-link {
    color: #ff4757;
    text-decoration: underline;
    font-weight: 600;
}

.desktop-signup-link:hover {
    color: #ff6677;
}

/* 桌面端隐藏移动端弹窗 */
@media (min-width: 769px) {

    .mobile-search-modal,
    .mobile-login-modal {
        display: none;
    }
}

/* 移动端隐藏桌面弹窗和搜索框 */
@media (max-width: 768px) {

    .header-search-wrapper,
    .desktop-login-modal {
        display: none;
    }
}