/* ===================================
   新闻页面移动端样式
   基于移动端通用样式，针对新闻页面特殊需求优化
   =================================== */

/* === 移动端新闻页面样式 (768px以下) === */
@media screen and (max-width: 768px) {
    
    /* === 1. 新闻分类标签 - 顶部样式 === */
    .news-categories {
        position: relative;
        background: rgba(28, 28, 28, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        display: flex;
        justify-content: space-around;
        padding: 0.5rem;
        margin-bottom: 1.5rem;
        width: 100%;
        max-width: 100vw;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    
    .news-categories .category-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--text-color);
        padding: 0.5rem 0.25rem;
        transition: all 0.3s ease;
        border-radius: 8px;
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        min-height: 45px;
        background: none;
        border: none;
        cursor: pointer;
        font-size: 0.7rem;
        font-weight: 500;
        white-space: nowrap;
        flex: 1;
        min-width: 0;
    }
    
    .news-categories .category-tab:hover,
    .news-categories .category-tab.active {
        color: var(--primary-color);
        background: rgba(224, 184, 160, 0.2);
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(224, 184, 160, 0.2);
    }
    
    .news-categories .category-tab::before {
        content: '';
        font-size: 1.3rem;
        margin-bottom: 0.15rem;
        display: block;
        transition: all 0.3s ease;
        font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "Font Awesome 5 Pro";
        font-weight: 900;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: auto;
        line-height: 1;
        font-style: normal;
        font-variant: normal;
    }
    
    /* 分类图标 */
    .news-categories .category-tab[data-category=""]::before {
        content: "\f1ea"; /* 全部新闻 - 报纸图标 */
    }
    
    .news-categories .category-tab[data-category="足球新闻"]::before {
        content: "\f1e3"; /* 足球新闻 - 足球图标 */
    }
    
    .news-categories .category-tab[data-category="优惠活动"]::before {
        content: "\f06b"; /* 优惠活动 - 礼物图标 */
    }
    
    .news-categories .category-tab[data-category="篮球新闻"]::before {
        content: "\f434"; /* 篮球新闻 - 篮球图标 */
    }
    
    .news-categories .category-tab[data-category="电竞新闻"]::before {
        content: "\f11b"; /* 电竞新闻 - 游戏手柄图标 */
    }
    
    .news-categories .category-tab[data-category="行业新闻"]::before {
        content: "\f275"; /* 行业新闻 - 工业图标 */
    }
    
    /* 备用图标显示方案 - 如果FontAwesome加载失败 */
    .news-categories .category-tab[data-category=""]::after {
        content: "📰";
        font-family: system-ui, -apple-system, sans-serif;
        display: none;
    }
    
    .news-categories .category-tab[data-category="足球新闻"]::after {
        content: "⚽";
        font-family: system-ui, -apple-system, sans-serif;
        display: none;
    }
    
    .news-categories .category-tab[data-category="优惠活动"]::after {
        content: "🎁";
        font-family: system-ui, -apple-system, sans-serif;
        display: none;
    }
    
    .news-categories .category-tab[data-category="篮球新闻"]::after {
        content: "🏀";
        font-family: system-ui, -apple-system, sans-serif;
        display: none;
    }
    
    .news-categories .category-tab[data-category="电竞新闻"]::after {
        content: "🎮";
        font-family: system-ui, -apple-system, sans-serif;
        display: none;
    }
    
    .news-categories .category-tab[data-category="行业新闻"]::after {
        content: "🏭";
        font-family: system-ui, -apple-system, sans-serif;
        display: none;
    }
    
    /* 如需启用备用emoji，请在父容器加上 .no-fa 类以切换显示 */
    .no-fa .news-categories .category-tab::before { display: none; }
    .no-fa .news-categories .category-tab::after {
        display: block;
        font-size: 1.3rem;
        margin-bottom: 0.15rem;
    }
    
    /* === 2. 新闻容器调整 === */
    #news-container {
        margin-bottom: 2rem;
        padding-bottom: 1rem;
    }
    
    /* === 3. 新闻卡片 - 竖排布局 === */
    #news-container .news-item {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        background: rgba(28, 28, 28, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 0;
        margin-bottom: 1rem;
        height: 120px; /* 固定高度 */
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    #news-container .news-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    }
    
    /* === 4. 新闻图片 - 左侧固定尺寸 === */
    #news-container .news-item .news-image {
        flex: 0 0 120px !important;
        width: 120px !important;
        height: 120px !important;
        margin-right: 0;
        border-radius: 12px 0 0 12px;
        overflow: hidden;
        position: relative;
    }
    
    #news-container .news-item .news-image img {
        width: 120px;
        height: 120px;
        object-fit: cover;
        transition: transform 0.3s ease;
    }
    
    #news-container .news-item:hover .news-image img {
        transform: scale(1.05);
    }
    
    /* === 5. 新闻内容 - 右侧上下布局 === */
    #news-container .news-item .news-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
        min-width: 0; /* 防止内容溢出 */
        padding: 0.5rem;
    }
    
    /* 标题区域 */
    #news-container .news-item .news-content .news-title {
        margin: 0 0 0.5rem 0;
        font-size: 0.9rem;
        font-weight: 600;
        line-height: 1.3;
        color: #fff;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
    }
    
    #news-container .news-item .news-content .news-title-link {
        color: #fff;
        text-decoration: none;
        transition: color 0.3s ease;
    }
    
    #news-container .news-item .news-content .news-title-link:hover {
        color: var(--primary-color);
    }
    
    /* 日期 - 隐藏 */
    #news-container .news-item .news-content .news-date {
        display: none;
    }
    
    /* 摘要内容 */
    #news-container .news-item .news-content .news-summary {
        margin: 0;
        font-size: 0.75rem;
        line-height: 1.4;
        color: rgba(255, 255, 255, 0.8);
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
        flex: 1;
    }
    
    #news-container .news-item .news-content .news-summary-link {
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        transition: color 0.3s ease;
    }
    
    #news-container .news-item .news-content .news-summary-link:hover {
        color: var(--primary-color);
    }
    
    /* 阅读更多按钮 - 隐藏 */
    #news-container .news-item .news-content .read-more {
        display: none;
    }
    
    /* === 6. 分页控件优化 === */
    .pagination-container {
        margin-top: 2rem;
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .pagination-container .pagination-info {
        margin-bottom: 1rem;
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.7);
    }
    
    .pagination-container .pagination-controls {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
    }
    
    .pagination-container .pagination-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        background: rgba(28, 28, 28, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #fff;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
        min-height: 40px;
        min-width: 60px;
    }
    
    .pagination-container .pagination-btn:hover:not(:disabled) {
        background: rgba(224, 184, 160, 0.2);
        border-color: var(--primary-color);
    }
    
    .pagination-container .pagination-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
    
    .pagination-container .page-numbers {
        display: flex;
        gap: 0.25rem;
    }
    
    .pagination-container .page-number {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        background: rgba(28, 28, 28, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #fff;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
        min-width: 40px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .pagination-container .page-number:hover,
    .pagination-container .page-number.active {
        background: var(--primary-color);
        color: #000;
        border-color: var(--primary-color);
    }
    
    /* === 7. 骨架屏样式 === */
    #news-container .skeleton-img {
        background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
        background-size: 200% 100%;
        animation: skeleton-loading 1.5s infinite;
        border-radius: 8px;
    }
    
    #news-container .skeleton-line {
        height: 0.8rem;
        background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
        background-size: 200% 100%;
        animation: skeleton-loading 1.5s infinite;
        border-radius: 4px;
        margin-bottom: 0.5rem;
    }
    
    #news-container .skeleton-line.title {
        height: 1rem;
        width: 80%;
    }
    
    #news-container .skeleton-line.text {
        width: 60%;
    }
    
    @keyframes skeleton-loading {
        0% {
            background-position: 200% 0;
        }
        100% {
            background-position: -200% 0;
        }
    }
}

/* === 小屏手机优化 (480px以下) === */
@media screen and (max-width: 480px) {
    
    /* 新闻卡片更紧凑 */
    #news-container .news-item {
        padding: 0;
        height: 110px;
    }
    
    /* 图片尺寸调整 */
    #news-container .news-item .news-image {
        flex: 0 0 110px !important;
        width: 110px !important;
        height: 110px !important;
        margin-right: 0;
        border-radius: 12px 0 0 12px;
    }
    
        /* 文字大小调整 */
    #news-container .news-item .news-content {
        padding: 0.5rem;
    }
    
    #news-container .news-item .news-content .news-title {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
    
    #news-container .news-item .news-content .news-summary {
        font-size: 0.7rem;
        -webkit-line-clamp: 2;
    }
    

    
    /* 分类标签更紧凑 */
    .news-categories {
        padding: 0.4rem;
        margin-bottom: 1rem;
    }
    
    .news-categories .category-tab {
        font-size: 0.65rem;
        padding: 0.4rem 0.2rem;
        min-height: 40px;
    }
    
    .news-categories .category-tab::before {
        font-size: 1.1rem;
        margin-bottom: 0.1rem;
    }
    
    /* 分页控件更紧凑 */
    .pagination-container .pagination-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        min-height: 36px;
        min-width: 50px;
    }
    
    .pagination-container .page-number {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        min-width: 36px;
        min-height: 36px;
    }
}

/* === 横屏模式优化 === */
@media screen and (max-width: 768px) and (orientation: landscape) {
    
    /* 横屏下新闻卡片可以稍微高一些 */
    #news-container .news-item {
        height: 130px;
    }
    
    #news-container .news-item .news-image {
        flex: 0 0 130px !important;
        width: 130px !important;
        height: 130px !important;
        border-radius: 12px 0 0 12px;
    }
    
    /* 分类标签在横屏下保持紧凑 */
    .news-categories {
        padding: 0.4rem;
        margin-bottom: 1.25rem;
    }
    
    .news-categories .category-tab {
        min-height: 45px;
    }
    
    /* 横屏下内容区域调整 */
    #news-container .news-item .news-content {
        padding: 0.5rem;
    }
}

/* === 超小屏手机优化 (360px以下) === */
@media screen and (max-width: 360px) {
    
    /* 新闻卡片最小化 */
    #news-container .news-item {
        padding: 0;
        height: 100px;
    }
    
    /* 图片最小化 */
    #news-container .news-item .news-image {
        flex: 0 0 100px !important;
        width: 100px !important;
        height: 100px !important;
        margin-right: 0;
        border-radius: 12px 0 0 12px;
    }
    
        /* 文字最小化 */
    #news-container .news-item .news-content {
        padding: 0.5rem;
    }
    
    #news-container .news-item .news-content .news-title {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }
    
    #news-container .news-item .news-content .news-summary {
        font-size: 0.65rem;
        -webkit-line-clamp: 1;
    }
    

    
    /* 分类标签最小化 */
    .news-categories {
        padding: 0.3rem;
        margin-bottom: 0.75rem;
    }
    
    .news-categories .category-tab {
        font-size: 0.6rem;
        padding: 0.3rem 0.15rem;
        min-height: 35px;
    }
    
    .news-categories .category-tab::before {
        font-size: 1rem;
        margin-bottom: 0.05rem;
    }
}
