/* ==================== 全局样式重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container-fluid {
    max-width: 96%;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 顶部公告栏 ==================== */
.announcement-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 0;
    font-size: 13px;
}

.announcement-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.announcement-icon {
    font-size: 16px;
}

.announcement-link {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

.announcement-link:hover {
    opacity: 0.9;
}

/* ==================== 主导航栏 ==================== */
.main-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    height: 60px;
    gap: 24px;
}

/* 菜单按钮 */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #667eea;
    border-radius: 2px;
    transition: all 0.3s;
}

/* Logo品牌 */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 800;
    font-size: 16px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.brand-tag {
    font-size: 11px;
    color: #667eea;
    font-weight: 600;
}

/* 主导航 */
.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
}

.nav-item:hover {
    background: #f3f4f6;
    color: #667eea;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
}

.badge-new {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

/* 搜索框 */
.header-search {
    position: relative;
    width: 280px;
}

.header-search input {
    width: 100%;
    height: 36px;
    padding: 0 40px 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

.header-search input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.header-search .search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
}

/* 用户区 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.action-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #e5e7eb;
}

.badge-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.user-btn:hover {
    border-color: #667eea;
    background: #f9fafb;
}

/* ==================== 页面容器 - 三栏布局 ==================== */
.page-container {
    display: grid;
    grid-template-columns: 220px 1fr 300px;
    gap: 20px;
    max-width: 96%;
    margin: 20px auto;
    padding: 0 20px;
}

/* ==================== 左侧边栏 ==================== */
.sidebar {
    background: white;
    border-radius: 12px;
    padding: 16px 0;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.sidebar-section {
    padding: 0 16px 12px;
    border-bottom: 1px solid #f3f4f6;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.sidebar-nav {
    margin-top: 8px;
}

.nav-group {
    margin: 12px 0;
}

.nav-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    cursor: pointer;
}

.nav-group-title .arrow {
    margin-left: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    color: #4b5563;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: #f9fafb;
    color: #667eea;
}

.sidebar-link.hot {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.sidebar-link .count {
    margin-left: auto;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: #6b7280;
}

.tag-hot {
    margin-left: auto;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.tag-live {
    margin-left: auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

/* 侧边栏Banner */
.sidebar-banner {
    margin: 20px 16px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    text-align: center;
    color: white;
}

.banner-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.banner-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.banner-desc {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.banner-btn {
    width: 100%;
    padding: 10px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ==================== 主内容区 ==================== */
.main-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Banner轮播 */
.hero-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.banner-main {
    position: relative;
    z-index: 1;
}

.banner-tag {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.banner-badge {
    display: inline-block;
    background: rgba(255,255,255,0.95);
    color: #667eea;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
}

.banner-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.banner-subtitle {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.banner-desc {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.banner-actions {
    display: flex;
    gap: 12px;
}

.btn-play,
.btn-outline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-play {
    background: white;
    color: #667eea;
    border: none;
}

.btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: #667eea;
}

/* 缩略图导航 */
.banner-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 30px;
}

.thumb-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.thumb-item:hover,
.thumb-item.active {
    border-color: white;
}

.thumb-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.thumb-item span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
}

/* 快速入口 */
.quick-access {
    background: white;
    border-radius: 16px;
    padding: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.btn-text {
    margin-left: auto;
    background: none;
    border: none;
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #f3f4f6;
    transition: all 0.2s;
    cursor: pointer;
}

.tool-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.tool-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.tool-desc {
    font-size: 12px;
    color: #9ca3af;
}

/* 加载中状态 */
.loading-placeholder {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-placeholder p {
    font-size: 14px;
    color: #9ca3af;
}

/* 错误信息 */
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #ef4444;
    font-size: 14px;
}

/* 数据看板 */
.data-dashboard {
    background: white;
    border-radius: 16px;
    padding: 24px;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.data-card {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.data-value {
    font-size: 28px;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 4px;
}

.data-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.data-trend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}

.data-trend.up {
    color: #10b981;
}

.data-trend.down {
    color: #ef4444;
}

/* ==================== 右侧信息栏 ==================== */
.info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-shrink: 0; /* 防止被压缩 */
}

.card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.news-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #f9fafb;
    flex: 1; /* 填充剩余空间 */
    align-items: flex-start;
}

.news-flag {
    font-size: 24px;
}

.news-content {
    flex: 1;
}

.news-title {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.news-time {
    font-size: 12px;
    color: #9ca3af;
}

/* 汇率数据 */
.rate-item {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.rate-item:last-child {
    border-bottom: none;
}

.rate-name {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.rate-value {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.rate-change {
    font-size: 12px;
    font-weight: 600;
}

.rate-change.up {
    color: #10b981;
}

.rate-change.down {
    color: #ef4444;
}

/* 热门话题 */
.badge-live {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
}

.link-more {
    margin-left: auto;
    color: #667eea;
    font-size: 12px;
    font-weight: 600;
}

.topic-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.topic-rank {
    width: 24px;
    font-weight: 700;
    color: #667eea;
}

.topic-name {
    flex: 1;
    color: #1f2937;
}

.topic-count {
    color: #6b7280;
    font-size: 12px;
}

.topic-trend {
    font-size: 11px;
    font-weight: 600;
}

.topic-trend.up {
    color: #10b981;
}

/* 公告内容 */
.announcement-content {
    font-size: 13px;
    line-height: 1.8;
    color: #4b5563;
}

.announcement-content .highlight {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 8px;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1200px) {
    .page-container {
        grid-template-columns: 200px 1fr 280px;
    }
    
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .page-container {
        grid-template-columns: 1fr 280px;
    }
    
    .sidebar {
        display: none;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-container {
        grid-template-columns: 1fr;
    }
    
    .info-sidebar {
        display: none;
    }
    
    .banner-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== 页脚备案信息 ==================== */
.main-footer {
    background: #1f2937;
    color: #9ca3af;
    margin-top: 60px;
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-info p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.beian-info a {
    color: #9ca3af;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.beian-info a:hover {
    color: #667eea;
}

.beian-info svg {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #9ca3af;
    font-size: 14px;
    transition: all 0.2s;
}

.footer-links a:hover {
    color: #667eea;
}

.footer-links .separator {
    color: #4b5563;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-info {
        align-items: center;
    }
}

/* ==================== 紧凑式展会推荐 ==================== */
.exhibition-recommend {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

/* 横跨全宽展会推荐 */
.exhibition-recommend-full {
    width: 100%;
    background: white;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.section-header-simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px; /* 减小下边距 */
    padding-bottom: 6px;
    border-bottom: 2px solid #f3f4f6;
}

.header-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: 0.3px;
}

.header-more {
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.header-more:hover {
    color: #764ba2;
    transform: translateX(2px);
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 固定5列 */
    gap: 8px 10px;
}

.recommend-item {
    display: flex;
    align-items: center;
    gap: 6px; /* logo和文字之间的间距 */
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    color: #374151;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
}

.recommend-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: rgba(102, 126, 234, 0.3);
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.15);
}

.item-logo {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background: white;
    border: 1px solid #e5e7eb;
}

.item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    line-height: 1.3;
}

.loading-simple {
    grid-column: 1 / -1;
    text-align: center;
    padding: 15px;
    color: #9ca3af;
    font-size: 12px;
}

.error-simple {
    grid-column: 1 / -1;
    text-align: center;
    padding: 15px;
    color: #ef4444;
    font-size: 12px;
}

/* 响应式调整 */
@media (max-width: 1400px) {
    .recommend-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .recommend-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .recommend-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .exhibition-recommend-full {
        grid-column: 1 / -1; /* 小屏时占满全宽 */
    }
}
