/* 默认白天模式 */
body {
  background-color: #ffffff;
  color: #000000;
  max-width: 100%;
  overflow-x: hidden; /* 禁止水平拖动 */
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 确保所有链接的下划线移除 */
a, a:hover, a:focus, a:active {
  text-decoration: none !important;
}

/* 设置容器的圆角和防止溢出 */
.container-outer {
  border-radius: 10px; /* 确保四个角都有圆角 */
  overflow: hidden; /* 防止内部内容超出容器边界 */
  max-width: 100%; /* 确保宽度不超出父容器 */
  box-sizing: border-box; /* 确保 padding 不会影响宽度 */
  padding: 2px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.container-inner {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
}

/* 图标广告容器的样式 */
.icon-ads {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 2px;
  max-width: 1320px;
  margin: 0 auto;
  border-radius: 10px; /* 确保广告容器四个角都有圆角 */
}

/* 单个广告项 */
.icon-ad {
  width: calc(20% - 5px);
  text-align: center;
}

/* 广告图标容器 */
.icon-image-container {
  width: 100%;
  padding-top: 100%;
  position: relative;
  overflow: hidden;
}

/* 广告图标 */
.icon-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* 广告标题 */
.icon-title {
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin: 0;
  padding-top: 5px;
}

/* 按钮容器样式 */
.toggle-button-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  max-width: 1200px;
  margin: 0 auto;
}

.toggle-button {
  flex: 0 0 calc(50% - 10px);
  padding: 10px 20px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

.toggle-button:hover {
  background-color: #0056b3;
}

/* PC端调整按钮宽度 */
@media (min-width: 1024px) {
  .toggle-button {
    flex: 0 0 calc(25% - 10px);
  }
  .icon-ad {
    width: calc(10% - 10px); /* PC端一行10个图标 */
  }
}

/* 骨架屏通用样式 */
.skeleton {
  background-color: #e0e0e0;
  border-radius: 8px;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-ad {
  width: 100px;
  height: 100px;
  background-color: #e0e0e0;
}

/* 网址框架样式 */
.url-frame {
  border: 1px solid #ddd;
  padding: 10px;
  background-color: #fff;
  border-radius: 10px; /* 保证有圆角 */
}

.url-item {
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
  margin-bottom: 5px;
}

.custom-card-footer {
  text-align: center;
  padding: 10px;
  background-color: #f8d7da;
  color: #721c24;
  font-weight: bold;
  margin-top: 20px;
}

/* 删除多余的内边距 */
.no-padding {
  padding: 0 !important;
}

/* 删除卡片的左右边距 */
.card {
  margin: 0 !important;
}

/* 删除额外的间距 */
.container {
  padding: 0;
  margin: 0;
  text-align: center;
}

/* 标题样式 */
.title {
  font-weight: bold;
  color: #dc3545;
  font-size: 18px;
  margin-top: 10px;
  margin-bottom: 5px;
}

/* 头部导航高度 */
.toubu {
  height: 60px;
}

/* 外部容器 */
.container-outer {
  max-width: 1400px;
  margin: 0 auto;
  padding-bottom: 5px;
  padding-left: 5px;
  padding-right: 5px;
}

/* 加载和错误状态样式 */
.loading {
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: 16px;
}

.error {
  text-align: center;
  padding: 20px;
  color: #ff0000;
  font-size: 16px;
}

.error button {
  margin-top: 10px;
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.error button:hover {
  background-color: #0056b3;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container-outer {
    width: 100%;
    padding-left: 5px;
    padding-right: 5px;
  }
  
  .container-inner {
    margin: 10px 0;
    padding: 15px;
  }
  
  .title {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .container-inner {
    margin: 5px 0;
    padding: 10px;
  }

  .title {
    font-size: 14px;
  }

  .toubu {
    height: 40px;
  }
}

/* ===== Vue组件样式合并 ===== */

/* Categories 组件样式 - 来自 components/Categories.vue */
/* 整个框架的外观 */
.url-frame {
  border: 1px solid #ddd;
  padding: 15px;
  background-color: #fff;
  border-radius: 10px; /* 圆角 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 添加阴影 */
}

/* 每一行网址的布局和样式 */
.url-item {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 10px;
  display: flex;
  justify-content: center; /* 保证网址居中 */
  align-items: center;
}

.url-item-2 {
    border-bottom: 1px solid #ddd;
    margin-bottom: 5px;
    padding-bottom: 10px;
}

/* 链接样式 */
.url-link {
  text-decoration: none;
  color: #007bff;
  font-size: 16px; /* 增大链接的字体 */
}

.url-link:hover {
  color: #0056b3;
}

/* 复制按钮的样式 */
.custom-btn-outline {
  font-size: 14px;
  padding: 5px 10px;
  color: #28a745;
  background-color: transparent; /* 无背景色 */
  border: 1px solid #28a745; /* 绿色边框 */
  border-radius: 5px;
  cursor: pointer;
  position: absolute;
  right: 0; /* 将按钮右对齐 */
}

.custom-btn-outline:hover {
  background-color: transparent; /* 依旧无背景色 */
  color: #218838; /* 改变字体颜色 */
  border-color: #218838; /* 改变边框颜色 */
}

/* 展开/收起按钮的样式 */
.custom-btn-primary {
  font-size: 14px;
  padding: 8px 15px;
  color: #fff;
  background-color: #007bff;
  border: 1px solid #007bff;
  border-radius: 5px;
  cursor: pointer;
}

.custom-btn-primary:hover {
  background-color: #0056b3;
  border-color: #004085;
}

/* 文本居中 */
.text-center {
  text-align: center;
}

/* 边距重置 */
.mt-0 {
  margin-top: 0;
}




/* Header 组件样式 - 来自 components/Header.vue */
/* 顶部导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center; /* 确保内容在垂直方向上居中 */
  padding: 10px 20px;
  height: 60px; /* 设置固定高度，确保导航栏高度不变 */
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  box-sizing: border-box; /* 确保 padding 不会导致宽度溢出 */
}

/* 图标和 LOGO 样式 */
.menu-icon,
.search-icon {
  cursor: pointer;
  display: flex;
  align-items: center; /* 确保图标内容在其容器内垂直居中 */
  justify-content: center;
  flex-shrink: 0;
  width: 22px; /* 保持宽高 */
  height: 22px;
}

.logo {
  font-size: 24px; /* 保持 LOGO 大小 */
  font-weight: bold;
  white-space: nowrap; /* 防止 LOGO 自动换行 */
  overflow: hidden;
  text-overflow: ellipsis; /* 当内容过长时显示省略号 */
  flex-grow: 1; /* 让 LOGO 占据剩余空间 */
  text-align: center; /* 居中 LOGO */
}

.logo a {
  text-decoration: none;
  color: #333;
}

.sub-logo {
  color: #ff007f;
}

/* 确保导航栏中的项目有足够的间距 */
.navbar > * {
  margin-left: 10px;
  margin-right: 10px;
}

/* 侧边栏样式 - 来自原始Sidebar.vue */
.sidebar {
  width: 250px;
  background-color: #fff;
  color: #333;
  padding: 20px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  z-index: 1000;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

/* 侧边栏激活时的样式 */
.sidebar.active {
  transform: translateX(0);
}

/* 侧边栏头部 */
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.sidebar-header .logo {
  font-size: 20px;
  font-weight: bold;
  color: #54d947;
}

.sidebar-header .sub-logo {
  color: #ff69b4;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
}

/* 易记网址按钮 */
.easy-url {
  margin-bottom: 20px;
  text-align: center;
}

.easy-url-btn {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

/* 导航列表 */
.sidebar-list {
  list-style: none;
  padding: 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

.sidebar-item.active .item-text {
  color: #000;
}

.item-text {
  flex-grow: 1;
  text-decoration: none;
  color: #333;
}

.item-text:hover {
  text-decoration: underline;
  color: #007bff;
}

/* 独立子栏目区域 */
.subcategory-container {
  margin-top: 20px;
  background-color: #f9f9f9;
  padding: 10px;
  border-radius: 8px;
}

.subcategory-header {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
}

.subcategory-list {
  list-style: none;
  padding: 0;
}

.subcategory-item {
  padding: 8px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid #ddd;
}

.subcategory-link {
  color: #007bff;
  text-decoration: none;
}

.subcategory-link:hover {
  text-decoration: underline;
}

/* 搜索层样式 - 来自原始SearchLayer.vue */
.search-layer {
  position: fixed;
  top: 40px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #fff;
  padding: 20px;
  z-index: 999;
  overflow-y: auto;
  color: #333;
  max-width: 1400px; /* PC端最大宽度为1400px */
  margin: 0 auto;
}

/* 搜索头部 */
.search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.close-icon {
  cursor: pointer;
  color: #333;
}

/* 搜索结果统计 */
.search-summary {
  display: flex;
  align-items: center;
  padding: 10px 0;
  color: #333;
  font-size: 16px;
}

.search-summary .result-count {
  background-color: #ff6600;
  color: #fff;
  border-radius: 12px;
  padding: 0 10px;
  margin-left: 8px;
  font-size: 14px;
}

/* 搜索输入框容器 */
.search-input-container {
  display: flex;
  margin-bottom: 20px;
}

.search-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px 0 0 5px;
  background-color: #f9f9f9;
  color: #333;
}

.search-button {
  padding: 10px 20px;
  background-color: #ff6600;
  color: white;
  border: none;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
}

/* 猜你想搜 */
.suggestions {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.suggestions span {
  display: inline-block;
  margin-right: 10px;
  margin-bottom: 10px;
  background-color: #eee;
  padding: 5px 10px;
  border-radius: 5px;
  color: #333;
  cursor: pointer;
}

.suggestions span:hover {
  background-color: #ddd;
}

/* 热搜 */
.hot-search {
  margin-top: 20px;
}

.hot-search h3 {
  margin-bottom: 10px;
}

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

.hot-search li {
  display: flex;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid #ddd;
  color: #333;
  cursor: pointer;
}

.hot-search li:hover {
  background-color: #f5f5f5;
}

.hot-search .hot-index {
  color: #ff4500;
  margin-right: 10px;
}

.count {
  margin-left: auto;
  color: #666;
}

/* 搜索分类按钮 */
.category-filters {
  display: flex;
  margin-bottom: 20px;
}

.category-filters button {
  flex: 1;
  padding: 10px;
  margin-right: 5px;
  background-color: #f1f1f1;
  color: #333;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}

.category-filters button.active {
  background-color: #ff6600;
  color: white;
}

/* 搜索结果部分 */
.search-results {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* 卡片之间的间距 */
  justify-content: flex-start;
  width: 100%;
  margin: 0 auto;
}

.search-item {
  width: calc(50% - 10px); /* 移动端每行2个 */
}

/* 图片样式 */
.search-item img {
  width: 100%;
  height: 130px; /* 移动端图片高度为130px */
  object-fit: cover;
  border-radius: 5px;
}

/* PC端调整：每行4个 */
@media (min-width: 768px) {
  .search-item {
    width: calc(25% - 20px); /* PC端4列布局 */
    max-width: 350px;
  }

  .search-item img {
    height: 175px; /* PC端图片高度为175px */
    object-fit: cover;
  }
}

.result-details {
  margin-top: 10px;
  text-align: center;
}

/* 移除链接下划线 */
.search-item a {
  color: #333;
  text-decoration: none;
}

.search-item a:hover {
  text-decoration: none;
  color: #000; /* 悬停时链接变为黑色 */
}

/* 加载更多按钮 */
.load-more {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 30px;
}

.load-more button {
  padding: 10px 20px;
  background-color: #f1f1f1;
  color: #333;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.load-more button:hover {
  background-color: #ddd;
}

/* 搜索状态样式 */
.search-error {
  text-align: center;
  padding: 20px;
  color: #ff0000;
  font-size: 16px;
}

.search-loading {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 16px;
}

.search-loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-left: 10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #ff6600;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.no-results {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 16px;
}

/* 搜索结果项悬停效果 */
.search-item:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}

.search-item:hover img {
  opacity: 0.9;
}

/* 搜索结果标题样式 */
.search-item h4 {
  margin: 8px 0 0 0;
  font-size: 14px;
  color: #333;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 加载更多按钮加载状态 */
.load-more button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.load-more button.loading::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 1px solid #fff;
  border-top: 1px solid transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Header 响应式设计 */
@media (max-width: 768px) {
  .navbar {
    flex-direction: row;
    padding: 10px;
  }

  .logo {
    font-size: 18px;
  }

  .menu-icon,
  .search-icon {
    font-size: 20px;
  }

  .sidebar {
    width: 250px;
  }

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

/* 避免宽度超出视口 */
img, video, iframe {
  max-width: 100%;
  height: auto;
}

.container, .row, .col {
  max-width: 100vw; /* 确保所有内容块不会超出视口宽度 */
}
