/* 动力煤详情页样式 */

/* 面包屑导航 */
.breadcrumb {
    background-color: #F5F5F5;
    padding: 15px 0;
}

.breadcrumb-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumb-item {
    color: #666666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.breadcrumb-item:hover {
    color: #951D1D;
}

.breadcrumb-item.active {
    color: #333333;
    font-weight: 500;
}

.breadcrumb-separator {
    color: #999999;
    font-size: 14px;
}

/* 主要内容区域 */
.main-content {
    max-width: 1800px;
    margin: 40px auto;
    padding: 0 60px;
}

.content-container {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 30px;
}

/* 左侧主要内容 */
.coal-main-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 通用区块样式 */
.nb-index-section,
.price-table-section {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #951D1D;
}

.section-title {
    color: #951D1D;
    font-size: 24px;
    font-weight: bold;
    font-family: "Alibaba PuHuiTi", "阿里巴巴普惠体", sans-serif;
    margin: 0;
}

.index-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.index-select {
    padding: 8px 15px;
    border: 1px solid #DEDEDE;
    border-radius: 5px;
    font-size: 14px;
    background-color: #ffffff;
    color: #333333;
    cursor: pointer;
    transition: border-color 0.3s;
    min-width: 180px;
}

.index-select:hover {
    border-color: #951D1D;
}

.index-select:focus {
    outline: none;
    border-color: #951D1D;
    box-shadow: 0 0 0 2px rgba(149, 29, 29, 0.1);
}

.index-date {
    color: #666666;
    font-size: 14px;
    white-space: nowrap;
}

/* NB指数区域 */
.index-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    align-items: center;
}

/* 轮播容器 */
.index-carousel {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 轮播按钮 */
.carousel-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #951D1D 0%, #6C1515 100%);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.carousel-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(149, 29, 29, 0.4);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.index-value-card {
    background: linear-gradient(135deg, #951D1D 0%, #6C1515 100%);
    border-radius: 10px;
    padding: 30px;
    color: #ffffff;
    text-align: center;
    box-shadow: 0 4px 12px rgba(149, 29, 29, 0.3);
    flex: 1;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

/* 左右滑动动画 */
@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.index-value-card.slide-out-left {
    animation: slideOutLeft 0.5s ease-out forwards;
}

.index-value-card.slide-in-right {
    animation: slideInRight 0.5s ease-out forwards;
}

.index-label {
    font-size: 18px;
    font-weight: bold;
    opacity: 0.95;
    margin-bottom: 15px;
}

.index-value {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 15px;
    font-family: "Arial", sans-serif;
}

.index-change {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.change-label {
    opacity: 0.9;
}

.change-value {
    font-weight: bold;
    font-size: 18px;
}

.change-value.up {
    color: #FCCA00;
}

.change-value.up::before {
    content: '▲ ';
}

.change-value.down {
    color: #00D4AA;
}

.change-value.down::before {
    content: '▼ ';
}

.index-chart {
    background-color: #F9F9F9;
    border-radius: 8px;
    padding: 20px;
    min-height: 340px; /* 从200px增加到340px */
    display: flex;
    align-items: center;
    justify-content: center;
}

#nbIndexChart {
    max-width: 100%;
    max-height: 340px; /* 从200px增加到340px */
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background-color: #F9F9F9;
    border-radius: 8px;
}

.filter-left,
.filter-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-label {
    color: #666666;
    font-size: 14px;
    font-weight: 500;
}

.filter-select,
.filter-date {
    padding: 8px 15px;
    border: 1px solid #DEDEDE;
    border-radius: 5px;
    font-size: 14px;
    background-color: #ffffff;
    color: #333333;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-select:hover,
.filter-date:hover {
    border-color: #951D1D;
}

.filter-select:focus,
.filter-date:focus {
    outline: none;
    border-color: #951D1D;
    box-shadow: 0 0 0 2px rgba(149, 29, 29, 0.1);
}

.filter-select {
    min-width: 150px;
}

.filter-date {
    min-width: 160px;
}

/* 价格表格 */
.price-table-container {
    position: relative;
}

.price-table-wrapper {
    position: relative;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #EEEEEE;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background-color: #ffffff;
}

.price-table thead {
    background-color: #F5F5F5;
    position: sticky;
    top: 0;
    z-index: 10;
}

.price-table thead th {
    padding: 15px 12px;
    text-align: left;
    font-weight: bold;
    color: #333333;
    border-bottom: 2px solid #DEDEDE;
    white-space: nowrap;
}

.price-table tbody tr {
    border-bottom: 1px solid #F0F0F0;
    transition: background-color 0.3s;
}

.price-table tbody tr:hover {
    background-color: #FFF9F9;
}

.price-table tbody tr:last-child {
    border-bottom: none;
}

.price-table tbody td {
    padding: 15px 12px;
    color: #666666;
}

/* 价格列 */
.price-cell {
    color: #951D1D;
    font-weight: bold;
    font-size: 16px;
}

/* 涨跌列 */
.change-cell {
    font-weight: 500;
}

/* 企业名称链接 */
.company-link {
    color: #1890FF;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.company-link:hover {
    color: #ffffff;
    background-color: #1890FF;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.company-link::after {
    content: '»';
    margin-left: 4px;
    opacity: 0;
    transition: all 0.3s;
}

.company-link:hover::after {
    opacity: 1;
    margin-left: 6px;
}

.change-cell.up {
    color: #FF4D4F;
}

.change-cell.up::before {
    content: '↑ ';
}

.change-cell.down {
    color: #52C41A;
}

.change-cell.down::before {
    content: '↓ ';
}

.change-cell.flat {
    color: #999999;
}

.change-cell.flat::before {
    content: '- ';
}

/* 价格上涨下跌样式 - 提高优先级 */
.price-table tbody td.price-up {
    color: #FF4D4F !important;  /* 涨 - 红色 */
    font-weight: 500;
}

.price-table tbody td.price-down {
    color: #52C41A !important;  /* 跌 - 绿色 */
    font-weight: 500;
}

.price-table tbody td.price-flat {
    color: #999999 !important;  /* 平 - 灰色 */
    font-weight: 400;
}

/* 价格单元格 */
.price-cell {
    font-weight: bold;
    color: #951D1D;
    font-size: 15px;
}

/* 联系链接 */
.contact-link {
    color: #1890FF;
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid #1890FF;
    border-radius: 4px;
    display: inline-block;
    font-size: 13px;
    transition: all 0.3s;
}

.contact-link:hover {
    background-color: #1890FF;
    color: #ffffff;
    transform: scale(1.05);
}

/* 详情按钮 */
.btn-detail {
    padding: 6px 16px;
    background: linear-gradient(135deg, #951D1D 0%, #6C1515 100%);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-detail:hover {
    box-shadow: 0 4px 12px rgba(149, 29, 29, 0.4);
    transform: translateY(-2px);
}

/* 分页按钮 */
.page-num {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 1px solid #DEDEDE;
    border-radius: 5px;
    color: #333333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-num:hover {
    background-color: #951D1D;
    color: #ffffff;
    border-color: #951D1D;
}

.page-num.active {
    background-color: #951D1D;
    color: #ffffff;
    border-color: #951D1D;
    font-weight: bold;
}

/* 联系购买按钮 */
.contact-btn {
    padding: 6px 16px;
    background: linear-gradient(135deg, #951D1D 0%, #6C1515 100%);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.contact-btn:hover {
    box-shadow: 0 4px 12px rgba(149, 29, 29, 0.4);
    transform: translateY(-2px);
}

/* 加入我的煤库按钮 */
.add-to-library-btn {
    padding: 6px 16px;
    background: linear-gradient(135deg, #1890FF 0%, #0066CC 100%);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.add-to-library-btn:hover {
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
    transform: translateY(-2px);
}

.add-to-library-btn:active {
    transform: translateY(0);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999999;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-text {
    font-size: 16px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #EEEEEE;
}

.page-btn {
    padding: 8px 16px;
    background-color: #ffffff;
    border: 1px solid #DEDEDE;
    border-radius: 5px;
    color: #333333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover:not(:disabled) {
    background-color: #951D1D;
    color: #ffffff;
    border-color: #951D1D;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 1px solid #DEDEDE;
    border-radius: 5px;
    color: #333333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-number:hover {
    background-color: #951D1D;
    color: #ffffff;
    border-color: #951D1D;
}

.page-number.active {
    background-color: #951D1D;
    color: #ffffff;
    border-color: #951D1D;
    font-weight: bold;
}

.page-ellipsis {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999999;
    font-size: 14px;
}

/* 右侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-module {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.module-header {
    background: linear-gradient(135deg, #951D1D 0%, #6C1515 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    font-family: "Alibaba PuHuiTi", "阿里巴巴普惠体", sans-serif;
    margin: 0;
}

.module-more {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s;
}

.module-more:hover {
    opacity: 0.8;
}

.module-content {
    padding: 0;
}

/* 侧边栏资讯列表 */
.sidebar-news-list {
    display: flex;
    flex-direction: column;
}

.sidebar-news-item {
    display: block;
    text-decoration: none;
    padding: 15px 20px;
    border-bottom: 1px solid #EEEEEE;
    transition: background-color 0.3s;
}

.sidebar-news-item:last-child {
    border-bottom: none;
}

.sidebar-news-item:hover {
    background-color: #FFF9F9;
}

.sidebar-news-title {
    color: #333333;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-news-item:hover .sidebar-news-title {
    color: #951D1D;
}

.sidebar-news-date {
    color: #999999;
    font-size: 12px;
}

/* 资讯空状态 */
.empty-news-hint {
    padding: 30px 20px;
    text-align: center;
    color: #999999;
    font-size: 14px;
}

/* 响应式设计 - PC端大屏 (891px-1400px) */
@media (min-width: 891px) and (max-width: 1400px) {
    .content-container {
        grid-template-columns: 1fr 320px;
    }
}

/* PC端中屏 (891px-1024px) */
@media (min-width: 891px) and (max-width: 1024px) {
    .content-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .sidebar-module {
        flex: 1;
        min-width: 300px;
    }
    
    .index-content {
        grid-template-columns: 1fr;
    }
}

/* 删除 @media (max-width: 768px) - 移动端样式在 mobile.css */

/* 价格表遮罩样式 */
.price-table-section {
    position: relative;
}

/* 价格列遮罩 - 从价格列开始遮挡 */
.price-table-mask {
    position: absolute;
    top: 57px; /* 表头高度，跳过thead */
    left: 440px; /* 前4列宽度: 80+120+120+120=440px */
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    pointer-events: none;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.price-table-mask .mask-gradient {
    position: absolute;
    top: 0;
    left: -80px; /* 向左延伸，创建渐变过渡 */
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.7) 40px, rgba(255, 255, 255, 0.98) 80px);
}

.price-table-mask .unlock-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 12px;
    padding: 30px 40px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    text-align: center;
    pointer-events: auto;
    min-width: 360px;
}

.price-table-mask .unlock-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.price-table-mask .unlock-message {
    font-size: 18px;
    font-weight: bold;
    color: #333333;
    margin-bottom: 20px;
}

.price-table-mask .unlock-btn {
    display: inline-block;
    padding: 12px 40px;
    background: linear-gradient(135deg, #951D1D 0%, #6C1515 100%);
    color: #ffffff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(149, 29, 29, 0.3);
}

.price-table-mask .unlock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(149, 29, 29, 0.4);
}

.price-table-mask .unlock-hint {
    margin-top: 15px;
    font-size: 14px;
    color: #999999;
}
