/* =================
   首页专用样式
   ================= */

/* 轮播图 - 全屏宽度 */
.banner-carousel {
    width: 100%;
    margin-bottom: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
    min-height: 400px;
    position: relative;
}

/* 骨架屏主容器 */
.banner-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 400px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.banner-skeleton.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 骨架屏内容区域 */
.skeleton-content {
    width: 100%;
    height: 100%;
    position: relative;
    background: transparent;
    overflow: hidden;
}

/* 骨架屏波纹效果 */
.skeleton-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.8),
        transparent
    );
    animation: skeleton-loading 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes skeleton-loading {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}


/* 骨架屏主内容区域 */
.skeleton-main-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 500px;
}

/* 骨架屏标题 */
.skeleton-title {
    height: 40px;
    background: #e2e5e9;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

/* 骨架屏副标题 */
.skeleton-subtitle {
    height: 20px;
    background: #e2e5e9;
    border-radius: 4px;
    width: 70%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* 为每个骨架元素添加波纹效果 */
.skeleton-title::before,
.skeleton-subtitle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.7),
        transparent
    );
    animation: skeleton-loading 2s ease-in-out infinite;
    animation-delay: 0.3s;
    z-index: 2;
}


/* 骨架屏圆点指示器 */
.skeleton-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.skeleton-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e2e5e9;
    animation: skeleton-dot 1.5s ease-in-out infinite;
}

.skeleton-dot:nth-child(1) { animation-delay: 0s; }
.skeleton-dot:nth-child(2) { animation-delay: 0.2s; }
.skeleton-dot:nth-child(3) { animation-delay: 0.4s; }
.skeleton-dot:nth-child(4) { animation-delay: 0.6s; }
.skeleton-dot:nth-child(5) { animation-delay: 0.8s; }

@keyframes skeleton-dot {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Vue未初始化时的v-cloak样式 */
[v-cloak] {
    display: none !important;
}

/* 骨架屏在Vue未初始化时显示 */
[v-cloak] .banner-skeleton {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* 隐藏Vue未初始化时的轮播图 */
[v-cloak] .el-carousel {
    opacity: 0 !important;
}

/* Vue未初始化时隐藏轮播图内容 */
[v-cloak] .banner-carousel .el-carousel__item {
    opacity: 0;
}

/* Element UI轮播图样式 */
.banner-carousel.el-carousel {
    background: transparent;
}

/* 轮播图加载完成后隐藏骨架屏 */
.banner-carousel.loaded .banner-skeleton {
    opacity: 0;
    pointer-events: none;
}

.banner-carousel .el-carousel__item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.banner-carousel .el-carousel__arrow {
    background-color: rgba(78, 142, 247, 0.7);
}

.banner-carousel .el-carousel__arrow:hover {
    background-color: rgba(78, 142, 247, 0.9);
}

.banner-carousel .el-carousel__button {
    background-color: #4E8EF7;
}

/* 核心优势 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.feature-card {
    background: white;
    padding: 35px 25px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(102,126,234,.2);
    border-color: #667eea;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

.feature-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* 左右布局 */
.main-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
}

.left-content {
    min-width: 0;
}

.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 平台介绍 */
.intro-section {
    background: linear-gradient(135deg, #4E8EF7 0%, #667eea 100%);
    color: white;
    padding: 50px 40px;
    margin-bottom: 30px;
    border-radius: 8px;
}

.intro-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.section-title-large {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 18px;
}

.intro-desc {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 25px;
    opacity: 0.95;
}

.intro-stats {
    display: flex;
    gap: 35px;
}

.intro-stat-item {
    text-align: center;
}

.stat-num {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 6px;
}

.stat-text {
    font-size: 13px;
    opacity: 0.9;
}

.intro-image img {
    width: 100%;
    max-width: 300px;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.3);
}

/* 资讯和煤源 */
.section {
    background: white;
    border-radius: 12px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.news-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102,126,234,.15);
    transform: translateY(-3px);
}

.news-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.5;
}

.news-meta {
    font-size: 13px;
    color: #999;
}

.source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.source-card {
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
    background: white;
}

.source-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102,126,234,.15);
    transform: translateY(-3px);
}

.source-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #333;
}

.source-price {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    margin-top: 10px;
}

/* 侧边栏模块 */
.sidebar-box {
    background: white;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4E8EF7;
}

.sidebar-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.sidebar-more {
    font-size: 13px;
    color: #4E8EF7;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-more:hover {
    color: #3d7ae0;
}

.sidebar-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-item:last-child {
    border-bottom: none;
}

.sidebar-item:hover {
    padding-left: 8px;
    color: #4E8EF7;
}

.sidebar-item-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-item-meta {
    font-size: 12px;
    color: #999;
}

.sidebar-source {
    padding: 15px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    margin-bottom: 12px;
    transition: all 0.2s;
    cursor: pointer;
}

.sidebar-source:hover {
    border-color: #4E8EF7;
    box-shadow: 0 2px 12px rgba(78,142,247,.15);
}

.sidebar-source-name {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.sidebar-source-info {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.sidebar-source-price {
    font-size: 18px;
    font-weight: bold;
    color: #4E8EF7;
}

/* 服务流程 */
.service-process {
    background: white;
    border-radius: 8px;
    padding: 40px 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.process-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 40px;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.process-step {
    text-align: center;
    position: relative;
}

.process-step-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #4E8EF7, #667eea);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    box-shadow: 0 4px 12px rgba(78,142,247,.3);
}

.process-step-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.process-step-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.process-step:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: -10px;
    top: 35px;
    font-size: 24px;
    color: #4E8EF7;
}

/* 广告位 */
.ad-banner {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    transition: all 0.3s;
}

.ad-banner:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
    transform: translateY(-2px);
}

.ad-banner img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    display: block;
}

/* 数据看板 */
.data-dashboard {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.dashboard-title {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 3px solid #667eea;
    display: inline-block;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.dashboard-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 25px;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.dashboard-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.dashboard-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.dashboard-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,.15);
}

.dashboard-card-icon {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 40px;
    opacity: 0.3;
}

.dashboard-card-label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.dashboard-card-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.dashboard-card-trend {
    font-size: 12px;
    opacity: 0.8;
}

.dashboard-chart {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    height: 280px;
    width: 100%;
}

/* 友情链接样式 */
.friendlink-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px 25px;
    margin-top: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.friendlink-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.friendlink-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.friendlink-tip {
    font-size: 12px;
    color: #999;
    margin-left: 15px;
}

.friendlink-apply {
    margin-left: auto;
    font-size: 13px;
    color: #409eff;
    text-decoration: none;
}

.friendlink-apply:hover {
    text-decoration: underline;
}

.friendlink-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px;
}

.friendlink-list a {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: color .2s;
}

.friendlink-list a:hover {
    color: #409eff;
}

.friendlink-empty {
    font-size: 14px;
    color: #999;
}

/* =================
   首页响应式布局
   ================= */

/* 平板端适配 */
@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }
    
    /* 左右布局变单列 */
    .main-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .right-sidebar {
        order: -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    /* 平台介绍 */
    .intro-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .intro-image {
        order: -1;
    }
    
    .intro-stats {
        justify-content: center;
    }
    
    /* 服务流程 */
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .process-step:nth-child(2)::after {
        display: none;
    }
    
    .process-step:not(:last-child)::after {
        right: -15px;
        font-size: 20px;
    }
    
    /* 数据看板 */
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    /* 轮播图 */
    .banner-carousel,
    .banner-carousel .el-carousel__item img,
    .banner-skeleton {
        height: 200px !important;
        min-height: 200px;
    }
    
    /* 核心优势 */
    .features-section {
        padding: 30px 0;
    }
    
    .main-title {
        font-size: 22px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .feature-card {
        padding: 25px 20px;
    }
    
    .feature-icon {
        font-size: 36px;
        margin-bottom: 15px;
    }
    
    .feature-title {
        font-size: 18px;
    }
    
    /* 广告位 */
    .ad-banner img {
        height: 45px;
    }
    
    /* 右侧边栏改单列 */
    .right-sidebar {
        grid-template-columns: 1fr;
    }
    
    /* 平台介绍 */
    .intro-section {
        padding: 30px 20px;
    }
    
    .section-title-large {
        font-size: 22px;
        margin-bottom: 15px;
    }
    
    .intro-desc {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .intro-stats {
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .stat-num {
        font-size: 24px;
    }
    
    .intro-image img {
        max-width: 180px;
        max-height: 120px;
    }
    
    /* 服务流程 */
    .service-process {
        padding: 25px 20px;
    }
    
    .process-title {
        font-size: 20px;
        margin-bottom: 25px;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .process-step::after {
        display: none;
    }
    
    .process-step-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .process-step-title {
        font-size: 15px;
    }
    
    .process-step-desc {
        font-size: 12px;
    }
    
    /* 数据看板 */
    .data-dashboard {
        padding: 20px 15px;
    }
    
    .dashboard-title {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dashboard-card {
        padding: 20px;
    }
    
    .dashboard-card-value {
        font-size: 26px;
    }
    
    .dashboard-chart {
        height: 220px;
        padding: 15px;
    }
    
    /* 侧边栏模块 */
    .sidebar-box {
        padding: 15px;
    }
    
    .sidebar-title {
        font-size: 15px;
    }
    
    .sidebar-source {
        padding: 12px;
    }
    
    .sidebar-source-price {
        font-size: 16px;
    }
    
    /* 友情链接 */
    .friendlink-section {
        padding: 15px 20px;
    }
    
    .friendlink-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .friendlink-tip {
        display: none;
    }
    
    .friendlink-list {
        gap: 12px 20px;
    }
    
    .friendlink-list a {
        font-size: 13px;
    }
}

/* 小屏手机适配 */
@media (max-width: 480px) {
    .banner-carousel,
    .banner-carousel .el-carousel__item img,
    .banner-skeleton {
        height: 160px !important;
        min-height: 160px;
    }
    
    .intro-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-num {
        font-size: 22px;
    }
}

