﻿/* =========================================================
   源码演示站前台 - 对齐后台闲鱼智控 PRO（#FFE815）
   ========================================================= */
:root {
  --brand: #FFE815;
  --brand-hover: #FFD600;
  --brand-shadow: rgba(255, 214, 0, 0.35);
  --bg: #F4F5F7;
  --shell: #ffffff;
  --text: #111111;
  --text-secondary: #6B7280;
  --muted: #9CA3AF;
  --border: #F3F4F6;
  --input-bg: #F7F8FA;
  --shell-w: 430px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--brand); color: #000; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.1); border-radius: 10px; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 居中手机壳 ===== */
.page-shell {
  width: min(100%, var(--shell-w));
  margin: 0 auto;
  min-height: 100vh;
  background: var(--shell);
  box-shadow: 0 8px 40px rgba(0,0,0,.06);
  overflow-x: hidden;
  position: relative;
  animation: fadeIn .4s cubic-bezier(0.16, 1, 0.3, 1);
}
.page-shell::before {
  content: "";
  position: absolute;
  top: -80px; right: -120px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255,232,21,.35), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.page-shell > * { position: relative; z-index: 1; }
.page-shell-wide { overflow: visible; }

@media (min-width: 860px) {
  body { padding: 28px 0; }
  .page-shell {
    min-height: calc(100vh - 56px);
    border-radius: 28px;
  }
}

/* ===== 顶栏品牌 ===== */
.site-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 8px;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.site-mark {
  width: 40px; height: 40px;
  background: var(--brand);
  border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 18px; color: #000;
  box-shadow: 0 8px 18px var(--brand-shadow);
  transform: rotate(-3deg);
  flex-shrink: 0;
}
.site-brand-text {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-pro {
  font-size: 9px;
  font-weight: 800;
  background: #000;
  color: var(--brand);
  padding: 2px 5px;
  border-radius: 4px;
}
.site-search {
  flex: 1;
  max-width: 160px;
}
.site-search form {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border-radius: 999px;
  padding: 0 4px 0 12px;
  border: 1px solid transparent;
  transition: .2s;
}
.site-search form:focus-within {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255,232,21,.28);
}
.site-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 500;
  outline: none;
}
.site-search button {
  width: 32px; height: 32px;
  border: none;
  border-radius: 999px;
  background: var(--brand);
  color: #000;
  font-weight: 800;
  cursor: pointer;
  display: grid; place-items: center;
}
.site-search button svg { width: 14px; height: 14px; }

/* ===== 顶部横幅 ===== */
.promo-banner {
  position: relative;
  margin: 10px 14px 0;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 80% at 90% 20%, rgba(255,232,21,.55), transparent 55%),
    linear-gradient(135deg, #111 0%, #1a1a1a 45%, #2a2208 100%);
  min-height: 140px;
  color: #fff;
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
}
.promo-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 18px;
  min-height: 140px;
  gap: 12px;
}
.promo-copy h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.promo-copy p {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 232, 21, .88);
  letter-spacing: .08em;
  font-weight: 600;
}
.promo-pill {
  display: inline-flex;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand);
  color: #000;
  font-size: 11px;
  font-weight: 800;
}
.promo-deco {
  position: relative;
  width: 100px;
  height: 96px;
  flex-shrink: 0;
}
.deco-orb {
  position: absolute;
  right: 4px; top: 6px;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFF59D, var(--brand) 50%, transparent 72%);
  box-shadow: 0 0 28px rgba(255,232,21,.5);
}
.deco-chip {
  position: absolute;
  left: 0; bottom: 18px;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,232,21,.4);
  color: var(--brand);
}
.deco-chip-2 {
  left: auto; right: 0; bottom: 4px; top: auto;
}

/* ===== 图标横滑 ===== */
.icon-scroll-wrap { padding: 18px 0 6px; overflow: hidden; }
.section-label {
  padding: 0 16px 10px;
  font-size: 13px;
  font-weight: 800;
  color: #111;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::before {
  content: "";
  width: 6px; height: 14px;
  border-radius: 4px;
  background: var(--brand);
}
.icon-marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.icon-marquee.is-static {
  mask-image: none;
  -webkit-mask-image: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.icon-marquee.is-static::-webkit-scrollbar { display: none; }
.icon-track {
  display: flex;
  gap: 14px;
  width: max-content;
  padding: 0 14px 6px;
  animation: icon-marquee 28s linear infinite;
  will-change: transform;
}
.icon-marquee.is-static .icon-track {
  animation: none;
  will-change: auto;
}
.icon-marquee:hover .icon-track { animation-play-state: paused; }
.icon-marquee.is-static:hover .icon-track { animation-play-state: running; }
@keyframes icon-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.icon-item {
  flex: 0 0 auto;
  width: 58px;
  text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  .icon-track { animation: none; }
}
.icon-sq {
  width: 52px; height: 52px;
  border-radius: 16px;
  object-fit: cover;
  display: grid; place-items: center;
  margin: 0 auto;
  font-size: 20px;
  font-weight: 800;
  color: #111;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}
.icon-name {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tone-0 { background: linear-gradient(145deg, #FFE815, #FFD600); }
.tone-1 { background: linear-gradient(145deg, #BFDBFE, #60A5FA); }
.tone-2 { background: linear-gradient(145deg, #DDD6FE, #A78BFA); }
.tone-3 { background: linear-gradient(145deg, #A7F3D0, #34D399); }
.tone-4 { background: linear-gradient(145deg, #FECDD3, #FB7185); }
.tone-5 { background: linear-gradient(145deg, #FDE68A, #F59E0B); }
.tone-6 { background: linear-gradient(145deg, #C7D2FE, #818CF8); }
.tone-7 { background: linear-gradient(145deg, #99F6E4, #2DD4BF); }

/* ===== 公告 ===== */
.announce-bar {
  margin: 10px 14px 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #FFFEF0;
  border: 1px solid rgba(255,232,21,.45);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(255,214,0,.1);
}
.announce-ico { flex-shrink: 0; font-size: 15px; line-height: 1.4; }
.announce-text {
  font-size: 12px;
  color: #6B7280;
  line-height: 1.55;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 分类 Tab ===== */
.cat-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 14px 8px;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #6B7280;
  background: var(--input-bg);
  transition: .2s;
}
.cat-tab:hover { color: #111; background: #E5E7EB; }
.cat-tab.active {
  background: var(--brand);
  color: #000;
  box-shadow: 0 6px 16px var(--brand-shadow);
}

/* ===== 产品列表 ===== */
.product-list {
  padding: 4px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.product-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(0,0,0,.03);
  transition: transform .2s, box-shadow .2s;
}
.product-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  border-color: rgba(255,232,21,.5);
}
.product-row:active { background: #FFFEF5; }

.row-icon { flex-shrink: 0; width: 58px; height: 58px; }
.row-icon img,
.row-icon .icon-sq {
  width: 58px; height: 58px;
  border-radius: 16px;
  object-fit: cover;
  font-size: 22px;
}

.row-body { flex: 1; min-width: 0; }
.row-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.row-desc {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
  font-weight: 500;
}
.row-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.meta-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #111;
  color: var(--brand);
  line-height: 1.4;
}

.btn-view {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: var(--brand);
  color: #111;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 14px var(--brand-shadow);
  transition: .15s;
}
.btn-view:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
}

.empty {
  text-align: center;
  padding: 64px 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.site-footer {
  padding: 22px 16px 30px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ===== 详情页 ===== */
body.detail-page { background: var(--bg); }
.page-shell-wide { width: min(100%, 920px); }
@media (min-width: 960px) {
  .page-shell-wide {
    border-radius: 28px;
    margin-top: 20px;
    margin-bottom: 20px;
    min-height: calc(100vh - 40px);
  }
}

.detail-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  z-index: 20;
}
.detail-topbar .back {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--brand);
  color: #000;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 4px 12px var(--brand-shadow);
}
.detail-topbar .title {
  font-size: 15px;
  font-weight: 800;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-head {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 22px 20px 10px;
}
.pd-icon { width: 76px; height: 76px; flex-shrink: 0; }
.pd-icon img,
.pd-icon .icon-sq {
  width: 76px; height: 76px;
  border-radius: 20px;
  object-fit: cover;
  font-size: 28px;
  box-shadow: 0 10px 24px rgba(0,0,0,.1);
}
.pd-meta h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.pd-sub { font-size: 13px; color: #6B7280; font-weight: 500; }

.pd-desc {
  padding: 4px 20px 0;
  font-size: 13px;
  color: #6B7280;
  line-height: 1.7;
  font-weight: 500;
}
.pd-expand {
  border: none;
  background: none;
  color: #111;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  padding: 0 0 0 4px;
}

.pd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px 6px;
}
.pd-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--input-bg);
  color: #6B7280;
}
.pd-badge.is-on {
  background: var(--brand);
  color: #000;
  box-shadow: 0 4px 12px var(--brand-shadow);
}

.pd-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px 20px 8px;
}
.pd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 10px;
  border-radius: 16px;
  border: none;
  background: var(--input-bg);
  color: #111;
  font-size: 13px;
  font-weight: 800;
  transition: .2s;
}
.pd-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.pd-btn:hover { background: #E5E7EB; transform: translateY(-1px); }
.pd-btn-primary {
  background: var(--brand);
  color: #111;
  box-shadow: 0 8px 20px var(--brand-shadow);
}
.pd-btn-primary:hover {
  background: var(--brand-hover);
  color: #111;
}
.pd-btn.is-disabled { opacity: .4; pointer-events: none; }

.pd-tabs {
  display: flex;
  gap: 24px;
  padding: 18px 20px 0;
  border-bottom: 1px solid var(--border);
}
.pd-tab {
  position: relative;
  border: none;
  background: none;
  padding: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: #9CA3AF;
  cursor: pointer;
}
.pd-tab.is-active { color: #111; }
.pd-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--brand);
}

.pd-panel { display: none; padding: 8px 0 12px; }
.pd-panel.is-active { display: block; }

.coverflow {
  position: relative;
  padding: 24px 40px 8px;
  user-select: none;
}
.cf-stage {
  position: relative;
  height: 420px;
  perspective: 1200px;
  overflow: hidden;
}
.cf-item {
  position: absolute;
  top: 50%; left: 50%;
  width: 200px;
  margin-left: -100px;
  margin-top: -200px;
  transition: transform .45s cubic-bezier(.22,.61,.36,1), opacity .35s ease;
  transform-style: preserve-3d;
  opacity: 0;
  pointer-events: none;
}
.cf-item.is-center {
  opacity: 1;
  transform: translateX(0) translateZ(40px) scale(1);
  z-index: 5 !important;
  pointer-events: auto;
}
.cf-item.is-left {
  opacity: .88;
  transform: translateX(-150px) translateZ(-60px) rotateY(28deg) scale(.86);
  z-index: 3 !important;
}
.cf-item.is-right {
  opacity: .88;
  transform: translateX(150px) translateZ(-60px) rotateY(-28deg) scale(.86);
  z-index: 3 !important;
}
.cf-item.is-far {
  opacity: 0;
  transform: translateX(0) translateZ(-160px) scale(.7);
}

.phone-frame {
  background: #111;
  border-radius: 28px;
  padding: 10px 8px 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.22), 0 0 0 2px #1f2937;
  overflow: hidden;
}
.phone-notch {
  width: 72px; height: 8px;
  border-radius: 8px;
  background: #374151;
  margin: 0 auto 8px;
}
.phone-frame img {
  width: 100%;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  border-radius: 18px;
  background: #0f172a;
}

.cf-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  z-index: 10;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--brand);
  color: #111;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px var(--brand-shadow);
}
.cf-nav:hover { background: var(--brand-hover); }
.cf-prev { left: 8px; }
.cf-next { right: 8px; }

.cf-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 14px 0 6px;
}
.cf-dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  border: none;
  background: #D1D5DB;
  cursor: pointer;
  padding: 0;
  transition: .2s;
}
.cf-dot.is-active {
  width: 18px;
  background: var(--brand);
}

.video-box {
  margin: 16px 20px;
  border-radius: 20px;
  overflow: hidden;
  background: #111;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
}
.video-box iframe,
.video-box video {
  width: 100%; height: 100%;
  border: 0; display: block;
}
.empty-soft {
  text-align: center;
  color: #9CA3AF;
  padding: 48px 20px;
  font-size: 14px;
  font-weight: 600;
}

.account-box {
  margin: 8px 20px 24px;
  padding: 18px;
  border-radius: 20px;
  background: #FFFEF0;
  border: 1px solid rgba(255,232,21,.4);
  box-shadow: 0 6px 18px rgba(255,214,0,.08);
}
.account-box h3 { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.account-short { font-size: 13px; color: #4B5563; margin-bottom: 8px; font-weight: 600; }
.account-box pre {
  background: #111;
  color: var(--brand);
  padding: 14px;
  border-radius: 14px;
  font-size: 12px;
  white-space: pre-wrap;
  overflow: auto;
  font-weight: 600;
}

@media (max-width: 720px) {
  .pd-actions { grid-template-columns: 1fr 1fr; }
  .pd-meta h1 { font-size: 22px; }
  .cf-stage { height: 360px; }
  .cf-item { width: 160px; margin-left: -80px; margin-top: -170px; }
  .cf-item.is-left { transform: translateX(-110px) translateZ(-50px) rotateY(26deg) scale(.84); }
  .cf-item.is-right { transform: translateX(110px) translateZ(-50px) rotateY(-26deg) scale(.84); }
  .coverflow { padding: 16px 28px 4px; }
}

@media (max-width: 420px) {
  .site-search { max-width: 120px; }
  .pd-head { padding: 16px 14px 6px; }
  .pd-desc, .pd-badges { padding-left: 14px; padding-right: 14px; }
  .pd-actions { padding-left: 14px; padding-right: 14px; gap: 8px; }
  .pd-btn { font-size: 12px; padding: 11px 8px; }
  .pd-tabs { padding-left: 14px; padding-right: 14px; }
}
