:root {
    /* 扁平化简约配色变量 */
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #333;
    --text-secondary: #777;
    --border-radius: 6px;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 - 扁平化设计 */
header {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 40px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

header p:nth-child(2) {
    background-color: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

header p:nth-child(2)::before {
    content: '✓';
    margin-right: 5px;
}

.favorite-button {
    background-color: white;
    color: var(--primary-color);
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.favorite-button:hover {
    background-color: var(--dark-color);
    color: white;
    transform: translateY(-2px);
}

/* 模块通用样式 */
.module, .module1, .module2 {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.module h2, .module1 h2, .module2 h2 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-color);
    font-weight: 600;
}

/* 线路选择模块 */
.links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.link-item {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 18px;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 600;
    transition: var(--transition);
    display: block;
    font-size: 1.1rem;
}

.link-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.link-item:nth-child(1) { background-color: #3498db; }
.link-item:nth-child(2) { background-color: #9b59b6; }
.link-item:nth-child(3) { background-color: #2ecc71; }
.link-item:nth-child(4) { background-color: #f39c12; color: #2c3e50; }

/* 导航链接模块 */
.module2 {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-section {
    flex: 1 1 300px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: var(--border-radius);
}

.nav-section h2 {
    font-size: 1.3rem;
    color: var(--primary-color);
    border-bottom-color: var(--light-color);
}

.nav-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.nav-link {
    background-color: white;
    color: var(--dark-color);
    text-decoration: none;
    padding: 12px 8px;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1px solid #e0e0e0;
}

.nav-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 热搜模块 */
.hot-search-container {
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.hot-search-tab {
    display: flex;
    background-color: white;
    border-bottom: 1px solid #e0e0e0;
}

.hot-search-tab button {
    flex: 1;
    background: none;
    border: none;
    padding: 15px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 1rem;
}

.hot-search-tab button.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.hot-search-tab button:hover:not(.active) {
    color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.05);
}

.hot-search-content {
    padding: 20px;
}

.hot-search-list {
    display: none;
}

.hot-search-list.active {
    display: block;
}

.hot-search-list ul {
    list-style: none;
}

.hot-search-list li {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    transition: var(--transition);
}

.hot-search-list li:last-child {
    border-bottom: none;
}

.hot-search-list li:hover {
    background-color: rgba(52, 152, 219, 0.05);
    padding-left: 10px;
    margin-left: -10px;
    border-radius: var(--border-radius);
}

.hot-search-list .rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 12px;
    color: white;
}

.hot-search-list li:nth-child(1) .rank { background-color: #e74c3c; }
.hot-search-list li:nth-child(2) .rank, 
.hot-search-list li:nth-child(3) .rank { background-color: #f39c12; }
.hot-search-list li:nth-child(n+4) .rank { background-color: #3498db; }

.hot-search-list a {
    color: var(--dark-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.hot-search-list a:hover {
    color: var(--primary-color);
}

.update-time {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

/* 加载和错误状态 */
.loading, .error, .empty {
    text-align: center;
    padding: 25px;
    color: var(--text-secondary);
}

.error { color: var(--accent-color); }

/* 页脚 */
footer {
    text-align: center;
    padding: 25px;
    background-color: var(--dark-color);
    color: white;
    border-radius: var(--border-radius);
    margin-top: 30px;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header {
        padding: 30px 15px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .module, .module1, .module2 {
        padding: 20px;
    }
    
    .links {
        grid-template-columns: 1fr 1fr;
    }
    
    .nav-section {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.6rem;
    }
    
    .links {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        grid-template-columns: 1fr 1fr;
    }
    
    .hot-search-tab button {
        padding: 12px 8px;
        font-size: 0.9rem;
    }
    
    .hot-search-content {
        padding: 15px;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 列表项动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hot-search-list li {
    animation: fadeIn 0.3s ease forwards;
}

.hot-search-list li:nth-child(1) { animation-delay: 0.05s; }
.hot-search-list li:nth-child(2) { animation-delay: 0.1s; }
.hot-search-list li:nth-child(3) { animation-delay: 0.15s; }
.hot-search-list li:nth-child(4) { animation-delay: 0.2s; }
.hot-search-list li:nth-child(5) { animation-delay: 0.25s; }
.hot-search-list li:nth-child(6) { animation-delay: 0.3s; }
.hot-search-list li:nth-child(7) { animation-delay: 0.35s; }
.hot-search-list li:nth-child(8) { animation-delay: 0.4s; }
.hot-search-list li:nth-child(9) { animation-delay: 0.45s; }
.hot-search-list li:nth-child(10) { animation-delay: 0.5s; }