/* ===== 门户增强样式 ===== */

/* 多级下拉导航 */
.nav-dropdown { position: relative; }
.nav-dropdown > a { cursor: pointer; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); min-width: 200px; z-index: 100;
  list-style: none; padding: 8px 0; max-height: 70vh; overflow-y: auto; }
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-item { position: relative; }
.dropdown-item > a { display: block; padding: 8px 16px; color: var(--text); font-size: 14px; }
.dropdown-item > a:hover { background: var(--surface-2); text-decoration: none; }
.dropdown-submenu { display: none; position: absolute; left: 100%; top: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); min-width: 180px; z-index: 101;
  list-style: none; padding: 8px 0; max-height: 60vh; overflow-y: auto; }
.dropdown-item:hover .dropdown-submenu { display: block; }
.dropdown-submenu li a { display: block; padding: 6px 16px; color: var(--text-muted); font-size: 13px; }
.dropdown-submenu li a:hover { background: var(--surface-2); color: var(--primary); text-decoration: none; }

/* Hero 统计 */
.hero-stats { display: flex; justify-content: center; gap: 24px; margin-top: 20px;
  flex-wrap: wrap; }
.hero-stats span { font-size: 14px; color: var(--text-muted);
  background: var(--surface); padding: 4px 14px; border-radius: 20px;
  border: 1px solid var(--border); }

/* 子分类直达云 */
.subcat-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.subcat-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  font-size: 14px; color: var(--text); }
.subcat-tag:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }
.subcat-count { font-size: 12px; background: var(--surface-2); padding: 1px 7px;
  border-radius: 10px; color: var(--text-muted); }
.subcat-tag:hover .subcat-count { background: rgba(255,255,255,0.25); color: #fff; }

/* 标签计数 */
.tag-count { font-size: 11px; background: var(--surface-2); padding: 1px 6px;
  border-radius: 10px; margin-left: 4px; color: var(--text-muted); }
.tag:hover .tag-count { background: rgba(255,255,255,0.25); color: #fff; }

/* 分类更多链接 */
.section-more { text-align: right; margin-top: 12px; }
.section-more a { font-size: 14px; color: var(--primary); }

/* 子分类导航区块 */
.subcategory-nav { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 24px; }
.subcategory-nav h3 { font-size: 16px; margin-bottom: 12px; }
.subcat-list { display: flex; flex-wrap: wrap; gap: 10px; }
.subcat-card { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
  background: var(--surface-2); border-radius: 8px; font-size: 14px; color: var(--text);
  border: 1px solid transparent; }
.subcat-card:hover { background: var(--surface); border-color: var(--primary); color: var(--primary); text-decoration: none; }
.subcat-name { font-weight: 500; }
.subcat-count { font-size: 12px; color: var(--text-muted); }

/* 工具网格 */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.tool-card { display: block; padding: 24px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); transition: transform .15s, box-shadow .15s; color: var(--text);
  text-align: center; }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.tool-icon { font-size: 36px; display: block; margin-bottom: 12px; }
.tool-card h3 { font-size: 16px; margin-bottom: 6px; }
.tool-card p { color: var(--text-muted); font-size: 13px; }

.tools-page { max-width: 900px; margin: 0 auto; }
.tools-page h1 { font-size: 28px; margin-bottom: 12px; }
.tools-intro { color: var(--text-muted); margin-bottom: 28px; }

/* 工具入口区 */
.tools-entry .tools-grid { margin-top: 16px; }

/* 友情链接 */
.footer-friend-links { padding: 20px 20px 0; border-top: 1px solid var(--border); }
.footer-friend-links h4 { font-size: 15px; margin-bottom: 12px; }
.friend-link-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.friend-link-list li a { font-size: 13px; color: var(--text-muted); }
.friend-link-list li a:hover { color: var(--primary); text-decoration: underline; }

/* 联系信息 */
.footer-contact .contact-info { font-size: 13px; color: var(--text); line-height: 1.7; word-break: break-all; }

/* 响应式补充 */
@media (max-width: 900px) {
  .dropdown-menu, .dropdown-submenu { position: static; display: block; box-shadow: none;
    border: none; padding: 0; }
  .nav-dropdown:hover .dropdown-menu { display: none; }
  .nav-dropdown.open .dropdown-menu { display: block; }
  .dropdown-item > a { padding: 8px 0; }
  .dropdown-submenu li a { padding: 6px 0 6px 16px; }
  .footer-friend-links { padding: 16px 20px 0; }
}
@media (max-width: 720px) {
  .hero-stats { gap: 12px; }
  .hero-stats span { font-size: 12px; padding: 3px 10px; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
}
