/* ===== 顶部导航 ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 77, 74, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gold);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.15);
}
.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 2px;
}
.brand-seal {
  width: 34px;
  height: 34px;
  background: var(--red);
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.15);
  font-family: var(--font-serif);
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}
.nav-links a {
  color: rgba(255, 255, 255, 0.75);
  padding: 8px 16px;
  border-radius: var(--r);
  font-size: 14px;
  transition: all 0.2s;
  font-weight: 500;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-links a.active { color: #fff; background: rgba(184, 145, 70, 0.25); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.btn-add {
  background: var(--gold);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-add:hover { background: var(--gold-light); transform: translateY(-1px); color: #fff; }

/* 移动端汉堡菜单 */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(184,145,70,0.3);
  transition: all 0.2s;
  line-height: 1;
  padding: 0;
  font-family: sans-serif;
}
.nav-toggle:hover { background: rgba(184,145,70,0.25); border-color: var(--gold); }
.nav-toggle:active { transform: scale(0.92); }

/* 移动端新增按钮 */
.btn-add-mobile {
  display: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: 24px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-weight: 300;
  box-shadow: 0 4px 12px rgba(184,145,70,0.5);
  transition: all 0.2s;
  line-height: 1;
  padding: 0;
  font-family: sans-serif;
}
.btn-add-mobile:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(184,145,70,0.6); }
.btn-add-mobile:active { transform: scale(0.92); }

/* 移动端悬浮搜索框 */
.mobile-searchbar {
  display: none;
  position: fixed;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  width: calc(100% - 28px);
  max-width: 420px;
}
.mobile-search-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(26, 77, 74, 0.15);
  border-radius: 24px;
  padding: 8px 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  gap: 10px;
}
.mobile-search-icon {
  color: var(--text-muted);
  font-size: 16px;
  flex-shrink: 0;
}
.mobile-search-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  padding: 6px 0;
  font-family: inherit;
}
.mobile-search-input-wrap input::placeholder { color: var(--text-muted); }
.mobile-search-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--paper-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  display: none;
  z-index: 200;
}
.mobile-search-dropdown.show { display: block; }

/* 搜索框 */
.nav-search {
  margin-left: auto;
  position: relative;
  width: 280px;
}
.nav-search input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff;
  outline: none;
  transition: all 0.2s;
}
.nav-search input::placeholder { color: rgba(255,255,255,0.5); }
.nav-search input:focus { background: rgba(255,255,255,0.18); border-color: var(--gold); width: 320px; }
.nav-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
  pointer-events: none;
}
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--paper-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  max-height: 420px;
  overflow-y: auto;
  display: none;
  z-index: 200;
}
.search-dropdown.show { display: block; }
.search-group-title {
  padding: 8px 14px 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1px;
}
.search-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.15s;
}
.search-item:hover { background: var(--paper-dark); }
.search-item:last-child { border-bottom: none; }
.search-item-title { font-weight: 500; color: var(--text); font-size: 14px; }
.search-item-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.search-item-snippet { font-size: 13px; color: var(--text-soft); margin-top: 3px; }
.search-item mark { background: rgba(184,145,70,0.25); color: var(--ink); border-radius: 2px; padding: 0 2px; }
.search-field-tag {
  display: inline-block;
  background: rgba(26, 77, 74, 0.1);
  color: var(--ink);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 6px;
  font-weight: 500;
}
.search-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ===== 主容器 ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px;
}

.page-header {
  margin-bottom: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.page-header h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 1px;
}
.page-header .subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 6px;
}
.page-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.page-search {
  position: relative;
  width: 260px;
}
.page-search input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--paper-card);
  color: var(--text);
  outline: none;
  transition: all 0.2s;
  font-size: 14px;
}
.page-search input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,145,70,0.1); }
.page-search input::placeholder { color: var(--text-muted); }
.page-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 14px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .navbar-inner { padding: 0 14px; gap: 10px; }
  .brand { font-size: 18px; }
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  .nav-search { display: none; }
  .nav-toggle { display: flex; }
  .btn-add-mobile { display: flex; }
  .btn-add { padding: 8px 12px; font-size: 13px; }
  .btn-add span.txt { display: none; }
  .container { padding: 16px 14px 90px; }
  .page-header h1 { font-size: 22px; }
  .page-header-actions { display: none; }
  .page-search { flex: 1; min-width: 0; }
  .mobile-searchbar { display: block; }
  body { padding-bottom: 0; }

  /* 移动端导航菜单展开 */
  .nav-links.mobile-open {
    display: flex;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--ink-dark);
    padding: 10px;
    gap: 2px;
    border-bottom: 1px solid var(--gold);
  }
  .nav-links.mobile-open a {
    padding: 12px 16px;
    border-radius: var(--r);
  }
}
