/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 14px;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    height: 100vh;
}

.markets-page {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body, .markets-page {
    background: #f7f8fa !important;
}

/* 顶部导航栏样式 */
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border-bottom: 1px solid #f0f0f0;
    box-shadow: none;
    height: 56px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.brand-logo {
    flex: 0 0 auto;
}

.brand-logo img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.page-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
    text-align: center;
    margin: 0 10px;
}

.top-search-container {
    flex: 1;
    max-width: 200px;
    margin: 0 10px;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 6px 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-icon {
    color: #1677ff;
    font-size: 14px;
    margin-right: 8px;
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #333;
    width: 100%;
}

.search-input::placeholder {
    color: #999;
}

.message-icon {
    flex: 0 0 auto;
    margin-left: 8px;
}

.message-icon:hover {
    transform: scale(1.05);
}

/* 顶部导航栏毛玻璃效果 */
.top-header {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border-bottom: 1px solid #f0f0f0;
    box-shadow: none;
}

/* 标签页样式 */
.markets-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    height: 56px;
    margin: 0 8px;
    background: none;
    border: none;
    box-shadow: none;
    position: static;
}

.tab-item {
    position: relative;
    padding: 0 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 15px;
    color: #666;
    font-weight: 500;
    background: none;
    border: none;
    transition: color 0.2s;
}

.tab-title {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.tab-item.active .tab-title {
    color: #1677ff;
    font-weight: 600;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: #1677ff;
    border-radius: 2px;
}

/* 标签栏毛玻璃效果 */
.markets-tabs {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border-bottom: 1px solid #f0f0f0;
    box-shadow: none;
}

.tab-item {
    background: none !important;
    box-shadow: none !important;
    border: none !important;
}

.tab-title {
    background: transparent !important;
}

/* 内容区域样式 */
.content-area {
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    /* 改为100vh，让内容可以滚动到底部bar下方 */
    height: calc(100vh - 56px - 44px); /* 只减去顶部导航和标签栏 */
    overflow: auto;
    padding: 0;
    margin: 0;
    /* 移除底部padding，让内容直接延伸到底部 */
    padding-top: 120px;
}

/* 确保底部导航栏在内容上方 */
.bottom-nav {
    z-index: 1000 !important;
}

.tab-content {
    display: none;
    height: 100%;
    width: 100%;
}

.tab-content.active {
    display: block;
}

/* 内容区毛玻璃容器 */
.glass-container {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border-radius: 0;
    margin: 0; /* 移除margin */
    padding: 0;
    box-shadow: none;
    border: none; /* 移除边框 */
    overflow: hidden;
    height: 100%;
    position: relative;
}

.market-iframe-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
    background: transparent;
    position: relative;
}

.market-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    background: #fff;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    z-index: 1;
    top: 0 !important;
    left: 0;
    right: 0;
    display: block !important;
}

/* 咻推内容特殊处理 - 参考market.html的info-container */
#xpush-content .glass-container {
    margin-top: -10px; /* 消除顶部空白，参考market.html */
    background: #fff; /* 使用纯白背景 */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#xpush-content .market-iframe-wrapper {
    overflow: hidden !important;
    height: 100vh !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
}
#xpush-content .market-iframe {
    position: relative !important;
    top: -40px !important;
    height: calc(100vh + 40px) !important;
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    border: none !important;
}

#xmeta-content .market-iframe,
#xpush-content .market-iframe {
    position: relative;
    top: -120px;
    margin-bottom: -120px;
}

/* 删除底部自定义bar样式，全部交给common.css的.bottom-nav .nav-item */
.scq-bottom-nav, .scq-nav-item {
    display: none !important;
}

/* 响应式设计 */
@media screen and (max-width: 375px) {
    .top-search-container {
        max-width: 150px;
    }
    
    .tab-item {
        padding: 0 15px;
    }
    
    .tab-title {
        font-size: 13px;
    }
    
    .glass-container {
        margin: 4px 0;
    }
    .market-iframe-wrapper, .market-iframe {
        height: 50vh;
    }
}

@media screen and (max-width: 320px) {
    .top-search-container {
        max-width: 120px;
    }
    
    .tab-item {
        padding: 0 10px;
    }
    
    .tab-title {
        font-size: 12px;
    }
    
    .glass-container {
        margin: 2px 0;
    }
    .market-iframe-wrapper, .market-iframe {
        height: 40vh;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content.active {
    animation: fadeIn 0.3s ease-out;
}

/* 毛玻璃效果增强 */
.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: 20px;
    pointer-events: none;
}

/* 安全区域适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .scq-bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .content-area {
        bottom: calc(70px + env(safe-area-inset-bottom));
    }
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
    
    .markets-page {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
    
    .top-header,
    .markets-tabs,
    .scq-bottom-nav {
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    
    .glass-container {
        background: rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .market-iframe-wrapper {
        background: rgba(255, 255, 255, 0.9);
    }
} 

.top-header,
.markets-tabs,
.tab-item,
.tab-title {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.tab-item {
    color: #666 !important;
    font-weight: 500;
}

.tab-item.active .tab-title {
    color: #1677ff !important;
    font-weight: 600;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: #1677ff;
    border-radius: 2px;
} 