/* ================================
   Responsive.css - 响应式样式
   ================================ */

/* 大屏幕 (1200px及以下) */
@media (max-width: 1200px) {
    .page-container:not(.index-body) .game-card {
        width: calc(25% - 7.5px); /* 4张卡片一行 */
    }
}

/* 中等屏幕 (992px及以下) */
@media (max-width: 992px) {
    .page-container:not(.index-body) .game-card {
        width: calc(33.333% - 6.67px); /* 3张卡片一行 */
    }
}

/* 桌面端确保水平布局 - 大于768px屏幕 */
@media (min-width: 769px) {
    .review-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 20px !important;
    }
    
    .review-card-image {
        display: block !important;
    }
}

/* 平板屏幕 (768px及以下) - 现代化移动导航 */
@media (max-width: 768px) {
    /* 移动端全局居中修复 */
    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
    }

    body {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* 确保页面容器居中 */
    .page-container {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* 现代化移动导航栏 */
    .main-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        box-shadow: 
            0 20px 40px rgba(0, 0, 0, 0.12),
            0 8px 24px rgba(0, 0, 0, 0.08),
            0 4px 8px rgba(0, 0, 0, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.6);
        border-top: none;
        border-radius: 0 0 24px 24px;
        padding: 20px 0 32px 0; /* 增加底部间距为用户下拉菜单预留空间 */
        z-index: 999;
        animation: slideDown 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        min-height: 400px; /* 设置最小高度确保用户下拉菜单有足够空间 */
        max-height: 80vh; /* 限制最大高度避免超出屏幕 */
        overflow-y: auto; /* 允许滚动 */
        overflow-x: hidden;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px) scale(0.95);
            backdrop-filter: blur(0px);
        }
        50% {
            opacity: 0.6;
            transform: translateY(-5px) scale(0.98);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
            backdrop-filter: blur(25px);
        }
    }

    .header.nav-open .main-nav {
        display: flex;
    }

    .nav-item {
        width: calc(100% - 32px);
        margin: 4px 16px;
        text-align: left;
        padding: 18px 24px;
        border-bottom: none;
        border-radius: 16px;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        position: relative;
        overflow: hidden;
        font-size: 16px;
        font-weight: 500;
        color: #2d3748;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(0, 0, 0, 0.05);
        display: flex;
        align-items: center;
        gap: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    /* 菜单项悬停和激活效果 */
    .nav-item:hover {
        transform: translateY(-2px) scale(1.02);
        background: linear-gradient(135deg, #FF6B35 0%, #E8425A 100%);
        color: #ffffff;
        box-shadow: 
            0 8px 25px rgba(255, 107, 53, 0.3),
            0 4px 12px rgba(0, 0, 0, 0.1);
        border-color: rgba(255, 255, 255, 0.3);
    }

    .nav-item:active {
        transform: translateY(0) scale(0.98);
        transition-duration: 0.1s;
    }

    /* 隐藏原始的Font Awesome图标，为自定义图标让路 */
    .nav-item i.fas {
        display: none !important;
    }
    
    /* 为菜单项添加图标样式 - 修复首页按钮显示问题 */
    .nav-item::before {
        content: '';
        width: 20px;
        height: 20px;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        flex-shrink: 0;
        opacity: 0.7;
        transition: opacity 0.3s ease;
        margin-right: 12px; /* 为文字预留足够间距 */
    }

    .nav-item:hover::before {
        opacity: 1;
        filter: brightness(0) invert(1); /* 悬停时图标变白 */
    }

    /* 首页图标 - 使用mask方式确保正常显示 */
    .nav-item[href="/index.html"]::before,
    .nav-item[href="index.html"]::before,
    .nav-item[href="/"]::before {
        background-color: #FF6B35;
        mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9,22 9,12 15,12 15,22"/></svg>');
        mask-size: contain;
        mask-repeat: no-repeat;
        mask-position: center;
        -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9,22 9,12 15,12 15,22"/></svg>');
        -webkit-mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-position: center;
    }

    /* 资讯图标 */
    .nav-item[href="news.html"]::before,
    .nav-item[href*="news"]::before,
    .nav-item[href="/zixun.html"]::before {
        background-color: #FF6B35;
        mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2"/><path d="M18 14h-8"/><path d="M15 18h-5"/><path d="M10 6h8v4h-8V6Z"/></svg>');
        mask-size: contain;
        mask-repeat: no-repeat;
        mask-position: center;
        -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2"/><path d="M18 14h-8"/><path d="M15 18h-5"/><path d="M10 6h8v4h-8V6Z"/></svg>');
        -webkit-mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-position: center;
    }

    /* 品味游戏图标 */
    .nav-item[href="games.html"]::before,
    .nav-item[href*="game"]::before,
    .nav-item[href="/pinweiyouxi.html"]::before {
        background-color: #FF6B35;
        mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 12h4m4 0h4m-2-6a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z"/><circle cx="8" cy="16" r="1"/><circle cx="16" cy="16" r="1"/></svg>');
        mask-size: contain;
        mask-repeat: no-repeat;
        mask-position: center;
        -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 12h4m4 0h4m-2-6a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z"/><circle cx="8" cy="16" r="1"/><circle cx="16" cy="16" r="1"/></svg>');
        -webkit-mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-position: center;
    }

    /* 资源分享图标 */
    .nav-item[href*="resource"]::before,
    .nav-item[href*="share"]::before,
    .nav-item[href="/resources.html"]::before {
        background-color: #FF6B35;
        mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"/><polyline points="16,6 12,2 8,6"/><line x1="12" y1="2" x2="12" y2="15"/></svg>');
        mask-size: contain;
        mask-repeat: no-repeat;
        mask-position: center;
        -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"/><polyline points="16,6 12,2 8,6"/><line x1="12" y1="2" x2="12" y2="15"/></svg>');
        -webkit-mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-position: center;
    }

    /* 抽奖区图标 */
    .nav-item[href*="lottery"]::before,
    .nav-item[href="/lottery.html"]::before {
        background-color: #FF6B35;
        mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>');
        mask-size: contain;
        mask-repeat: no-repeat;
        mask-position: center;
        -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>');
        -webkit-mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-position: center;
    }

    /* 外设图标 */
    .nav-item[href*="peripheral"]::before,
    .nav-item[href*="hardware"]::before,
    .nav-item[href="/peripherals.html"]::before {
        background-color: #FF6B35;
        mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="4" width="20" height="16" rx="2"/><path d="m10 16 6-12"/><path d="M12 17h.01"/><path d="M17 17h.01"/></svg>');
        mask-size: contain;
        mask-repeat: no-repeat;
        mask-position: center;
        -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="4" width="20" height="16" rx="2"/><path d="m10 16 6-12"/><path d="M12 17h.01"/><path d="M17 17h.01"/></svg>');
        -webkit-mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-position: center;
    }

    .nav-item.search {
        display: none !important; /* 移动端隐藏搜索按钮，避免遮挡用户菜单 */
    }
    
    /* 移动端汉堡菜单中隐藏当前活动页面的菜单项，避免重复显示 */
    .nav-item.active {
        display: none !important;
    }

    .nav-item.search input {
        background: transparent;
        border: none;
        outline: none;
        width: 100%;
        font-size: 16px;
        color: #2d3748;
        padding: 8px 0;
    }

    .nav-item.search input::placeholder {
        color: rgba(45, 55, 72, 0.6);
        font-size: 15px;
    }

    .nav-item.search::before {
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>');
        background-color: rgba(255, 107, 53, 0.7);
        mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>');
        mask-size: contain;
        mask-repeat: no-repeat;
        mask-position: center;
        width: 18px;
        height: 18px;
    }

    /* 移动端用户菜单重新设计 - 使用展开式设计 */
    .nav-item.user-dropdown {
        background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(232, 66, 90, 0.1) 100%);
        border: 2px solid rgba(255, 107, 53, 0.2);
        font-weight: 600;
        color: #FF6B35;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important; /* 改为 space-between 为箭头预留空间 */
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
    }
    
    /* 用户菜单展开状态 */
    .nav-item.user-dropdown.expanded {
        background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(232, 66, 90, 0.2) 100%);
        border-radius: 16px 16px 4px 4px;
    }
    
    /* 用户菜单箭头指示器 - 更小更协调的设计 */
    .nav-item.user-dropdown::after {
        content: '';
        width: 10px;
        height: 10px;
        background-color: rgba(255, 107, 53, 0.6); /* 降低透明度使其更协调 */
        mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M6 9l6 6 6-6"/></svg>');
        mask-size: contain;
        mask-repeat: no-repeat;
        mask-position: center;
        transition: all 0.3s ease;
        flex-shrink: 0;
        opacity: 0.8; /* 添加整体透明度 */
        margin-left: 4px; /* 与文字保持适当距离 */
    }
    
    .nav-item.user-dropdown.expanded::after {
        transform: rotate(180deg);
        background-color: rgba(255, 107, 53, 0.8); /* 展开时稍微增强颜色 */
        opacity: 1;
    }

    .nav-item.user-dropdown::before {
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>');
        background-color: #FF6B35;
        mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>');
        mask-size: contain;
        mask-repeat: no-repeat;
        mask-position: center;
    }

    .header-content-wrapper {
        position: relative;
        gap: 10px;
        min-height: 52px;
        padding-right: 72px;
    }

    .logo-container {
        flex-shrink: 0;
    }

    .header-content-wrapper .language-switcher {
        margin-left: auto;
        margin-right: 8px;
        flex-shrink: 0;
    }

    .nav-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        border-radius: 12px;
        padding: 8px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        z-index: 1002;
    }

    .nav-toggle:hover {
        background: rgba(255, 255, 255, 1);
        transform: translateY(-50%) scale(1.05);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }

    /* 菜单项加载动画 */
    .main-nav .nav-item {
        animation: slideInFromLeft 0.4s ease-out forwards;
        opacity: 0;
        transform: translateX(-30px);
    }

    .main-nav .nav-item:nth-child(1) { animation-delay: 0.1s; }
    .main-nav .nav-item:nth-child(2) { animation-delay: 0.15s; }
    .main-nav .nav-item:nth-child(3) { animation-delay: 0.2s; }
    .main-nav .nav-item:nth-child(4) { animation-delay: 0.25s; }
    .main-nav .nav-item:nth-child(5) { animation-delay: 0.3s; }
    .main-nav .nav-item:nth-child(6) { animation-delay: 0.35s; }
    .main-nav .nav-item:nth-child(7) { animation-delay: 0.4s; }

    @keyframes slideInFromLeft {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    /* 菜单项点击水波纹效果 */
    .nav-item {
        overflow: hidden;
        position: relative;
    }

    .nav-item::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.6);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
        pointer-events: none;
    }

    .nav-item:active::after {
        width: 300px;
        height: 300px;
        transition: width 0.3s, height 0.3s;
    }

    /* 菜单关闭动画 */
    .main-nav.closing .nav-item {
        animation: slideOutToLeft 0.3s ease-in forwards;
    }

    .main-nav.closing .nav-item:nth-child(1) { animation-delay: 0s; }
    .main-nav.closing .nav-item:nth-child(2) { animation-delay: 0.05s; }
    .main-nav.closing .nav-item:nth-child(3) { animation-delay: 0.1s; }
    .main-nav.closing .nav-item:nth-child(4) { animation-delay: 0.15s; }
    .main-nav.closing .nav-item:nth-child(5) { animation-delay: 0.2s; }
    .main-nav.closing .nav-item:nth-child(6) { animation-delay: 0.25s; }
    .main-nav.closing .nav-item:nth-child(7) { animation-delay: 0.3s; }

    @keyframes slideOutToLeft {
        to {
            opacity: 0;
            transform: translateX(-30px);
        }
    }

    /* 触摸反馈优化 */
    @media (hover: none) and (pointer: coarse) {
        .nav-item:hover {
            transform: none;
            background: rgba(255, 255, 255, 0.8);
            color: #2d3748;
        }
        
        .nav-item:active {
            transform: scale(0.95);
            background: linear-gradient(135deg, #FF6B35 0%, #E8425A 100%);
            color: #ffffff;
        }
    }

    /* 汉堡菜单动画 */
    .header.nav-open .hamburger {
        background: transparent;
    }

    .header.nav-open .hamburger::before {
        transform: translateY(8px) rotate(45deg);
    }

    .header.nav-open .hamburger::after {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* 子导航栏调整 */
    .sub-nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .hot-tags {
        margin-bottom: 10px;
        flex-wrap: wrap;
    }

    .hot-tags a {
        font-size: 13px;
    }

    .category-tabs {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
    }

    /* 主要内容布局 */
    .main-content-area {
        flex-direction: column;
        margin: 20px auto;
        padding: 0 15px;
        max-width: 100%;
        gap: 20px;
    }

    .sidebar {
        width: 100%;
    }

    /* 内容网格调整 */
    .content-grid {
        min-height: auto;
    }

    #home-pinweiyouxi .game-card,
    #home-zixun .news-card,
    #home-lottery-main .lottery-card {
        width: calc(100% - 16px); /* 1张卡片一行，增加间距 */
        margin-bottom: 15px;
        min-width: 280px; /* 确保最小宽度避免标题竖排 */
    }

    /* 游戏卡片移动端优化 */
    .game-card {
        border-radius: 12px;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        touch-action: manipulation;
    }

    .game-card:active {
        transform: scale(0.98);
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }

    /* 卡片图片优化 */
    .game-card img,
    .news-card img,
    .lottery-card img {
        will-change: transform;
        transform: translateZ(0);
    }

    /* 轮播图调整 */
    .carousel-container {
        margin: 10px auto;
        padding: 0 15px;
        max-width: 100%;
        box-sizing: border-box;
        min-height: auto !important;
    }

    .carousel-main {
        height: 280px;
        border-radius: 12px;
    }

    /* 轮播图触摸优化 */
    .banner-img {
        touch-action: pan-y;
        user-select: none;
        -webkit-user-select: none;
        pointer-events: none;
    }

    /* 添加轮播图加载优化 */
    .banner-img {
        will-change: transform;
        transform: translateZ(0);
    }

    .carousel-item {
        width: calc(100% / 3.5 - 8px);
    }

    .carousel-item p {
        font-size: 11px;
        height: calc(11px * 1.4 * 2);
    }

    .carousel-item img {
        height: 50px;
    }

    .carousel-item {
        padding: 5px;
    }

    /* 分页按钮调整 */
    .page-btn.prev {
        left: -5px;
    }

    .page-btn.next {
        right: -5px;
    }

    /* 现代化页面容器调整 */
    .page-container {
        margin: 20px auto;
        padding: 20px;
        max-width: 100%;
        width: 100%;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-radius: 16px;
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.1),
            0 2px 8px rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-sizing: border-box;
    }

    /* 模态框调整 */

    /* 表单调整 */
    .form-control {
        font-size: 16px; /* 防止iOS缩放 */
    }

    /* 全局触摸优化 */
    * {
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        -webkit-touch-callout: none;
    }

    /* 按钮触摸优化 */
    button,
    .btn,
    .nav-item,
    .category-tab {
        touch-action: manipulation;
        min-height: 44px; /* iOS触摸目标最小尺寸 */
        min-width: 44px;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }

    /* 链接触摸优化 */
    a {
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }

    /* 滑动容器优化 */
    .category-tabs {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* 移动端分享按钮重新定位到主图右上角 */
    .review-card {
        position: relative;
    }
    
    .title-share-container {
        flex-direction: row !important;
        justify-content: flex-start !important;
    }
    
    .review-card-title {
        width: 100% !important;
        margin: 0 !important;
        font-size: 16px !important;
    }
    
    .review-card-content-wrapper {
        padding: 12px !important;
        gap: 10px !important;
    }

    /* 全新的嵌入式用户子菜单设计 */
    .user-submenu {
        display: none;
        flex-direction: column;
        background: transparent; /* 完全透明，与父容器融为一体 */
        margin: 0; /* 去除外边距，完全融入菜单流 */
        padding: 0;
        border: none; /* 移除所有边框 */
        box-shadow: none; /* 移除阴影 */
        animation: slideDown 0.3s ease-out;
    }
    
    .user-submenu.show {
        display: flex;
    }
    
    /* 用户子菜单项 - 与主菜单项完全一致的样式 */
    .user-submenu-item {
        width: calc(100% - 32px);
        margin: 4px 16px;
        text-align: left;
        padding: 18px 24px; /* 简洁样式，无图标 */
        border-bottom: none;
        border-radius: 16px;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        position: relative;
        overflow: hidden;
        font-size: 15px; /* 稍小于主菜单项表示层级 */
        font-weight: 500;
        color: #4a5568; /* 稍淡的颜色表示次级 */
        background: rgba(255, 255, 255, 0.6); /* 稍淡的背景 */
        backdrop-filter: blur(10px);
        border: 1px solid rgba(0, 0, 0, 0.03);
        display: flex;
        align-items: center;
        gap: 12px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
        cursor: pointer;
        min-height: 44px;
    }
    
    /* 用户子菜单项悬停效果 */
    .user-submenu-item:hover {
        transform: translateY(-1px) scale(1.01); /* 稍小的变换表示层级 */
        background: linear-gradient(135deg, rgba(255, 107, 53, 0.8) 0%, rgba(232, 66, 90, 0.8) 100%);
        color: #ffffff;
        box-shadow: 
            0 6px 20px rgba(255, 107, 53, 0.25),
            0 3px 8px rgba(0, 0, 0, 0.08);
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .user-submenu-item:active {
        transform: translateY(0) scale(0.98);
        transition-duration: 0.1s;
    }
    
    /* 用户子菜单图标 - 与主菜单项图标一致 */
    .user-submenu-item::before {
        display: none; /* 移除图标，简洁风格 */
    }
    
    .user-submenu-item:hover::before {
        display: none;
    }

    /* 各类用户子菜单图标 */
    .user-submenu-item[data-action="chat"]::before {
        mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>');
        -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>');
    }
    
    .user-submenu-item[data-action="quiz"]::before {
        mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><path d="M12 17h.01"/></svg>');
        -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><path d="M12 17h.01"/></svg>');
    }
    
    .user-submenu-item[data-action="lottery"]::before {
        mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>');
        -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>');
    }
    
    /* 退出按钮特殊样式 */
    .user-submenu-item[data-action="logout"] {
        color: #dc2626;
        border-top: 1px solid rgba(220, 38, 38, 0.1);
        margin-top: 8px;
        background: rgba(220, 38, 38, 0.05);
    }
    
    .user-submenu-item[data-action="logout"]::before {
        background-color: #dc2626;
        mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16,17 21,12 16,7"/><line x1="21" y1="12" x2="9" y2="12"/></svg>');
        -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16,17 21,12 16,7"/><line x1="21" y1="12" x2="9" y2="12"/></svg>');
    }
    
    .user-submenu-item[data-action="logout"]:hover {
        background: linear-gradient(135deg, rgba(220, 38, 38, 0.8) 0%, rgba(185, 28, 28, 0.8) 100%);
        color: #ffffff;
        box-shadow: 
            0 6px 20px rgba(220, 38, 38, 0.25),
            0 3px 8px rgba(0, 0, 0, 0.08);
    }
    
    /* 用户子菜单项加载动画 - 与主菜单动画配合 */
    .user-submenu .user-submenu-item {
        animation: slideInFromLeft 0.4s ease-out forwards;
        opacity: 0;
        transform: translateX(-30px);
    }
    
    .user-submenu .user-submenu-item:nth-child(1) { animation-delay: 0.4s; } /* 在主菜单动画后开始 */
    .user-submenu .user-submenu-item:nth-child(2) { animation-delay: 0.45s; }
    .user-submenu .user-submenu-item:nth-child(3) { animation-delay: 0.5s; }
    .user-submenu .user-submenu-item:nth-child(4) { animation-delay: 0.55s; }
    .user-submenu .user-submenu-item:nth-child(5) { animation-delay: 0.6s; }
    
    /* 用户子菜单项点击水波纹效果 - 与主菜单一致 */
    .user-submenu-item::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.6);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
        pointer-events: none;
        z-index: -1;
    }
    
    .user-submenu-item:active::after {
        width: 300px;
        height: 300px;
        transition: width 0.3s, height 0.3s;
    }

    /* 移动端强制使用flex布局而非grid布局 */
    .game-grid,
    .content-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        grid-template-columns: none !important;
    }

    /* 移动端所有卡片宽度修复 - 确保标题有足够空间 */
    .game-card,
    .news-card,
    .lottery-card {
        width: 100% !important;
        min-width: 320px !important;
        max-width: 100% !important;
        margin: 0 !important;
        flex: none !important;
    }

}

/* 手机屏幕 (576px及以下) */
@media (max-width: 576px) {
    /* 小屏手机全局居中强化 */
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* 移动端强制禁用所有旧的dropdown-menu样式，防止弹窗效果 */
    .main-nav .user-dropdown .dropdown-menu,
    .user-dropdown.open .dropdown-menu,
    .nav-item.dropdown.open .dropdown-menu {
        display: none !important;
        position: static !important;
        z-index: auto !important;
    }

    /* 小屏幕文章标题强制修复 - 统一换行规则 - 高优先级 */
    .game-card .game-info h3.game-title,
    .game-card h3.game-title,
    .game-info h3.game-title,
    h3.game-title,
    .game-card .game-title,
    .game-info .game-title,
    .game-card-info h3,
    .news-card .game-title {
        font-size: 13px !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
        word-wrap: break-word !important;
        white-space: normal !important;
        line-height: 1.4 !important;
        hyphens: none !important;
        min-height: auto !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        padding: 8px !important;
    }

    /* 小屏手机样式优化 - 移除重复定义，已在上面统一处理 */
    
    .review-card-content-wrapper {
        gap: 8px !important;
        padding: 10px !important;
    }
    
    .share-button {
        font-size: 11px !important;
        padding: 5px 8px !important;
    }
    
    /* Logo调整 */
    .logo {
        width: 48px;
        height: 48px;
    }

    /* 站点标题调整 */
    .site-title {
        font-size: 18px;
        margin-left: 8px;
    }

    /* 头部内容调整 */
    .header-content-wrapper {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 首页卡片调整 */
    #home-pinweiyouxi .game-card,
    #home-zixun .news-card,
    #home-lottery-main .lottery-card {
        width: 100%; /* 1张卡片一行 */
    }

    /* 通用卡片调整 */
    .game-card,
    .news-card,
    .lottery-card {
        margin-bottom: 15px;
    }

    /* 分页按钮调整 */
    .page-btn {
        width: 30px;
        height: 30px;
    }

    .page-btn.prev {
        left: 2px;
    }

    .page-btn.next {
        right: 2px;
    }

    /* 轮播图进一步调整 */
    .carousel-container {
        margin: 10px auto;
        padding: 0 15px;
        max-width: 100%;
        box-sizing: border-box;
        min-height: auto !important;
    }

    .carousel-main {
        height: 200px;
    }

    .carousel-item {
        width: calc(100% / 3 - 8px);
    }

    .carousel-item p {
        font-size: 10px;
        height: calc(10px * 1.4 * 2);
    }

    /* 页面容器调整 - 详情页移动端优化 */
    .page-container {
        margin: 10px auto;
        padding: 12px;
        max-width: 100%;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(10px);
        box-sizing: border-box;
    }

    /* 详情页标题优化 */
    .review-card {
        background: linear-gradient(135deg, #FF6B35 0%, #E8425A 100%);
        border-radius: 16px;
        padding: 20px;
        margin-bottom: 16px;
        box-shadow: 0 8px 32px rgba(255, 107, 53, 0.3);
    }

    /* 特定页面标题样式 - 使用更具体的选择器避免冲突 */
    .detail-page .review-card-title,
    .game-detail-page .review-card-title {
        font-size: 18px !important;
        line-height: 1.4;
        margin-bottom: 15px;
        margin-right: 80px !important;
        color: #ffffff;
        font-weight: 700;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        max-width: calc(100% - 90px) !important;
        display: flex !important;
        flex-direction: row !important;
    }

    .review-card-meta {
        gap: 8px;
        font-size: 13px;
        color: rgba(255, 255, 255, 0.9);
    }

    /* 游戏详情内容区域 */
    .game-content-section {
        background: #ffffff;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .game-content-section img {
        border-radius: 12px !important;
        margin: 16px 0 !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }

    .game-content-section p {
        font-size: 15px;
        line-height: 1.7;
        margin-bottom: 14px;
        color: #2d3748;
    }

    .game-content-section h1,
    .game-content-section h2,
    .game-content-section h3 {
        font-size: 18px;
        margin: 20px 0 12px 0;
        color: #1a202c;
        font-weight: 600;
        position: relative;
        padding-left: 12px;
    }


    /* 评论区域优化 */
    .comments-container {
        background: #ffffff;
        border-radius: 12px;
        padding: 16px;
        margin-top: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .comments-container h3 {
        font-size: 18px;
        margin-bottom: 16px;
        color: #1a202c;
        font-weight: 600;
        padding-bottom: 8px;
        border-bottom: 2px solid #e2e8f0;
    }

    /* 版块标题调整 */
    .section-title {
        font-size: 18px;
    }

    .section-title:after {
        width: 40px;
        height: 2px;
    }

    /* 新闻卡片移动端优化 */
    .news-card {
        flex-direction: column;
        padding: 15px;
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        margin-bottom: 12px;
    }
    
    /* 详情页review-card在桌面端保持水平布局，移动端使用单列 */
    .review-card {
        flex-direction: row !important;
        align-items: center !important;
        gap: 20px !important;
    }
    
    /* 平板和手机端隐藏主图，使用单列布局 */
    @media (max-width: 768px) {
        .review-card {
            flex-direction: column !important;
            align-items: flex-start !important;
        }
        
        .review-card-image {
            display: none !important;
        }
    }

    .news-card .game-img {
        flex: none;
        width: 100%;
        height: 120px;
        margin-right: 0;
        margin-bottom: 10px;
        border-radius: 8px;
        overflow: hidden;
    }

    .news-card .news-content-wrapper {
        min-height: auto;
    }

    /* 抽奖卡片移动端优化 */
    .lottery-card {
        padding: 12px;
        min-height: 120px;
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        margin-bottom: 12px;
    }

    .lottery-title {
        font-size: 14px;
    }

    .lottery-prize {
        font-size: 13px;
    }

    /* 侧边栏模块调整 */
    .sidebar-module {
        padding: 15px;
        margin-bottom: 16px;
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .sidebar-item-title {
        font-size: 14px;
    }

    /* 子导航进一步调整 */
    .sub-nav {
        padding: 8px;
    }

    .hot-tags {
        margin-bottom: 8px;
    }

    .hot-tags a {
        font-size: 12px;
        margin-right: 10px;
    }

    .category-tabs a {
        padding: 4px 8px;
        font-size: 12px;
    }

    /* 浮动操作按钮样式 */
    .floating-action {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        background: linear-gradient(135deg, #FF6B35 0%, #E8425A 100%);
        border-radius: 50%;
        box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 20px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .floating-action:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
    }
}

/* 超小屏幕 (480px及以下) */
@media (max-width: 480px) {
    /* 超小屏全局居中强化 */
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .header-content-wrapper {
        padding-left: 10px;
        padding-right: 10px;
    }

    .site-title {
        font-size: 16px;
    }

    .page-container {
        margin: 10px auto;
        padding: 12px;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .carousel-container {
        margin: 8px auto;
        padding: 0 10px;
        max-width: 100%;
        box-sizing: border-box;
        min-height: auto !important;
    }

    .carousel-main {
        height: 180px;
    }

    .section-title {
        font-size: 16px;
    }

    /* 游戏评分圆圈调整 */
    .score-circle {
        width: 30px;
        height: 30px;
        bottom: 8px;
        right: 8px;
    }

    .score-text {
        font-size: 12px;
    }
    
    /* 小屏幕隐藏主图，使用单列布局 */
    .review-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }
    
    .review-card-image {
        display: none !important;
    }
}

/* 横屏手机优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .carousel-main {
        height: 200px;
    }

    .main-content-area {
        gap: 15px;
    }

    #home-pinweiyouxi .game-card,
    #home-zixun .news-card,
    #home-lottery-main .lottery-card {
        width: calc(33.333% - 6.67px); /* 横屏时3张一行 */
    }
    
    /* 横屏时也隐藏主图 */
    .review-card {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .review-card-image {
        display: none !important;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .banner-img,
    .game-card img,
    .news-card img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* 打印样式 */
/* Mobile polish overrides */
@media (max-width: 768px) {
    body {
        display: block;
    }

    .main-nav {
        background: rgba(255, 255, 255, 0.99);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-radius: 0 0 18px 18px;
        padding: 10px 0 18px 0;
        min-height: auto;
        max-height: calc(100dvh - 72px);
        overscroll-behavior: contain;
    }

    .nav-item {
        width: calc(100% - 24px);
        margin: 4px 12px;
        padding: 14px 16px;
        border-radius: 12px;
        font-size: 15px;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(6px);
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
        min-height: 48px;
    }

    .main-content-area {
        margin: 16px auto;
        padding: 0 12px;
        gap: 16px;
    }

    .content-grid {
        gap: 12px;
    }

    .page-container:not(.index-body) .game-card {
        width: calc(50% - 6px);
    }

    #home-pinweiyouxi .game-card,
    #home-zixun .news-card,
    #home-lottery-main .lottery-card {
        min-width: 0;
    }

    .carousel-container {
        margin: 8px auto;
        padding: 0 12px;
    }

    .carousel-main {
        height: 220px;
    }

    .page-container {
        margin: 14px auto;
        padding: 16px;
    }

    .page-btn {
        width: 44px;
        height: 44px;
    }

    .page-btn.prev {
        left: 6px;
    }

    .page-btn.next {
        right: 6px;
    }
}

@media (max-width: 576px) {
    .page-container:not(.index-body) .game-card {
        width: 100%;
    }

    .carousel-main {
        height: 170px;
    }

    .carousel-item {
        width: calc(100% / 2.4 - 8px);
    }
}

@media (max-width: 480px) {
    .carousel-main {
        height: 156px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        align-items: stretch;
    }

    .nav-item.user-dropdown {
        display: block !important;
        padding: 0 14px 0 16px;
        border-width: 1px;
        border-color: rgba(255, 107, 53, 0.28);
        background: linear-gradient(180deg, rgba(255, 247, 243, 0.98) 0%, rgba(255, 240, 235, 0.96) 100%);
        box-shadow: 0 10px 24px rgba(255, 107, 53, 0.12);
    }

    .nav-item.user-dropdown.expanded {
        border-radius: 16px;
        box-shadow: 0 12px 28px rgba(255, 107, 53, 0.16);
    }

    .nav-item.user-dropdown .dropdown-toggle {
        display: flex;
        align-items: center;
        min-height: 52px;
        width: 100%;
        padding: 14px 0;
        color: #c94a25;
        font-weight: 700;
        border-radius: 0;
    }

    .nav-item.user-dropdown .dropdown-toggle::before {
        display: none !important;
    }

    .nav-item.user-dropdown:hover .dropdown-toggle,
    .nav-item.user-dropdown.open .dropdown-toggle,
    .nav-item.user-dropdown.expanded .dropdown-toggle {
        color: #c94a25;
    }

    .nav-item.user-dropdown::after {
        width: 14px;
        height: 14px;
        margin-left: auto;
        background-color: #ff6b35;
        opacity: 1;
    }

    .user-submenu {
        width: calc(100% - 24px);
        margin: 10px 12px 0;
        padding: 8px;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(255, 107, 53, 0.10);
        border-radius: 14px;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
        gap: 4px;
        box-sizing: border-box;
        align-self: stretch;
    }

    .user-submenu-item {
        width: 100%;
        margin: 0;
        padding: 14px 16px;
        border-radius: 10px;
        background: transparent;
        border: none;
        box-shadow: none;
        color: #344054;
        font-size: 16px;
        font-weight: 600;
        min-height: 52px;
        justify-content: flex-start;
    }

    .user-submenu-item::before {
        display: block;
        width: 18px;
        height: 18px;
        background-color: #ff6b35;
        opacity: 0.88;
        flex-shrink: 0;
    }

    .user-submenu-item::after {
        display: none;
    }

    .user-submenu-item:hover {
        transform: none;
        background: rgba(255, 107, 53, 0.08);
        color: #c94a25;
        border-color: transparent;
        box-shadow: none;
    }

    .user-submenu-item:active {
        transform: scale(0.99);
    }

    .user-submenu-item[data-action="logout"] {
        margin-top: 4px;
        border-top: 1px solid rgba(220, 38, 38, 0.12);
        border-radius: 10px;
        background: rgba(220, 38, 38, 0.04);
    }

    .user-submenu-item[data-action="logout"]:hover {
        background: rgba(220, 38, 38, 0.10);
        color: #b42318;
        box-shadow: none;
    }
}

@media (max-width: 576px) {
    .user-submenu {
        width: 100%;
        margin: 10px 0 0;
    }

    .user-submenu-item {
        font-size: 15px;
        min-height: 50px;
    }
}

@media print {
    .header,
    .sub-nav,
    .sidebar,
    .footer,
    .page-btn,
    .carousel-nav {
        display: none !important;
    }

    .page-container {
        box-shadow: none;
        margin: 0;
        padding: 0;
    }

    .main-content-area {
        margin: 0;
    }

    .game-card,
    .news-card,
    .lottery-card {
        break-inside: avoid;
        width: 100%;
        margin-bottom: 20px;
    }
}


/* Final mobile header alignment overrides (2026-03-22) */
@media (max-width: 768px) {
    .header-content,
    .header-content-wrapper {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        min-height: 56px !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        gap: 10px !important;
    }

    .logo-container {
        order: 1 !important;
        flex: 0 0 auto !important;
        margin-right: auto !important;
    }

    .header .language-switcher,
    .header-content-wrapper .language-switcher {
        order: 2 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        transform: none !important;
        flex: 0 1 auto !important;
        max-width: calc(100vw - 150px) !important;
    }

    .nav-toggle {
        order: 3 !important;
        position: relative !important;
        right: auto !important;
        top: auto !important;
        left: auto !important;
        bottom: auto !important;
        margin: 0 0 0 8px !important;
        transform: none !important;
        flex: 0 0 44px !important;
        z-index: 1003 !important;
    }

    .nav-toggle:hover {
        transform: scale(1.05) !important;
    }

    .nav-toggle:active {
        transform: scale(0.96) !important;
    }
}

@media (max-width: 480px) {
    .header-content,
    .header-content-wrapper {
        padding-right: 10px !important;
        min-height: 54px !important;
    }

    .nav-toggle {
        margin-left: 6px !important;
    }

    .header .language-switcher,
    .header-content-wrapper .language-switcher {
        max-width: calc(100vw - 138px) !important;
    }

    .language-switcher {
        padding: 0 !important;
        gap: 8px !important;
    }

    .language-switcher button {
        min-width: 0 !important;
        padding: 0 !important;
    }
}


/* Mobile language switcher inside hamburger menu */
@media (max-width: 768px) {
    .header .language-switcher {
        display: none !important;
    }

    .mobile-language-switcher {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 4px 12px 10px;
        padding: 10px 0;
        border-radius: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .mobile-language-switcher::before {
        content: "\f1ab";
        font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
        font-weight: 900;
        color: #5f5a55;
        font-size: 14px;
        line-height: 1;
    }

    .mobile-language-switcher button {
        flex: 0 0 auto;
        min-width: 0;
        padding: 0;
        border: none;
        background: transparent;
        color: #5f5a55;
        border-radius: 0;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: color 0.2s ease;
    }

    .mobile-language-switcher button:hover,
    .mobile-language-switcher button:focus-visible {
        color: #E8425A;
    }

    .mobile-language-switcher button.active {
        display: none;
    }

    .header-content,
    .header-content-wrapper {
        padding-right: 14px !important;
    }
}

@media (max-width: 480px) {
    .mobile-language-switcher {
        margin: 4px 10px 10px;
        padding: 10px 0;
    }

    .mobile-language-switcher button {
        padding: 0;
        font-size: 13px;
    }

    .header-content,
    .header-content-wrapper {
        padding-right: 10px !important;
    }
}


/* Final mobile hamburger centering fix (2026-03-22) */
@media (max-width: 768px) {
    .nav-toggle {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        line-height: 1 !important;
    }

    .nav-toggle .hamburger {
        position: relative !important;
        display: block !important;
        left: 0 !important;
        top: 0 !important;
        margin: 0 !important;
        transform: none !important;
    }

    .nav-toggle .hamburger::before {
        top: -9px !important;
        left: 0 !important;
        transform: none !important;
    }

    .nav-toggle .hamburger::after {
        bottom: -9px !important;
        left: 0 !important;
        transform: none !important;
    }

    .header.nav-open .nav-toggle .hamburger {
        transform: none !important;
        background: transparent !important;
    }

    .header.nav-open .nav-toggle .hamburger::before {
        top: 0 !important;
        transform: rotate(45deg) !important;
    }

    .header.nav-open .nav-toggle .hamburger::after {
        bottom: 0 !important;
        transform: rotate(-45deg) !important;
    }
}
