/* 图图抠图大师 (jpggo.com) 现代化视觉与设计系统规范 (Design Tokens) */

:root {
  /* 品牌核心色彩 - 官方翡翠绿与科技蓝体系 */
  --brand-primary: #00B88A;
  --brand-primary-hover: #009973;
  --brand-primary-light: #E8F7F3;
  --brand-primary-glow: rgba(0, 184, 138, 0.18);
  --brand-secondary: #3B82F6;
  --brand-accent: #FF8C42;
  --brand-purple: #8B7FEA;

  /* 表面与背景色彩 */
  --bg-body: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #FFFFFF;
  --bg-subtle: #F1F5F9;

  /* 文字层级色彩 */
  --text-main: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  /* 边框规范 */
  --border-light: #E2E8F0;
  --border-focus: #00B88A;

  /* 阴影系统 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 20px 25px -5px rgba(0, 184, 138, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* 过渡 */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 暗黑模式自适应 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: #0F172A;
    --bg-surface: #1E293B;
    --bg-surface-elevated: #334155;
    --bg-subtle: #1E293B;
    --text-main: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;
    --border-light: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 20px 25px -5px rgba(0, 184, 138, 0.25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* 现代化毛玻璃粘性顶栏 */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  min-height: 70px;
  transition: all var(--transition-normal);
}
@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(15, 23, 42, 0.88); }
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.navbar-brand img {
  height: 44px;
  width: 160px;
  object-fit: contain;
  display: block;
}

/* 导航链接 */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-item {
  color: var(--text-secondary);
  font-size: 15px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  font-weight: 500;
  text-decoration: none;
}
.nav-item:hover, .nav-item.active {
  color: var(--brand-primary);
  background: var(--brand-primary-light);
}

/* 顶栏快速搜索 */
.header-search {
  position: relative;
  margin: 0 10px;
}
.header-search input {
  padding: 8px 14px 8px 34px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 13px;
  width: 160px;
  transition: all var(--transition-normal);
  outline: none;
}
.header-search input:focus {
  width: 210px;
  border-color: var(--brand-primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--brand-primary-glow);
}
.header-search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

/* 立即使用 CTA 按钮 */
.nav-btn-primary {
  background: var(--brand-primary);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 184, 138, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-btn-primary:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 184, 138, 0.45);
}

/* 移动端汉堡切换按钮 */
.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  z-index: 1001;
}
.mobile-menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* 移动端滑出式抽屉与遮罩层 */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}
.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--bg-surface);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  z-index: 1002;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}
.drawer-close {
  width: 36px;
  height: 36px;
  background: var(--bg-subtle);
  border: none;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drawer-search {
  padding: 16px 20px 8px;
}
.drawer-search input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}
.drawer-search input:focus {
  border-color: var(--brand-primary);
  background: var(--bg-surface);
}

.drawer-nav {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drawer-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 12px 12px 4px;
}
.drawer-link {
  padding: 12px 14px;
  color: var(--text-main);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  transition: all var(--transition-fast);
}
.drawer-link:hover, .drawer-link.active {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}
.drawer-sublink {
  padding: 10px 14px 10px 24px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}
.drawer-sublink:hover {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}
.drawer-cta {
  padding: 20px 16px;
  margin-top: auto;
}
.drawer-btn-primary {
  display: block;
  text-align: center;
  background: var(--brand-primary);
  color: #fff;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 184, 138, 0.35);
}

/* Hero 区域 */
.hero {
  background: linear-gradient(135deg, #00B88A 0%, #00D4AA 100%);
  color: #fff;
  padding: 80px 20px 70px;
  text-align: center;
}
.hero h1 {
  font-size: 3.2em;
  margin-bottom: 18px;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero p {
  font-size: 1.25em;
  margin-bottom: 30px;
  opacity: 0.95;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.hero-btn {
  display: inline-block;
  background: #fff;
  color: #00B88A !important;
  padding: 14px 38px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  text-decoration: none;
}
.hero-btn:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* =======================================================
   图图抠图大师专属：AI 智能抠图实时交互体验台 (Matting Studio)
   ======================================================= */
.matting-studio-section {
  padding: 60px 0 80px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
}
.studio-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  background: var(--bg-body);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.studio-header {
  background: var(--bg-surface);
  padding: 24px 30px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.studio-title-group h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.studio-title-group p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}
.studio-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.studio-tab-btn {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-light);
  background: var(--bg-body);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.studio-tab-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}
.studio-tab-btn.active {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  box-shadow: 0 2px 8px var(--brand-primary-glow);
}

.studio-body {
  padding: 36px 30px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
  align-items: center;
}

/* Before / After 对比滑块 */
.split-slider-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  user-select: none;
  cursor: ew-resize;
  background: #E2E8F0;
}
.checkerboard-bg {
  background-image: linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
                    linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
                    linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}
.slider-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.slider-img-after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  pointer-events: none;
  transition: clip-path 0.05s linear;
}
.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #FFFFFF;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
  transform: translateX(-50%);
  pointer-events: none;
}
.slider-handle-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--brand-primary);
  font-weight: 700;
}
.slider-badge-before, .slider-badge-after {
  position: absolute;
  bottom: 14px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  pointer-events: none;
}
.slider-badge-before { right: 14px; }
.slider-badge-after { left: 14px; background: rgba(0, 184, 138, 0.85); }

/* 右侧控制面板与调色板 */
.studio-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.studio-panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}
.palette-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.palette-swatches {
  display: flex;
  gap: 12px;
  align-items: center;
}
.palette-swatch {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}
.palette-swatch.active {
  border-color: var(--brand-primary);
  transform: scale(1.15);
  box-shadow: 0 0 0 3px var(--brand-primary-glow);
}
.dropzone-box {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  background: var(--bg-body);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.dropzone-box:hover {
  border-color: var(--brand-primary);
  background: var(--brand-primary-light);
}
.dropzone-box svg {
  width: 32px;
  height: 32px;
  color: var(--brand-primary);
  margin-bottom: 8px;
}
.dropzone-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}
.dropzone-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* 核心功能网格 */
.features { padding: 80px 20px; background: var(--bg-body); }
.features h2 { text-align: center; font-size: 32px; margin-bottom: 45px; font-weight: 700; color: var(--text-main); }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; max-width: 1200px; margin: 0 auto; }
.feature-card {
  background: var(--bg-surface);
  padding: 28px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  text-decoration: none;
  display: block;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--brand-primary);
}
.feature-card h3 { font-size: 18px; margin-bottom: 10px; color: var(--brand-primary); font-weight: 600; }
.feature-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.6; margin: 0; }

/* 页脚 */
.footer-black {
  background: #0F172A;
  color: #94A3B8;
  padding: 60px 0 30px;
  border-top: 1px solid #1E293B;
}
.footer-black a { color: #94A3B8; text-decoration: none; transition: color var(--transition-fast); }
.footer-black a:hover { color: #F8FAFC; }
.footer-links {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #1E293B;
  flex-wrap: wrap;
}
.footer-col { min-width: 180px; flex: 1; }
.footer-brand { max-width: 320px; }
.footer-title { color: #F8FAFC; font-size: 1.15em; margin-bottom: 18px; font-weight: 600; }
.footer-blog { padding: 0; margin: 0; list-style: none; }
.footer-blog li { padding: 8px 0; }
.footer-bottom {
  padding-top: 30px;
  text-align: center;
  font-size: 0.9em;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Toast 微提示 */
#toastMessage {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 10px 22px;
  border-radius: 20px;
  font-size: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  z-index: 10002;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
}
#toastMessage.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 回到顶部 */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 184, 138, 0.4);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateY(20px);
  z-index: 999;
}
.scroll-to-top.visible { opacity: 1; transform: translateY(0); }
.scroll-to-top:hover { color: #fff; transform: translateY(-3px); }

/* 响应式网格 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 992px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .studio-body { grid-template-columns: 1fr; }
  .header-search { display: none; }
}
@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2em; }
  .nav-menu, .nav-btn-primary { display: none; }
  .mobile-menu-toggle { display: flex; }
  .footer-links { flex-direction: column; gap: 30px; }
}

/* Zero CLS 防抖规则 */
ins.adsbygoogle {
  display: block;
  min-height: 90px;
  background-color: rgba(0, 0, 0, 0.02);
}

/* Checkbox & Radio 现代对齐规范与品牌色点缀 */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--brand-primary);
  width: 16px;
  height: 16px;
  vertical-align: -2.5px;
  margin: 0 6px 0 0;
  cursor: pointer;
  flex-shrink: 0;
}
label {
  cursor: pointer;
}
