/* 煤球网 - 移动端纯净样式 */
/* 适用于屏幕宽度 ≤ 890px */
/* 无需覆盖PC端样式,完全独立 */

@media (max-width: 890px) {
/* ==================== 全局设置 ==================== */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-size: 14px;
    min-width: 320px;
    margin: 0;
    padding: 0;
}

* {
    box-sizing: border-box;
}

/* ==================== 页眉区域 - 三层布局 ==================== */

/* 外层容器 - 垂直布局 */
.top-bar {
    display: flex !important;
    flex-direction: column !important;
    background: transparent !important;
}

/* 第1层: 品牌栏 - 包含Logo+下载按钮+会员 */
.logo-section {
    order: 1 !important;
    height: 60px !important;
    background: #3a3a3a !important;
    padding: 0 15px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    justify-content: space-between !important;
    position: relative !important;
}

.logo-inner {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
    order: 1 !important;
}

.logo-img {
    width: 35px !important;
    height: 35px !important;
}

.logo-text {
    font-size: 16px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    display: none !important; /* 移动端隐藏文字 */
}

.app-download-link {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    height: 35px !important;
    order: 2 !important;
    margin-left: 8px !important;
}

.app-download-img {
    height: 28px !important;
    width: auto !important;
}

/* ==================== 搜索框区域 - 移动端隐藏header中的搜索框 ==================== */
/* 注意：只隐藏header中的搜索框，banner中的搜索框不受影响 */
.logo-section .search-container-mobile,
.logo-section .search-wrapper {
    display: none !important;
}

/* 登录/会员按钮 */
.header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    order: 3 !important;
}

.btn-login {
    height: 30px !important;
    font-size: 12px !important;
    padding: 0 12px !important;
    border-radius: 15px !important;
    background: #ffffff !important;
    color: #3a3a3a !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.btn-member {
    width: auto !important;
    height: 30px !important;
    font-size: 11px !important;
    padding: 0 10px !important;
    border-radius: 15px !important;
    background: #e74c3c !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3) !important;
}

/* 第2层: 主导航 */
.top-nav {
    order: 2 !important;
    height: 40px !important;
    background: #4a4a4a !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
}

.top-nav::-webkit-scrollbar {
    display: none !important;
}

.nav-container {
    display: flex !important;
    height: 40px !important;
    min-width: max-content !important;
}

.nav-link {
    font-size: 13px !important;
    padding: 0 18px !important;
    white-space: nowrap !important;
    height: 40px !important;
    line-height: 40px !important;
    color: #ffffff !important;
    flex: 0 0 auto !important;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* 第3层: 煤种导航 */
.coal-nav {
    order: 3 !important;
    height: 40px !important;
    background: #ffffff !important;
    padding: 0 15px !important;
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    align-items: center !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.coal-nav::-webkit-scrollbar {
    display: none;
}

.coal-item {
    min-width: 70px;
    height: 32px;
    font-size: 13px;
    padding: 0 15px;
    white-space: nowrap;
    line-height: 32px;
    border-radius: 16px;
    background: #f5f5f5;
    color: #333333;
    text-align: center;
    flex: 0 0 auto;
    border: 1px solid #e8e8e8;
}

.coal-item.active,
.coal-item:active {
    background: #C8102E;
    color: #ffffff;
}

.coal-item-special {
    background: #FCCA00;
    color: #000000;
    font-weight: bold;
}

/* ==================== Banner区域 - 移动端隐藏 ==================== */
/* PC端显示banner和搜索框，移动端隐藏 */
.banner,
#banner-container,
.banner-container {
    display: none !important;
}

/* ==================== 行业资讯 ==================== */
.industry-news-section {
    padding: 8px 0;
    background: #f5f5f5;
    margin-bottom: 6px;
    max-width: 100vw;
    overflow-x: hidden;
}

.industry-container {
    padding: 0 12px;
    max-width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    line-height: 1.2;
}

.more-link {
    font-size: 12px;
    color: #1890ff;
    line-height: 1.2;
}

.industry-news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-width: 100%;
}

/* 移动端只显示前2条资讯 */
.industry-news-grid .industry-card:nth-child(n+3) {
    display: none;
}

.industry-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
    max-width: 100%;
}

.industry-card:active {
    transform: scale(0.98);
}

.card-image {
    height: 100px;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.card-meta {
    padding: 6px 8px;
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999999;
    border-top: 1px solid #f0f0f0;
}

/* ==================== 煤炭市场板块 ==================== */
.coal-market {
    padding: 0 12px;
    margin-bottom: 8px;
    max-width: 100vw;
    overflow-x: hidden;
}

.main-content {
    max-width: 100vw;
    overflow-x: hidden;
}

.market-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    margin-bottom: 8px;
}

.market-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.market-title h2 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.market-zone {
    font-size: 13px;
    color: #1890ff;
    line-height: 1.2;
}

/* 隐藏所有分隔线 */
.divider-line {
    display: none;
}

/* NB指数区域 */
.nb-index-section-inline {
    margin-bottom: 8px;
}

.nb-index-inline {
    background: linear-gradient(135deg, #c62828 0%, #8b1a1a 100%);
    padding: 8px;
    border-radius: 6px;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* NB Logo隐藏 */
.nb-logo {
    display: none;
}

/* 指数轮播 */
.index-carousel-home {
    width: 100%;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.index-carousel-home::-webkit-scrollbar {
    display: none;
}

/* 轮播按钮隐藏 */
.carousel-btn-home {
    display: none;
}

.index-cards {
    display: flex;
    gap: 8px;
    flex: 1;
}

.index-card {
    min-width: 110px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 5px;
    padding: 6px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.port-name {
    font-size: 12px;
    color: #666666;
}

.price {
    font-size: 20px;
    font-weight: bold;
    color: #C8102E;
}

.change-value {
    font-size: 14px;
}

/* ==================== 三栏模块 ==================== */
.three-modules {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0 12px;
    margin-bottom: 12px;
}

/* 移动端显示所有模块,不再隐藏 */

.module-box {
    background: #ffffff;
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.module-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    padding-bottom: 0;
    border-bottom: none;
}

/* 图表 */
.chart-wrapper {
    height: 180px;
    margin-bottom: 6px;
}

.chart-wrapper canvas {
    max-width: 100%;
}

.chart-legend {
    display: none; /* 移动端隐藏图例,节省空间 */
}

.legend-item {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 新闻列表 */
.news-list-module {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-item-module {
    padding: 6px 0;
    border-bottom: none;
}

.news-item-module:last-child {
    border-bottom: none;
}

.news-title-module {
    font-size: 13px;
    line-height: 1.4;
    color: #333333;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-date-module {
    font-size: 11px;
    color: #999999;
}

.more-link-container {
    text-align: center;
    margin-top: 6px;
}

.more-link-blue {
    font-size: 13px;
    color: #1890ff;
}

/* 提示文字 - 移动端隐藏 */
.three-modules .module-box:first-child::after {
    display: none;
}

/* ==================== 页脚优化 ==================== */
.footer {
    background: linear-gradient(135deg, #333333 0%, #2c2c2c 100%);
    color: #ffffff;
    padding: 25px 15px 20px;
    font-size: 12px;
    text-align: center;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, #e74c3c, #FCCA00, #3498db);
}

.footer-content {
    max-width: 100%;
    position: relative;
    z-index: 1;
}

/* 页脚顶部 - Logo和公司信息 */
.footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 18px;
    gap: 15px;
}

.footer-logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    background: #fff;
    padding: 2px;
}

.footer-company {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    text-align: left;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 页脚信息区 */
.footer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 5px;
}

.footer-link {
    color: #cccccc;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
    position: relative;
}

.footer-link:hover {
    color: #FCCA00;
    background: rgba(252, 202, 0, 0.1);
    transform: translateY(-1px);
}

.footer-link:active {
    transform: translateY(0);
}

.footer-email {
    color: #aaaaaa;
    font-size: 11px;
    margin-top: 3px;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 4px;
}

.footer-email::before {
    content: '✉️';
    font-style: normal;
}

/* 分割线 */
.footer-divider {
    height: 1px;
    background: linear-gradient(to right, transparent 10%, rgba(255,255,255,0.2) 50%, transparent 90%);
    margin: 15px 0 12px;
    position: relative;
}

.footer-divider::after {
    content: '•';
    position: absolute;
    left: 50%;
    top: -6px;
    transform: translateX(-50%);
    background: #333;
    color: #FCCA00;
    font-size: 12px;
    padding: 0 4px;
}

/* 页脚标语 */
.footer-slogan {
    font-size: 15px;
    font-weight: 700;
    color: #FCCA00;
    text-align: center;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    margin-bottom: 8px;
    position: relative;
}

.footer-slogan::before {
    content: '✨';
    margin-right: 5px;
}

.footer-slogan::after {
    content: '✨';
    margin-left: 5px;
}

/* 版权信息 */
.copyright {
    font-size: 10px;
    color: #888888;
    line-height: 1.4;
    margin-top: 5px;
    text-align: center;
    opacity: 0.8;
}

/* ==================== 骨架屏 ==================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    height: 140px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.skeleton-text {
    height: 16px;
    border-radius: 4px;
    margin-bottom: 8px;
}

/* 分类区域标题 */
.section-divider {
    background: #e8eaf0;
    color: #333;
    padding: 8px 12px;
    margin: 0;
    border-left: 3px solid #666;
    position: relative;
}

.section-divider-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    width: 100%;
}

.section-text {
    color: #333;
    font-weight: 600;
    flex: 0 0 auto;
}

.section-subtitle {
    font-size: 11px;
    color: #666;
    font-weight: 400;
    white-space: nowrap;
    flex: 0 0 auto;
}

/* 煤种切换Tab条 */
.coal-type-tabs {
    background: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 10;
}

.tabs-container {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 12px;
    gap: 0;
}

.tabs-container::-webkit-scrollbar {
    display: none;
}

.tab-item {
    flex: 0 0 auto;
    background: none;
    border: none;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 55px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    color: #666;
    position: relative;
    z-index: 11;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.tab-item.active {
    color: #e74c3c;
    border-bottom-color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.tab-item:hover {
    background: rgba(231, 76, 60, 0.1);
}

.tab-item:active {
    transform: scale(0.95);
    opacity: 0.9;
}

.tab-icon {
    font-size: 16px;
    line-height: 1;
    pointer-events: none;
}

.tab-text {
    font-size: 12px;
    font-weight: 500;
    color: inherit;
    white-space: nowrap;
    pointer-events: none;
}

.tab-item.active .tab-text {
    font-weight: 600;
}

/* 统一的煤炭市场板块 */
.coal-market {
    background: #fff;
    margin: 0;
    padding: 0;
}

/* 市场标题栏 */
.market-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.market-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.market-title h2 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.trend-icon {
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23e74c3c"><path d="M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"/></svg>') no-repeat center;
    background-size: contain;
}

.market-zone {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.market-zone:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #2980b9;
}

.arrow-icon::after {
    content: '›';
    font-size: 16px;
    font-weight: bold;
}

/* NB指数块增强样式 */
.nb-index-section-inline {
    padding: 15px;
    background: #fff;
}

.nb-index-inline {
    display: flex;
    gap: 15px;
    align-items: center;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    color: white;
}

/* 煤种背景色彩 */
.nb-index-inline.coking-coal-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nb-index-inline.anthracite-coal-bg {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    color: white;
}

.nb-index-inline.coke-bg {
    background: linear-gradient(135deg, #8360c3 0%, #2ebf91 100%);
    color: white;
}

.nb-index-inline.semicoke-bg {
    background: linear-gradient(135deg, #ff8a80 0%, #ea6100 100%);
    color: white;
}

.nb-index-inline.briquette-bg {
    background: linear-gradient(135deg, #8d7053 0%, #5d4e37 100%);
    color: white;
}

/* 增强移动端轮播按钮 */
.carousel-btn-home {
    display: flex !important; /* 覆盖之前的隐藏 */
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    flex: 0 0 28px;
}

.carousel-btn-home:hover {
    background: #fff;
    color: #e74c3c;
    border-color: #e74c3c;
}

.carousel-btn-home:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 焦炭类型的按钮颜色适配 */
.nb-index-inline.coking-coal-bg .carousel-btn-home,
.nb-index-inline.anthracite-coal-bg .carousel-btn-home,
.nb-index-inline.coke-bg .carousel-btn-home,
.nb-index-inline.semicoke-bg .carousel-btn-home,
.nb-index-inline.briquette-bg .carousel-btn-home {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.nb-index-inline.coking-coal-bg .carousel-btn-home:hover,
.nb-index-inline.anthracite-coal-bg .carousel-btn-home:hover,
.nb-index-inline.coke-bg .carousel-btn-home:hover,
.nb-index-inline.semicoke-bg .carousel-btn-home:hover,
.nb-index-inline.briquette-bg .carousel-btn-home:hover {
    background: #fff;
    color: #e74c3c;
}

/* 修正指数卡片在有背景时的样式 */
.nb-index-inline.coking-coal-bg .index-card,
.nb-index-inline.anthracite-coal-bg .index-card,
.nb-index-inline.coke-bg .index-card,
.nb-index-inline.semicoke-bg .index-card,
.nb-index-inline.briquette-bg .index-card {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
}

/* 价格走势图针对Tab切换的适配 */
.chart-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    height: 200px;
}

#priceChart {
    max-width: 100%;
    width: 280px !important;
    height: 180px !important;
}

/* 移动端的Tab切换动效 */
.coal-market {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 占位内容样式 */
.news-item-module.placeholder {
    opacity: 0.6;
}

.news-item-module.placeholder .news-title-module {
    color: #999 !important;
    font-style: italic;
    pointer-events: none;
}

.news-item-module.placeholder .news-date-module {
    color: #ccc !important;
}

/* 广告位优化样式 - 移动端 */
.ad-section {
    background: rgba(248, 249, 250, 0.5);
    border-radius: 8px;
    padding: 15px;
    margin: 15px;
    position: relative;
    border: 1px solid #e9ecef;
}

.ad-section::before {
    content: '🤝 合作伙伴';
    position: absolute;
    top: -8px;
    left: 20px;
    background: #fff;
    padding: 4px 8px;
    font-size: 11px;
    color: #666;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.ad-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 100%;
}

.ad-item {
    display: block;
    width: 100%;
    height: 100px;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    background: #fff;
    border: 1px solid #e9ecef;
    position: relative;
}

.ad-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #d6d9dc;
}

.ad-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.ad-item:hover .ad-img {
    transform: scale(1.01);
}

.ad-placeholder {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #666;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

/* 广告位间距调整 */
#ad-container {
    margin: 10px 0;
}

} /* @media (max-width: 890px) 结束 */
