:root {
  --primary: #ff8831;
  --primary-light: #ff9d55;
  --primary-dark: #e67a2b;
  --primary-gradient: linear-gradient(135deg, #ff632d, #ff7225);
  --primary-bg: rgba(255, 136, 49, 0.1);
  --danger: #f03036;
  --danger-light: #f25c5f;
  --danger-gradient: linear-gradient(-90deg, #f03036, rgba(240,48,54,.7));
  --success: #52c41a;
  --success-bg: rgba(82, 196, 26, 0.1);
  --warning: #faad14;
  --warning-bg: rgba(250, 173, 20, 0.1);
  --orange: #ff8831;
  --purple: #722ed1;
  --pink: #f03036;

  --bg: #f5f7fa;
  --bg-warm: #fef7f0;
  --bg-white: #ffffff;
  --bg-gray: #fafafa;
  --bg-gray-2: #f2f2f2;
  --bg-dark: #1a1a1a;

  --text-primary: #333333;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --text-disabled: #cccccc;
  --text-white: #ffffff;
  --text-price: #f03036;
  --text-link: #ff8831;

  --border: rgba(0, 0, 0, 0.06);
  --border-light: rgba(0, 0, 0, 0.04);
  --divider: #eeeeee;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 0.1rem 0.5rem 0 rgba(0, 0, 0, 0.1);

  --radius-sm: 0.35rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.7rem;
  --radius-xl: 0.8rem;
  --radius-round: 999px;

  --tab-bar-height: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --font-xs: 11px;
  --font-sm: 13px;
  --font-base: 15px;
  --font-md: 17px;
  --font-lg: 20px;
  --font-xl: 24px;
  --font-xxl: 28px;
  --font-hero: 34px;

  --transition-fast: 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-normal: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-slow: 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);

  --z-page: 1;
  --z-tabbar: 100;
  --z-mask: 500;
  --z-popup: 600;
  --z-loading: 700;
  --z-toast: 800;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  display: block;
  border: 0;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
  -webkit-appearance: none;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

ul, ol {
  list-style: none;
}

::-webkit-scrollbar {
  display: none;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

#page-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

.page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
  z-index: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.page.has-tab-bar {
  padding-bottom: calc(var(--tab-bar-height) + var(--safe-bottom));
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  padding: calc(var(--safe-top) + 12px) 16px 12px;
  border-bottom: 1px solid var(--border);
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
}

.page-header-title {
  font-size: var(--font-md);
  font-weight: 600;
  text-align: center;
  flex: 1;
}

.page-header-back,
.page-header-action {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.page-header-back svg,
.page-header-action svg {
  width: 22px;
  height: 22px;
}

.header-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  cursor: pointer;
}

.header-back svg {
  width: 22px;
  height: 22px;
}

.header-title {
  flex: 1;
  font-size: var(--font-md);
  font-weight: 600;
  text-align: center;
}

.page-content {
  padding: 12px 16px;
}

.page-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.safe-top { padding-top: var(--safe-top); }
.safe-bottom { padding-bottom: var(--safe-bottom); }

.page-enter {
  animation: slideInRight 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.page-leave {
  animation: slideOutLeft 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.page-back-enter {
  animation: slideInLeft 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.page-back-leave {
  animation: slideOutRight 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0.8; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutLeft {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-30%); opacity: 0.6; }
}

@keyframes slideInLeft {
  from { transform: translateX(-30%); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0.8; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slideDown {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes popIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  height: calc(var(--tab-bar-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  z-index: 999;
  transition: transform var(--transition-normal);
}

.tab-bar.hidden {
  transform: translateX(-50%) translateY(100%);
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: var(--tab-bar-height);
  padding: 4px 0;
  flex: 1;
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
  position: relative;
}

.tab-item.active {
  color: var(--primary);
}

.tab-icon {
  width: 28px;
  height: 28px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-icon svg {
  width: 24px;
  height: 24px;
}

.tab-label {
  font-size: var(--font-xs);
  margin-top: 2px;
  font-weight: 500;
}

.badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--danger);
  color: var(--text-white);
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  border-radius: 8px;
  border: 2px solid #fff;
}

.card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card + .card {
  margin-top: 12px;
}

.card-body {
  padding: 16px;
}

.card-header {
  padding: 16px 16px 0;
  font-size: var(--font-md);
  font-weight: 600;
}

.card-footer {
  padding: 0 16px 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-round);
  font-size: var(--font-base);
  font-weight: 500;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary-gradient);
  color: var(--text-white);
  box-shadow: 0 4px 16px rgba(255, 136, 49, 0.3);
}

.btn-primary:active {
  opacity: 0.9;
}

.btn-danger {
  background: var(--danger-gradient);
  color: var(--text-white);
  box-shadow: 0 4px 16px rgba(240, 48, 54, 0.3);
}

.btn-outline {
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-ghost {
  color: var(--primary);
  background: transparent;
}

.btn-sm {
  height: 32px;
  padding: 0 16px;
  font-size: var(--font-sm);
  border-radius: var(--radius-round);
}

.btn-lg {
  height: 50px;
  padding: 0 32px;
  font-size: var(--font-md);
  border-radius: var(--radius-round);
}

.btn-round {
  border-radius: var(--radius-round);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.price {
  color: var(--text-price);
  font-weight: 600;
}

.price-symbol {
  font-size: 0.75em;
  margin-right: 1px;
}

.price .original {
  color: var(--text-tertiary);
  font-weight: 400;
  text-decoration: line-through;
  margin-left: 4px;
  font-size: 0.85em;
}

.search-bar {
  display: flex;
  align-items: center;
  height: 36px;
  background: var(--bg-gray-2);
  border-radius: var(--radius-round);
  padding: 0 12px;
  gap: 8px;
}

.search-bar svg {
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  height: 100%;
  font-size: var(--font-base);
  background: transparent;
}

.search-bar input::placeholder {
  color: var(--text-disabled);
}

.form-group {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.form-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  min-height: 48px;
}

.form-item + .form-item {
  border-top: 1px solid var(--border-light);
}

.form-label {
  width: 80px;
  flex-shrink: 0;
  font-size: var(--font-base);
  color: var(--text-primary);
}

.form-input {
  flex: 1;
  font-size: var(--font-base);
  text-align: right;
}

.form-input::placeholder {
  color: var(--text-disabled);
}

.form-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px 16px;
  font-size: var(--font-base);
  line-height: 1.5;
  resize: none;
}

.form-select {
  flex: 1;
  font-size: var(--font-base);
  text-align: right;
  color: var(--text-primary);
  background: transparent;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal {
  width: 280px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: scaleIn 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.modal-header {
  padding: 24px 24px 8px;
  text-align: center;
  font-size: var(--font-md);
  font-weight: 600;
}

.modal-body {
  padding: 8px 24px 24px;
  text-align: center;
  font-size: var(--font-base);
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  border-top: 1px solid var(--border);
}

.modal-btn {
  flex: 1;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-md);
  transition: background var(--transition-fast);
}

.modal-btn:active {
  background: var(--bg-gray);
}

.modal-btn + .modal-btn {
  border-left: 1px solid var(--border);
}

.modal-btn.confirm {
  color: var(--primary);
  font-weight: 600;
}

.modal-btn.cancel {
  color: var(--text-secondary);
}

.popup {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  background: var(--bg-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 1001;
  animation: slideUp 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  padding-bottom: var(--safe-bottom);
}

.popup.hidden {
  animation: slideDown 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  position: relative;
}

.popup-title {
  font-size: var(--font-md);
  font-weight: 600;
  flex: 1;
  text-align: center;
}

.popup-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-gray);
}

.popup-body {
  padding: 0 16px 16px;
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--text-white);
  font-size: var(--font-base);
  border-radius: var(--radius-md);
  z-index: var(--z-toast);
  animation: fadeIn 0.2s ease;
  max-width: 80%;
  text-align: center;
}

.loading-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-loading);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.empty-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
  color: var(--text-disabled);
}

.empty-text {
  font-size: var(--font-base);
  color: var(--text-tertiary);
  margin-bottom: 20px;
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-gray) 25%, #eee 50%, var(--bg-gray) 75%);
  background-size: 200% 100%;
  animation: pulse 1.5s ease infinite;
  border-radius: var(--radius-sm);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: var(--font-xs);
  border-radius: var(--radius-round);
  font-weight: 500;
}

.tag-primary {
  background: var(--primary-bg);
  color: var(--primary);
}

.tag-danger {
  background: rgba(240, 48, 54, 0.08);
  color: var(--danger);
}

.tag-success {
  background: var(--success-bg);
  color: var(--success);
}

.divider {
  height: 1px;
  background: var(--divider);
  margin: 12px 0;
}

.section-title {
  font-size: var(--font-lg);
  font-weight: 600;
  margin-bottom: 12px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-column { flex-direction: column; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-wrap { flex-wrap: wrap; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.p-12 { padding: 12px; }
.p-16 { padding: 16px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: var(--font-sm); }
.text-xs { font-size: var(--font-xs); }
.text-secondary { color: var(--text-secondary); }
.text-primary-color { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-bold { font-weight: 600; }
.text-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-line-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.text-line-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }

.product-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.product-card:active {
  opacity: 0.9;
}

.product-card .product-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--bg-gray);
}

.product-card .product-info {
  padding: 10px 12px 12px;
}

.product-card .product-name {
  font-size: var(--font-sm);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.product-card .product-price {
  margin-top: 8px;
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--text-price);
}

.product-card .product-price .symbol {
  font-size: 0.7em;
}

.swiper {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.swiper-track {
  display: flex;
  transition: transform var(--transition-normal);
}

.swiper-slide {
  flex-shrink: 0;
  width: 100%;
}

.swiper-indicators {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.swiper-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: all var(--transition-fast);
}

.swiper-dot.active {
  width: 18px;
  border-radius: 3px;
  background: #fff;
}

.action-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1001;
  visibility: hidden;
}

.action-sheet.visible {
  visibility: visible;
}

.action-sheet-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.action-sheet-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg-gray);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  transform: translateY(100%);
  transition: transform var(--transition-normal);
  padding-bottom: var(--safe-bottom);
}

.action-sheet.visible .action-sheet-content {
  transform: translateY(0);
}

.action-sheet-item {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-md);
  background: var(--bg-white);
}

.action-sheet-item:active {
  background: var(--bg-gray);
}

.action-sheet-item + .action-sheet-item {
  border-top: 1px solid var(--border-light);
}

.action-sheet-cancel {
  margin-top: 8px;
}

.step-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 20px 40px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0;
}

.step-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-xs);
  font-weight: 600;
  background: var(--bg-gray-2);
  color: var(--text-disabled);
  border: 2px solid var(--text-disabled);
  flex-shrink: 0;
}

.step-item.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.step-item.done .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.step-text {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-left: 6px;
  white-space: nowrap;
}

.step-item.active .step-text {
  color: var(--primary);
  font-weight: 600;
}

.step-line {
  width: 40px;
  height: 2px;
  background: var(--text-disabled);
  margin: 0 4px;
}

.step-item.done + .step-item .step-line,
.step-item.done .step-line {
  background: var(--success);
}

.count-down {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--font-sm);
  color: var(--danger);
}

.count-down-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  background: var(--danger);
  color: #fff;
  border-radius: 4px;
  font-size: var(--font-xs);
  font-weight: 600;
  padding: 0 4px;
}

.count-down-sep {
  font-weight: 600;
}

.price-range {
  color: var(--text-price);
  font-weight: 700;
  font-size: var(--font-xl);
}

.price-range .symbol {
  font-size: 0.6em;
}

.nav-bar {
  display: flex;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}

.nav-item {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-base);
  color: var(--text-tertiary);
  position: relative;
}

.nav-item.active {
  color: var(--text-primary);
  font-weight: 600;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.pull-refresh-tip {
  text-align: center;
  padding: 12px;
  font-size: var(--font-sm);
  color: var(--text-tertiary);
}

.price-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
  padding: 8px 16px;
  padding-bottom: calc(8px + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 100;
}

.price-bar-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 8px;
}

.price-bar-center {
  flex: 1;
}

.price-bar-right {
  display: flex;
  gap: 8px;
}

.nav-back-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-back-btn svg {
  width: 18px;
  height: 18px;
}

.product-img-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-gray);
}

.checkout-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
}

.checkout-item + .checkout-item {
  margin-top: 8px;
}

.checkout-item-img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-gray);
  flex-shrink: 0;
}

.checkout-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.checkout-item-name {
  font-size: var(--font-base);
  font-weight: 500;
}

.checkout-item-spec {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  margin-top: 4px;
}

.checkout-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkout-item-price {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text-price);
}

.checkout-item-qty {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--bg-white);
}

.cart-item + .cart-item {
  border-top: 1px solid var(--border-light);
}

.cart-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--text-disabled);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 16px;
  transition: all var(--transition-fast);
}

.cart-checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
}

.cart-checkbox.checked::after {
  content: '';
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
  margin-top: -2px;
}

.cart-img {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-gray);
  flex-shrink: 0;
}

.cart-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-name {
  font-size: var(--font-base);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-spec {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  background: var(--bg-gray);
  padding: 2px 8px;
  border-radius: var(--radius-round);
  display: inline-block;
  margin-top: 6px;
}

.cart-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-round);
  overflow: hidden;
}

.stepper-btn {
  width: 30px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-md);
  color: var(--text-secondary);
  background: var(--bg-gray);
  transition: all var(--transition-fast);
}

.stepper-btn:active {
  background: var(--bg-gray-2);
}

.stepper-btn.disabled {
  color: var(--text-disabled);
  pointer-events: none;
}

.stepper-num {
  width: 40px;
  text-align: center;
  font-size: var(--font-base);
  font-weight: 500;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.coupon-card {
  display: flex;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.coupon-card + .coupon-card {
  margin-top: 12px;
}

.coupon-left {
  width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
}

.coupon-left::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    var(--border) 0,
    var(--border) 4px,
    transparent 4px,
    transparent 8px
  );
}

.coupon-value {
  font-size: var(--font-xxl);
  font-weight: 700;
  line-height: 1;
}

.coupon-value .symbol {
  font-size: 0.5em;
}

.coupon-condition {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-top: 4px;
}

.coupon-right {
  flex: 1;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.coupon-name {
  font-size: var(--font-base);
  font-weight: 500;
}

.coupon-date {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
}

.coupon-get-btn {
  align-self: flex-end;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-white);
  transition: background var(--transition-fast);
}

.list-item:active {
  background: var(--bg-gray);
}

.list-item + .list-item {
  border-top: 1px solid var(--border-light);
}

.list-item-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.list-item-icon svg {
  width: 22px;
  height: 22px;
}

.list-item-content {
  flex: 1;
  font-size: var(--font-base);
}

.list-item-arrow {
  color: var(--text-disabled);
}

.list-item-arrow svg {
  width: 16px;
  height: 16px;
}

.profile-header {
  background: var(--primary-gradient);
  padding: calc(var(--safe-top) + 30px) 20px 30px;
  color: #fff;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.2);
}

.profile-name {
  font-size: var(--font-lg);
  font-weight: 600;
  margin-top: 12px;
}

.profile-id {
  font-size: var(--font-sm);
  opacity: 0.8;
  margin-top: 4px;
}

.profile-stats {
  display: flex;
  margin-top: 20px;
  gap: 0;
}

.profile-stat {
  flex: 1;
  text-align: center;
}

.profile-stat-value {
  font-size: var(--font-xl);
  font-weight: 700;
}

.profile-stat-label {
  font-size: var(--font-xs);
  opacity: 0.8;
  margin-top: 2px;
}

.profile-orders {
  margin: -16px 16px 0;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.profile-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.profile-order-title {
  font-size: var(--font-base);
  font-weight: 600;
}

.profile-order-more {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.profile-order-icons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.profile-order-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.profile-order-icon svg {
  width: 24px;
  height: 24px;
  color: var(--text-primary);
}

.profile-order-icon span {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
}

.profile-menu {
  margin: 12px 16px;
}

.profile-menu-group {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.profile-menu-group + .profile-menu-group {
  margin-top: 12px;
}

.category-layout {
  display: flex;
  height: calc(100vh - var(--tab-bar-height));
  height: calc(100vh - var(--tab-bar-height) - var(--safe-bottom));
}

.category-sidebar {
  width: 88px;
  background: var(--bg-gray);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}

.category-sidebar-item {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  padding: 0 8px;
  text-align: center;
  position: relative;
  transition: all var(--transition-fast);
}

.category-sidebar-item.active {
  background: var(--bg-white);
  color: var(--primary);
  font-weight: 600;
}

.category-sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.category-main {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
}

.category-group-title {
  font-size: var(--font-sm);
  font-weight: 600;
  margin-bottom: 12px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.category-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.category-grid-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-gray);
  object-fit: cover;
}

.category-grid-text {
  font-size: var(--font-xs);
  color: var(--text-primary);
  text-align: center;
}

.filter-bar {
  display: flex;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.filter-item {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  gap: 4px;
}

.filter-item.active {
  color: var(--primary);
  font-weight: 600;
}

.filter-item svg {
  width: 14px;
  height: 14px;
}

.pull-refresh {
  overflow: hidden;
  position: relative;
}

.pull-refresh-track {
  position: relative;
}

.pull-refresh-loading {
  position: absolute;
  top: -40px;
  left: 0;
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pull-refresh-loading svg {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  color: var(--text-tertiary);
}

/* ===== HOME PAGE ===== */
.page-home {
  padding-bottom: 0;
}
.home-header {
  background: var(--primary-gradient);
  padding: calc(var(--safe-top) + 12px) 16px 16px;
}
.greeting {
  font-size: var(--font-lg);
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}
.home-header .search-bar {
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-round);
  height: 40px;
  padding: 0 14px;
  gap: 8px;
}
.home-header .search-bar .search-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.home-header .search-bar .search-placeholder {
  font-size: var(--font-base);
  color: rgba(255, 255, 255, 0.7);
}
.home-header .search-bar svg {
  color: rgba(255, 255, 255, 0.7);
}
.banner-swiper {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: var(--bg-gray);
}
.swiper-wrapper {
  position: relative;
  width: 100%;
}
.banner-swiper .swiper-slide {
  width: 100%;
  display: none;
}
.banner-swiper .swiper-slide:first-child {
  display: block;
}
.banner-swiper .swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
}
.swiper-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: all var(--transition-fast);
}
.dot.active {
  width: 18px;
  border-radius: 3px;
  background: #fff;
}
.nav-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  padding: 16px 8px;
  background: var(--bg-white);
}
.nav-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  cursor: pointer;
}
.nav-grid-item:active {
  opacity: 0.7;
}
.nav-icon {
  font-size: 28px;
  margin-bottom: 6px;
  line-height: 1;
}
.nav-text {
  font-size: var(--font-xs);
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
}
.banner-vip,
.banner-distribution {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 16px 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.banner-vip:active,
.banner-distribution:active {
  opacity: 0.85;
}
.banner-vip {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #5D3A00;
}
.banner-distribution {
  background: var(--primary-gradient);
  color: #fff;
}
.vip-content,
.dist-content {
  font-size: var(--font-base);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.vip-icon,
.dist-icon {
  font-size: 20px;
}
.vip-btn,
.dist-btn {
  font-size: var(--font-sm);
  font-weight: 600;
  padding: 4px 14px;
  border-radius: var(--radius-round);
  background: rgba(255, 255, 255, 0.3);
  color: inherit;
}
.flash-sale {
  padding: 16px;
  margin-top: 12px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-header .section-title {
  font-size: var(--font-lg);
  font-weight: 600;
  margin-bottom: 0;
}
.section-header .section-more {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  cursor: pointer;
}
.section-header .section-action {
  font-size: 18px;
  cursor: pointer;
}
.countdown {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--font-sm);
  color: var(--danger);
  font-weight: 600;
}
.cd-h,
.cd-m,
.cd-s {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  background: var(--danger);
  color: #fff;
  border-radius: 4px;
  font-size: var(--font-xs);
  font-weight: 700;
  padding: 0 4px;
}
.flash-sale-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}
.flash-sale-list::-webkit-scrollbar {
  display: none;
}
.flash-item {
  flex-shrink: 0;
  width: 110px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  scroll-snap-align: start;
  cursor: pointer;
}
.flash-item:active {
  transform: scale(0.97);
}
.flash-img {
  width: 110px;
  height: 110px;
  overflow: hidden;
  background: var(--bg-gray);
}
.flash-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.flash-name {
  font-size: var(--font-xs);
  padding: 6px 8px 2px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flash-price {
  padding: 2px 8px 6px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.price-now {
  font-size: var(--font-base);
  font-weight: 700;
  color: var(--text-price);
}
.price-old {
  font-size: var(--font-xs);
  color: var(--text-disabled);
  text-decoration: line-through;
}
.flash-progress {
  padding: 0 8px 8px;
  font-size: 10px;
  color: var(--text-tertiary);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.flash-progress-bar {
  height: 8px;
  background: var(--danger-gradient);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.flash-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.live-preview {
  padding: 16px;
}
.live-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.live-scroll::-webkit-scrollbar {
  display: none;
}
.live-card {
  flex-shrink: 0;
  width: 140px;
  cursor: pointer;
}
.live-card:active {
  opacity: 0.85;
}
.live-cover {
  width: 140px;
  height: 190px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: var(--bg-gray);
}
.live-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.live-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-round);
  letter-spacing: 0.5px;
}
.live-anchor {
  font-size: var(--font-sm);
  font-weight: 500;
  margin-top: 8px;
  padding: 0 2px;
}
.live-title {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
  padding: 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recommend {
  padding: 16px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.product-card:active {
  opacity: 0.9;
}
.product-card .product-img {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-gray);
}
.product-card .product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card .product-name {
  font-size: var(--font-sm);
  line-height: 1.4;
  padding: 8px 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}
.product-card .product-price {
  padding: 6px 10px 10px;
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--text-price);
}
.product-card .product-sales {
  padding: 0 10px 10px;
  font-size: var(--font-xs);
  color: var(--text-tertiary);
}
.load-more-tip {
  text-align: center;
  padding: 16px;
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  display: none;
}

/* ===== CATEGORY PAGE ===== */
.page-category {
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.category-header {
  padding: calc(var(--safe-top) + 12px) 12px 12px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.category-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}
.category-sidebar {
  width: 88px;
  background: var(--bg-gray);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}
.sidebar-item {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  padding: 0 8px;
  text-align: center;
  position: relative;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.sidebar-item:active {
  background: rgba(0, 0, 0, 0.02);
}
.sidebar-item.active {
  background: var(--bg-white);
  color: var(--primary);
  font-weight: 600;
}
.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.category-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
}
.subcategory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.subcat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.subcat-item:active {
  opacity: 0.7;
}
.subcat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.subcat-text {
  font-size: var(--font-xs);
  color: var(--text-primary);
  text-align: center;
}
.category-products .section-title {
  font-size: var(--font-base);
  font-weight: 600;
  margin-bottom: 12px;
}

/* ===== CART PAGE ===== */
.page-cart {
  padding-bottom: calc(56px + var(--safe-bottom));
}
.cart-list {
  padding-bottom: 8px;
}
.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-white);
  position: relative;
  overflow: hidden;
}
.cart-item + .cart-item {
  border-top: 1px solid var(--border-light);
}
.cart-item-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--text-disabled);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 20px;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.cart-item-check.checked {
  background: var(--primary);
  border-color: var(--primary);
}
.cart-item-check.checked::after {
  content: '';
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
  margin-top: -2px;
}
.cart-checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
}
.cart-checkbox.checked::after {
  content: '';
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
  margin-top: -2px;
}
.cart-item-img {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-gray);
}
.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 90px;
}
.cart-item-name {
  font-size: var(--font-base);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item-spec {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  background: var(--bg-gray);
  padding: 2px 8px;
  border-radius: var(--radius-round);
  display: inline-block;
  margin-top: 6px;
}
.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.cart-item-price {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text-price);
}
.cart-item-qty,
.cart-qty-control {
  display: inline-flex;
  align-items: center;
}
.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-round);
  font-size: var(--font-md);
  color: var(--text-secondary);
  background: var(--bg-gray);
  cursor: pointer;
}
.qty-btn:active {
  background: var(--bg-gray-2);
}
.qty-num {
  width: 40px;
  text-align: center;
  font-size: var(--font-base);
  font-weight: 500;
}
.cart-item-delete {
  position: absolute;
  right: -60px;
  top: 0;
  width: 60px;
  height: 100%;
  background: var(--danger);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-sm);
  transition: right var(--transition-fast);
  cursor: pointer;
}
.cart-item-delete.show {
  right: 0;
}
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}
.cart-empty .empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  width: auto;
  height: auto;
}
.cart-empty .empty-text {
  font-size: var(--font-base);
  color: var(--text-tertiary);
  margin-bottom: 20px;
}
.empty-btn {
  padding: 10px 32px;
  background: var(--primary-gradient);
  color: #fff;
  border-radius: var(--radius-round);
  font-size: var(--font-base);
  cursor: pointer;
}
.empty-btn:active {
  opacity: 0.85;
}
.cart-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  height: calc(56px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding-left: 16px;
  z-index: 100;
}
.cart-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-base);
  cursor: pointer;
}
.cart-total {
  flex: 1;
  text-align: right;
  padding-right: 12px;
  font-size: var(--font-base);
}
.total-price {
  color: var(--text-price);
  font-weight: 700;
  font-size: var(--font-md);
}
.cart-checkout-btn {
  height: 44px;
  padding: 0 24px;
  background: var(--primary-gradient);
  color: #fff;
  border-radius: var(--radius-round);
  font-size: var(--font-base);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 16px;
}
.cart-checkout-btn:active {
  opacity: 0.85;
}
.cart-list,
#cart-list {
  padding-bottom: 8px;
}

/* ===== PROFILE PAGE ===== */
.page-profile {
  padding-bottom: 0;
}
.profile-page {
  padding-bottom: 0;
}
.page-profile .profile-header {
  background: var(--primary-gradient);
  padding: calc(var(--safe-top) + 20px) 20px 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-profile .profile-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.profile-bg {
  position: absolute;
  top: -40%;
  right: -20%;
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}
.profile-info {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.profile-info .profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
  flex-shrink: 0;
}
.profile-info .profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-detail {
  flex: 1;
}
.profile-info .profile-name {
  font-size: var(--font-lg);
  font-weight: 600;
  margin-top: 0;
}
.profile-level {
  margin-top: 4px;
}
.vip-badge {
  display: inline-block;
  padding: 2px 10px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #5D3A00;
  font-size: var(--font-xs);
  font-weight: 600;
  border-radius: var(--radius-round);
}
.profile-settings {
  font-size: 22px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-page .profile-stats {
  display: flex;
  background: var(--bg-white);
  margin: -1px 16px 0;
  border-radius: var(--radius-md);
  padding: 16px 0;
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 2;
}
.stat-item {
  flex: 1;
  text-align: center;
  cursor: pointer;
}
.stat-num {
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--text-primary);
}
.stat-label {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}
.profile-section {
  margin: 12px 16px;
}
.profile-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.profile-section .section-title {
  font-size: var(--font-base);
  font-weight: 600;
  margin-bottom: 0;
}
.profile-section .section-more {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  cursor: pointer;
}
.order-quick {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 16px 0;
}
.order-quick-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.order-quick {
  display: flex;
  justify-content: space-around;
}
.order-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.order-quick-item:active {
  opacity: 0.7;
}
.order-icon {
  font-size: 24px;
}
.order-label {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
}
.menu-list {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.menu-item:active {
  background: var(--bg-gray);
}
.menu-item + .menu-item {
  border-top: 1px solid var(--border-light);
}
.menu-icon {
  font-size: 20px;
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-text {
  flex: 1;
  font-size: var(--font-base);
  margin-left: 10px;
}
.menu-arrow {
  color: var(--text-disabled);
  font-size: var(--font-sm);
}

/* ===== PRODUCT PAGE ===== */
.page-product {
  padding-bottom: calc(56px + var(--safe-bottom));
}
.product-back-btn {
  position: fixed;
  top: calc(var(--safe-top) + 12px);
  left: 12px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}
.product-back-btn:active {
  opacity: 0.6;
}
.product-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--bg-gray);
}
.carousel-wrapper {
  position: relative;
  width: 100%;
}
.carousel-slide {
  display: none;
  width: 100%;
}
.carousel-slide.active {
  display: block;
}
.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}
.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.carousel-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: all var(--transition-fast);
}
.carousel-dots .dot.active {
  width: 18px;
  border-radius: 3px;
  background: #fff;
}
.carousel-back {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  left: 12px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  z-index: 3;
  cursor: pointer;
}
.carousel-back:active {
  opacity: 0.7;
}
.product-price-section {
  background: var(--bg-white);
  padding: 14px 16px;
}
.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.product-price-row .product-price {
  font-size: var(--font-xxl);
  font-weight: 700;
  color: var(--text-price);
}
.product-original-price {
  font-size: var(--font-sm);
  color: var(--text-disabled);
  text-decoration: line-through;
}
.product-discount {
  font-size: var(--font-xs);
  color: var(--text-white);
  background: var(--danger);
  padding: 2px 6px;
  border-radius: var(--radius-round);
  font-weight: 600;
}
.product-price-section .product-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 10px;
  color: #333;
}
.product-desc {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  line-height: 1.5;
  margin-top: 6px;
}
.product-sales-info {
  font-size: var(--font-xs);
  color: var(--text-disabled);
  margin-top: 8px;
}
.product-section {
  background: var(--bg-white);
  margin-top: 10px;
  padding: 14px 16px;
}
.product-section .section-row {
  display: flex;
  align-items: center;
  font-size: var(--font-base);
  cursor: pointer;
}
.product-section .section-row:active {
  opacity: 0.7;
}
.product-section .section-label {
  width: 50px;
  flex-shrink: 0;
  color: var(--text-tertiary);
}
.product-section .section-title {
  font-size: var(--font-base);
  font-weight: 600;
  margin-bottom: 12px;
}
.coupon-tag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(240, 48, 54, 0.08);
  color: var(--danger);
  font-size: var(--font-xs);
  border-radius: var(--radius-round);
  margin-right: 6px;
}
.address-text {
  flex: 1;
  font-size: var(--font-base);
}
.address-arrow {
  color: var(--text-disabled);
  font-size: var(--font-sm);
}
.detail-img {
  margin-top: 8px;
}
.detail-img img {
  width: 100%;
  display: block;
}
.reviews-section {
  margin-top: 10px;
}
.review-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.review-item:last-child {
  border-bottom: none;
}
.review-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.review-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}
.review-user {
  font-size: var(--font-sm);
  font-weight: 500;
}
.review-rating {
  font-size: var(--font-xs);
}
.review-content {
  font-size: var(--font-base);
  line-height: 1.5;
  margin-top: 8px;
}
.review-time {
  font-size: var(--font-xs);
  color: var(--text-disabled);
  margin-top: 6px;
}
.product-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  height: calc(56px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 100;
}
.bar-icons {
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 0;
}
.bar-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  cursor: pointer;
  font-size: var(--font-xs);
  color: var(--text-tertiary);
}
.bar-icon-item:active {
  opacity: 0.7;
}
.bar-icon {
  font-size: 20px;
  margin-bottom: 2px;
}
.bar-buttons {
  flex: 1;
  display: flex;
  gap: 0;
  height: 44px;
}
.bar-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-base);
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}
.bar-btn:active {
  opacity: 0.85;
}
.bar-btn-cart {
  background: var(--primary);
  border-radius: 0 var(--radius-round) 0 0;
}
.bar-btn-buy {
  background: var(--danger);
  border-radius: var(--radius-round) 0 0 var(--radius-round);
}
.spec-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-popup);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.spec-popup-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}
.spec-popup-content {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: var(--bg-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
  animation: slideUp 0.3s ease;
  z-index: 1;
  max-height: 70vh;
  overflow-y: auto;
}
.spec-popup-header {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.spec-popup-img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.spec-popup-info {
  flex: 1;
}
.spec-popup-price {
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--text-price);
}
.spec-popup-stock {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  margin-top: 6px;
}
.spec-popup-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: 50%;
  background: var(--bg-gray);
}
.spec-popup-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
}
.spec-tag {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-round);
  font-size: var(--font-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.spec-tag:active {
  opacity: 0.8;
}
.spec-tag.selected {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}
.spec-popup-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--border-light);
}
.qty-control {
  display: inline-flex;
  align-items: center;
}
.spec-popup-actions {
  display: flex;
  gap: 10px;
  padding-top: 16px;
}
.spec-action-btn {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-round);
  font-size: var(--font-base);
  font-weight: 600;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
}
.spec-action-btn:active {
  opacity: 0.85;
}
.spec-action-btn.primary {
  background: var(--danger);
}

/* ===== SEARCH PAGE ===== */
.page-search {
  background: var(--bg-white);
}
.search-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--safe-top) + 10px) 12px 10px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}
.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  height: 36px;
  background: var(--bg-gray);
  border-radius: var(--radius-round);
  padding: 0 12px;
  gap: 8px;
}
.search-input-wrap .search-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.search-input {
  flex: 1;
  height: 100%;
  font-size: var(--font-base);
  background: transparent;
}
.search-input::placeholder {
  color: var(--text-disabled);
}
.search-cancel {
  font-size: var(--font-base);
  color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
.search-body {
  padding: 16px;
}
.search-history,
.hot-search {
  margin-bottom: 24px;
}
.search-history .section-header,
.hot-search .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.search-history .section-title,
.hot-search .section-title {
  font-size: var(--font-base);
  font-weight: 600;
  margin-bottom: 0;
}
.section-action {
  font-size: 16px;
  cursor: pointer;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.search-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--bg-gray);
  border-radius: var(--radius-round);
  font-size: var(--font-sm);
  color: var(--text-primary);
  cursor: pointer;
}
.search-tag:active {
  background: var(--bg-gray-2);
}
.search-tag.hot {
  color: var(--danger);
}
.search-tag.hot.red {
  color: var(--danger);
  font-weight: 600;
}
.search-tag.hot.orange {
  color: var(--orange);
}
.search-results {
  background: var(--bg-white);
}

/* ===== LIVE PAGE ===== */
.live-page {
  padding-bottom: 0;
}
.anchor-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 16px;
  padding: 14px 16px;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  color: #fff;
  cursor: pointer;
}
.anchor-entry:active {
  opacity: 0.85;
}
.anchor-entry-content {
  display: flex;
  align-items: center;
  gap: 8px;
}
.anchor-icon {
  font-size: 24px;
}
.anchor-text {
  font-size: var(--font-base);
  font-weight: 600;
}
.anchor-desc {
  font-size: var(--font-xs);
  opacity: 0.8;
  margin-left: 4px;
}
.anchor-arrow {
  font-size: var(--font-lg);
  opacity: 0.7;
}
.live-section {
  padding: 16px;
}
.live-scroll-h {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.live-scroll-h::-webkit-scrollbar {
  display: none;
}
.live-upcoming-card {
  flex-shrink: 0;
  width: 160px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.upcoming-cover {
  width: 160px;
  height: 100px;
  overflow: hidden;
}
.upcoming-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upcoming-info {
  padding: 8px 10px 10px;
}
.upcoming-title {
  font-size: var(--font-sm);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upcoming-anchor {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}
.upcoming-time {
  font-size: var(--font-xs);
  color: var(--primary);
  margin-top: 4px;
  font-weight: 500;
}
.live-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.live-now-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.live-now-card:active {
  opacity: 0.9;
}
.live-now-card .live-cover {
  width: 100%;
  height: 160px;
}
.live-now-card .live-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.live-viewers {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 6px;
  border-radius: var(--radius-round);
}
.live-info {
  padding: 8px 10px 10px;
}
.live-now-card .live-title {
  font-size: var(--font-sm);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-now-card .live-anchor {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-top: 4px;
}
.live-replays {
  padding: 16px;
}
.replay-card {
  display: flex;
  gap: 12px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 10px;
}
.replay-card:last-child {
  margin-bottom: 0;
}
.replay-cover {
  width: 140px;
  height: 80px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.replay-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.replay-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  padding: 1px 6px;
  border-radius: 4px;
}
.replay-info {
  flex: 1;
  padding: 10px 12px 10px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.replay-title {
  font-size: var(--font-base);
  font-weight: 500;
  line-height: 1.3;
}
.replay-meta {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-top: 6px;
}

/* ===== LIVE ROOM PAGE ===== */
.page-live-room {
  background: #000;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}
.live-video-area {
  width: 100%;
  height: 100%;
  position: relative;
  background: #000;
}
.live-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.live-anchor-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: calc(var(--safe-top) + 12px) 16px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent);
  z-index: 12;
}
.anchor-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}
.anchor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.anchor-info {
  flex: 1;
}
.anchor-name {
  font-size: var(--font-base);
  font-weight: 600;
  color: #fff;
}
.anchor-fans {
  font-size: var(--font-xs);
  color: rgba(255, 255, 255, 0.7);
}
.live-viewers-count {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-sm);
  color: rgba(255, 255, 255, 0.8);
}
.viewer-icon {
  font-size: 14px;
}
.live-follow-btn {
  padding: 6px 16px;
  background: var(--danger);
  color: #fff;
  border-radius: var(--radius-round);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.live-follow-btn:active {
  opacity: 0.85;
}
.live-back {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  left: 12px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  z-index: 15;
  cursor: pointer;
}
.danmaku-area {
  position: absolute;
  bottom: 110px;
  left: 0;
  right: 0;
  height: 30%;
  pointer-events: none;
  z-index: 10;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 12px;
  scrollbar-width: none;
}
.danmaku-area::-webkit-scrollbar { display: none; }
.danmaku-item {
  padding: 6px 14px;
  background: transparent;
  color: #fff;
  border-radius: 16px;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: auto;
  margin-bottom: 6px;
  animation: danmakuFadeIn 0.3s ease-out;
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.danmaku-item.self {
  background: rgba(255, 215, 0, 0.8);
  color: #333;
  margin-left: auto;
}
@keyframes danmakuFadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.live-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  padding-bottom: calc(10px + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  z-index: 15;
}
.live-input-wrap {
  flex: 1;
}
.live-input {
  width: 100%;
  height: 36px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-round);
  color: #fff;
  font-size: var(--font-sm);
}
.live-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.live-action-icons {
  display: flex;
  gap: 12px;
}
.live-action-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.live-action-item:active {
  opacity: 0.7;
}
.live-action-icon {
  font-size: 24px;
}
.floating-heart {
  position: absolute;
  bottom: 80px;
  font-size: 28px;
  animation: floatUp 1.5s ease-out forwards;
  z-index: 10;
  pointer-events: none;
}
@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-200px) scale(1.5); }
}
.gift-panel,
.goods-panel,
.coupon-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.gift-panel-mask,
.goods-panel-mask,
.coupon-panel-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}
.gift-panel-content,
.goods-panel-content,
.coupon-panel-content {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: var(--bg-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding-bottom: var(--safe-bottom);
  animation: slideUp 0.3s ease;
  z-index: 1;
  max-height: 50vh;
}
.gift-panel-header,
.goods-panel-header,
.coupon-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  font-size: var(--font-md);
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
}
.gift-panel-close,
.goods-panel-close,
.coupon-panel-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-gray);
  font-size: 14px;
  cursor: pointer;
}
.gift-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
}
.gift-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.gift-item:active {
  background: var(--bg-gray);
}
.gift-icon {
  font-size: 32px;
}
.gift-name {
  font-size: var(--font-xs);
  color: var(--text-primary);
}
.gift-price {
  font-size: 10px;
  color: var(--text-tertiary);
}
.goods-list {
  padding: 12px 16px;
}
.goods-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.goods-item:last-child {
  border-bottom: none;
}
.goods-img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.goods-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.goods-info {
  flex: 1;
}
.goods-name {
  font-size: var(--font-base);
  font-weight: 500;
}
.goods-price {
  font-size: var(--font-base);
  color: var(--text-price);
  font-weight: 600;
  margin-top: 4px;
}
.goods-buy-btn {
  padding: 6px 16px;
  background: var(--danger);
  color: #fff;
  border-radius: var(--radius-round);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.goods-buy-btn:active {
  opacity: 0.85;
}
.coupon-list {
  padding: 12px 16px;
}
.coupon-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.coupon-item:last-child {
  margin-bottom: 0;
}
.coupon-item .coupon-left {
  width: 80px;
  background: var(--danger);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  position: relative;
}
.coupon-item .coupon-left::after {
  background: repeating-linear-gradient(to bottom, var(--bg-gray) 0, var(--bg-gray) 4px, transparent 4px, transparent 8px);
}
.coupon-amount {
  font-size: var(--font-lg);
  font-weight: 700;
}
.coupon-center {
  flex: 1;
  padding: 10px 12px;
}
.coupon-item .coupon-condition {
  font-size: var(--font-sm);
  color: var(--text-primary);
  font-weight: 500;
}
.coupon-expire {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}
.coupon-right {
  padding: 0 12px;
}
.coupon-claim-btn {
  padding: 6px 14px;
  background: var(--danger);
  color: #fff;
  border-radius: var(--radius-round);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
}
.coupon-claim-btn:active {
  opacity: 0.85;
}

/* ===== ORDER PAGE ===== */
.order-tabs {
  display: flex;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 44px;
  z-index: 10;
}
.order-tabs::-webkit-scrollbar {
  display: none;
}
.order-tab {
  flex-shrink: 0;
  padding: 12px 16px;
  font-size: var(--font-base);
  color: var(--text-tertiary);
  position: relative;
  cursor: pointer;
  white-space: nowrap;
}
.order-tab.active {
  color: var(--text-primary);
  font-weight: 600;
}
.order-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.order-list {
  padding: 12px 16px;
}
.order-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 12px;
}
.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
}
.order-id {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
}
.order-status {
  font-size: var(--font-sm);
  color: var(--danger);
  font-weight: 600;
}
.order-goods {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
}
.order-goods + .order-goods {
  border-top: 1px solid var(--border-light);
}
.order-goods-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-gray);
}
.order-goods-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.order-goods-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.order-goods-name {
  font-size: var(--font-base);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.order-goods-spec {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-top: 4px;
}
.order-goods-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  flex-shrink: 0;
}
.order-goods-price {
  font-size: var(--font-base);
  font-weight: 600;
}
.order-goods-qty {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
}
.order-card-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.order-total {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
}
.order-price {
  color: var(--text-price);
  font-weight: 700;
}
.order-actions {
  display: flex;
  gap: 8px;
}
.order-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-round);
  font-size: var(--font-sm);
  color: var(--text-primary);
  background: var(--bg-white);
  cursor: pointer;
}
.order-btn:active {
  background: var(--bg-gray);
}
.order-btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.order-btn.primary:active {
  opacity: 0.85;
}

/* ===== CHECKOUT PAGE ===== */
.page-checkout {
  padding-bottom: calc(56px + var(--safe-bottom));
}
.checkout-address {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-white);
  margin: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.checkout-address:active {
  opacity: 0.9;
}
.address-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.address-info {
  flex: 1;
}
.address-user {
  font-size: var(--font-base);
  font-weight: 600;
}
.address-detail {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  margin-top: 4px;
  line-height: 1.4;
}
.address-arrow {
  color: var(--text-disabled);
  font-size: var(--font-sm);
}
.checkout-goods {
  margin: 0 16px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.checkout-goods .checkout-item {
  background: transparent;
  border-radius: 0;
}
.checkout-goods .checkout-item + .checkout-item {
  border-top: 1px solid var(--border-light);
}
.checkout-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  flex-shrink: 0;
}
.checkout-section {
  margin: 10px 16px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.checkout-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
}
.row-label {
  width: 70px;
  flex-shrink: 0;
  font-size: var(--font-base);
  color: var(--text-tertiary);
}
.row-value {
  flex: 1;
  font-size: var(--font-base);
  text-align: right;
}
.coupon-selected {
  color: var(--danger);
}
.row-arrow {
  margin-left: 6px;
  color: var(--text-disabled);
  font-size: var(--font-sm);
}
.remark-input {
  flex: 1;
  font-size: var(--font-base);
  text-align: right;
  background: transparent;
}
.remark-input::placeholder {
  color: var(--text-disabled);
}
.checkout-price-breakdown {
  margin: 10px 16px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.price-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-base);
  padding: 4px 0;
}
.price-row .discount {
  color: var(--danger);
}
.price-row.total {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-weight: 600;
}
.price-row.total .total-price {
  color: var(--text-price);
  font-weight: 700;
}
.checkout-bottom {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  height: calc(56px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 16px;
  gap: 12px;
  z-index: 100;
}
.checkout-total {
  font-size: var(--font-base);
}
.checkout-total-price {
  color: var(--text-price);
  font-weight: 700;
  font-size: var(--font-md);
}
.checkout-submit-btn {
  padding: 10px 28px;
  background: var(--danger);
  color: #fff;
  border-radius: var(--radius-round);
  font-size: var(--font-base);
  font-weight: 600;
  cursor: pointer;
}
.checkout-submit-btn:active {
  opacity: 0.85;
}
.address-picker-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-popup);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.picker-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}
.picker-content {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: var(--bg-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding-bottom: var(--safe-bottom);
  animation: slideUp 0.3s ease;
  z-index: 1;
  max-height: 60vh;
}
.picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  font-size: var(--font-md);
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
}
.picker-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-gray);
  font-size: 14px;
  cursor: pointer;
}
.address-list {
  padding: 12px 16px;
  max-height: 40vh;
  overflow-y: auto;
}
.address-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}
.address-item:last-child {
  border-bottom: none;
}
.address-item:active {
  opacity: 0.8;
}
.address-item-info {
  flex: 1;
}
.address-item-user {
  font-size: var(--font-base);
  font-weight: 500;
}
.default-tag {
  display: inline-block;
  padding: 1px 6px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  border-radius: var(--radius-round);
  margin-left: 6px;
}
.address-item-addr {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  margin-top: 4px;
}
.address-item-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--text-disabled);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  color: transparent;
}
.address-item.selected .address-item-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.picker-add-btn {
  padding: 14px;
  text-align: center;
  color: var(--primary);
  font-size: var(--font-base);
  cursor: pointer;
  border-top: 1px solid var(--border-light);
}
.picker-add-btn:active {
  background: var(--bg-gray);
}

/* ===== DISTRIBUTION PAGE ===== */
.page-distribution {
  padding-bottom: 0;
}
.dist-header {
  background: var(--primary-gradient);
  padding: 20px 16px;
  color: #fff;
  position: relative;
}
.dist-earnings {
  text-align: center;
}
.earnings-total {
  margin-bottom: 16px;
}
.earnings-label {
  font-size: var(--font-sm);
  opacity: 0.8;
}
.earnings-amount {
  font-size: var(--font-hero);
  font-weight: 700;
  margin-top: 4px;
}
.earnings-row {
  display: flex;
  gap: 0;
}
.earnings-item {
  flex: 1;
  text-align: center;
}
.earnings-item-label {
  font-size: var(--font-xs);
  opacity: 0.8;
}
.earnings-item-value {
  font-size: var(--font-lg);
  font-weight: 600;
  margin-top: 4px;
}
.dist-withdraw-btn {
  margin-top: 16px;
  padding: 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-round);
  font-size: var(--font-base);
  font-weight: 600;
  cursor: pointer;
}
.dist-withdraw-btn:active {
  opacity: 0.8;
}
.dist-menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-white);
  margin: -1px 16px 0;
  border-radius: var(--radius-md);
  padding: 16px 0;
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 1;
}
.dist-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.dist-menu-item:active {
  opacity: 0.7;
}
.dist-menu-icon {
  font-size: 24px;
}
.dist-menu-text {
  font-size: var(--font-xs);
  color: var(--text-primary);
}
.rank-list {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}
.rank-item + .rank-item {
  border-top: 1px solid var(--border-light);
}
.rank-num {
  width: 24px;
  text-align: center;
  font-size: var(--font-base);
  font-weight: 700;
  color: var(--text-tertiary);
}
.rank-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rank-name {
  flex: 1;
  font-size: var(--font-base);
  font-weight: 500;
}
.rank-right {
  text-align: right;
}
.rank-commission {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--text-price);
  display: block;
}
.rank-team {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
}
.dist-apply-section {
  padding: 24px 16px;
}
.dist-apply-btn {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-gradient);
  color: #fff;
  border-radius: var(--radius-round);
  font-size: var(--font-md);
  font-weight: 600;
  cursor: pointer;
}
.dist-apply-btn:active {
  opacity: 0.85;
}
.commission-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-popup);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.commission-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}
.commission-content {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: var(--bg-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding-bottom: var(--safe-bottom);
  animation: slideUp 0.3s ease;
  z-index: 1;
  max-height: 60vh;
}
.commission-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  font-size: var(--font-md);
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
}
.commission-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-gray);
  font-size: 14px;
  cursor: pointer;
}
.commission-list {
  padding: 12px 16px;
  max-height: 45vh;
  overflow-y: auto;
}
.commission-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.commission-record + .commission-record {
  border-top: 1px solid var(--border-light);
}
.commission-record-type {
  font-size: var(--font-base);
  font-weight: 500;
}
.commission-record-time {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}
.commission-record-amount {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--text-price);
  text-align: right;
}
.commission-record-status {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  text-align: right;
  margin-top: 2px;
}

/* ===== MEMBERSHIP PAGE ===== */
.page-membership {
  padding-bottom: 0;
}
.member-header {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #5D3A00;
}
.member-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}
.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.member-name {
  font-size: var(--font-lg);
  font-weight: 600;
}
.level-badge {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(93, 58, 0, 0.15);
  border-radius: var(--radius-round);
  font-size: var(--font-xs);
  font-weight: 600;
  margin-top: 4px;
}
.points-card {
  margin: 12px 16px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
}
.points-left {
  text-align: center;
  flex-shrink: 0;
}
.points-label {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
}
.points-num {
  font-size: var(--font-xxl);
  font-weight: 700;
  color: var(--text-price);
  margin-top: 4px;
}
.points-right {
  flex: 1;
}
.points-progress {
  margin-top: 8px;
}
.progress-bar {
  height: 8px;
  background: var(--bg-gray);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFD700, #FFA500);
  border-radius: 4px;
  transition: width var(--transition-normal);
}
.progress-text {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-top: 4px;
  display: block;
}
.member-benefits {
  padding: 16px;
}
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 14px 4px;
  box-shadow: var(--shadow-card);
}
.benefit-icon {
  font-size: 28px;
}
.benefit-title {
  font-size: var(--font-sm);
  font-weight: 500;
  text-align: center;
}
.benefit-desc {
  font-size: 10px;
  color: var(--text-tertiary);
  text-align: center;
}
.member-plans {
  padding: 0 16px 16px;
}
.plan-list {
  display: flex;
  gap: 10px;
}
.plan-card {
  flex: 1;
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}
.plan-card:active {
  opacity: 0.9;
}
.plan-card.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
}
.plan-card.hot {
  border-color: var(--danger);
}
.plan-hot-tag {
  position: absolute;
  top: -1px;
  right: -1px;
  padding: 2px 8px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 0 var(--radius-md) 0 var(--radius-sm);
}
.plan-name {
  font-size: var(--font-base);
  font-weight: 600;
}
.plan-price {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--text-price);
  margin-top: 8px;
}
.plan-original {
  font-size: var(--font-xs);
  color: var(--text-disabled);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 4px;
}
.plan-discount {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-top: 4px;
}
.subscribe-btn {
  margin-top: 16px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #5D3A00;
  border-radius: var(--radius-round);
  font-size: var(--font-md);
  font-weight: 700;
  cursor: pointer;
}
.subscribe-btn:active {
  opacity: 0.85;
}

/* ===== SETTINGS PAGE ===== */
.page-settings {
  padding-bottom: 0;
}
.settings-section {
  margin: 12px 16px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.settings-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
}
.settings-user:active {
  background: var(--bg-gray);
}
.settings-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}
.settings-user-info {
  flex: 1;
}
.settings-user-name {
  font-size: var(--font-base);
  font-weight: 600;
}
.settings-user-id {
  font-size: var(--font-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}
.settings-arrow {
  color: var(--text-disabled);
  font-size: var(--font-sm);
}
.settings-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
}
.settings-row + .settings-row {
  border-top: 1px solid var(--border-light);
}
.settings-row:active {
  background: var(--bg-gray);
}
.settings-label {
  flex: 1;
  font-size: var(--font-base);
}
.settings-value {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
  margin-right: 6px;
}
.toggle-switch {
  width: 48px;
  height: 28px;
  background: var(--text-disabled);
  border-radius: 14px;
  position: relative;
  transition: background var(--transition-fast);
  cursor: pointer;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-fast);
}
.toggle-switch.active {
  background: var(--success);
}
.toggle-switch.active::after {
  transform: translateX(20px);
}
.logout-btn {
  margin: 24px 16px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  color: var(--danger);
  font-size: var(--font-md);
  font-weight: 500;
  cursor: pointer;
}
.logout-btn:active {
  background: var(--bg-gray);
}

/* ===== LOGIN PANEL ===== */
.login-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.login-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 1001;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 85vh;
  overflow-y: auto;
}

.login-panel.show {
  transform: translateY(0);
}

.login-panel-header {
  display: flex;
  justify-content: flex-end;
  padding: 16px 20px 0;
}

.login-panel-close {
  width: 32px;
  height: 32px;
  background: var(--bg-gray);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-tertiary);
  cursor: pointer;
}

.login-panel-body {
  padding: 8px 32px 40px;
  text-align: center;
}

.login-logo {
  font-size: 48px;
  margin-bottom: 8px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 32px;
}

.login-form {
  text-align: left;
}

.login-input-group {
  display: flex;
  align-items: center;
  background: var(--bg-gray);
  border-radius: 12px;
  padding: 0 16px;
  margin-bottom: 16px;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.login-input-group:focus-within {
  border-color: var(--primary);
  background: #fff;
}

.login-input-prefix {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  padding-right: 12px;
  border-right: 1px solid var(--divider);
  margin-right: 12px;
}

.login-input {
  flex: 1;
  height: 52px;
  font-size: 16px;
  background: transparent;
}

.login-input::placeholder {
  color: var(--text-disabled);
}

.login-input-code {
  flex: 1;
}

.login-code-btn {
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  padding: 8px 0;
}

.login-code-btn.disabled {
  color: var(--text-disabled);
  cursor: not-allowed;
}

.login-agreement {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.login-agreement input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.login-link {
  color: var(--primary);
}

.login-submit-btn {
  width: 100%;
  height: 52px;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: 26px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 136, 49, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.login-submit-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(255, 136, 49, 0.2);
}

.login-other {
  margin-top: 32px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--divider);
}

.login-divider span {
  font-size: 13px;
  color: var(--text-disabled);
  white-space: nowrap;
}

.login-other-btns {
  display: flex;
  justify-content: center;
  gap: 40px;
}

.login-wechat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.login-wechat-btn span:first-child {
  font-size: 40px;
}

.login-wechat-btn span:last-child {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ===== LIVE PAGE SUPPLEMENT ===== */
.anchor-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary-gradient);
  margin: 12px 16px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  color: #fff;
  cursor: pointer;
}
.anchor-entry:active { transform: scale(0.98); }
.anchor-entry-content { display: flex; align-items: center; gap: 12px; }
.anchor-icon { font-size: 32px; }
.anchor-text { font-size: 17px; font-weight: 600; }
.anchor-desc { font-size: 13px; opacity: 0.8; }
.anchor-arrow { font-size: 20px; opacity: 0.7; }

.live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ===== LIVE ROOM SUPPLEMENT ===== */
.live-info-bar { position: absolute; bottom: 60px; left: 0; right: 0; padding: 8px 16px; background: linear-gradient(to top, rgba(0,0,0,0.6), transparent); z-index: 12; }
.live-info-title { color: #fff; font-size: 15px; font-weight: 500; }

.live-status { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, 0.7); color: #fff; padding: 10px 24px; border-radius: 24px; font-size: 14px; z-index: 20; }

.anchor-avatar img { width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.5); }
.anchor-info { flex: 1; }
.anchor-name { color: #fff; font-size: 16px; font-weight: 600; }
.anchor-fans { color: rgba(255, 255, 255, 0.7); font-size: 12px; }
.live-viewers-count { background: rgba(0, 0, 0, 0.5); color: #fff; padding: 4px 10px; border-radius: 12px; font-size: 13px; display: flex; align-items: center; gap: 4px; }

.live-action-text { font-size: 11px; color: rgba(255, 255, 255, 0.7); }
.live-action-item { transition: transform 0.2s; }
.live-action-item:active { transform: scale(1.2); }

/* ===== RESPONSIVE ===== */
@media (min-width: 640px) {
  body { max-width: 640px; margin: 0 auto; }
  .page { max-width: 640px; margin: 0 auto; }
  .tab-bar { max-width: 640px; left: 50%; transform: translateX(-50%); }
}

@media (min-width: 768px) {
  :root { --font-base: 16px; --font-md: 18px; }
  .product-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .flash-sale-list { gap: 16px !important; }
  .flash-item { min-width: 140px !important; }
}

@media (min-width: 1024px) {
  :root { --font-base: 16px; --font-md: 18px; }
  .product-grid { grid-template-columns: repeat(4, 1fr) !important; }
}