/* ================================
   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 (max-width: 768px) {
    /* 现代化移动导航栏 */
    .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 24px 0;
        z-index: 999;
        animation: slideDown 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        min-height: auto;
        overflow: 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, #667eea 0%, #764ba2 100%);
        color: #ffffff;
        box-shadow: 
            0 8px 25px rgba(102, 126, 234, 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;
    }

    /* 为菜单项添加图标样式 */
    .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;
    }

    .nav-item:hover::before {
        opacity: 1;
        filter: brightness(0) invert(1); /* 悬停时图标变白 */
    }

    /* 首页图标 */
    .nav-item[href="index.html"]::before,
    .nav-item[href="/"]::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="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>');
    }

    /* 资讯图标 */
    .nav-item[href="news.html"]::before,
    .nav-item[href*="news"]::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="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>');
    }

    /* 品味游戏图标 */
    .nav-item[href="games.html"]::before,
    .nav-item[href*="game"]::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="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>');
    }

    /* 资源分享图标 */
    .nav-item[href*="resource"]::before,
    .nav-item[href*="share"]::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="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>');
    }

    /* 抽奖区图标 */
    .nav-item[href*="lottery"]::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="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>');
    }

    /* 外设图标 */
    .nav-item[href*="peripheral"]::before,
    .nav-item[href*="hardware"]::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"><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>');
    }

    .nav-item.search {
        margin: 12px 16px;
        padding: 12px 16px;
        background: rgba(102, 126, 234, 0.08);
        border: 2px solid rgba(102, 126, 234, 0.2);
        border-radius: 20px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .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(102, 126, 234, 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(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
        border: 2px solid rgba(102, 126, 234, 0.2);
        font-weight: 600;
        color: #667eea;
    }

    .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: #667eea;
        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;
    }

    .nav-toggle {
        display: block;
        position: relative;
        border-radius: 12px;
        padding: 8px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

    .nav-toggle:hover {
        background: rgba(255, 255, 255, 1);
        transform: 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, #667eea 0%, #764ba2 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 10px;
        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 15px;
    }

    .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;
        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);
    }

/* 移动端每日答题模态框优化 */
    #daily-quiz-modal .modal-content {
        width: 95%;
        max-width: 500px;
        margin: 10vh auto;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    #daily-quiz-modal #quiz-container {
        padding: 15px;
    }

    /* 模态框调整 */

    /* 表单调整 */
    .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;
    }

    /* 移动端详情页样式补充 */
    .review-card-title {
        font-size: 16px !important;
    }
    
    .review-card-content-wrapper {
        padding: 12px !important;
        gap: 10px !important;
    }

    /* 移动端汉堡菜单内用户下拉菜单定位修复 */
    .main-nav .user-dropdown .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        left: 10px !important;
        right: 10px !important;
        transform: none !important;
        margin-top: 3px !important;
        width: auto !important;
        min-width: 120px !important;
        max-width: 180px !important;
        z-index: 9999 !important;
        background: #fff !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
        border-radius: 8px !important;
        padding: 3px 0 !important;
        border: 1px solid #e0e0e0 !important;
    }

    /* 确保汉堡菜单内的用户下拉菜单容器定位正确 */
    .main-nav .nav-item.dropdown.user-dropdown {
        position: relative !important;
        overflow: visible !important;
    }

    /* 移动端下拉菜单项样式 */
    .main-nav .user-dropdown .dropdown-item {
        padding: 8px 12px !important;
        font-size: 13px !important;
        color: #333 !important;
        border-bottom: none !important;
        display: block !important;
        text-decoration: none !important;
        text-align: center !important;
        line-height: 1.2 !important;
    }

    .main-nav .user-dropdown .dropdown-item:hover {
        background-color: #f5f5f5 !important;
        color: #1a73e8 !important;
    }

    /* 移动端强制使用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;
    }

    /* 移动端文章卡片标题显示强制修复 - 彻底覆盖所有webkit-box样式 */
    html body div.content-grid div.game-card div.game-card-info h3,
    html body div.content-grid div.game-card h3.game-title,
    html body div.news-grid div.news-card h3.game-title,
    html body div.game-grid div.game-card h3.game-title,
    html body .main-content-area .content-grid .game-card .game-card-info h3,
    html body .main-content-area .content-grid .game-card .game-title,
    html body .main-content-area .news-grid .news-card .game-title,
    html body .page-container .content-grid .game-card-info h3,
    html body .page-container .content-grid .game-card .game-title,
    html body .page-container .news-grid .news-card .game-title {
        /* 彻底重置所有可能导致竖排的属性 */
        display: block !important;
        -webkit-box-orient: horizontal !important;
        -webkit-line-clamp: none !important;
        -webkit-line-clamp: unset !important;
        -webkit-box-direction: normal !important;
        
        /* 文字方向和书写模式 */
        writing-mode: horizontal-tb !important;
        text-orientation: mixed !important;
        direction: ltr !important;
        unicode-bidi: normal !important;
        
        /* 文字换行和断行 */
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        
        /* 布局属性 */
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        
        /* 文字样式 */
        font-size: 14px !important;
        line-height: 1.4 !important;
        text-align: left !important;
        vertical-align: top !important;
        
        /* 间距 */
        margin: 8px 0 !important;
        padding: 8px !important;
        
        /* 溢出处理 */
        overflow: visible !important;
        text-overflow: clip !important;
        
        /* 盒模型 */
        box-sizing: border-box !important;
    }

    /* 移动端每日答题模态框优化 */
    #daily-quiz-modal .modal-content {
        width: 95%;
        max-width: 500px;
        margin: 10vh auto;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    #daily-quiz-modal #quiz-container {
        padding: 15px;
    }
}

/* 手机屏幕 (576px及以下) */
@media (max-width: 576px) {
    /* 手机屏幕每日答题模态框优化 */
    #daily-quiz-modal .modal-content {
        width: 98% !important;
        max-width: 420px !important;
        margin: 5vh auto !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        padding: 10px !important;
    }
    
    #daily-quiz-modal #quiz-container {
        padding: 10px !important;
    }
    
    #daily-quiz-modal h1 {
        font-size: 18px !important;
        margin-bottom: 10px !important;
    }
    
    #daily-quiz-modal #quiz-content-wrapper {
        padding: 10px !important;
    }
    
    #daily-quiz-modal .quiz-button {
        padding: 10px 20px !important;
        font-size: 16px !important;
    }
    
    #daily-quiz-modal #question-text {
        font-size: 16px !important;
        line-height: 1.4 !important;
        margin-bottom: 15px !important;
    }
    
    #daily-quiz-modal .option-btn {
        padding: 12px !important;
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }
    
    /* 小屏手机用户菜单进一步优化 */
    .main-nav .user-dropdown .dropdown-menu {
        margin-top: 2px !important;
        padding: 2px 0 !important;
        min-width: 110px !important;
        max-width: 160px !important;
    }

    .main-nav .user-dropdown .dropdown-item {
        padding: 6px 10px !important;
        font-size: 12px !important;
        line-height: 1.1 !important;
    }

    /* 小屏幕文章标题强制修复 */
    .game-card-info h3,
    .game-card .game-title,
    .news-card .game-title {
        font-size: 13px !important;
        word-break: keep-all !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
        line-height: 1.3 !important;
    }

    /* 小屏手机样式优化 */
    .review-card-title {
        font-size: 15px !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 15px;
    }

    .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;
        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);
    }

    /* 详情页标题优化 */
    .review-card {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 16px;
        padding: 20px;
        margin-bottom: 16px;
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    }

    .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; /* 确保标题不被分享按钮遮挡 */
    }

    .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;
    }

    .game-content-section h1::before,
    .game-content-section h2::before,
    .game-content-section h3::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 16px;
        background: linear-gradient(45deg, #667eea, #764ba2);
        border-radius: 2px;
    }

    /* 评论区域优化 */
    .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;
    }

    .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, #667eea 0%, #764ba2 100%);
        border-radius: 50%;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 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(102, 126, 234, 0.6);
    }
}

/* 超小屏幕 (480px及以下) */
@media (max-width: 480px) {
    .header-content-wrapper {
        padding-left: 10px;
        padding-right: 10px;
    }

    .site-title {
        font-size: 16px;
    }

    .page-container {
        margin: 10px auto;
        padding: 12px;
    }

    .carousel-container {
        margin: 8px 10px;
    }

    .carousel-main {
        height: 180px;
    }

    .section-title {
        font-size: 16px;
    }

    /* 游戏评分圆圈调整 */
    .score-circle {
        width: 30px;
        height: 30px;
        bottom: 8px;
        right: 8px;
    }

    .score-text {
        font-size: 12px;
    }
}

/* 横屏手机优化 */
@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张一行 */
    }
}

/* 高分辨率屏幕优化 */
@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;
    }
}

/* 打印样式 */
@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;
    }
}