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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 2.5rem;
    color: #ff0050;
    background: linear-gradient(45deg, #ff0050, #ff0050);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
}

.stats {
    display: flex;
    gap: 24px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.stat-item i {
    color: #ff0050;
}

/* 筛选区域样式 */
.filters {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.search-box input:focus {
    outline: none;
    border-color: #ff0050;
    box-shadow: 0 0 0 3px rgba(255, 0, 80, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 12px;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    background: transparent;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #ff0050;
    color: #ff0050;
}

.filter-btn.active {
    background: #ff0050;
    border-color: #ff0050;
    color: white;
}

/* 热榜列表样式 */
.hot-list {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    flex: 1;
    margin-bottom: 24px;
}

.list-header {
    display: grid;
    grid-template-columns: 80px 1fr 120px 100px;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 0, 80, 0.05);
    border-bottom: 1px solid #e1e5e9;
    font-weight: 600;
    color: #666;
}

.hot-items {
    max-height: 600px;
    overflow-y: auto;
}

.hot-item {
    display: grid;
    grid-template-columns: 80px 1fr 120px 100px;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.hot-item:hover {
    background: rgba(255, 0, 80, 0.03);
    transform: translateX(4px);
}

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

.rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff0050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rank-1 { color: #ff6b35; }
.rank-2 { color: #ff8e53; }
.rank-3 { color: #ffa726; }

.topic {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topic-img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    background: #f0f0f0;
}

.topic-content {
    flex: 1;
}

.topic-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: #1a1a1a;
}

.topic-meta {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    gap: 12px;
}

.heat {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-weight: 600;
    color: #ff0050;
}

.trend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: 500;
}

.trend.up {
    color: #00c853;
}

.trend.down {
    color: #ff1744;
}

.trend.neutral {
    color: #9e9e9e;
}

/* 加载状态 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff0050;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.loading p {
    color: #666;
    font-weight: 500;
}

/* 底部样式 */
.footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* 错误和警告样式 */
.error-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.error-message i {
    font-size: 3rem;
    color: #ff4757;
    margin-bottom: 16px;
}

.error-message p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.retry-btn {
    padding: 12px 24px;
    background: #ff0050;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #e00040;
    transform: translateY(-2px);
}

.toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 400px;
}

.toast-message.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-message button {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    opacity: 0.7;
}

.toast-message button:hover {
    opacity: 1;
}

.toast-warning {
    background: #ffa502;
    color: white;
    border-left: 4px solid #ff8c00;
}

.toast-info {
    background: #007bff;
    color: white;
    border-left: 4px solid #0056b3;
}

.toast-success {
    background: #28a745;
    color: white;
    border-left: 4px solid #1e7e34;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .stats {
        justify-content: center;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .list-header,
    .hot-item {
        grid-template-columns: 60px 1fr 80px;
        gap: 12px;
    }
    
    .trend {
        display: none;
    }
    
    .topic-img {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .list-header,
    .hot-item {
        grid-template-columns: 50px 1fr 70px;
        gap: 8px;
        padding: 12px;
    }
    
    .heat {
        font-size: 0.9rem;
    }
    
    .topic-title {
        font-size: 1rem;
    }
}