:root {
  --bg: #0b0c10;
  --bg-alt: #101218;
  --text: #e6e8ec;
  --muted: #9aa3b2;
  --brand: #ff2d55;
  --brand-2: #ff8a00;
  --card: #131722;
  --border: #222633;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* 间距 */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 24px;
  --radius-full: 999px;
  
  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,.18);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.24);
  --shadow-brand: 0 10px 28px rgba(255,45,85,.22);
  
  /* 过渡 */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.6s ease;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  opacity: 0;
  transition: opacity 0.4s ease;
}
body.page-loaded { 
  opacity: 1;
}
html { scroll-behavior: smooth; }

/* 骨架屏加载效果 */
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--bg-alt) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
  border-radius: 4px;
}
.skeleton-title {
  height: 1.5em;
  width: 60%;
  margin-bottom: 1em;
  border-radius: 4px;
}
.skeleton-button {
  height: 56px;
  border-radius: var(--radius-xl);
  margin-top: 1em;
}

/* 跳过导航链接 - 无障碍访问 */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  z-index: 100;
  text-decoration: none;
  transition: top 0.3s;
}
.skip-to-content:focus {
  top: 10px;
}

/* global links */
a { text-decoration: none; }

.container { width: min(1120px, 92%); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(160%) blur(8px);
  background: linear-gradient(180deg, rgba(11,12,16,.9), rgba(11,12,16,.6));
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .4px; }
.brand .logo { height: 28px; width: auto; display: block; }
.brand .brand-name { font-size: 16px; }
.nav { display: flex; gap: 16px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--text); }
.nav a.active { color: #fff; position: relative; }
.nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 2px; }

/* hamburger */
.menu-toggle { display: none; border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: 10px; padding: 8px 12px; font-weight: 800; }

.btn { 
  appearance: none; 
  border: 1px solid transparent; 
  border-radius: var(--radius-xl); 
  padding: var(--spacing-md) var(--spacing-lg); 
  font-weight: 800; 
  cursor: pointer; 
  transition: all var(--transition-base); 
  display: inline-block; 
  text-align: center; 
  line-height: 1;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}
.btn:active::before {
  width: 300px;
  height: 300px;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }
.btn-primary { 
  background: linear-gradient(135deg, #ff3d6a, #ff8a00); 
  background-size: 200% 200%;
  color: #fff; 
  box-shadow: 0 10px 28px rgba(255,45,85,.22); 
  font-size: 18px;
  animation: gradient-pulse 3s ease infinite;
}
@keyframes gradient-pulse {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.btn-primary:hover { 
  transform: translateY(-2px) scale(1.02); 
  box-shadow: 0 14px 32px rgba(255,45,85,.35);
}
.btn-primary:active { 
  transform: translateY(0) scale(0.98); 
  box-shadow: 0 8px 20px rgba(255,45,85,.24); 
}
.btn-primary, .btn-ghost, .btn-outline { min-height: 56px; }

/* focus-visible a11y - 改进对比度 */
:focus-visible { outline: 3px solid #5b9cff; outline-offset: 2px; border-radius: 10px; }
a:focus-visible { outline-color: var(--brand); }
button:focus-visible { outline-color: var(--brand-2); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--text); }
.btn-ghost { 
  background: #ffffff10; 
  color: #fff; 
  border: 1px solid #ffffff20;
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { 
  background: #ffffff20; 
  border-color: #ffffff40;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(255,255,255,0.1);
}
.w-100 { width: 100%; }

.hero { position: relative; overflow: hidden; }
.hero-inner { text-align: center; padding: 72px 0 64px; }
.hero-badge { 
  display: inline-block; 
  padding: 6px 10px; 
  border-radius: 999px; 
  background: linear-gradient(135deg, #ffffff15, #ffffff08); 
  border: 1px solid #ffffff20; 
  color: #fff; 
  font-weight: 700; 
  letter-spacing: .6px;
  box-shadow: 0 4px 12px rgba(255,45,85,0.15);
  animation: badge-glow 2s ease-in-out infinite;
}
@keyframes badge-glow {
  0%, 100% { box-shadow: 0 4px 12px rgba(255,45,85,0.15); }
  50% { box-shadow: 0 4px 20px rgba(255,45,85,0.3); }
}
.hero h1 { margin: 14px 0 8px; font-size: clamp(28px, 4.6vw, 48px); line-height: 1.18; font-weight: 800; }
.hero h1 span { 
  background: linear-gradient(135deg, #ff3d6a, #ff8a00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease-in-out infinite;
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero .subtitle { color: var(--muted); margin-bottom: 18px; }
.countdown { display: flex; justify-content: center; gap: 10px; margin: 18px 0 22px; }
.countdown .time { background: #ffffff0d; border: 1px solid #ffffff14; padding: 10px 14px; border-radius: 12px; min-width: 72px; }
.countdown .time span { display: block; font-size: 28px; font-weight: 800; }
.countdown .time label { font-size: 12px; color: var(--muted); }
.cta { display: flex; justify-content: center; gap: 12px; margin-top: 6px; }
.hero-bg { position: absolute; inset: -20% -10% auto -10%; height: 60%; background: radial-gradient(1200px 400px at 50% -10%, #ff2d5526, transparent), radial-gradient(800px 300px at 20% -10%, #ff8a0020, transparent); pointer-events: none; }

.section { padding: 56px 0; }
.section.alt { background: var(--bg-alt); }
.section h2 { margin: 0 0 8px; font-size: 26px; }
.section-desc { color: var(--muted); margin: 0 0 22px; }

.grid { display: grid; gap: 16px; align-items: stretch; }
.products { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.coupons { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card { 
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: var(--radius-lg); 
  padding: var(--spacing-md); 
  box-shadow: var(--shadow-md); 
  display: flex; 
  flex-direction: column; 
  height: 100%; 
  transition: transform var(--transition-base), box-shadow var(--transition-base), opacity var(--transition-slow);
  opacity: 0;
  transform: translateY(30px);
}
.card.animate-in {
  opacity: 1;
  transform: translateY(0);
}
.card:hover { 
  transform: translateY(-4px) scale(1.02); 
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
}
.card .card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.card .tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid #ffffff20; background: #ffffff12; }
.card .tag.hot { border-color: #ff2d5530; background: #ff2d5514; color: #ff7b95; }
.card .features { margin: 10px 0 14px; padding-left: 18px; color: var(--muted); }
.card .features li { margin: 6px 0; }
.price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.price-now { font-weight: 800; color: #fff; font-size: 20px; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 14px; }
.card .w-100 { margin-top: auto; display: block; }

/* Flash sale */
.flash { background: linear-gradient(180deg, #1a0f12, #0b0c10); border-top: 1px solid #ff2d5526; border-bottom: 1px solid #ff8a0020; }
.flash-head { display: flex; align-items: center; justify-content: space-between; }
.flash-badge { background: #ff2d55; color: #fff; padding: 6px 10px; border-radius: 999px; font-weight: 800; letter-spacing: .6px; animation: pulse 1.2s infinite; box-shadow: 0 0 0 0 rgba(255,45,85,.6); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,45,85,.6);} 70% { box-shadow: 0 0 0 12px rgba(255,45,85,0);} 100% { box-shadow: 0 0 0 0 rgba(255,45,85,0);} }
.flash-grid { gap: 14px; }
.flash-card { background: linear-gradient(135deg, #2a0f18, #1a1d2a); border: 1px solid #ff2d5530; box-shadow: 0 12px 30px rgba(255,45,85,.12); position: relative; }
.flash-card .price-now { color: #fff; font-size: 22px; }
.flash-card .stock { color: #ff8a00; font-weight: 700; margin-bottom: 10px; }
.flash-card .tag.hot { background: #ff2d55; color: #fff; border-color: #ff2d55; }

.coupon { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; background: linear-gradient(135deg, #1d2333, #171c29); border: 1px dashed #2a3142; padding: 16px; border-radius: 14px; }
.coupon .value { font-size: 28px; font-weight: 900; color: #fff; }
.coupon .desc { color: var(--muted); }

.rules { color: var(--muted); padding-left: 18px; }
.rules li { margin: 8px 0; }

.faq details { 
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: 12px; 
  padding: 12px 14px; 
  margin: 10px 0;
  transition: all 0.3s ease;
}
.faq details:hover { 
  border-color: var(--brand); 
  box-shadow: 0 4px 12px rgba(255,45,85,0.15);
  transform: translateX(4px);
}
.faq details[open] {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(255,45,85,0.2);
}
.faq summary { 
  cursor: pointer; 
  font-weight: 700;
  position: relative;
  padding-right: 24px;
  user-select: none;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--brand);
  font-weight: 700;
  transition: transform 0.3s ease;
}
.faq details[open] summary::after {
  content: '−';
  transform: translateY(-50%) rotate(180deg);
}
.faq p { 
  color: var(--muted); 
  margin: 8px 0 0;
  animation: fadeInDown 0.3s ease;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; color: var(--muted); }
.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { color: var(--text); }

/* back-to-top */
#backTop { 
  position: fixed !important; 
  right: 18px !important; 
  bottom: 30px !important; 
  top: auto !important;
  left: auto !important;
  z-index: 40; 
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: auto;
  padding: 14px 20px;
  white-space: nowrap;
  font-size: 15px;
  box-shadow: var(--shadow-brand);
}
#backTop.show { 
  display: inline-flex !important;
}
#backTop:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(255,45,85,.35);
}

/* Toast 通知 */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--card);
  color: var(--text);
  padding: 14px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  font-weight: 600;
  min-width: 200px;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-success {
  border-color: var(--success);
  background: linear-gradient(135deg, #22c55e15, var(--card));
}
.toast-info {
  border-color: #5b9cff;
  background: linear-gradient(135deg, #5b9cff15, var(--card));
}
.toast-error {
  border-color: var(--brand);
  background: linear-gradient(135deg, #ff2d5515, var(--card));
}

/* Drawer styles */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 39; opacity: 0; pointer-events: none; transition: .2s ease; }
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; left: 0; height: 100vh; width: min(80vw, 320px); background: var(--bg-alt); border-right: 1px solid var(--border); z-index: 40; transform: translateX(-100%); transition: transform .25s ease; display: flex; flex-direction: column; }
.drawer.show { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 800; }
.drawer-close { border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: 8px; padding: 6px 10px; }
.drawer-links { display: flex; flex-direction: column; padding: 8px; }
.drawer-links a { padding: 12px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.drawer-links a:hover { background: #ffffff10; }

body.no-scroll { overflow: hidden; }

/* 动画偏好设置 - 尊重用户系统设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 打印样式 */
@media print {
  .site-header, .drawer, .drawer-backdrop, #backTop, .online-support-widget {
    display: none !important;
  }
  body { background: white; color: black; }
  .section { page-break-inside: avoid; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .menu-toggle { display: inline-block; }
  .hero-inner { padding: 56px 0 48px; }
  .countdown .time { min-width: 64px; }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* extra small phones */
@media (max-width: 400px) {
  .hero-inner { padding: 44px 0 40px; }
  .section { padding: 40px 0; }
  .grid-5, .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .btn { padding: 14px 18px; font-size: 16px; }
  .countdown { gap: 8px; }
  .countdown .time { min-width: 56px; padding: 8px 10px; }
}

/* light theme */
.light { --bg: #f7f8fb; --bg-alt: #fff; --text: #1b1f2a; --muted: #536076; --card: #ffffff; --border: #e6e8ef; }
body.light .site-header { background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(247,248,251,.85)); border-bottom-color: #e6e8ef; }
body.light .hero-bg { background: radial-gradient(1200px 400px at 50% -10%, #ff2d551a, transparent), radial-gradient(800px 300px at 20% -10%, #ff8a0015, transparent); }
.light .nav a { color: #1b1f2a; }
.light .nav a:hover { color: #000; }
.light .price-now { color: var(--brand); }
.light .btn-ghost { background: #0000000d; color: #1b1f2a; border: 1px solid #e6e8ef; }
.light .btn-ghost:hover { background: #00000014; border-color: #d5d9e3; }
.light .btn-outline { color: #1b1f2a; }
.light .menu-toggle { color: #1b1f2a; border-color: #e6e8ef; }
.light .flash { background: linear-gradient(180deg, #fff5f7, #f7f8fb); border-top: 1px solid #ffd1db; border-bottom: 1px solid #ffe0c2; }
.light .flash-card { background: linear-gradient(135deg, #fff0f3, #ffffff); border: 1px solid #ffd1db; box-shadow: 0 10px 24px rgba(255,45,85,.10); }
.light .flash-card .price-now { color: #d61f45; }
.light .flash-card .stock { color: #ff7a00; }
.light .drawer { background: #fff; border-right-color: #e6e8ef; }
.light .drawer-head { border-bottom-color: #e6e8ef; }
.light .drawer-close { border-color: #e6e8ef; color: #1b1f2a; }
.light .drawer-links a { color: #1b1f2a; }
.light .drawer-links a:hover { background: #f7f8fb; }
.light .toast { background: #fff; color: #1b1f2a; border-color: #e6e8ef; box-shadow: 0 10px 40px rgba(0,0,0,0.15); }
.light .toast-success { background: linear-gradient(135deg, #22c55e10, #fff); }
.light .toast-info { background: linear-gradient(135deg, #5b9cff10, #fff); }
.light .toast-error { background: linear-gradient(135deg, #ff2d5510, #fff); }
.light .skip-to-content { background: var(--brand); color: #fff; }
.light .card .tag { background: #e5e7eb; border-color: #d1d5db; color: #4b5563; font-weight: 700; }
.light .card .tag.hot { background: #ffe4e8; border-color: #ffb3c1; color: #c81e48; font-weight: 800; }
.light .flash-card .tag { background: #e5e7eb; border-color: #d1d5db; color: #4b5563; }
.light .flash-card .tag.hot { background: #ff2d55; color: #fff; border-color: #ff2d55; font-weight: 800; }
.light .flash-badge { background: #ff2d55; color: #fff; }
.light .coupon { background: linear-gradient(135deg, #fff5f7, #fffbf5); border-color: #ffc4d0; box-shadow: 0 4px 12px rgba(255,45,85,0.08); }
.light .coupon .value { color: #ff2d55; }
.light .coupon .desc { color: #6b7280; }
body.light:not(.page-loaded) { background: #ffffff; }
.light .hero-badge { background: #ffe4e8; border-color: #ffc4d0; color: #c81e48; }
.light .countdown .time { background: #f3f4f6; border-color: #d1d5db; }
.light .countdown .time span { color: #ff2d55; }
.light .countdown .time label { color: #6b7280; }
.light .skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
}

