/* Credits 余额显示条 */
.wd-credits-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--wd-navy);
  color: var(--wd-white);
  padding: 8px 0;
  z-index: 1000;
  font-size: 14px;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}
.wd-credits-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wd-credits-icon { font-size: 16px; }
.wd-credits-text { font-weight: 600; }
.wd-credits-user {
  font-size: 12px;
  color: var(--wd-slate-light);
  margin-left: 4px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wd-credits-refresh {
  background: none;
  border: 1px solid var(--wd-slate-light);
  color: var(--wd-white);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}
.wd-credits-refresh:hover {
  background: var(--wd-slate-dark);
  border-color: var(--wd-slate);
}

@media (max-width: 768px) {
  .wd-footer-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
  .wd-credits-inner { padding: 0 16px; }
  .wd-credits-text { font-size: 13px; }
  .wd-credits-refresh { padding: 3px 6px; font-size: 11px; }
}

/* Form */
.wd-form-group { margin-bottom: 20px; }
.wd-form-group label { display: block; font-size: 14px; font-weight: 500; color: var(--wd-navy); margin-bottom: 6px; }
.wd-form-group input,
.wd-form-group select,
.wd-form-group textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--wd-border); border-radius: 10px;
  font-size: 15px; font-family: inherit; background: var(--wd-white); color: var(--wd-navy);
  transition: border-color 0.2s;
}
.wd-form-group input:focus,
.wd-form-group select:focus,
.wd-form-group textarea:focus { outline: none; border-color: var(--wd-src-from); }
.wd-form-group textarea { resize: vertical; min-height: 120px; }

/* Toast */
.wd-toast {
  position: fixed; top: 92px; left: 50%; transform: translateX(-50%) translateY(-20px);
  background: var(--wd-navy); color: var(--wd-white); padding: 14px 28px; border-radius: 10px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all 0.3s; z-index: 200;
}
.wd-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Page header */
.wd-page-header { background: linear-gradient(180deg, var(--wd-light) 0%, var(--wd-white) 100%); padding: 140px 0 80px; text-align: center; }
.wd-page-header h1 { font-size: 42px; font-weight: 700; margin-bottom: 12px; }
.wd-page-header p { color: var(--wd-slate); font-size: 17px; }

/* Legal */
.wd-legal-layout { display: grid; grid-template-columns: 260px 1fr; gap: 48px; }
.wd-legal-nav { position: sticky; top: 100px; height: fit-content; }
.wd-legal-nav a { display: block; padding: 10px 16px; border-radius: 8px; color: var(--wd-slate); text-decoration: none; font-size: 15px; margin-bottom: 4px; }
.wd-legal-nav a:hover, .wd-legal-nav a.active { background: var(--wd-light); color: var(--wd-navy); }
.wd-legal-content { background: var(--wd-white); border: 1px solid var(--wd-border); border-radius: 20px; padding: 48px; }
.wd-legal-content h2 { font-size: 28px; margin-bottom: 24px; }
.wd-legal-content h3 { font-size: 20px; margin: 32px 0 12px; }
.wd-legal-content p { color: var(--wd-slate); margin-bottom: 12px; }
.wd-scene-card { background:var(--wd-white); border:1px solid var(--wd-border); border-radius:14px; padding:24px; transition:all .3s; }
.wd-scene-card:hover { transform:translateY(-4px); box-shadow:0 12px 28px rgba(15,23,42,.06); }
.wd-scene-card h4 { font-size:16px; font-weight:700; margin-bottom:6px; color:var(--wd-navy); }
.wd-scene-card p { font-size:13px; color:var(--wd-slate); line-height:1.6; margin:0; }

/* 顶导中文产品名后较宽：1099px 以下折叠为汉堡菜单（与 ≤768 折叠一致，点击展开用内联样式可覆盖） */
@media (max-width: 1099px) {
  .wd-nav { display: none; }
  .wd-mobile-menu-btn { display: flex; }
}

/* 响应式 */
@media (max-width: 768px) {
  .wd-section { padding: 80px 0; }
  .wd-section-title { font-size: 28px; }
  .wd-card-grid, .wd-legal-layout { grid-template-columns: 1fr !important; }
  .wd-nav { display: none; }
  .wd-mobile-menu-btn { display: flex; }
  .wd-card { padding: 28px; }
  .wd-card h3 { font-size: 20px; }
  .wd-page-header h1 { font-size: 32px; }
  body { font-size: 15px; }

  /* Mobile dropdown */
  .wd-nav-dropdown-menu {
    position: static;
    transform-origin: top center;
    transform: scaleY(0) !important;
    box-shadow: none;
    border: none;
    background: var(--wd-light);
    border-radius: 8px;
    padding: 8px 0;
    margin-top: 4px;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
    max-height: 300px;
    overflow: hidden;
  }
  .wd-nav-dropdown.wd-dropdown-open .wd-nav-dropdown-menu {
    transform: scaleY(1) !important;
    opacity: 1;
    visibility: visible;
  }
}

/* ============== 头部用户区 ============== */
.wd-user-area { display: flex; align-items: center; }
.wd-login-btn {
  padding: 8px 18px; background: var(--wd-src-from); color: var(--wd-white);
  border: none; border-radius: 8px; font-size: 14px; cursor: pointer;
  transition: background 0.2s;
  min-height: 40px;
}
.wd-login-btn:hover { background: var(--wd-accent-dark); }
.wd-login-btn:focus-visible {
  outline: 2px solid var(--wd-focus-ring);
  outline-offset: var(--wd-focus-ring-offset);
}
.wd-user-logged {
  position: relative; display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 4px 8px; border-radius: 8px;
  transition: background 0.2s;
}
.wd-user-logged:hover { background: var(--wd-border-light); }
.wd-user-avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--wd-border);
}
.wd-user-name { font-size: 14px; color: var(--wd-navy); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-user-dropdown {
  display: none; position: absolute; top: 100%; right: 0;
  background: var(--wd-white); border: 1px solid var(--wd-border); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08); min-width: 140px;
  z-index: 100; padding: 4px 0;
}
.wd-user-logged:hover .wd-user-dropdown { display: block; }
.wd-user-dropdown a {
  display: block; padding: 8px 16px; font-size: 14px; color: var(--wd-navy);
  text-decoration: none;
}
.wd-user-dropdown a:hover { background: var(--wd-border-light); }
@media (max-width: 768px) {
  .wd-user-area { margin-right: 8px; }
  .wd-user-name { display: none; }
}

@keyframes wd-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
