/* ============================================================
   NexAI Store — App Store / 商城聚合风格
   高端、浅色、聚焦应用图标
   ============================================================ */

:root {
  --bg-page: #f5f5f7; /* Apple canvas-parchment */
  --bg-surface: #ffffff; /* Apple canvas */
  --bg-hover: #f0f0f0; /* Apple divider-soft / hover */
  
  --text-main: #1d1d1f; /* Apple ink / body */
  --text-secondary: #6e6e73; /* secondary text */
  --text-muted: #7a7a7a; /* Apple ink-muted-48 */
  --text-light: #cccccc; /* Apple body-muted */
  
  --border: #e0e0e0; /* Apple hairline */
  --border-light: #f0f0f0;
  
  --primary: #0066cc; /* Apple Action Blue */
  --primary-hover: #0071e3; /* Apple Focus Blue */
  
  --radius-sm: 8px; /* rounded.sm */
  --radius-md: 11px; /* rounded.md */
  --radius-lg: 18px; /* rounded.lg */
  --radius-squircle: 22.5%;
  --radius-pill: 9999px; /* rounded.pill */
  
  --shadow-sm: 0 1px 1px rgba(0,0,0,0.02), 0 2px 2px rgba(0,0,0,0.04);
  --shadow-hover: 0 2px 4px rgba(0,0,0,0.04), 0 8px 16px -4px rgba(0,0,0,0.08), 0 24px 32px -8px rgba(0,0,0,0.04);
  --shadow-inset-hairline: inset 0 0 0 1px rgba(0,0,0,0.06);
  --product-shadow: rgba(0, 0, 0, 0.22) 3px 5px 30px 0; /* Apple's signature product shadow */
  
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-out: cubic-bezier(0.21, 0.61, 0.35, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.mall-body {
  font-family: "SF Pro Text", "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.47;
  letter-spacing: -0.374px;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }

/* --- 顶部导航 --- */
.mall-header {
  position: sticky; top: 0; z-index: 100;
  height: 64px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}

.header-left .logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 1.125rem;
}
.logo-icon {
  width: 28px; height: 28px;
  background: var(--text-main); color: white;
  border-radius: 8px; display: grid; place-items: center;
}
.logo-icon svg { width: 16px; height: 16px; }
.logo-badge {
  font-size: 0.75rem; color: var(--primary);
  background: rgba(15, 98, 254, 0.1);
  padding: 2px 6px; border-radius: 4px; font-weight: 600;
  margin-left: 4px; vertical-align: middle;
}

.header-search { flex: 1; max-width: 480px; margin: 0 24px; }
.search-bar {
  display: flex; align-items: center;
  background: var(--bg-hover);
  border-radius: 99px;
  padding: 0 16px; height: 40px;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.search-bar:focus-within {
  background: var(--bg-surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.1);
}
.search-icon { width: 18px; height: 18px; color: var(--text-muted); }
.search-bar input {
  border: none; background: none; outline: none;
  flex: 1; padding: 0 12px; font-size: 0.95rem;
  color: var(--text-main);
}
.search-bar input::placeholder { color: var(--text-light); }
.search-shortcut {
  font-size: 0.75rem; color: var(--text-light);
  background: var(--bg-surface); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 4px;
}

.header-right { display: flex; align-items: center; gap: 20px; }
.header-link { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); transition: color 0.2s; }
.header-link:hover { color: var(--text-main); }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-hover); display: grid; place-items: center;
  color: var(--text-muted); cursor: pointer;
}
.user-avatar svg { width: 20px; height: 20px; }

/* --- 主体布局 --- */
.mall-layout {
  display: flex;
  max-width: 1440px; margin: 0 auto;
  padding: 32px 24px; gap: 40px;
}

/* --- 侧边栏 --- */
.sidebar {
  width: 240px; flex-shrink: 0;
  position: sticky; top: 96px;
  height: calc(100vh - 120px);
  display: flex; flex-direction: column; gap: 32px;
}
.menu-group { display: flex; flex-direction: column; gap: 4px; }
.menu-title {
  font-size: 0.75rem; font-weight: 600; color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 8px; padding-left: 12px;
}
.menu-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 10px 12px; border-radius: var(--radius-md);
  font-size: 0.95rem; font-weight: 500; color: var(--text-muted);
  transition: all 0.2s;
}
.menu-item svg { width: 18px; height: 18px; }
.menu-item span { margin-left: auto; font-size: 0.8rem; color: var(--text-light); }
.menu-item:hover { background: var(--bg-hover); color: var(--text-main); }
.menu-item.active { background: var(--bg-surface); color: var(--primary); box-shadow: var(--shadow-sm); }

.sidebar-promo { margin-top: auto; }
.promo-box {
  background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
  padding: 16px; border-radius: var(--radius-md);
  border: 1px solid #bbf7d0;
}
.promo-box h5 { display: flex; align-items: center; gap: 6px; color: #166534; font-size: 0.9rem; margin-bottom: 8px; }
.promo-box h5 svg { width: 16px; height: 16px; }
.promo-box p { font-size: 0.75rem; color: #15803d; line-height: 1.5; }


/* --- 右侧内容区 --- */
.main-content { flex: 1; min-width: 0; }

/* Banner 推荐位 */
.showcase-banner-container {
  display: grid;
  margin-bottom: 48px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15);
  position: relative;
}
.showcase-banner {
  grid-area: 1 / 1;
  padding: 48px;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; overflow: hidden;
  opacity: 0; pointer-events: none;
  transition: opacity 0.8s ease-in-out;
}
.showcase-banner.active {
  opacity: 1; pointer-events: auto; z-index: 2;
}
.banner-indicators {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 10;
}
.indicator {
  width: 32px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.3);
  cursor: pointer; transition: all 0.3s;
}
.indicator.active { background: white; }

.showcase-banner::before {
  content: ""; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
  transform: rotate(30deg);
  animation: banner-sweep 6s linear infinite;
  pointer-events: none;
}
@keyframes banner-sweep {
  0% { transform: translateX(-50%) rotate(30deg); }
  100% { transform: translateX(50%) rotate(30deg); }
}
.showcase-banner::after {
  content: ""; position: absolute; right: -50px; top: -50px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.3) 0%, transparent 70%);
  pointer-events: none;
  animation: pulse-glow 4s ease-in-out infinite alternate;
}
@keyframes pulse-glow {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.1); opacity: 1; }
}
.banner-info { max-width: 500px; position: relative; z-index: 1; }
.banner-eyebrow {
  color: #A78BFA; font-size: 0.875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 12px;
}
.banner-info h2 { 
  font-size: 2.5rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px; line-height: 1.1; 
  background: linear-gradient(to right, #FFFFFF 20%, #A78BFA 50%, #FFFFFF 80%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: text-shine 3s linear infinite;
}
@keyframes text-shine {
  to { background-position: 200% center; }
}
.banner-info p { color: #94A3B8; font-size: 1.1rem; line-height: 1.6; margin-bottom: 32px; }
.btn-banner {
  display: inline-block; background: white; color: #0F172A;
  padding: 12px 24px; border-radius: 99px; font-weight: 600; font-size: 1rem;
  transition: transform 0.2s;
}
.btn-banner:hover { transform: scale(1.05); }

.banner-visual { position: relative; z-index: 1; margin-right: 40px; }
.banner-app-icon {
  width: 140px; height: 140px; border-radius: 32px;
  display: grid; place-items: center; color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  animation: float-icon 6s ease-in-out infinite;
}
@keyframes float-icon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.banner-app-icon svg { width: 70px; height: 70px; }

/* 列表区 */
.store-section { margin-bottom: 48px; }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.section-head h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
.see-all { font-size: 0.95rem; color: var(--primary); font-weight: 500; }
.see-all:hover { color: var(--primary-hover); text-decoration: underline; }

/* App 网格 (类似 App Store 列表模式卡片) */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.zone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.zone-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm), var(--shadow-inset-hairline);
  color: inherit;
  text-decoration: none;
  transition: all 0.3s var(--ease-out);
}

.zone-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover), inset 0 0 0 1px rgba(0,0,0,0.12);
}

.zone-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: #eef6ff;
  overflow: hidden;
}

.zone-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zone-info {
  min-width: 0;
}

.zone-info h4 {
  margin: 0;
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-info p {
  margin: 5px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.zone-price {
  text-align: right;
  color: var(--text-secondary);
  font-size: 12px;
}

.zone-price b {
  display: block;
  margin-top: 2px;
  color: var(--primary);
  font-size: 18px;
}

/* App 卡片设计核心 */
.app-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; border-radius: var(--radius-lg);
  background: var(--bg-surface); 
  box-shadow: var(--shadow-sm), var(--shadow-inset-hairline);
  transition: all 0.3s var(--ease-out);
  cursor: pointer;
}
.app-card:hover {
  box-shadow: var(--shadow-hover), inset 0 0 0 1px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* 核心：App 圆角大图标 */
.app-icon {
  width: 72px; height: 72px; flex-shrink: 0;
  border-radius: var(--radius-squircle);
  display: block; /* 移除 grid 和 place-items */
  background: white;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.05);
  overflow: hidden;
  position: relative;
}
.app-icon img, .app-icon svg { 
  width: 100%; height: 100%; 
  display: block; 
  object-fit: cover; /* 填满整个圆角矩形 */
}

/* Banner 里的超大图标 */
.banner-app-icon {
  width: 140px; height: 140px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.banner-app-icon img { width: 100%; height: 100%; object-fit: cover; }

/* 各种 App 图标的背景色 */
.openai-bg { background: #10A37F; }
.claude-bg { background: #D97757; }
.cursor-bg { background: #000000; }
.github-bg { background: #ffffff; color: #000 !important; }
.mj-bg { background: #111827; }
.runway-bg { background: #8b5cf6; }
.suno-bg { background: #f59e0b; }
.notion-bg { background: white; border: 1px solid #e5e7eb; box-shadow: none; }
.gemini-bg { background: #1E88E5; }
.perplexity-bg { background: #000000; }

.brand-title { display: flex; align-items: center; gap: 12px; }
.brand-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
}
.brand-icon img, .brand-icon svg { width: 20px; height: 20px; }
.brand-title h3 span { font-size: 0.9rem; color: var(--text-muted); font-weight: normal; margin-left: 6px; }

.menu-icon { width: 20px; height: 20px; flex-shrink: 0; }
img.menu-icon {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
  border-radius: 6px;
  background: var(--bg-hover);
}

.app-info { flex: 1; min-width: 0; }
.app-name { font-size: 1.05rem; font-weight: 600; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; letter-spacing: -0.2px; }
.app-vendor { 
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; 
  color: var(--text-light); margin-bottom: 4px; 
}
.app-desc { font-size: 0.8rem; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 操作区：价格 + 按钮 */
.app-action {
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  flex-shrink: 0; margin-left: 12px;
}
.btn-get {
  background: var(--bg-hover); color: var(--primary);
  font-weight: 600; font-size: 0.95rem;
  padding: 8px 20px; border-radius: var(--radius-pill);
  transition: all 0.2s var(--ease-out);
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-get:hover { background: var(--border); }
.btn-get:active { transform: scale(0.95); }
.app-price { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.app-price small { font-size: 0.75rem; font-weight: 400; color: var(--text-light); }

/* 响应式 */
@media (max-width: 1200px) {
  .mall-layout { padding: 32px 24px; gap: 32px; }
  .app-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .zone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .mall-layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; overflow-x: auto; padding: 2px 0 12px; gap: 24px; scroll-snap-type: x proximity; }
  .sidebar::-webkit-scrollbar { display: none; }
  .menu-group { flex-direction: row; align-items: center; }
  .menu-title { display: none; }
  .menu-item { white-space: nowrap; width: auto; min-height: 42px; scroll-snap-align: start; background: rgba(255,255,255,0.72); box-shadow: var(--shadow-inset-hairline); }
  .sidebar-promo { display: none; }
  .showcase-banner { flex-direction: column; text-align: center; gap: 32px; padding: 40px 24px; }
  .banner-visual { margin-right: 0; order: -1; }
}
@media (max-width: 640px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  body.mall-body { letter-spacing: 0; }
  .header-search { display: none; }
  .mall-header { height: 58px; padding: 0 14px; gap: 12px; }
  .header-left .logo { font-size: 1rem; gap: 7px; min-width: 0; }
  .logo-icon { width: 30px; height: 30px; border-radius: 9px; }
  .logo-text { display: inline-flex; align-items: center; min-width: 0; }
  .logo-badge { font-size: 0.68rem; padding: 1px 5px; }
  .header-right { gap: 10px; margin-left: auto; }
  .header-link { font-size: 0.86rem; padding: 8px 0; }
  #btn-contact { display: inline-flex; max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .user-avatar { width: 34px; height: 34px; }
  .mall-layout { padding: 14px 12px 28px; gap: 18px; }
  .sidebar { margin: 0 -12px; padding: 0 12px 10px; gap: 10px; }
  .menu-group { gap: 8px; flex-shrink: 0; }
  .menu-item { min-height: 38px; padding: 8px 11px; gap: 8px; border-radius: 999px; font-size: 0.86rem; }
  .menu-icon, img.menu-icon { width: 18px; height: 18px; border-radius: 5px; }
  .showcase-banner-container { margin: 0 0 24px; border-radius: 18px; box-shadow: 0 12px 26px -12px rgba(0,0,0,0.22); }
  .showcase-banner { min-height: 360px; justify-content: center; gap: 20px; padding: 28px 20px 42px; }
  .banner-info { max-width: 100%; }
  .banner-eyebrow { font-size: 0.72rem; margin-bottom: 9px; letter-spacing: 0.08em; }
  .banner-info h2 { font-size: clamp(1.8rem, 8vw, 2.35rem); margin-bottom: 12px; }
  .banner-info p { font-size: 0.94rem; line-height: 1.5; margin-bottom: 22px; }
  .btn-banner { padding: 10px 18px; font-size: 0.92rem; }
  .banner-app-icon { width: 92px; height: 92px; border-radius: 22px; }
  .banner-indicators { bottom: 16px; }
  .indicator { width: 22px; height: 3px; }
  .store-section { margin-bottom: 30px; }
  .section-head { align-items: center; margin-bottom: 14px; padding-bottom: 10px; }
  .section-head h3 { font-size: 1.12rem; min-width: 0; }
  .brand-title { gap: 8px; min-width: 0; }
  .brand-title h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand-title h3 span { display: none; }
  .brand-icon { width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0; }
  .see-all { font-size: 0.85rem; flex-shrink: 0; }
  .app-grid { grid-template-columns: 1fr; }
  .zone-grid { grid-template-columns: 1fr; }
  .zone-card { grid-template-columns: 46px minmax(0, 1fr) auto; padding: 14px; }
  .zone-icon { width: 46px; height: 46px; border-radius: 14px; }
  .app-card { display: grid; gap: 12px; padding: 12px; border-radius: 16px; align-items: center; grid-template-columns: 56px minmax(0, 1fr) auto; }
  .app-card:hover { transform: none; }
  .app-icon { width: 56px; height: 56px; }
  .app-name { font-size: 0.97rem; }
  .app-vendor { font-size: 0.68rem; margin-bottom: 2px; }
  .app-desc { font-size: 0.76rem; max-width: 100%; }
  .app-action { grid-column: auto; width: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-left: 0; }
  .btn-get { padding: 7px 12px; min-width: 58px; font-size: 0.82rem; }
  .app-price { font-size: 0.8rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dropdown-menu { position: fixed; left: 12px; right: 12px; top: 66px; width: auto; transform: translateY(8px); border-radius: 18px; }
  .dropdown-menu.right { left: 12px; right: 12px; transform: translateY(8px); }
  .dropdown-wrapper.open .dropdown-menu,
  .dropdown-wrapper.open .dropdown-menu.right { transform: translateY(0); }
  .modal-overlay { align-items: flex-end; padding: 12px; }
  .modal-content { max-width: none; padding: 22px; border-radius: 22px; transform: translateY(24px); }
  .modal-title { font-size: 1.25rem; }
  .form-input { min-height: 48px; font-size: 16px; }
  .btn-primary { min-height: 48px; }
}

@media (max-width: 390px) {
  .header-link { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-card { gap: 10px; }
  .app-icon { width: 52px; height: 52px; }
  .btn-get { padding-inline: 12px; }
  .app-price small { display: none; }
  .zone-card { grid-template-columns: 42px minmax(0, 1fr); }
  .zone-card .zone-price { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--border); text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================================
   Dropdown & Modal Styles
   ============================================================ */
/* --- 顶部右侧下拉菜单 --- */
.dropdown-wrapper { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--bg-surface);
  border-radius: 16px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.02), 0 8px 16px -4px rgba(0,0,0,0.04), 0 24px 32px -8px rgba(0,0,0,0.06), inset 0 0 0 1px rgba(0,0,0,0.06);
  width: 260px;
  padding: 8px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: all 0.2s var(--ease-spring);
  z-index: 100;
}
.dropdown-menu.right { left: auto; right: 0; transform: translateY(8px); }
.dropdown-wrapper.open .dropdown-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.dropdown-wrapper.open .dropdown-menu.right { transform: translateY(0); }

.dropdown-header { padding: 12px 16px 8px; font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }
.user-name { font-size: 1.05rem; font-weight: 700; color: var(--text-main); margin-bottom: 2px; }
.user-email { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }
.dropdown-divider { height: 1px; background: var(--border); margin: 8px 0; }

.dropdown-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  color: var(--text-main); font-weight: 500; font-size: 0.95rem;
  border-radius: 10px; transition: all 0.2s;
}
.dropdown-item svg { width: 18px; height: 18px; color: var(--text-muted); transition: color 0.2s; }
.dropdown-item:hover { background: var(--bg-hover); }
.dropdown-item:hover svg { color: var(--primary); }

/* --- Modal 弹窗 --- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-content {
  background: var(--bg-surface);
  width: 100%; max-width: 440px;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.02), 0 8px 16px -4px rgba(0,0,0,0.08), 0 24px 32px -8px rgba(0,0,0,0.12), inset 0 0 0 1px rgba(0,0,0,0.06);
  transform: translateY(20px) scale(0.96);
  transition: all 0.4s var(--ease-spring);
  opacity: 0;
}
.modal-overlay.open .modal-content { transform: translateY(0) scale(1); opacity: 1; }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-title { font-size: 1.5rem; font-weight: 600; color: var(--text-main); letter-spacing: -0.6px; }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg-hover);
  color: var(--text-muted); cursor: pointer; transition: all 0.2s;
}
.modal-close:hover { background: #E2E8F0; color: var(--text-main); }
.modal-close svg { width: 20px; height: 20px; }

.modal-desc { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 24px; }
.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text-main); margin-bottom: 8px; }
.form-input {
  width: 100%; padding: 14px 16px;
  background: white; border: 1px solid var(--border);
  border-radius: 8px; font-size: 1rem; color: var(--text-main); font-weight: 400;
  transition: all 0.2s var(--ease-out); outline: none;
}
.form-input::placeholder { color: var(--text-light); }
.form-input:focus { border-color: transparent; box-shadow: 0 0 0 1px var(--primary), 0 0 0 4px rgba(0, 102, 204, 0.15); }

.btn-primary {
  background: var(--primary); color: white;
  font-weight: 600; border-radius: var(--radius-pill);
  transition: all 0.2s var(--ease-out); display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 18px;
}
.btn-primary:hover { background: var(--primary-hover); transform: scale(0.98); }
.btn-primary:active { transform: scale(0.95); }
/* Buyer account / wallet */
.panel-card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.07);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), var(--shadow-inset-hairline);
}
.w-full { width: 100%; }
.account-auth-page,.account-page{width:min(1120px,calc(100% - 32px));margin:32px auto 64px}
.account-auth-page{display:grid;place-items:center;min-height:calc(100vh - 130px)}
.account-auth-card{width:min(470px,100%);padding:30px}
.account-auth-head{margin-bottom:22px}
.account-auth-head h1,.account-hero h1,.account-section h1,.account-section h2{margin:8px 0 8px;color:var(--text-main);letter-spacing:0;line-height:1.16}
.account-auth-head p,.account-hero p{margin:0;color:var(--text-muted);line-height:1.6}
.account-kicker{display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:999px;background:#edf5ff;color:var(--primary);font-size:12px;font-weight:700}
.account-auth-foot{margin-top:16px;text-align:center;color:var(--text-muted);font-size:14px}
.account-auth-foot a,.account-section-head a{color:var(--primary);font-weight:700;text-decoration:none}
.account-nav{display:flex;align-items:center;gap:8px;margin:0 0 16px;padding:6px;border:1px solid var(--border);border-radius:999px;background:rgba(255,255,255,.72);overflow-x:auto}
.account-nav::-webkit-scrollbar{display:none}
.account-nav a{flex:0 0 auto;padding:9px 14px;border-radius:999px;color:var(--text-muted);font-size:14px;font-weight:700}
.account-nav a:hover,.account-nav a.active{background:#fff;color:var(--primary);box-shadow:var(--shadow-sm)}
.account-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:28px;margin-bottom:18px;background:linear-gradient(135deg,#fff 0%,#f7fbff 54%,#eef6ff 100%)}
.account-balance{min-width:250px;padding:18px;border:1px solid rgba(0,102,204,.14);border-radius:16px;background:#fff;display:grid;gap:10px}
.account-balance span{font-size:13px;color:var(--text-muted)}
.account-balance strong{font-size:32px;color:var(--text-main);letter-spacing:0;font-variant-numeric:tabular-nums}
.account-actions{display:flex;gap:10px;flex-wrap:wrap}
.account-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}
.account-stat{padding:20px}
.account-stat span{display:block;color:var(--text-muted);font-size:13px;margin-bottom:8px}
.account-stat strong{font-size:26px;color:var(--text-main);font-variant-numeric:tabular-nums}
.account-section{padding:24px}
.account-section + .account-section{margin-top:16px}
.account-section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
.account-section-head span{color:var(--text-muted);font-size:14px}
.account-empty{padding:22px;border:1px dashed var(--border);border-radius:14px;color:var(--text-muted);background:#fafafa}
.account-order-row{display:grid;grid-template-columns:minmax(0,1fr) 110px 120px;align-items:center;gap:16px;padding:15px 0;border-top:1px solid var(--border);color:inherit;text-decoration:none}
.account-order-row:first-of-type{border-top:0}
.account-order-row:hover strong{color:var(--primary)}
.account-order-row strong{display:block;color:var(--text-main);font-size:15px;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-order-row span{display:block;color:var(--text-muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-order-row em{font-style:normal;color:var(--primary);font-weight:700}
.account-order-row b{text-align:right;color:var(--text-main);font-variant-numeric:tabular-nums}
.devshop-field{display:block;margin-bottom:16px}
.devshop-field span{display:block;margin-bottom:8px;color:var(--text-main);font-size:14px;font-weight:700}
.devshop-field input{width:100%;height:48px;padding:0 14px;border:1px solid var(--border);border-radius:12px;background:#fff;color:var(--text-main);font-size:16px;outline:none;transition:border-color .18s,box-shadow .18s}
.devshop-field input:focus{border-color:var(--primary);box-shadow:0 0 0 4px rgba(0,102,204,.12)}
.recharge-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:16px}
.recharge-card{position:relative;padding:20px;border:1px solid var(--border);border-radius:16px;background:#fff;text-align:left;cursor:pointer;transition:border-color .18s,box-shadow .18s,transform .18s}
.recharge-card::after{content:"充值";position:absolute;right:16px;top:16px;height:24px;padding:0 9px;border-radius:999px;background:#edf5ff;color:var(--primary);font-size:12px;font-weight:700;line-height:24px}
.recharge-card:hover{border-color:var(--primary);box-shadow:0 10px 26px rgba(15,23,42,.08);transform:translateY(-1px)}
.recharge-card strong{display:block;color:var(--text-main);font-size:24px;margin-bottom:8px;font-variant-numeric:tabular-nums}
.recharge-card span{color:var(--text-muted);font-size:13px}
.btn-secondary{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 16px;border-radius:999px;background:#fff;color:var(--primary);font-weight:700;border:1px solid var(--border);box-shadow:var(--shadow-sm)}
.btn-secondary:hover{border-color:rgba(0,102,204,.35);background:#f7fbff}
@media (max-width:760px){
  html, body { max-width: 100%; overflow-x: hidden; }
  .account-auth-page,.account-page{width:min(100% - 20px,1120px);margin:18px auto 44px}
  .account-auth-card{padding:22px;border-radius:18px}
  .account-hero{display:grid;padding:20px}
  .account-balance{min-width:0}
  .account-grid,.recharge-grid{grid-template-columns:1fr}
  .account-section{padding:18px;border-radius:18px}
  .account-section-head{align-items:flex-start;flex-direction:column;gap:6px}
  .account-order-row{grid-template-columns:1fr;gap:6px}
  .account-order-row b{text-align:left}
  .account-nav{border-radius:16px}
}
