/* 通用头部样式 - 适用于所有页面 */
/* PC端样式 - 只在宽度 > 890px 时生效 */

@media (min-width: 891px) {
/* 顶部导航栏 - 在大色块内部顶部 */
.top-nav {
    background-color: #6C6C6C;
    height: 52px;
    width: 1050px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.nav-container {
    display: flex;
    justify-content: center;
    gap: 50px;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-family: "Alibaba PuHuiTi", "阿里巴巴普惠体", sans-serif;
    font-size: 18px;
    font-weight: bold;
    padding: 8px 20px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 顶部栏 - 底色#333333, 高度175px */
.top-bar {
    background-color: #333333;
    display: block; /* 块级布局 */
    padding: 72px 50px 0;
    height: 175px !important; /* 强制高度 */
    max-width: 1920px;
    margin: 0 auto !important; /* 强制无间距 */
    position: relative;
    overflow: hidden; /* 防止子元素溢出 */
    box-sizing: border-box; /* 确保ing计入高度 */
}

/* Logo区域 */
.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
}

/* Logo内部垂直排列区 */
.logo-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.logo-img {
    width: 105px;
    height: 105px;
}

/* 通用logo样式，防止其他页面使用.logo类名时出现问题 */
.logo {
    width: 105px;
    height: 105px;
    display: block;
}

.logo-text {
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
    font-family: "Alibaba PuHuiTi", "阿里巴巴普惠体", "STHeiti", "华文黑体", sans-serif;
}

/* APP下载链接 */
.app-download-link {
    display: inline-block;
}

.app-download-img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* 右侧按钮区域 - 上下居中 */
.header-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
}

.btn-login {
    color: #ffffff;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-login:hover {
    opacity: 0.8;
}

/* 用户头像ICON */
.user-icon {
    width: 32px;
    height: 32px;
    background-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.user-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background-color: #333333;
    border-radius: 50%;
}

.user-icon::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 12px;
    background-color: #333333;
    border-radius: 10px 10px 0 0;
}

.btn-member {
    width: 188px;
    height: 41px;
    background-color: #FCCA00;
    color: #000000;
    font-family: "Alibaba PuHuiTi", "阿里巴巴普惠体", sans-serif;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-member:hover {
    background-color: #E5B800;
}

/* 皇冠图标 */
.crown-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    position: relative;
}

.crown-icon::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20px;
    height: 12px;
    background-color: #000000;
    border-radius: 2px;
}

.crown-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 8px solid #000000;
}

/* 煤种导航栏 - 在顶图内部底部居中,紧贴底边 */
.coal-nav {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 10px;
}

.coal-item {
    width: 119px;
    height: 48px;
    background-color: #CECECE;
    color: #333333;
    text-decoration: none;
    font-family: "Alibaba PuHuiTi", "阿里巴巴普惠体", sans-serif;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: all 0.3s;
}

.coal-item:hover {
    background-color: #B8B8B8;
}

/* 我的煤库特殊样式 */
.coal-item-special {
    background: linear-gradient(135deg, #1890FF 0%, #0066CC 100%);
    color: #FCCA00 !important;
    font-weight: 700;
}

.coal-item-special:hover {
    background: linear-gradient(135deg, #0066CC 0%, #0052A3 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
}

/* Banner横幅 */
.banner {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    overflow: hidden;
    max-height: 158px; /* 与图片实际高度一致 */
    background: transparent; /* 透明背景 */
    display: block; /* 确保无间距 */
    padding: 0; /* 确保无内边距 */
    margin-top: 0; /* 确保顶部无间距 */
    line-height: 0; /* 消除行高影响 */
}

.banner-img {
    width: 100%;
    height: 158px; /* 与实际图片高度一致 */
    display: block;
    object-fit: contain; /* 等比例缩放 */
    object-position: center; /* 居中显示 */
    background: transparent; /* 透明背景 */
    margin: 0; /* 确保无间距 */
    padding: 0; /* 确保无内边距 */
    vertical-align: top; /* 防止图片底部间隙 */
}

/* 用户菜单样式 */
.user-menu-wrapper {
    position: relative;
}

.btn-user {
    color: #ffffff;
    font-size: 20px;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
}

.btn-user:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
}

.user-name {
    font-family: "Alibaba PuHuiTi", "阿里巴巴普惠体", sans-serif;
    font-weight: 600;
    color: #ffffff;
    font-size: 20px;
}

/* 用户下拉菜单 */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.user-menu-wrapper:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #667eea;
}

.dropdown-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 8px 0;
}

/* 响应式布局 - 页眉 */
/* 注意：header.css 已经通过 media="(min-width: 891px)" 限制为PC端 */
/* 不需要 max-width < 891px 的媒体查询，移动端样式在 mobile-pure.css */
/* 所有 max-width 媒体查询必须加上 min-width: 891px 限制，防止在移动端生效 */

/* PC端大屏优化 (891px-1400px) */
@media (min-width: 891px) and (max-width: 1400px) {
    .top-bar {
        padding: 72px 30px 0;
    }
    
    .logo-section {
        left: 30px;
    }
    
    .header-actions {
        right: 30px;
    }
}

/* PC端中小屏优化 (891px-1200px) */
@media (min-width: 891px) and (max-width: 1200px) {
    .coal-nav {
        gap: 15px;
    }
    
    .coal-item {
        font-size: 16px;
        padding: 10px 15px;
    }
    
    .top-nav {
        width: 500px;
    }
    
    .nav-container {
        gap: 30px;
    }
}

/* PC端小屏优化 (891px-1024px) */
@media (min-width: 891px) and (max-width: 1024px) {
    .top-bar {
        height: auto;
        min-height: 175px;
        flex-wrap: wrap;
    }
    
    .coal-nav {
        display: none; /* 小屏幕隐藏煤种导航 */
    }
    
    .logo-img {
        width: 80px;
        height: 80px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .btn-login {
        font-size: 24px;
    }
    
    .btn-member {
        width: 160px;
        height: 36px;
        font-size: 18px;
    }
}

/* 删除 @media (max-width: 768px) - 移动端样式已在 mobile-pure.css */
/* 因为HTML中media属性只控制文件加载，不能阻止文件内部的媒体查询 */
/* 所以必须删除 max-width < 891px 的所有媒体查询 */

} /* @media (min-width: 891px) PC端样式结束 */
