/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    height: 100%;
    overflow: hidden;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 顶部Logo样式 */
.header {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #fff;
    position: relative;
}

.back-button {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 10;
}

.back-button:hover {
    background-color: #e0e0e0;
    transform: translateY(-50%) scale(1.1);
}

.back-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    max-width: 100%;
    height: auto;
    max-height: 60px;
}

/* 中间热搜内容样式 */
.main-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    padding-bottom: 80px;
}

.hot-search-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 加载覆盖层样式 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.hot-search-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
}

.hot-search-rank {
    font-size: 18px;
    font-weight: bold;
    margin-right: 15px;
    color: #999;
    min-width: 20px;
}

.hot-search-rank.top3 {
    color: #ff4757;
}

.hot-search-info {
    flex: 1;
}

.hot-search-title {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #333;
}

.hot-search-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.3;
    margin-bottom: 8px;
}

.hot-search-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
}

.hot-search-time {
    margin-right: 15px;
}

.hot-search-hotness {
    display: flex;
    align-items: center;
}

.hot-search-hotness::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #ff4757;
    border-radius: 50%;
    margin-right: 5px;
}

/* 底部切换图标栏样式 */
.footer {
    border-top: 1px solid #e0e0e0;
    background-color: #fff;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 600px;
    margin: 0 auto;
    z-index: 100;
}

.tab-bar {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
    transform: scale(1);
}

.tab-item.active {
    opacity: 1;
    color: #ff4757;
    transform: scale(1.1);
}

.tab-item:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.tab-item img {
    width: 24px;
    height: 24px;
    margin-bottom: 5px;
}

.tab-item span {
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
    }
    
    .header {
        padding: 15px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .hot-search-item {
        padding: 12px 0;
    }
    
    .hot-search-title {
        font-size: 15px;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    font-size: 14px;
    color: #999;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ff4757;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}