/*
Theme Name: 我的导航站
Theme URI: https://example.com
Author: WorkBuddy
Description: 简洁炫酷的网址导航站主题，支持后台管理导航链接和分组。
Version: 1.2
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: navtheme
*/

/* ========== 炫酷动态背景 ========== */
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #2c3e50;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 200% 200%;
  animation: navGradient 14s ease infinite;
  position: relative;
  overflow-x: hidden;
}
@keyframes navGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
/* 浮动光斑 */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .45;
  z-index: 0;
  pointer-events: none;
}
body::before {
  width: 420px; height: 420px;
  background: #4facfe;
  top: -120px; left: -120px;
  animation: navFloat1 18s ease-in-out infinite;
}
body::after {
  width: 520px; height: 520px;
  background: #ff6ec7;
  bottom: -180px; right: -140px;
  animation: navFloat2 22s ease-in-out infinite;
}
@keyframes navFloat1 {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(120px, 80px); }
}
@keyframes navFloat2 {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(-100px, -70px); }
}

/* ========== 主体 ========== */
.nav-wrap { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; }
.nav-header { text-align: center; padding: 52px 0 26px; }
.nav-header h1 {
  margin: 0 0 10px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,.22);
}
.nav-header p { margin: 0; color: rgba(255,255,255,.88); font-size: 15px; text-shadow: 0 1px 6px rgba(0,0,0,.15); }

/* ========== 搜索栏 ========== */
.nav-search {
  margin: 28px auto 6px;
  max-width: 720px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 40px;
  padding: 7px 8px 7px 7px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 36px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.3);
}
.nav-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 15px;
  color: #fff;
  outline: none;
}
.nav-search input::placeholder { color: rgba(255,255,255,.75); }
.nav-search button {
  border: none;
  background: linear-gradient(135deg,#fff,#e8ecff);
  color: #2563eb;
  padding: 11px 26px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.nav-search button:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.2); }

/* 搜索引擎选择器 */
.engine-select { position: relative; flex: none; }
.engine-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: rgba(255,255,255,.25);
  color: #fff;
  padding: 11px 16px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.3);
  transition: background .2s;
}
.engine-btn:hover { background: rgba(255,255,255,.35); }
.engine-btn .arrow { font-size: 10px; opacity: .8; }
.engine-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 150px;
  background: rgba(255,255,255,.97);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0,0,0,.22);
  padding: 6px;
  display: none;
  z-index: 50;
  backdrop-filter: blur(20px);
}
.engine-menu.open { display: block; }
.engine-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #2c3e50;
  font-size: 14px;
  cursor: pointer;
}
.engine-option:hover { background: #eff6ff; color: #2563eb; }
.engine-option.active { background: #2563eb; color: #fff; }
.engine-option .dot { width: 8px; height: 8px; border-radius: 50%; background: #2563eb; }
.engine-option.active .dot { background: #fff; }

.nav-hint { text-align: center; color: rgba(255,255,255,.75); font-size: 12px; margin: 10px 0 0; }

/* ========== 分类与卡片 ========== */
.nav-section { margin-top: 32px; }
.nav-section h2 {
  font-size: 19px;
  margin: 0 0 16px;
  padding-left: 14px;
  border-left: 4px solid rgba(255,255,255,.9);
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 14px; }
.nav-card {
  display: flex; align-items: center; gap: 11px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 13px;
  padding: 14px 16px;
  text-decoration: none;
  color: #2c3e50;
  transition: transform .25s, box-shadow .25s;
  box-shadow: 0 6px 18px rgba(0,0,0,.1);
  backdrop-filter: blur(10px);
}
.nav-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.22); }
.nav-card .ico {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg,#667eea,#764ba2);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex: none;
  box-shadow: 0 3px 10px rgba(102,126,234,.4);
}
.nav-card .txt { font-size: 14px; font-weight: 600; }
.nav-footer { text-align: center; color: rgba(255,255,255,.8); font-size: 12px; margin-top: 50px; text-shadow: 0 1px 4px rgba(0,0,0,.15); }
.hidden { display: none !important; }
.nav-no-result { text-align: center; color: rgba(255,255,255,.9); font-size: 16px; padding: 60px 20px; text-shadow: 0 2px 8px rgba(0,0,0,.2); }

/* 响应式 */
@media (max-width: 640px) {
  .nav-header h1 { font-size: 30px; }
  .nav-search { flex-wrap: wrap; border-radius: 24px; }
  .nav-search input { flex-basis: 100%; order: 3; }
  .engine-select { order: 1; }
  .nav-search button { order: 2; }
}
