*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #1f2933;
  background: #f3f4f6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 顶部导航栏 */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 32px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.logo-area {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: #2563eb;
}

/* 工具总数徽章样式 */
.tool-count-badge {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background-color: #2563eb;
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  vertical-align: middle;
  min-width: 20px;
  text-align: center;
  white-space: nowrap;
}

.logo-subtitle {
  font-size: 12px;
  color: #6b7280;
}

.top-nav {
  display: flex;
  gap: 16px;
}

.top-nav-item {
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 999px;
  color: #4b5563;
}

.top-nav-item:hover {
  background: #e5f0ff;
  color: #2563eb;
}

.top-nav-item--active {
  background: #2563eb;
  color: #ffffff;
}

.top-extra {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  border: none;
  cursor: pointer;
  color: #2563eb;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease-in-out;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}

/* 搜索区 */
.search-section {
  padding: 24px 32px 12px;
  background: #f9fafb;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.search-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.search-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.search-ctrl-d {
  font-size: 14px;
  color: #2563eb;
}

.search-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 14px;
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.search-box input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  outline: none;
  font-size: 14px;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-box input::placeholder {
  color: #c4c4cc; /* 比正文更浅的灰色 */
}

.search-box input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.search-suggest {
  font-size: 12px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.suggest-label {
  color: #6b7280;
}

.chip {
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 12px;
  color: #4b5563;
  cursor: pointer;
}

.chip:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.search-time {
  margin-top: 24px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-time .sidebar-title,
.search-holiday .sidebar-title {
  margin-bottom: 0;
}

.search-holiday {
  margin-top: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.holiday-count {
  color: #2563eb;
  font-weight: 500;
}

.holiday-name {
  color: #ff4300;
  margin: 0 8px;
}

.holiday-block {
  display: flex;
  flex-direction: row;
  gap: 16px;
  flex-wrap: wrap;
}

.holiday-item {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #374151;
}

.holiday-separator {
  margin: 0 8px;
  color: #6b7280;
}

/* 主体布局 */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  padding: 16px 32px 32px;
  gap: 16px;
}

.sidebar {
  background: #f9fafb;
  border-radius: 16px;
  padding: 14px 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-section {
  border-radius: 12px;
  padding: 10px 10px 8px;
  background: rgba(255, 255, 255, 0.9);
}

.sidebar-title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  position: relative;
  padding-right: 60px;
}

.sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-item-btn {
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-item-btn:hover {
  background: #eff6ff;
}

.sidebar-item-btn--active {
  background: #2563eb;
  color: #ffffff;
}

/* 选中项在悬停时保持高亮底色，避免白字配浅底看不清 */
.sidebar-item-btn.sidebar-item-btn--active:hover {
  background: #2563eb;
  color: #ffffff;
}

.sidebar-item-meta {
  font-size: 11px;
  opacity: 0.75;
}

.time-block {
  display: flex;
  flex-direction: row;
  gap: 8px;
  font-size: 12px;
}

.time-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 6px;
  border-radius: 6px;
  background: #f3f4ff;
}

.time-label {
  color: #4b5563;
}

.time-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #111827;
}

#weekday {
  margin-right: 10px;
  color: #2563eb;
}

.countdown-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.countdown-item {
  padding: 6px 6px;
  border-radius: 8px;
  background: #f3f4f6;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.countdown-title {
  font-weight: 500;
  color: #111827;
}

.countdown-desc {
  color: #6b7280;
}

.countdown-time {
  font-weight: 600;
  color: #2563eb;
}

/* 内容区 */
.content {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px 18px 18px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-group-tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: #f3f4f6;
  align-self: flex-start;
}

.tab-btn {
  border-radius: 999px;
  border: none;
  padding: 4px 14px;
  font-size: 13px;
  cursor: pointer;
  background: transparent;
  color: #4b5563;
}

.tab-btn--active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 1px 4px rgba(148, 163, 184, 0.6);
}

.tool-group-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 6px;
}

.tool-group-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.tool-group-desc {
  font-size: 12px;
  color: #6b7280;
}

.tool-group-meta {
  font-size: 12px;
  color: #9ca3af;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.tool-card {
  border-radius: 12px;
  padding: 10px 10px 9px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 140px;
  height: 140px;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    border-color 0.12s ease, background 0.12s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.16);
  border-color: #bfdbfe;
  background: #ffffff;
}

.tool-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: #eff6ff;
  color: #2563eb;
  flex-shrink: 0;
}

.tool-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.tool-desc {
  font-size: 12px;
  color: #6b7280;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 2.4em;
  line-height: 1.2em;
}

.tool-tags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: nowrap;
  height: 20px; /* 设置固定高度 */
  overflow: hidden; /* 隐藏超出部分 */
  align-items: center; /* 垂直居中对齐 */
}

.tool-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  height: 16px;
  line-height: 16px;
  display: inline-flex;
  align-items: center;
}

.tool-tag-red {
  background: #fee2e2;
  color: #dc2626;
}

.tool-link {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}

.tool-link span {
  text-decoration: underline;
}

.tool-link:hover {
  color: #6b7280;
}

/* 页脚 */
.site-footer {
  background: #111827;
  color: #e5e7eb;
  margin-top: 24px;
  padding-top: 28px;
  font-size: 13px;
}

.footer-top {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 32px 24px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1.8fr);
  gap: 32px;
}

.footer-col--about .footer-text + .footer-text {
  margin-top: 6px;
}

.footer-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #ffffff;
}

.footer-text {
  color: #d1d5db;
  line-height: 1.6;
}

.footer-link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-link {
  color: #d1d5db;
}

.footer-link:hover {
  color: #ffffff;
}

.footer-qrcode-wrap {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-qrcode-item {
  text-align: center;
}

.footer-qrcode-box {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: #111827;
  overflow: hidden;
  border: 1px solid #374151;
}

.footer-qrcode-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.footer-qrcode-label {
  margin-top: 6px;
  color: #e5e7eb;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding: 10px 32px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #020617;
}

.footer-bottom-left,
.footer-bottom-right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #9ca3af;
  flex-wrap: wrap;
}

.footer-bottom {
  flex-wrap: wrap;
  flex-direction: column;
}

.footer-divider {
  opacity: 0.6;
}

/* 响应式 */
@media (max-width: 960px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    order: 2;
  }

  .content {
    order: 1;
  }

  .top-bar {
    padding: 8px 16px;
  }

  .search-section {
    padding: 16px 16px 10px;
  }

  .layout {
    padding: 14px 16px 24px;
  }

  .footer-top {
    padding: 0 16px 20px;
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-bottom {
    padding: 8px 16px 12px;
  }
}

@media (max-width: 640px) {
  .top-nav {
    display: none;
  }

  .search-box {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* 搜索建议列表样式 */
.search-box {
  position: relative; /* 确保建议列表相对搜索框定位 */
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 5;
  margin-top: 4px;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  color: #4b5563;
  transition: background-color 0.15s ease;
}

.suggestion-item:hover {
  background: #f0f7ff;
  color: #2563eb;
}

/* 搜索建议列表滚动条样式 */
.search-suggestions::-webkit-scrollbar {
  width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* 无结果提示样式 */
.no-result {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  background: #fff1f2;
  border: 2px solid #fee2e2;
  border-radius: 12px;
  color: #dc2626;
  font-size: 14px;
  font-weight: 500;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.no-result-message {
  margin-bottom: 8px;
}

.no-result-retry {
  color: #2563eb;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.2s ease;
}

.no-result-retry:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* 弹窗样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow: auto;
}

.modal.active {
  display: block;
}

.modal-content {
  background-color: white;
  margin: 15% auto;
  padding: 0;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
}

.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  font-weight: bold;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: #374151;
}

.modal-body {
  padding: 24px;
}

/* 表单样式 */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
}

.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  resize: vertical;
  font-size: 14px;
  font-family: inherit;
}

.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-actions {
  text-align: right;
}

/* 导航栏按钮样式 */
.top-nav {
  display: flex;
  align-items: center;
}

/* 反馈列表样式 */
.feedback-list {
  margin-top: 16px;
}

.feedback-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
}

.feedback-content {
  color: #374151;
  line-height: 1.6;
  margin-bottom: 12px;
  word-break: break-word;
}

.feedback-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
}

.feedback-date {
  font-style: italic;
}

.feedback-delete-btn {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.feedback-delete-btn:hover {
  background: #dc2626;
}


