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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    overflow-x: hidden;
}

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

/* 头部样式 */
.header {
    text-align: center;
    padding: 24px 0;
    border-bottom: 2px solid #a8e6cf;
    margin-bottom: 24px;
}

.title {
    font-size: 28px;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(39, 174, 96, 0.1);
}

.subtitle {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 400;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    position: relative;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #27ae60;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #a8e6cf;
    border-top: 3px solid #27ae60;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* 错误信息 */
.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #e74c3c;
}

.retry-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 16px;
    transition: background 0.3s ease;
}

.retry-btn:hover {
    background: #219a52;
}

/* 热搜列表 */
.hot-list {
    display: grid;
    gap: 16px;
}

.hot-item {
    background: #ffffff;
    border: 1px solid #e8f5e8;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.08);
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 12px;
    cursor: pointer;
}

.hot-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(39, 174, 96, 0.15);
    border-color: #a8e6cf;
}

.hot-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #27ae60, #a8e6cf);
}

/* 排名样式 */
.rank {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 4px;
}

.rank.top3 {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.rank.top1 {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

/* 封面图片 */
.item-cover {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e8f5e8;
}

/* 内容区域 */
.item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 60px;
}

.item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.item-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
    margin-bottom: 4px;
    transition: color 0.3s ease;
    flex: 1;
}

.item-title:hover {
    color: #27ae60;
}

.item-desc {
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.item-score {
    font-size: 14px;
    color: #27ae60;
    font-weight: 600;
}

.item-type {
    display: flex;
    align-items: center;
    gap: 4px;
}

.type-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.type-text {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.type-hot {
    background: #ffe6e6;
    color: #e74c3c;
}

.type-new {
    background: #e6f3ff;
    color: #3498db;
}

.type-default {
    background: #f8f9fa;
    color: #6c757d;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid #e8f5e8;
    margin-top: 32px;
}

.update-time {
    font-size: 12px;
    color: #95a5a6;
}

/* 手机端优化 (默认) */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    
    .header {
        padding: 20px 0;
    }
    
    .title {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 13px;
    }
    
    .hot-item {
        padding: 14px;
        gap: 10px;
    }
    
    .item-cover {
        width: 60px;
        height: 45px;
    }
    
    .item-title {
        font-size: 15px;
    }
    
    .item-desc {
        font-size: 12px;
    }
    
    .rank {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
}

/* 平板端适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 24px;
    }
    
    .hot-list {
        grid-template-columns: repeat(1, 1fr);
        gap: 18px;
    }
    
    .title {
        font-size: 32px;
    }
    
    .hot-item {
        padding: 18px;
    }
}

/* 电脑端适配 */
@media (min-width: 1025px) {
    .container {
        padding: 0 32px;
    }
    
    .hot-list {
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
    }
    
    .title {
        font-size: 36px;
    }
    
    .hot-item {
        padding: 20px;
        gap: 16px;
    }
    
    .item-cover {
        width: 100px;
        height: 75px;
    }
    
    .item-title {
        font-size: 17px;
    }
    
    .item-desc {
        font-size: 14px;
    }
}

/* 大屏幕优化 */
@media (min-width: 1400px) {
    .hot-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}