* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf5 100%);
  min-height: 100vh;
  padding-bottom: 70px;
  font-family: "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

/* 顶部导航 */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255,255,255,0.98);
  padding: 8px 12px;
  z-index: 9999;
  box-shadow: 0 3px 15px rgba(0,0,0,0.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  backdrop-filter: blur(10px);
}

.search-input {
  flex: 1;
  min-width: 120px;
  padding: 7px 14px;
  border: 1.5px solid #e0e6ed;
  border-radius: 50px;
  outline: none;
  transition: all 0.3s;
  font-size: 14px;
}

.search-input:focus {
  border-color: #7a5cff;
  box-shadow: 0 0 8px rgba(122,92,255,0.2);
}

.btn-top {
  border-radius: 30px;
  padding: 6px 14px;
  font-size: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  white-space: nowrap;
}

.btn-top.primary {
  background: linear-gradient(90deg, #00b6ff, #7a5cff);
  color: #fff;
}

.btn-top.primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-top.secondary {
  background: #f0f2f5;
  color: #555;
}

.btn-top.secondary:hover {
  background: #e2e6ed;
}

/* 主标题 */
.main-title {
  text-align: center;
  margin: 72px 15px 6px;
  font-size: 26px;
  background: linear-gradient(90deg, #ff0090, #7a5cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: bold;
  letter-spacing: 1px;
}

.sub-title {
  text-align: center;
  font-size: 14px;
  color: #ff2a6d;
  margin-bottom: 14px;
  font-weight: 500;
}

/* 主容器 */
.main-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 12px;
}

/* 统计面板 */
.count-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.count-container::-webkit-scrollbar { display: none; }

.count-card {
  min-width: 110px;
  max-width: 140px;
  flex: 1;
  background: #fff;
  border-radius: 14px;
  padding: 13px 8px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  border-left: 4px solid #7a5cff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.count-card:nth-child(2) { border-left-color: #00b6ff; }
.count-card:nth-child(3) { border-left-color: #ff2a6d; }
.count-card:nth-child(4) { border-left-color: #ff9800; }
.count-card:nth-child(5) { border-left-color: #4caf50; }
.count-card:nth-child(6) { border-left-color: #9c27b0; }

.count-card:hover { transform: translateY(-3px); }

.count-num {
  font-size: 20px;
  font-weight: bold;
  color: #ff2a6d;
  margin-bottom: 4px;
}
.count-text {
  font-size: 11px;
  color: #777;
  line-height: 1.4;
}

/* 分区标题 */
.section-label {
  font-size: 13px;
  font-weight: bold;
  color: #7a5cff;
  letter-spacing: 1px;
  margin: 18px 0 10px;
  padding-left: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: linear-gradient(90deg, #7a5cff22, transparent);
  border-radius: 2px;
}

/* 分类卡片网格 */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding-bottom: 4px;
}

.category-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 12px 16px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.07);
  cursor: pointer;
  transition: all 0.28s ease;
  border-top: 3px solid #7a5cff;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #7a5cff08, #00b6ff08);
  opacity: 0;
  transition: opacity 0.3s;
}

.category-card:hover::before { opacity: 1; }

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 24px rgba(122,92,255,0.18);
}

.category-card:active {
  transform: scale(0.97);
}

.category-card .card-icon {
  font-size: 26px;
  margin-bottom: 9px;
  display: block;
  line-height: 1;
}

.category-card .card-title {
  font-size: 13px;
  font-weight: bold;
  color: #333;
  margin: 0;
  line-height: 1.4;
}

.category-card .card-badge {
  position: absolute;
  top: 7px;
  right: 8px;
  font-size: 10px;
  background: linear-gradient(90deg, #ff2a6d, #ff9500);
  color: #fff;
  border-radius: 8px;
  padding: 1px 6px;
  font-weight: bold;
  line-height: 1.5;
}

/* 颜色变体 */
.category-card.c1 { border-top-color: #7a5cff; }
.category-card.c1 .card-icon { color: #7a5cff; }
.category-card.c2 { border-top-color: #00b6ff; }
.category-card.c2 .card-icon { color: #00b6ff; }
.category-card.c3 { border-top-color: #ff2a6d; }
.category-card.c3 .card-icon { color: #ff2a6d; }
.category-card.c4 { border-top-color: #ff9800; }
.category-card.c4 .card-icon { color: #ff9800; }
.category-card.c5 { border-top-color: #4caf50; }
.category-card.c5 .card-icon { color: #4caf50; }
.category-card.c6 { border-top-color: #e91e63; }
.category-card.c6 .card-icon { color: #e91e63; }
.category-card.c7 { border-top-color: #9c27b0; }
.category-card.c7 .card-icon { color: #9c27b0; }
.category-card.c8 { border-top-color: #009688; }
.category-card.c8 .card-icon { color: #009688; }

/* 弹窗样式 */
.modal-content {
  border-radius: 16px;
  overflow: hidden;
  border: none;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  margin-top: 55px;
}
.modal-backdrop { z-index: 9998; }
.modal { z-index: 99999 !important; }

.modal-header {
  background: linear-gradient(90deg, #00b6ff, #7a5cff);
  color: white;
  border-bottom: none;
  padding: 14px 20px;
}
.modal-header .modal-title {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.4;
}
.modal-header .close {
  color: white;
  opacity: 0.9;
  font-size: 22px;
  margin-top: 0;
  text-shadow: none;
}
.modal-header .close:hover { opacity: 1; }

.modal-body {
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.7;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

/* 链接列表样式 */
.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-list li {
  padding: 9px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  background: #f8f9ff;
  border-left: 3px solid #7a5cff;
  transition: background 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.link-list li:hover { background: #ede9ff; }

.link-list li a {
  color: #0066cc;
  text-decoration: none;
  word-break: break-all;
  font-size: 13px;
  flex: 1;
  min-width: 0;
  transition: color 0.2s;
}

.link-list li a:hover { color: #ff2a6d; text-decoration: underline; }

.link-list li .link-desc {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  background: #e8e4ff;
  border-radius: 6px;
  padding: 1px 7px;
  align-self: center;
}

/* 代码块 */
pre {
  background: #f8f9fa;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #eee;
  font-size: 13px;
  word-break: break-all;
  white-space: pre-wrap;
  word-wrap: break-word;
}

pre a { color: #0066cc; text-decoration: none; }
pre a:hover { color: #ff2a6d; text-decoration: underline; }

/* 底部 */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255,255,255,0.98);
  text-align: center;
  padding: 10px;
  font-size: 13px;
  color: #888;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  z-index: 999;
}
.footer a { color: #7a5cff; text-decoration: none; }

/* 无结果提示 */
.no-result {
  display: none;
  text-align: center;
  padding: 30px;
  color: #aaa;
  font-size: 15px;
}

/* 响应式 */
@media (max-width: 768px) {
  .main-title { font-size: 22px; margin: 66px 10px 6px; }
  .categories-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  .category-card { padding: 16px 8px 13px; }
  .category-card .card-icon { font-size: 22px; margin-bottom: 7px; }
  .category-card .card-title { font-size: 12px; }
  .count-card { min-width: 90px; padding: 10px 6px; }
  .count-num { font-size: 17px; }
}

@media (max-width: 480px) {
  .top-bar { padding: 6px 8px; gap: 4px; }
  .btn-top { padding: 5px 10px; font-size: 11px; }
  .search-input { padding: 6px 11px; font-size: 13px; }
  .main-title { font-size: 19px; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .category-card { padding: 13px 6px 11px; }
  .category-card .card-icon { font-size: 20px; margin-bottom: 5px; }
  .category-card .card-title { font-size: 11px; }
  .modal-body { padding: 13px 13px; }
  .link-list li { padding: 8px 10px; }
  .link-list li a { font-size: 12px; }
}

/* 动态背景 */
  html, body { margin: 0; width: 100%; height: 100%; }
  #dynamic-background { 
    width: 100%; 
    height: 100%; 
    position: fixed; 
    z-index: -1;
    /* 新增：强制贴顶 */
    top: 0;
    left: 0;
  }

/*链接检测弹窗*/
          .sponsor-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            gap: 6px;
            margin-top: 8px;
          }
          .sponsor-card {
            background: #f8f9ff;
            border-radius: 10px;
            padding: 10px 6px;
            text-align: center;
            border: 1px solid #e0e6ed;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
          }
          .sponsor-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.06);
            background: #ede9ff;
          }
          .sponsor-price {
            font-size: 14px;
            font-weight: bold;
            color: #ff2a6d;
            margin-bottom: 4px;
            word-break: break-all;
          }
          .sponsor-desc {
            font-size: 11px;
            color: #555;
            margin-bottom: 6px;
          }
          .link-status {
            margin-top: 6px;
            font-size: 11px;
            display: block;
          }
		  
/*卡片链接无下划线*/
.sponsor-card {
  text-decoration: none !important;
  display: block;
  color: inherit !important;
  cursor: pointer;
}
.sponsor-card:hover {
  text-decoration: none !important;
  opacity: 0.9;
}