/* 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: 16px; /* 从14px调大到16px */
    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: 14px; /* 从13px调大到14px */
    color: #555;
}

.datetime span {
    margin: 0 5px;
}

#time {
    background: #fff;
    border: 1px solid #d0e6ff;
    padding: 3px 12px; /* 增加内边距 */
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 14px; /* 增加字体大小 */
}

/* 搜索区域 */
.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: 8px; /* 从6px增加到8px */
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.search-tabs a {
    display: block;
    padding: 6px 16px; /* 增加内边距 */
    background: rgba(255, 255, 255, 0.85);
    border-radius: 4px;
    font-size: 14px; /* 从13px调大到14px */
    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: 14px 45px 14px 15px; /* 增加上下内边距 */
    font-size: 16px; /* 从14px调大到16px */
    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: 20px; /* 从18px调大到20px */
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; /* 从28px增加到32px */
    height: 32px; /* 从28px增加到32px */
    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 30px; /* 增加左右内边距 */
    font-size: 16px; /* 从15px调大到16px */
    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: 20px; /* 从18px增加到20px */
    justify-content: center;
    font-size: 14px; /* 从13px调大到14px */
}

.search-engine-select label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 8px; /* 增加内边距 */
    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;
    width: 16px; /* 增加单选按钮大小 */
    height: 16px;
}

/* 主要内容 */
.main-content {
    padding: 30px 0 35px; /* 增加上下内边距 */
}

/* 快捷链接 */
.quick-links {
    background: #f0f7ff;
    border: 1px solid #8bc1ff;
    border-radius: 6px;
    padding: 15px 24px; /* 增加上下内边距 */
    margin-bottom: 30px; /* 从25px增加到30px */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.quick-links ul {
    display: flex;
    gap: 35px; /* 从30px增加到35px */
    justify-content: center;
}

.quick-links li {
    list-style: none;
}

.quick-links a {
    font-size: 18px; /* 从16px调大到18px */
    color: #1a5fb4;
    padding: 8px 0; /* 从6px增加到8px */
    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: 22px; /* 从19px调大到22px */
    color: #1a5fb4;
    padding: 15px 0; /* 增加内边距 */
    margin-bottom: 20px; /* 从18px增加到20px */
    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: 40px; /* 从35px增加到40px */
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* 从130px增加到140px */
    gap: 15px; /* 从12px增加到15px */
    border: 1px solid #8bc1ff;
    border-radius: 8px;
    padding: 25px; /* 从20px增加到25px */
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.site-item {
    text-align: center;
}

.site-item a {
    display: block;
    padding: 12px 8px; /* 增加内边距 */
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
    border-radius: 8px; /* 从6px增加到8px */
    font-size: 15px; /* 从13px调大到15px */
    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(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* 分类区域 */
.categories-section {
    margin-bottom: 40px; /* 从35px增加到40px */
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* 从300px增加到320px */
    gap: 25px; /* 从24px增加到25px */
}

.category-card {
    background: #fff;
    border: 1px solid #8bc1ff;
    border-radius: 12px; /* 从10px增加到12px */
    padding: 22px; /* 从18px增加到22px */
    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(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #6fa3ff;
}

.category-title {
    font-size: 19px; /* 从17px调大到19px */
    color: #1a5fb4;
    padding-bottom: 15px; /* 从12px增加到15px */
    margin-bottom: 15px; /* 从14px增加到15px */
    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: 12px; /* 从11px增加到12px */
    margin-right: 10px; /* 从8px增加到10px */
    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: 12px; /* 从10px增加到12px */
}

.category-links.collapsed {
    display: none;
}

.category-links a {
    display: inline-block;
    padding: 8px 16px; /* 增加内边距 */
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
    border-radius: 6px; /* 从5px增加到6px */
    font-size: 15px; /* 从13px调大到15px */
    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(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* 页脚 */
.site-footer {
    text-align: center;
    padding: 30px 0; /* 从25px增加到30px */
    border-top: 2px solid #b8d4ff;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
    margin-top: 40px; /* 从30px增加到40px */
}

.site-footer a {
    display: inline-block;
    margin: 0 20px; /* 从18px增加到20px */
    color: #555;
    font-size: 15px; /* 从14px调大到15px */
    font-weight: 500;
    padding: 6px 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: 130px; /* 从120px增加到130px */
    height: 260px; /* 从240px增加到260px */
    background: rgba(248, 251, 255, 0.95);
    border: 2px dashed #b8d4ff;
    border-radius: 8px;
    z-index: 100;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px; /* 增加广告位文字大小 */
    color: #1a5fb4;
}

.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; }
.mt-30 { margin-top: 30px; } /* 新增 */
.mb-30 { margin-bottom: 30px; } /* 新增 */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px; /* 从8px增加到10px */
    height: 10px; /* 从8px增加到10px */
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px; /* 从4px增加到5px */
}

::-webkit-scrollbar-thumb {
    background: #b8d4ff;
    border-radius: 5px; /* 从4px增加到5px */
}

::-webkit-scrollbar-thumb:hover {
    background: #6fa3ff;
}