/* 基础重置 - 只针对市场页面内部 */
.markets-page * {
    box-sizing: border-box;
}

.markets-page {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--scq-bg, #f7f8fa);
    transition: background 0.3s ease;
    /* 市场页面内部可以滚动，但不影响其他页面 */
    overflow-x: hidden;
}

/* 顶部导航栏样式 - Market 页面专用 */
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    background: var(--scq-glass, rgba(255,255,255,0.85));
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border-bottom: 1px solid var(--scq-border, #f0f0f0);
    box-shadow: none;
    height: 56px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-sizing: border-box;
    transition: background 0.3s ease, border-color 0.3s ease;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

/* 确保顶栏在 max-width 容器内对齐 */
.markets-page .top-header {
    max-width: 480px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    right: auto !important;
}

/* 左侧用户头像 */
.market-header-left {
    flex: 0 0 auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
    padding-left: 8px;
}

.market-header-left:active {
    transform: scale(0.95);
}

.market-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--scq-border, rgba(0, 0, 0, 0.1));
    transition: border-color 0.3s ease;
}

/* 右侧区域 */
.market-header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: var(--scq-space-sm, 6px);
    padding-right: 8px;
}

.market-points {
    display: flex;
    align-items: center;
    padding: var(--scq-space-xs, 4px) var(--scq-space-sm, 6px);
    border-radius: var(--scq-radius-md, 8px);
    background: transparent;
    cursor: pointer;
    transition: background 0.2s;
    font-size: var(--scq-font-md, 14px);
    font-weight: 500;
    color: #ff4d4f;
    transition: color 0.3s ease, background 0.3s ease;
}

.market-points:hover {
    background: var(--scq-hover-bg, rgba(0, 0, 0, 0.05));
}

.market-points:active {
    transform: scale(0.95);
}

.market-barrage-toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--scq-primary, #1677ff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.market-barrage-toggle-btn:hover {
    background: var(--scq-secondary, #4096ff);
    transform: scale(1.1);
}

.market-barrage-toggle-btn:active {
    transform: scale(0.95);
}

.market-barrage-toggle-btn i {
    font-size: var(--scq-font-md, 14px);
}

.market-daily-report-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--scq-primary, #1677ff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.market-daily-report-btn:hover {
    background: var(--scq-secondary, #4096ff);
    transform: scale(1.1);
}

.market-daily-report-btn:active {
    transform: scale(0.95);
}

.market-daily-report-btn i {
    font-size: var(--scq-font-md, 14px);
}

/* 搜索栏样式 */
.market-search-bar {
    flex: 1;
    margin: 0 var(--scq-space-md, 8px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--scq-input-bg, rgba(245, 245, 245, 0.85));
    border-radius: var(--scq-radius-xl, 16px);
    padding: 0;
    height: 36px;
    box-sizing: border-box;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--scq-border, rgba(0, 0, 0, 0.03));
    transition: all 0.3s ease;
}

.market-search-bar:focus-within {
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.2);
    background: var(--scq-card-bg, rgba(255, 255, 255, 0.95));
}

.market-search-bar i {
    color: var(--scq-muted, #999);
    margin-left: var(--scq-space-sm, 6px);
    margin-right: var(--scq-space-sm, 6px);
    font-size: var(--scq-font-md, 14px);
    flex-shrink: 0;
    order: 2; /* 确保图标在右边 */
    transition: color 0.3s ease;
}

.market-search-bar input {
    border: none;
    background: transparent;
    flex: 1;
    font-size: var(--scq-font-md, 14px);
    color: var(--scq-text, #333);
    outline: none;
    height: 100%;
    line-height: 36px;
    padding: 0 var(--scq-space-sm, 6px) 0 var(--scq-space-md, 12px);
    margin: 0;
    min-width: 0;
    text-align: left;
    order: 1; /* 确保输入框在左边 */
    transition: color 0.3s ease;
    border-radius: var(--scq-radius-xl, 16px);
}

.market-search-bar input::placeholder {
    color: var(--scq-muted, #999);
}

/* 标签切换容器 - 参考行业群组设计 */
.markets-tabs-container {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 999;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
    background: var(--scq-glass, rgba(255,255,255,0.85));
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border-bottom: 1px solid var(--scq-border, #f0f0f0);
    transition: background 0.3s ease, border-color 0.3s ease;
    border-radius: 0;
    min-height: 80px;
}

/* 标签页样式 - 参考行业群组设计 */
.markets-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    min-height: 80px;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    position: static;
    min-width: 0; /* 允许收缩 */
    overflow-x: hidden;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.markets-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.tab-item {
    position: relative;
    padding: 0 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    flex: 0 0 calc(100% / 7);
    max-width: calc(100% / 7);
    justify-content: center;
    height: 100%;
    font-size: 12px;
    color: var(--scq-muted, #666);
    font-weight: 500;
    background: none;
    border: none;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.tab-item.tab-report-btn {
    background: #1677ff;
    border-radius: 6px;
    margin: 0 2px;
}

.tab-item.tab-report-btn .tab-title {
    color: #fff;
    font-weight: 600;
    font-size: 10px;
    padding: 0 4px;
}

.tab-item.tab-report-btn:active {
    opacity: 0.8;
    transform: scale(0.98);
}

.tab-item.active::before,
.tab-item.active::after {
    display: none;
    content: none;
}

.tab-title {
    font-size: 12px;
    color: var(--scq-muted, #666);
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s;
}

.tab-item.active .tab-title {
    color: var(--scq-primary, #1677ff);
    font-weight: 600;
}

.tab-item:active {
    opacity: 0.8;
}

/* 内容区域样式 - 固定尺寸 */
.tab-content {
    display: none;
    height: calc(100vh - 56px - 80px - 56px);
    min-height: calc(100vh - 56px - 80px - 56px);
    max-height: calc(100vh - 56px - 80px - 56px);
    width: 100%;
    position: absolute;
    top: calc(56px + 80px);
    left: 0;
    right: 0;
    bottom: 56px;
    transition: opacity 0.3s ease;
    overflow: hidden;
    box-sizing: border-box;
}

.tab-content.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.tab-content:not(.active) {
    opacity: 0;
    pointer-events: none;
}

/* 内容区毛玻璃容器 */
.glass-container {
    background: var(--scq-glass, rgba(255,255,255,0.7));
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border-radius: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    overflow: hidden;
    height: 100%;
    width: 100%;
    position: relative;
    box-sizing: border-box;
    transition: background 0.3s ease;
    /* 设置最小高度，避免空白 */
    min-height: calc(100vh - 56px - 40px - 56px);
}

/* 市场内容包装器（替换iframe） */
.market-content-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    position: relative;
    box-sizing: border-box;
    transition: background 0.3s ease;
    min-height: calc(100vh - 56px - 40px - 56px);
    padding: 6px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.market-content-wrapper::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* 搜索结果弹窗遮罩层 - 不覆盖底部导航栏 */
.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 56px; /* 不覆盖底部导航栏 */
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.search-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 搜索结果弹窗 */
.search-results-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 420px;
    max-height: 80vh;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: var(--scq-radius-xl, 16px);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease;
    overflow: hidden;
}

/* 暗色模式下的搜索结果弹窗 */
.dark-mode .search-results-modal {
    background: rgba(37, 37, 37, 0.7);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.search-results-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--scq-space-lg, 16px);
    border-bottom: 1px solid var(--scq-border, #f0f0f0);
    background: transparent;
    flex-shrink: 0;
    transition: border-color 0.3s ease;
}

/* 暗色模式下的头部 */
.dark-mode .search-results-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.search-results-title {
    display: flex;
    align-items: center;
    gap: var(--scq-space-sm, 8px);
    font-size: var(--scq-font-lg, 16px);
    font-weight: 600;
    color: var(--scq-text, #333);
}

.search-results-title i {
    color: var(--scq-primary, #1677ff);
}

.search-results-count {
    font-size: var(--scq-font-sm, 12px);
    font-weight: 400;
    color: var(--scq-muted, #999);
}

.close-search-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--scq-hover-bg, #f5f5f5);
    color: var(--scq-text, #333);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: var(--scq-font-md, 14px);
}

.close-search-btn:hover {
    background: var(--scq-border, #e0e0e0);
    transform: scale(1.1);
}

.close-search-btn:active {
    transform: scale(0.95);
}

.search-results-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--scq-space-md, 12px);
    min-height: 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.search-results-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--scq-muted, #999);
    text-align: center;
}

.search-empty i {
    font-size: 48px;
    margin-bottom: var(--scq-space-md, 16px);
    opacity: 0.5;
}

.search-empty p {
    font-size: var(--scq-font-md, 14px);
    margin-bottom: var(--scq-space-xs, 8px);
    font-weight: 500;
}

.search-empty span {
    font-size: var(--scq-font-sm, 12px);
    opacity: 0.7;
}

.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: var(--scq-space-md, 16px);
    color: var(--scq-muted, #999);
}

.search-loading i {
    font-size: 32px;
    color: var(--scq-primary, #1677ff);
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: var(--scq-space-sm, 8px);
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    gap: var(--scq-space-md, 12px);
    padding: var(--scq-space-lg, 16px);
    border: 1px solid var(--scq-border, #f0f0f0);
    border-radius: var(--scq-radius-lg, 12px);
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
}

/* 暗色模式下的搜索结果项 */
.dark-mode .search-result-item {
    border-color: rgba(255, 255, 255, 0.1);
}

.search-result-item:hover {
    background: var(--scq-hover-bg, rgba(0, 0, 0, 0.03));
    border-color: var(--scq-primary, #1677ff);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-result-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.search-result-image {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    border-radius: var(--scq-radius-md, 8px);
    overflow: hidden;
    background: var(--scq-bg-secondary, #f5f5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dark-mode .search-result-image {
    background: rgba(255, 255, 255, 0.05);
}

.search-result-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--scq-space-md, 12px);
    min-width: 0;
}

.search-result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--scq-space-md, 12px);
}

.search-result-header-right {
    display: flex;
    align-items: center;
    gap: var(--scq-space-sm, 8px);
}

.search-result-name {
    font-size: var(--scq-font-md, 15px);
    font-weight: 600;
    color: var(--scq-text, #333);
    flex: 1;
    line-height: 1.4;
    word-break: break-word;
}

.search-result-platform-badge {
    font-size: var(--scq-font-xs, 11px);
    color: var(--scq-primary, #1677ff);
    background: rgba(22, 119, 255, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
}

.search-result-subscribe-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 18px;
    color: #999;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    flex-shrink: 0;
}

.search-result-subscribe-btn:hover {
    color: #ffa500;
    transform: scale(1.1);
}

.search-result-subscribe-btn.subscribed {
    color: #ffa500;
}

.search-result-subscribe-btn.subscribed i {
    font-weight: 900;
}

.search-result-subscribe-btn:active {
    transform: scale(0.95);
}

.search-result-details {
    display: flex;
    flex-wrap: wrap;
    gap: var(--scq-space-md, 16px);
    padding-top: var(--scq-space-md, 12px);
    border-top: 1px solid var(--scq-border, #f0f0f0);
}

.search-result-price-item {
    display: flex;
    flex-direction: column;
    gap: var(--scq-space-xs, 4px);
    min-width: 80px;
}

.search-result-price-item .price-label {
    font-size: var(--scq-font-xs, 11px);
    color: var(--scq-muted, #999);
}

.search-result-price-item .price-value {
    font-size: var(--scq-font-md, 14px);
    font-weight: 600;
    color: var(--scq-text, #333);
}

.search-result-price-item .price-value.price-up {
    color: #ff4d4f;
}

.search-result-price-item .price-value.price-down {
    color: #52c41a;
}

/* 市场内容区域样式（已移除iframe，改用MarketTable组件） */
#xmeta-content,
#shanhai-content,
#baiyuecheng-content,
#silkroad-content,
#guxia-content,
#jiyuan-content {
    height: calc(100vh - 56px - 40px - 56px);
    min-height: calc(100vh - 56px - 40px - 56px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#xmeta-content::-webkit-scrollbar,
#shanhai-content::-webkit-scrollbar,
#baiyuecheng-content::-webkit-scrollbar,
#silkroad-content::-webkit-scrollbar,
#guxia-content::-webkit-scrollbar,
#jiyuan-content::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

#xmeta-content .glass-container,
#shanhai-content .glass-container,
#baiyuecheng-content .glass-container,
#silkroad-content .glass-container,
#guxia-content .glass-container,
#jiyuan-content .glass-container {
    height: 100%;
    width: 100%;
    overflow: visible;
}

/* 元一村 iframe样式 - 固定尺寸，隐藏滚动条 */
#xpush-content {
    height: calc(100vh - 56px - 48px - 56px) !important;
    min-height: calc(100vh - 56px - 48px - 56px) !important;
    max-height: calc(100vh - 56px - 48px - 56px) !important;
}

#xpush-content .glass-container,
#xpush-content .market-iframe-wrapper {
    height: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
}

#xpush-content .market-iframe {
    top: 0 !important;
    height: calc(100vh - 56px - 56px + 100px) !important;
    min-height: calc(100vh - 56px - 56px + 100px) !important;
    max-height: calc(100vh - 56px - 56px + 100px) !important;
    overflow: hidden !important;
}

/* 响应式设计 */
@media screen and (max-width: 375px) {
    .top-search-container {
        max-width: 150px;
    }
    
    .tab-item {
        padding: 0 var(--scq-space-xs, 4px);
        font-size: 11px;
    }
    
    .tab-title {
        font-size: 11px;
    }
}

@media screen and (max-width: 320px) {
    .top-search-container {
        max-width: 120px;
    }
    
    .tab-item {
        padding: 0 var(--scq-space-xs, 3px);
        font-size: 10px;
    }
    
    .tab-title {
        font-size: 10px;
    }
}

/* 动画效果已移除 */

/* 毛玻璃效果增强 */
.glass-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: var(--scq-radius-xl, 16px);
    pointer-events: none;
    opacity: 0.5;
}

/* 安全区域适配 - 底部导航栏样式统一在 main.css 中处理 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .markets-page .tab-content {
        bottom: calc(56px + env(safe-area-inset-bottom));
        height: calc(100vh - 56px - 40px - 56px - env(safe-area-inset-bottom));
    }
    
    .search-results-container {
        bottom: calc(56px + env(safe-area-inset-bottom));
    }
}

/* 暗色模式适配 - 已通过CSS变量系统实现，移除旧的媒体查询 */

/* ========== 弹幕样式 ========== */

/* 弹幕容器 */
.market-barrage-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

/* 弹幕项样式 */
.market-barrage-item {
  position: absolute;
  white-space: nowrap;
  pointer-events: auto;
  font-size: var(--scq-font-sm, 11px);
  line-height: 1.4;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--scq-radius-xl, 16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  contain: layout style paint;
  transition: opacity 0.3s ease;
}

.market-barrage-item .market-barrage-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.market-barrage-item .market-barrage-nickname {
  font-weight: 500;
  opacity: 0.9;
}

.market-barrage-item .market-barrage-content {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* 弹幕输入框样式 */
.market-barrage-input-container {
  position: fixed;
  bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  padding: var(--scq-space-md, 8px) var(--scq-space-lg, 12px);
  background: transparent;
  z-index: 200;
  display: none;
  max-width: 480px;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.market-barrage-input-container.show {
  display: block;
}

.market-barrage-input-wrapper {
  display: flex;
  align-items: center;
  gap: var(--scq-space-sm, 6px);
  max-width: 100%;
  background: var(--scq-glass, rgba(255, 255, 255, 0.95));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--scq-radius-xl, 16px);
  padding: var(--scq-space-xs, 4px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease;
}

.market-barrage-emoji-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(22, 119, 255, 0.1);
  color: var(--scq-primary, #1677ff);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  font-size: 18px;
}

.market-barrage-emoji-btn:hover {
  background: rgba(22, 119, 255, 0.2);
  transform: scale(1.1);
}

.market-barrage-emoji-btn:active {
  transform: scale(0.95);
    }
    
.market-barrage-input {
  flex: 1;
  padding: var(--scq-space-sm, 6px) var(--scq-space-md, 8px);
  border: 1px solid rgba(22, 119, 255, 0.2);
  border-radius: var(--scq-radius-lg, 12px);
  font-size: var(--scq-font-md, 14px);
  color: var(--scq-text, #333);
  background: var(--scq-input-bg, rgba(255, 255, 255, 0.9));
  outline: none;
  transition: all 0.3s ease;
}

.market-barrage-char-count {
  font-size: var(--scq-font-sm, 11px);
  color: var(--scq-muted, #999);
  min-width: 40px;
  text-align: right;
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.market-barrage-char-count.warning {
  color: #ff9800;
}

.market-barrage-char-count.error {
  color: #ff4d4f;
}

.market-barrage-input:focus {
  border-color: var(--scq-primary, #1677ff);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
  background: var(--scq-card-bg, #fff);
}

.market-barrage-input::placeholder {
  color: var(--scq-muted, #999);
}

.market-barrage-send-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--scq-primary, #1677ff), var(--scq-secondary, #4096ff));
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  font-size: var(--scq-font-xl, 16px);
    }
    
.market-barrage-send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.4);
}

.market-barrage-send-btn:active {
  transform: scale(0.95);
}

/* 表情选择器样式 */
.market-emoji-picker {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: var(--scq-card-bg, rgba(255, 255, 255, 0.98));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--scq-radius-xl, 16px) var(--scq-radius-xl, 16px) 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 201;
  margin-bottom: var(--scq-space-sm, 6px);
  transition: background 0.3s ease;
}

.market-emoji-picker.show {
  display: block;
}

.market-emoji-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--scq-space-md, 8px) var(--scq-space-lg, 12px);
  border-bottom: 1px solid var(--scq-border, #f0f0f0);
  position: sticky;
  top: 0;
  background: var(--scq-card-bg, rgba(255, 255, 255, 0.98));
  z-index: 1;
  transition: background 0.3s ease, border-color 0.3s ease;
    }
    
.market-emoji-picker-header span {
  font-size: var(--scq-font-md, 14px);
  font-weight: 600;
  color: var(--scq-text, #333);
  transition: color 0.3s ease;
}

.market-emoji-picker-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--scq-hover-bg, #f5f5f5);
  color: var(--scq-text, #333);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: var(--scq-font-md, 14px);
}

.market-emoji-picker-close:hover {
  background: var(--scq-border, #e0e0e0);
  transform: scale(1.1);
}

.market-emoji-picker-content {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--scq-space-xs, 4px);
  padding: var(--scq-space-md, 8px);
}

.market-emoji-item {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--scq-font-xl, 16px);
  cursor: pointer;
  border-radius: var(--scq-radius-md, 8px);
  transition: all 0.2s ease;
  background: transparent;
}

.market-emoji-item:hover {
  background: var(--scq-hover-bg, #f5f5f5);
  transform: scale(1.2);
    }

.market-emoji-item:active {
  transform: scale(0.9);
}

/* 数值颜色区分样式 */
.market-cap-cell {
  font-size: 13px;
  color: var(--scq-primary, #1677ff);
  font-weight: 700;
  transition: color 0.3s ease;
}

.volume-cell {
  font-size: 13px;
  color: #722ed1;
  font-weight: 700;
  transition: color 0.3s ease;
}

.rate-cell {
  font-size: 13px;
  color: var(--scq-primary, #1677ff);
  font-weight: 600;
  transition: color 0.3s ease;
}

/* ========== MarketTable 组件样式 ========== */
.market-table-container {
  width: 100%;
  min-height: 200px;
}

.loading-container,
.error-container {
  text-align: center;
  padding: 60px 20px;
  color: var(--scq-muted, #666);
  transition: color 0.3s ease;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-message {
  color: #e74c3c;
  margin-bottom: 16px;
  font-size: 14px;
}

.retry-button {
  margin-top: 20px;
  padding: 10px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.retry-button:hover {
  background: #5568d3;
}

/* 汇总区域 */
.summary-section {
  background: transparent;
  border-radius: 0;
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow: none;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.summary-item {
  flex: 1;
  text-align: center;
  min-width: 0;
}

/* 汇总栏内联时间模式切换按钮（京东灵稀） */
.time-mode-btn-inline {
  padding: 4px 12px;
  background: #1677ff;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(22, 119, 255, 0.3);
  margin-left: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.time-mode-btn-inline:hover {
  background: #0958d9;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(22, 119, 255, 0.4);
}

.time-mode-btn-inline:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(22, 119, 255, 0.3);
}

/* 汇总栏内联生成日报按钮（京东灵稀） */
.report-btn-inline {
  padding: 4px 12px;
  background: #1677ff;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(22, 119, 255, 0.3);
  margin-left: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.report-btn-inline:hover {
  background: #0958d9;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(22, 119, 255, 0.4);
}

.report-btn-inline:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(22, 119, 255, 0.3);
}

.summary-label {
  font-size: 11px;
  color: var(--scq-muted, #999);
  margin-bottom: 4px;
  transition: color 0.3s ease;
}

.summary-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--scq-text, #333);
  transition: color 0.3s ease;
}

.summary-value.primary {
  color: var(--scq-primary, #1677ff);
  font-weight: 600;
}

.summary-value.positive {
  color: #ff4d4f;
}

.summary-value.negative {
  color: #52c41a;
}

/* 涨跌条 */
.trend-bar {
  display: flex;
  height: 22px;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.trend-bar-down {
  background: #52c41a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex: 0;
  min-width: 0;
}

.trend-bar-unchanged {
  background: var(--scq-bg, #f5f5f5);
  flex: 0;
  transition: background 0.3s ease;
}

.trend-bar-up {
  background: #ff4d4f;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex: 0;
  min-width: 0;
}

.trend-bar-up.full-up {
  background: linear-gradient(135deg, #cf1322 0%, #f5222d 33%, #fa8c16 66%, #d48806 100%);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.mvp-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #ff4d4f;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.6);
  animation: mvpPulse 2s ease-in-out infinite;
}

@keyframes mvpPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* 表格区域 */
.table-section {
  background: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

.table-header {
  background: transparent;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--scq-border, #e0e0e0);
  font-size: 11px;
  font-weight: 600;
  color: var(--scq-muted, #666);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.table-header-item {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-header-item.sortable {
  cursor: pointer;
  user-select: none;
}

.table-header-item.sortable:active {
  opacity: 0.7;
}

.sort-icon {
  font-size: 10px;
  color: var(--scq-muted, #999);
  transition: color 0.2s;
}

.sort-icon.active {
  color: var(--scq-primary, #1677ff);
}

.table-body {
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.table-body::-webkit-scrollbar {
  display: none;
}

.table-row {
  display: grid;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--scq-border, #f0f0f0);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, border-color 0.3s ease;
  background: transparent;
}

.table-row:active {
  background: var(--scq-hover-bg, rgba(0, 0, 0, 0.02));
  transform: scale(0.98);
}

.table-row:last-child {
  border-bottom: none;
}

.table-cell {
  display: flex;
  align-items: center;
}

/* 订阅按钮样式 */
.subscribe-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.subscribe-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 18px;
  color: #999;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.subscribe-btn:hover {
  color: #ffa500;
  transform: scale(1.1);
}

.subscribe-btn.subscribed {
  color: #ffa500;
}

.subscribe-btn.subscribed i {
  font-weight: 900;
}

.subscribe-btn:active {
  transform: scale(0.95);
}
  font-size: 13px;
  word-break: break-word;
  overflow: hidden;
  color: var(--scq-text, #333);
  transition: color 0.3s ease;
}

.rank-cell {
  font-size: 13px;
  color: var(--scq-muted, #666);
  font-weight: 500;
  transition: color 0.3s ease;
}

.archive-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.archive-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--scq-bg, #f5f5f5);
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.archive-name-wrapper {
  flex: 1;
  min-width: 0;
}

.archive-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--scq-text, #333);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  transition: color 0.3s ease;
}

.archive-name.positive {
  color: #ff4d4f;
}

.archive-name.negative {
  color: #52c41a;
}

.archive-name.zero {
  color: var(--scq-muted, #999);
}

.archive-stats {
  font-size: 11px;
  color: var(--scq-muted, #999);
  margin-top: 4px;
  transition: color 0.3s ease;
}

.price-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 11px;
  color: var(--scq-text, #333);
  font-weight: 500;
  transition: color 0.3s ease;
}

.price-value {
  color: var(--scq-text, #333);
  font-size: 11px;
  transition: color 0.3s ease;
}

.price-change {
  font-size: 10px;
  font-weight: 600;
  margin-top: 3px;
}

.value-cell {
  font-size: 12px;
  color: var(--scq-text, #333);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.marketcap-cell {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.marketcap-cell.primary {
  color: var(--scq-primary, #1677ff);
}

.latestprice-cell {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.latestprice-cell.primary {
  color: var(--scq-primary, #1677ff);
}

.change-cell {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.change-cell.positive {
  color: #ff4d4f;
}

.change-cell.negative {
  color: #52c41a;
}

.change-cell.zero {
  color: var(--scq-muted, #999);
  transition: color 0.3s ease;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--scq-muted, #999);
  transition: color 0.3s ease;
}

.empty-text {
  font-size: 14px;
}

/* Toast 提示样式 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  max-width: 80%;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.toast-content {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 数据说明样式 */
.market-data-notice {
  position: absolute;
  bottom: 70px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 12px;
  background: transparent;
  z-index: 10;
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.notice-text-normal {
  color: #000;
}

:root.dark-mode .notice-text-normal {
  color: #fff;
}

.notice-text-gradient {
  background: linear-gradient(90deg, #1677ff, #722ed1, #eb2f96, #fa8c16, #52c41a, #1677ff);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 3s linear infinite;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

/* 平台日报生成按钮 */
.platform-report-btn-container {
  position: absolute;
  bottom: 100px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 10;
  pointer-events: auto;
}

.platform-report-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #1677ff 0%, #722ed1 100%);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3);
  transition: all 0.3s ease;
}

.platform-report-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 119, 255, 0.4);
}

.platform-report-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.3);
}

.platform-report-btn i {
  font-size: 16px;
}

/* 京东灵稀时间模式切换按钮 */
.lingxi-time-mode-switch {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 10;
  pointer-events: auto;
}

.time-mode-btn {
  padding: 6px 16px;
  background: #1677ff;
  color: #fff;
  border: none;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.3);
}

.time-mode-btn:hover {
  background: #0958d9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.4);
}

.time-mode-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(22, 119, 255, 0.3);
}
