/* 基础重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body {
min-height: 100vh;
background-color: #f8f9fa;
color: #333;
transition: background-color 0.3s ease, color 0.3s ease;
}
body.dark {
background-color: #1a1a2e;
color: #f0f0f0;
}

/* 容器 */
.container {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }

/* 头部样式 - 修复移动端主题按钮位置 */
header {
position: sticky;
top: 0;
z-index: 50;
background-color: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(4px);
border-bottom: 1px solid #e5e7eb;
padding: 10px 0;
transition: all 0.3s ease;
}
body.dark header {
background-color: rgba(17, 24, 39, 0.9);
border-bottom: 1px solid #3a3a56;
}
.header-inner {
display: flex;
flex-direction: row; /* 移动端改为行布局，避免主题按钮换行错乱 */
align-items: center;
justify-content: space-between;
gap: 10px;
flex-wrap: wrap; /* 适配小屏自动换行 */
}
@media (min-width: 768px) {
.header-inner {
gap: 20px;
}
}
.logo {
display: flex;
align-items: center;
gap: 8px;
flex-shrink: 0; /* 防止logo被压缩 */
}
/* 替换图标为文字标识 */
.logo-icon {
width: 24px;
height: 24px;
background-color: #165dff;
color: white;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: bold;
}
.logo-text {
font-size: 18px; /* 移动端缩小logo文字，避免占空间 */
font-weight: bold;
color: #165dff;
}
@media (min-width: 768px) {
.logo-text {
font-size: 20px;
}
}
.search-box {
position: relative;
flex: 1;
min-width: 200px; /* 移动端搜索框最小宽度 */
max-width: 400px;
}
.search-input {
width: 100%;
padding: 8px 35px 8px 12px;
border: 1px solid #e5e7eb;
border-radius: 8px;
background-color: #fff;
color: #333;
outline: none;
}
body.dark .search-input {
border-color: #3a3a56;
background-color: #24243e;
color: #f0f0f0;
}
/* 搜索按钮 - 文字替代图标 */
.search-btn {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
color: #666;
cursor: pointer;
font-size: 14px;
padding: 2px 5px;
}
body.dark .search-btn {
color: #b0b0c0;
}
/* 主题切换按钮 - 纯CSS实现，无图标（优化移动端位置） */
.theme-toggle {
width: 40px;
height: 40px;
border-radius: 50%;
background-color: #f1f1f1;
border: none;
color: #666;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
flex-shrink: 0; /* 防止被压缩 */
}
body.dark .theme-toggle {
background-color: #24243e;
color: #ffd700;
}
.theme-toggle:hover {
transform: rotate(180deg);
}

/* 导航样式 */
.category-nav {
margin: 20px 0;
overflow-x: auto;
padding-bottom: 5px;
}
.category-list {
display: flex;
gap: 8px;
list-style: none;
white-space: nowrap;
}
.category-item a {
display: inline-block;
padding: 6px 12px;
border-radius: 20px;
text-decoration: none;
font-size: 14px;
color: #333;
background-color: #f1f1f1;
transition: all 0.2s ease;
}
body.dark .category-item a {
color: #f0f0f0;
background-color: #24243e;
}
.category-item a.active, .category-item a:hover {
background-color: #165dff;
color: #fff !important;
}

/* 工具卡片样式 */
.section-title {
margin: 20px 0 15px;
padding-left: 10px;
border-left: 4px solid #165dff;
font-size: 18px;
font-weight: 600;
}
.tool-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 10px;
margin-bottom: 30px;
}
@media (min-width: 576px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .tool-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 992px) { .tool-grid { grid-template-columns: repeat(6, 1fr); } }
.tool-card {
background-color: #fff;
border: 1px solid #e5e7eb;
border-radius: 8px;
padding: 15px 5px;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
cursor: pointer;
transition: all 0.2s ease;
position: relative;
}
/* 编辑按钮样式（用户自定义网盘） */
.tool-card .edit-btn {
position: absolute;
top: 5px;
right: 5px;
width: 20px;
height: 20px;
border-radius: 50%;
background-color: #165dff;
color: white;
border: none;
cursor: pointer;
font-size: 10px;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.2s ease;
}
.tool-card:hover .edit-btn {
opacity: 1;
}
body.dark .tool-card {
background-color: #24243e;
border-color: #3a3a56;
}
.tool-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
background-color: #f0f5ff;
}
body.dark .tool-card:hover {
background-color: #2d2d50;
}
/* 工具卡片标识 - 文字/符号替代图标 */
.tool-tag {
width: 32px;
height: 32px;
background-color: #e8f3ff;
color: #165dff;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: 600;
margin-bottom: 8px;
}
body.dark .tool-tag {
background-color: #2d2d50;
color: #4d83ff;
}
.tool-name {
font-size: 14px;
font-weight: 500;
margin-bottom: 4px;
}
.tool-desc {
font-size: 12px;
color: #666;
}
body.dark .tool-desc {
color: #b0b0c0;
}

/* 网盘榜单样式（核心修改：左右并排 + 2排4列 + 隐藏数字/网址） */
.netdisk-container {
display: flex;
flex-wrap: wrap; /* 移动端自动换行 */
gap: 20px;
margin-bottom: 20px;
}
.netdisk-column {
flex: 1;
min-width: 300px; /* 最小宽度，避免过窄 */
}
.netdisk-column-title {
font-size: 16px;
font-weight: 600;
margin-bottom: 10px;
color: #165dff;
padding-left: 8px;
border-left: 3px solid #165dff;
}
/* 网盘列表样式（2排4列） */
.netdisk-grid {
display: grid;
grid-template-columns: repeat(2, 1fr); /* 移动端2列 */
gap: 10px;
}
@media (min-width: 576px) { .netdisk-grid { grid-template-columns: repeat(4, 1fr); } } /* 桌面端4列 */
.netdisk-item {
background-color: #fff;
border: 1px solid #e5e7eb;
border-radius: 8px;
padding: 15px 10px;
text-align: center;
transition: all 0.2s ease;
}
body.dark .netdisk-item {
background-color: #24243e;
border-color: #3a3a56;
}
.netdisk-item:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
background-color: #f0f5ff;
}
body.dark .netdisk-item:hover {
background-color: #2d2d50;
}
.netdisk-name {
font-size: 14px;
font-weight: 500;
margin-bottom: 5px;
}
.netdisk-name a {
color: #165dff;
text-decoration: none;
}
.netdisk-name a:hover {
text-decoration: underline;
}

/* 底部样式 */
footer {
background-color: #fff;
border-top: 1px solid #e5e7eb;
padding: 20px 0;
margin-top: 40px;
}
body.dark footer {
background-color: #171727;
border-top-color: #3a3a56;
}
.footer-inner {
display: flex;
flex-direction: column;
gap: 20px;
align-items: center;
}
@media (min-width: 768px) {
.footer-inner {
flex-direction: row;
justify-content: space-between;
align-items: center;
}
}
.footer-logo {
display: flex;
align-items: center;
gap: 8px;
}
.footer-logo-icon {
width: 20px;
height: 20px;
background-color: #165dff;
color: white;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
font-weight: bold;
}
.footer-logo-text {
font-size: 18px;
font-weight: bold;
color: #165dff;
}
.footer-desc {
font-size: 12px;
color: #666;
margin-top: 5px;
}
body.dark .footer-desc {
color: #b0b0c0;
}
.footer-links {
display: flex;
flex-wrap: wrap;
gap: 15px;
justify-content: center;
}
.footer-link {
font-size: 14px;
color: #666;
text-decoration: none;
}
body.dark .footer-link {
color: #b0b0c0;
}
.footer-link:hover {
color: #165dff;
}
.footer-copyright {
text-align: center;
font-size: 12px;
color: #666;
margin-top: 20px;
}
body.dark .footer-copyright {
color: #b0b0c0;
}

/* 回到顶部按钮 - 纯CSS实现 */
.back-to-top {
position: fixed;
bottom: 20px;
right: 20px;
width: 45px;
height: 45px;
border-radius: 50%;
background-color: #165dff;
color: #fff;
border: none;
cursor: pointer;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
z-index: 40;
font-size: 18px;
display: flex;
align-items: center;
justify-content: center;
}
.back-to-top.visible {
opacity: 1;
visibility: visible;
}
.back-to-top:hover {
background-color: #0d47a1;
}

/* 移动端分类折叠按钮 - 纯CSS */
.mobile-cat-toggle {
display: flex; /* 移动端显示 */
position: fixed;
bottom: 80px;
right: 20px;
width: 45px;
height: 45px;
border-radius: 50%;
background-color: #165dff;
color: #fff;
border: none;
cursor: pointer;
z-index: 40;
font-size: 18px;
align-items: center;
justify-content: center;
}
@media (min-width: 768px) {
.mobile-cat-toggle {
display: none !important;
}
}
.mobile-cat-toggle:hover {
background-color: #0d47a1;
}
@media (max-width: 767px) {
.category-nav {
position: fixed;
bottom: 120px;
right: 20px;
width: 200px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
padding: 10px;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
z-index: 30;
}
body.dark .category-nav {
background-color: #24243e;
}
.category-nav.visible {
opacity: 1;
visibility: visible;
}
.category-list {
flex-direction: column;
gap: 5px;
}
}

/* 编辑弹窗样式 */
.edit-modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
}
.edit-modal.show {
opacity: 1;
visibility: visible;
}
.modal-content {
background-color: #fff;
border-radius: 8px;
padding: 20px;
width: 90%;
max-width: 400px;
}
body.dark .modal-content {
background-color: #24243e;
}
.modal-title {
font-size: 16px;
font-weight: 600;
margin-bottom: 15px;
text-align: center;
}
.modal-form {
display: flex;
flex-direction: column;
gap: 10px;
}
.modal-form label {
font-size: 14px;
}
.modal-form input {
padding: 8px 10px;
border: 1px solid #e5e7eb;
border-radius: 6px;
background-color: #fff;
color: #333;
outline: none;
}
body.dark .modal-form input {
border-color: #3a3a56;
background-color: #1a1a2e;
color: #f0f0f0;
}
.modal-btns {
display: flex;
gap: 10px;
margin-top: 15px;
}
.modal-btn {
flex: 1;
padding: 8px;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
}
.save-btn {
background-color: #165dff;
color: white;
}
.cancel-btn {
background-color: #f1f1f1;
color: #333;
}
body.dark .cancel-btn {
background-color: #3a3a56;
color: #f0f0f0;
}
