/* 顶栏：全宽底边 + 内容区与主区域同宽对齐 */
.h5-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}

.h5-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
  padding: 8px 12px;
  max-width: 95%;
  margin: 0 auto;
}

.h5-logo,.h5-logo img {
  flex-shrink: 0;
  width: 86px;
  height: 36px;


  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
}

.h5-search {
  flex: 1;
  min-width: 0;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  background: var(--color-primary-light);
  border-radius: 18px;
  border: 1px solid rgba(206, 220, 228, 0.9);
}

.h5-search svg {
  flex-shrink: 0;
  opacity: 0.55;
}

.h5-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 14px;
  outline: none;
}

.h5-search input::placeholder {
  color: var(--color-muted);
}

.h5-header-actions {
  flex-shrink: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.h5-link-text {
  font-size: 13px;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.h5-link-text:hover {
  color: var(--color-primary);
}

.h5-btn-login {
  padding: 0 18px;
  height: 32px;
  line-height: 32px;
  border: none;
  border-radius: 16px;
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
}

.h5-btn-login:hover {
  filter: brightness(1.05);
}

.h5-icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 0;
  position: relative;
  color: var(--color-text);
}

.h5-badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ff4d4f;
  border-radius: 50%;
}

/* 顶栏：已登录 — 头像下拉 + 通知铃铛（首页/详情等共用） */
.h5-header-userbar {
  display: flex;
  align-items: center;
  gap: 2px;
}

.h5-header-userbar .h5-badge-dot {
  background: var(--color-primary);
}

.h5-user-menu-wrap {
  position: relative;
}

.h5-user-menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.h5-user-menu-trigger:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.h5-user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  border: 1px solid #bae6fd;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.h5-user-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 156px;
  padding: 6px 0;
  margin: 0;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #eef1f5;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  z-index: 200;
}

.h5-user-dropdown[hidden] {
  display: none !important;
}

.h5-user-dropdown a,
.h5-user-dropdown button.h5-user-dropdown-logout {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 18px;
  border: none;
  background: none;
  text-align: left;
  font-size: 14px;
  font-family: inherit;
  color: #1f2937;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.4;
}

.h5-user-dropdown a:hover,
.h5-user-dropdown button.h5-user-dropdown-logout:hover {
  background: #f8fafc;
}

.h5-user-dropdown-logout {
  margin-top: 4px !important;
  padding-top: 12px !important;
  border-top: 1px solid #f1f5f9 !important;
  color: #64748b !important;
}

/* 主题：天空背景 + 毛玻璃（多页面复用） */
body.h5-theme-glass {
  min-height: 100vh;
  background: radial-gradient(1200px 520px at 55% 44%, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.22) 42%, rgba(255, 255, 255, 0) 68%),
    linear-gradient(180deg, #2f77ff 0%, #6fb2ff 40%, #e9f6ff 100%);
}

body.h5-theme-glass::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(900px 420px at 60% 45%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.22) 48%, rgba(255, 255, 255, 0) 75%),
    radial-gradient(520px 260px at 25% 30%, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(680px 300px at 80% 70%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 70%);
  opacity: 0.9;
}

body.h5-theme-glass .h5-header {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.55);
}

.h5-glass-card {
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@media (min-width: 992px) {
  .h5-header-inner {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* 底栏：仅移动端 */
.h5-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: calc(var(--bottom-nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: #fff;
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
}

@media (min-width: 992px) {
  .h5-bottom-nav {
    display: none;
  }
}

.h5-bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px;
  font-size: 10px;
  color: var(--color-text-secondary);
}

.h5-bottom-nav a.active {
  color: var(--color-primary);
}

.h5-bottom-nav svg {
  opacity: 0.85;
}

/* 页脚 */
.h5-footer {
  padding: 20px 16px 28px;
  text-align: center;
}

.h5-footer-inner {
  max-width: 1108px;
  margin: 0 auto;
}

.h5-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.h5-footer-links a {
  font-size: 13px;
  color: #2a4f88;
}

.h5-footer-meta {
  font-size: 11px;
  color: var(--color-footer-text);
  line-height: 1.6;
}

.h5-footer-meta a {
  color: var(--color-footer-text);
}

/* 关于我们弹窗（首页/详情共用） */
.h5-about-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.h5-about-modal[hidden] {
  display: none !important;
}

.h5-about-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.h5-about-modal-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 8px;
  padding: 24px 24px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.h5-about-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.h5-about-modal-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  line-height: 28px;
  text-align: center;
  font-family: Georgia, serif;
}

.h5-about-modal-title {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

.h5-about-modal-body {
  padding-left: 40px;
  margin-bottom: 24px;
}

.h5-about-modal-body p {
  margin: 0 0 8px;
  font-size: 14px;
  color: #666;
  line-height: 1.65;
}

.h5-about-modal-body p:last-child {
  margin-bottom: 0;
}

.h5-about-modal-wechat {
  font-weight: 500;
  color: #444;
}

.h5-about-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.h5-about-modal-btn {
  min-width: 88px;
  height: 34px;
  padding: 0 20px;
  border: none;
  border-radius: 4px;
  background: #40a9ff;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.h5-about-modal-btn:hover {
  background: #1890ff;
}

/* 登录 / 注册弹窗 */
.h5-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.h5-auth-modal[hidden] {
  display: none !important;
}

.h5-auth-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.h5-auth-modal-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  max-height: min(90vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 10px;
  padding: 0 20px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.h5-auth-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 12px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

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

.h5-auth-close {
  width: 36px;
  height: 36px;
  margin: 0 -8px 0 0;
  border: none;
  padding: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  border-radius: 6px;
}

.h5-auth-close:hover {
  color: #333;
  background: #f5f5f5;
}

.h5-auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-radius: 8px;
  padding: 3px;
  background: #f0f2f5;
}

.h5-auth-tab {
  flex: 1;
  height: 36px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
}

.h5-auth-tab.active {
  background: #fff;
  color: var(--color-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.h5-auth-error {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  font-size: 13px;
  color: #cf1322;
}

.h5-auth-error[hidden] {
  display: none !important;
}

.h5-auth-panel {
  display: none;
}

.h5-auth-panel.active {
  display: block;
}

.h5-auth-field {
  margin-bottom: 14px;
}

.h5-auth-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #4a5568;
}

.h5-auth-field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.h5-auth-field input:focus {
  border-color: var(--color-primary);
}

.h5-auth-field input::placeholder {
  color: #a8b0bc;
}

.h5-auth-actions {
  margin-top: 20px;
}

.h5-auth-submit {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: var(--color-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.h5-auth-submit:hover {
  filter: brightness(1.05);
}
