/* style.css - 优化动画效果的样式 */
@charset "utf-8";

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul, ol {
    list-style: none;
}

/* 容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 顶部状态栏 */
.topbar {
    background: linear-gradient(135deg, #e9f3ff 0%, #d4e7ff 100%);
    border-bottom: 1px solid #c9daff;
    padding: 8px 0;
}

.datetime {
    text-align: right;
    font-size: 13px;
    color: #555;
}

.datetime span {
    margin: 0 5px;
}

#time {
    background: #fff;
    border: 1px solid #d0e6ff;
    padding: 3px 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* 搜索区域 */
.search-area {
    background: linear-gradient(135deg, #e0eeff 0%, #d4e7ff 100%);
    padding: 20px 0;
    border-bottom: 1px solid #c0d9ff;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.logo-section {
    flex: 0 0 200px;
    padding: 0 10px;
}

.logo {
    text-align: center;
}

.logo a {
    display: inline-block;
    transition: transform 0.2s ease;
}

.logo a:hover {
    transform: scale(1.02);
}

.search-section {
    flex: 1;
    padding-left: 20px;
    min-width: 300px;
}

.search-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.search-tabs a {
    display: block;
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 4px;
    font-size: 13px;
    color: #1a5fb4;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.search-tabs a:hover {
    background: #fff;
    color: #e63946;
    border-color: #85b0fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.search-form {
    max-width: 520px;
    position: relative;
}

.search-input-group {
    display: flex;
    border: 2px solid #b8d4ff;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
    background: white;
    position: relative;
}

#keyword {
    flex: 1;
    padding: 12px 40px 12px 15px;
    font-size: 14px;
    border: none;
    outline: none;
    min-width: 0;
}

#keyword:focus {
    box-shadow: inset 0 0 0 2px #6fa3ff;
}

/* 清除按钮样式 */
.clear-btn {
    position: absolute;
    right: 90px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: all 0.15s ease;
    z-index: 2;
}

.clear-btn:hover {
    color: #666;
    background: #f0f0f0;
}

.search-btn {
    background: linear-gradient(135deg, #4a90e2 0%, #357ae8 100%);
    color: white;
    border: none;
    padding: 0 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.search-btn:hover {
    background: linear-gradient(135deg, #3a80d8 0%, #2b65d9 100%);
    transform: scale(1.01);
}

.search-engine-select {
    display: flex;
    gap: 18px;
    justify-content: center;
    font-size: 13px;
}

.search-engine-select label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background 0.15s ease;
}

.search-engine-select label:hover {
    background: rgba(0, 0, 0, 0.05);
}

.search-engine-select input[type="radio"] {
    margin: 0;
    accent-color: #4a90e2;
}

/* 主要内容 */
.main-content {
    padding: 25px 0 30px;
}

/* 快捷链接 */
.quick-links {
    background: #f0f7ff;
    border: 1px solid #8bc1ff;
    border-radius: 6px;
    padding: 12px 24px;
    margin-bottom: 25px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.quick-links ul {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.quick-links li {
    list-style: none;
}

.quick-links a {
    font-size: 16px;
    color: #1a5fb4;
    padding: 6px 0;
    display: block;
    font-weight: 500;
    position: relative;
    transition: color 0.2s ease;
}

.quick-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #e63946;
    transition: width 0.25s ease;
}

.quick-links a:hover {
    color: #e63946;
}

.quick-links a:hover::after {
    width: 100%;
}

.quick-links .highlight {
    color: #e63946;
    font-weight: 700;
}

/* 区块标题 */
.section-title {
    font-size: 19px;
    color: #1a5fb4;
    padding: 12px 0;
    margin-bottom: 18px;
    border-bottom: 2px solid #e6f0ff;
    position: relative;
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 70px;
    height: 2px;
    background: linear-gradient(90deg, #4a90e2, #357ae8);
    border-radius: 1px;
}

/* 热门网站网格 */
.hot-sites-section {
    margin-bottom: 35px;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    border: 1px solid #8bc1ff;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.site-item {
    text-align: center;
}

.site-item a {
    display: block;
    padding: 10px 6px;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid #e6f0ff;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #1a5fb4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-item a:hover {
    background: linear-gradient(135deg, #e6f0ff 0%, #d9eaff 100%);
    color: #e63946;
    border-color: #85b0fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* 分类区域 */
.categories-section {
    margin-bottom: 35px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.category-card {
    background: #fff;
    border: 1px solid #8bc1ff;
    border-radius: 10px;
    padding: 18px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.category-card:nth-child(odd) {
    background: linear-gradient(135deg, #fafcff 0%, #f8fbff 100%);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    border-color: #6fa3ff;
}

.category-title {
    font-size: 17px;
    color: #1a5fb4;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 2px solid #e6f0ff;
    font-weight: 600;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.category-title::before {
    content: '▶';
    font-size: 11px;
    margin-right: 8px;
    transition: transform 0.2s ease;
    color: #4a90e2;
}

.category-title.collapsed::before {
    transform: rotate(90deg);
}

.category-title:hover {
    color: #357ae8;
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-links.collapsed {
    display: none;
}

.category-links a {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
    border-radius: 5px;
    font-size: 13px;
    border: 1px solid #d9eaff;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #2a6bc0;
}

.category-links a:hover {
    background: linear-gradient(135deg, #e6f0ff 0%, #d9eaff 100%);
    color: #e63946;
    border-color: #85b0fa;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

/* 页脚 */
.site-footer {
    text-align: center;
    padding: 25px 0;
    border-top: 2px solid #b8d4ff;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
    margin-top: 30px;
}

.site-footer a {
    display: inline-block;
    margin: 0 18px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 0;
    position: relative;
    transition: color 0.2s ease;
}

.site-footer a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #e63946;
    transition: width 0.25s ease;
}

.site-footer a:hover {
    color: #e63946;
}

.site-footer a:hover::after {
    width: 100%;
}

/* 广告位 */
.ad-left,
.ad-right {
    position: fixed;
    top: 200px;
    width: 120px;
    height: 240px;
    background: rgba(248, 251, 255, 0.95);
    border: 2px dashed #b8d4ff;
    border-radius: 8px;
    z-index: 100;
    transition: all 0.2s ease;
}

.ad-left:hover,
.ad-right:hover {
    background: rgba(255, 255, 255, 0.98);
    border-color: #6fa3ff;
    transform: scale(1.01);
}

.ad-left {
    left: 20px;
}

.ad-right {
    right: 20px;
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #b8d4ff;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6fa3ff;
}