/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 基础样式 */
body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    padding-top: 20px;
}

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

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.2rem;
    font-weight: 600;
}

header p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.favorite-button {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(231, 76, 60, 0.2);
}

.favorite-button:hover {
    background: linear-gradient(135deg, #c0392b, #a52c22);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(231, 76, 60, 0.3);
}

/* 模块通用样式 */
.module {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.module:hover {
    transform: translateY(-5px);
}

.module h2 {
    margin-bottom: 20px;
    padding-bottom: 12px;
    font-weight: 600;
    position: relative;
}

.module h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    border-radius: 2px;
}

/* 第一个模块样式 */
.module1 h2 {
    color: #3498db;
}

.module1 h2:after {
    background-color: #3498db;
}

.links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.link-item {
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #3498db, #2980b9);
    padding: 14px 28px;
    border-radius: 6px;
    margin: 10px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.2);
    min-width: 120px;
    text-align: center;
}

.link-item:hover {
    background: linear-gradient(135deg, #2980b9, #1a6fb0);
    transform: translateY(-3px);
    box-shadow: 0 6px 10px rgba(52, 152, 219, 0.3);
}

/* 图片样式 */
.middle-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.middle-image:hover {
    transform: scale(1.01);
}

/* 第二个模块样式 */
.module2 h2 {
    color: #e74c3c;
}

.module2 h2:after {
    background-color: #e74c3c;
}

.nav-section {
    margin-bottom: 30px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.nav-link {
    text-decoration: none;
    color: #34495e;
    padding: 10px 18px;
    background-color: #ecf0f1;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #bdc3c7;
    transform: translateY(-2px);
    color: #2c3e50;
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    color: #7f8c8d;
    font-size: 14px;
    border-top: 1px solid #eaeaea;
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }

    .module {
        padding: 20px;
    }

    .link-item {
        padding: 12px 24px;
        margin: 8px;
        min-width: 100px;
    }

    .nav-link {
        padding: 8px 15px;
        font-size: 13px;
    }

    .hot-search-tab button {
        padding: 8px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 15px;
    }

    .links {
        flex-direction: row;
        justify-content: center;
    }

    .link-item {
        width: calc(50% - 10px);
        max-width: 150px;
        margin: 5px;
        padding: 10px;
        font-size: 14px;
    }

    .hot-search-tab {
        flex-direction: column;
        gap: 8px;
    }

    .hot-search-tab button {
        width: 100%;
    }

    .hot-search-list li {
        font-size: 14px;
    }
}

/* 热搜内容模块样式 */
.hot-search-container {
    width: 100%;
}

.hot-search-tab {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.hot-search-tab button {
    padding: 10px 20px;
    background-color: #ecf0f1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.hot-search-tab button:hover {
    background-color: #bdc3c7;
}

.hot-search-tab button.active {
    background-color: #3498db;
    color: white;
}

.hot-search-content {
    position: relative;
    min-height: 300px;
}

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

.hot-search-list.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

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

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

.rank {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 14px;
    font-weight: bold;
}

.hot-search-list a {
    text-decoration: none;
    color: #333;
    transition: color 0.2s ease;
    flex: 1;
}

.hot-search-list a:hover {
    color: #3498db;
    text-decoration: underline;
}

.loading,
.error,
.empty {
    text-align: center;
    padding: 20px 0;
    color: #7f8c8d;
}

.error {
    color: #e74c3c;
}

.update-time {
    text-align: right;
    margin-top: 10px;
    font-size: 12px;
    color: #7f8c8d;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }

    .links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .link-item {
        width: calc(50% - 10px);
        max-width: 150px;
        margin: 5px;
    }

    .nav-links {
        justify-content: center;
    }
}

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

.module,
header,
footer {
    animation: fadeIn 0.5s ease forwards;
}

.module1 {
    animation-delay: 0.1s;
}

.middle-image {
    animation-delay: 0.2s;
}

.module2 {
    animation-delay: 0.3s;
}

footer {
    animation-delay: 0.4s;
}