/* ============================================
   AI 市集 (AI MARKETPLACE) — OKX.AI WEB3 THEME
   ============================================ */

/* ── Web3 Aurora Background Hero Section ── */
.market-hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 80px 0 50px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.market-hero-container {
  position: relative;
  z-index: 5;
}

.market-hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.market-hero-content h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 16px;
}

.market-hero-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 600px;
}

/* Statistics Bar inside Hero (okx style) */
.market-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 24px;
  margin-top: 16px;
  width: 100%;
  flex-wrap: wrap;
}

/* ── Marketplace Body ── */
.marketplace-body {
  padding-top: 36px;
  padding-bottom: 80px;
}

.marketplace-main {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

/* ── Unified Top Control Bar (okx.ai style) ── */
.market-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* Left Pill Tabs */
.market-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 5px;
  border-radius: 100px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.market-tabs::-webkit-scrollbar { display: none; }

.market-tab {
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.market-tab.active, .market-tab:hover {
  background: #ffffff;
  color: #000000;
}

/* ── Global Market Card (.mk-card) & Seller Avatar (.mk-seller-av) Fix ── */
.mk-grid {
  display: block !important;
  column-count: 3 !important;
  column-gap: 16px !important;
}

.mk-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  padding: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  cursor: pointer;
  transition: var(--transition) !important;
}

.mk-card:hover {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

.mk-thumb {
  height: 120px !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.04) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

.mk-thumb-top {
  position: absolute !important;
  top: 8px !important;
  left: 8px !important;
}

.mk-deliver-badge {
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 2px 6px !important;
  background: rgba(255,255,255,0.07) !important;
  color: rgba(255,255,255,0.8) !important;
  border-radius: 4px !important;
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
}

.mk-thumb-icon {
  font-size: 28px !important;
  opacity: 0.2 !important;
}

.mk-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.mk-cat {
  font-size: 11px !important;
  color: var(--text-muted) !important;
  font-weight: 600 !important;
}

.mk-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  line-height: 1.4 !important;
}

.mk-meta {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  margin-top: 4px !important;
}

.mk-price {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
}

.mk-sales {
  font-size: 11px !important;
  color: var(--text-muted) !important;
}

/* ── Card Footer with Avatar ── */
.mk-foot {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 10px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  padding-top: 10px !important;
}

.mk-seller-av {
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  color: #000000 !important;
  flex-shrink: 0 !important;
}

.mk-seller-nm {
  font-size: 12px !important;
  color: var(--text-secondary) !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 1 !important;
}

.mk-rating {
  font-size: 11px !important;
  color: white !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
}

/* Right Actions */
.market-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.btn-filter-toggle {
  background: rgba(255,255,255,0.02);
}

.btn-filter-toggle.active {
  border-color: rgba(255,255,255,0.35);
  color: white;
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 8px rgba(255,255,255,0.1);
}

/* ── Collapsible Advanced Filters Drawer ── */
.advanced-filter-drawer {
  max-height: 0;
  overflow: hidden;
  background: #060606;
  border: 1px solid rgba(255,255,255,0);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  transition: max-height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.25s, padding 0.3s;
}

.advanced-filter-drawer.open {
  max-height: 250px;
  border-color: rgba(255,255,255,0.06);
  padding: 24px;
  background: rgba(255,255,255,0.01);
}

.drawer-inner {
  display: flex;
  gap: 60px;
}

.drawer-col h4 {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.drawer-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-option {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: var(--transition);
}

.drawer-option:hover {
  border-color: rgba(255,255,255,0.2);
  color: white;
}

.drawer-option.active {
  border-color: rgba(255,255,255,0.35);
  color: white;
  background: rgba(255,255,255,0.06);
}

.drawer-option input {
  display: none;
}

/* ── Content Type Subtabs Merged Into Header ── */
.market-type-dropdown {
  position: relative !important;
  flex-shrink: 0 !important;
}

.type-drop-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 16px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 100px !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  white-space: nowrap !important;
  outline: none !important;
}

.type-drop-btn:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.type-drop-btn i.type-icon {
  width: 13px !important;
  height: 13px !important;
  color: inherit !important;
  stroke-width: 2px !important;
}

.type-drop-btn .arrow-icon {
  width: 11px !important;
  height: 11px !important;
  color: var(--text-muted) !important;
  transition: transform 0.2s ease !important;
}

.type-drop-menu {
  display: none;
  position: absolute !important;
  left: 0 !important;
  top: calc(100% + 8px) !important;
  background: rgba(15, 15, 15, 0.85) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 6px 0 !important;
  min-width: 140px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
  z-index: 1000 !important;
}

.type-menu-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 16px !important;
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
}

.type-menu-item i {
  width: 13px !important;
  height: 13px !important;
  stroke-width: 2px !important;
}

.type-menu-item:hover {
  color: white !important;
  background: rgba(255,255,255,0.04) !important;
  padding-left: 20px !important;
}

.type-menu-item.active {
  color: white !important;
  background: rgba(255,255,255,0.07) !important;
  font-weight: 700 !important;
}

.tab-vertical-divider {
  width: 1px !important;
  height: 18px !important;
  background: rgba(255, 255, 255, 0.12) !important;
  margin: 0 4px !important;
  flex-shrink: 0 !important;
}

.tasks-count-badge {
  display: inline-flex !important;
  align-items: center !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
}


.count-num {
  color: #ffffff;
  font-weight: 700;
}

/* ── Product & Task Grid ── */
.mk-grid {
  display: block !important;
  column-count: 3 !important;
  column-gap: 16px !important;
  margin-bottom: 40px;
}

/* 1. Tasks Card style (NEED & WANT) */
.task-card-web3 {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 !important;
  display: block !important;
  height: auto !important;
  width: 100% !important;
  margin-bottom: 16px !important;
  break-inside: avoid !important;
  -webkit-column-break-inside: avoid !important;
  overflow: hidden !important;
  cursor: pointer;
  transition: var(--transition);
}

.task-card-web3:hover {
  border-color: rgba(255,255,255,0.18);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.task-card-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-card-type-tag {
  align-self: flex-start;
}

.task-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.task-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.task-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.task-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.est-time {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.usdt-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
}

.task-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(16,208,97,0.06);
  color: var(--green);
  border: 1px solid rgba(16,208,97,0.18);
}

/* 2. Goods Card style (GOOD) - Agent inspired but fits in Grid */
.good-card-web3 {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 !important;
  display: block !important;
  height: auto !important;
  width: 100% !important;
  margin-bottom: 16px !important;
  break-inside: avoid !important;
  -webkit-column-break-inside: avoid !important;
  overflow: hidden !important;
  cursor: pointer;
  transition: var(--transition);
}

.good-card-web3:hover {
  border-color: rgba(255,255,255,0.18);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.good-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.good-logo-wrap {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  flex-shrink: 0;
}
.good-logo-wrap i {
  width: 18px; height: 18px;
}

.good-info {
  display: flex;
  flex-direction: column;
}

.good-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.good-cat {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.good-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.good-stats-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 14px;
}

.good-stats-row .rating {
  color: white;
  display: flex;
  align-items: center;
  gap: 3px;
}

.good-stats-row .divider {
  color: rgba(255,255,255,0.1);
}

.good-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 12px;
}

.good-price {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.page-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover {
  border-color: rgba(255,255,255,0.2);
  color: #ffffff;
}

.page-btn.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.page-ellipsis {
  color: var(--text-muted);
  font-size: 13px;
}

.next-btn {
  border-color: rgba(255,255,255,0.15);
  color: #ffffff;
}

/* ── Responsive ── */
@media (max-width: 992px) {
  .mk-grid {
    column-count: 2 !important;
  }
}

@media (max-width: 768px) {
  .market-hero {
    padding: 60px 0 40px;
  }
  
  .market-hero-stats {
    gap: 16px;
  }

  .market-control-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .market-actions {
    justify-content: space-between;
  }

  .drawer-inner {
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 560px) {
  .mk-grid {
    column-count: 1 !important;
  }
}

/* ── Expandable Search Bar Web3 Aurora Optimization ── */
.market-control-bar {
  position: relative !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 16px !important;
  flex-wrap: nowrap !important; /* 保证单行不换行 */
}

/* 1. Categorization Tabs transition */
.market-tabs {
  transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.4s ease, padding 0.4s ease, border-color 0.3s ease !important;
  max-width: 1000px !important;
  opacity: 1 !important;
  flex-shrink: 0 !important; /* 保证完整宽度不被压缩 */
  overflow: visible !important; /* 彻底清除横向滚动与最左侧内容截断 */
}

.market-tabs.search-active {
  max-width: 0 !important;
  opacity: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-color: transparent !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

/* 2. Expandable Search container */
.market-search-expandable {
  display: flex !important;
  align-items: center !important;
  position: relative !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  flex-shrink: 0 !important;
}

/* Default state: only search icon circle */
.search-toggle-btn {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  color: var(--text-secondary) !important;
}

.search-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  transform: scale(1.05);
}

/* Input container wrapper (collapsed by default) */
.search-expand-input-wrap {
  display: flex !important;
  align-items: center !important;
  width: 0 !important;
  max-width: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  position: relative !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid transparent !important;
  border-radius: 99px !important;
  padding: 0 !important;
}

/* Expanded state active classes */
.market-search-expandable.active {
  flex-grow: 1 !important;
  justify-content: flex-end !important;
}

.market-search-expandable.active .search-toggle-btn {
  display: none !important;
}

.market-search-expandable.active .search-expand-input-wrap {
  width: 380px !important; /* 精致中等宽度，给右侧控件留足呼吸空间 */
  max-width: 60vw !important;
  opacity: 1 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  padding: 6px 12px 6px 16px !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4) !important;
}

.market-search-expandable.active .search-expand-input-wrap:focus-within {
  border-color: rgba(255,255,255,0.3) !important;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05), 0 4px 24px rgba(0, 0, 0, 0.4) !important;
}

/* Inner elements in expanded state */
.search-inner-icon {
  margin-right: 8px !important;
  flex-shrink: 0 !important;
}

.search-expand-input-wrap input {
  flex: 1 !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #ffffff !important;
  font-size: 13.5px !important;
  height: 24px !important;
  font-family: inherit !important;
}

.search-expand-input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.3) !important;
}

/* Clear icon btn */
.search-clear-btn {
  background: none !important;
  border: none !important;
  color: var(--text-muted) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  transition: all 0.2s ease !important;
  margin-left: 8px !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
}

.search-clear-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

/* 响应式适配：在窄屏下，缩窄展开后的最大宽度 */
@media (max-width: 576px) {
  .market-search-expandable.active .search-expand-input-wrap {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ── Filter Controls Web3 Aurora Optimization ── */
.market-actions {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

/* 1. Custom Checkbox */
.filter-checkbox-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--text-secondary) !important;
  user-select: none;
}

.filter-checkbox-wrap input {
  display: none !important;
}

.custom-checkbox {
  width: 15px !important;
  height: 15px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: var(--transition) !important;
  background: rgba(255, 255, 255, 0.01) !important;
  flex-shrink: 0 !important;
}

.filter-checkbox-wrap input:checked + .custom-checkbox {
  background: white !important;
  border-color: white !important;
  box-shadow: 0 0 6px rgba(255,255,255,0.4) !important;
}

.filter-checkbox-wrap input:checked + .custom-checkbox::after {
  content: '✓' !important;
  color: #000000 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}


/* 3. Filter Toggle Button Custom Web3 look */
.btn-filter-toggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 16px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.02) !important;
  color: var(--text-secondary) !important;
  transition: var(--transition) !important;
}

.btn-filter-toggle:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

.btn-filter-toggle.active {
  border-color: rgba(255,255,255,0.35) !important;
  color: white !important;
  background: rgba(255,255,255,0.06) !important;
  box-shadow: 0 0 8px rgba(255,255,255,0.1) !important;
}

/* ── Market dynamic info bar styles ── */
.market-meta-bar {
  display: none !important;
}

.market-actions .market-count-label {
  font-size: 12.5px !important;
  color: var(--text-muted) !important;
  font-weight: 500 !important;
  margin-right: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.market-actions .market-count-label .count-num {
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  margin: 0 4px !important;
}

@media (max-width: 991px) {
  .market-actions .market-count-label {
    display: none !important;
  }
}

.mk-notice {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 24px !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.mk-notice-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.mk-notice-left svg,
.mk-notice-left [data-lucide] {
  width: 16px !important;
  height: 16px !important;
  color: var(--acid) !important;
}

.mk-notice .market-meta-bar {
  display: block !important;
}

.mk-notice .market-count-label {
  font-size: 13px !important;
  color: rgba(255, 255, 255, 0.6) !important;
}

.mk-notice .market-count-label .count-num {
  color: var(--acid) !important;
  font-weight: 700 !important;
  margin: 0 4px !important;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}





/* ══════════════════════════════════════
   LIGHT THEME OVERRIDES (minimal black & white)
   ══════════════════════════════════════ */
[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea,
[data-theme="light"] .form-select { 
  background: #ffffff !important; 
  color: #000000 !important; 
  border-color: rgba(0, 0, 0, 0.08) !important; 
}
[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-textarea:focus,
[data-theme="light"] .form-select:focus { 
  border-color: rgba(0, 0, 0, 0.25) !important; 
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.03) !important; 
}
[data-theme="light"] .form-input::placeholder,
[data-theme="light"] .form-textarea::placeholder { 
  color: rgba(0, 0, 0, 0.35) !important; 
}

/* ── Hero Background ── */
[data-theme="light"] .market-hero {
  background: #ffffff !important;
  background-image: radial-gradient(circle at 50% -20%, rgba(200, 255, 0, 0.06) 0%, transparent 65%) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .market-hero h1 {
  color: #000000 !important;
}
[data-theme="light"] .orb-1,
[data-theme="light"] .orb-2 {
  display: none !important; /* 隐藏原本的紫、青色球，保证黄绿单色光的纯净感 */
}
[data-theme="light"] .grid-overlay {
  background-image: linear-gradient(rgba(0, 0, 0, 0.008) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0, 0, 0, 0.008) 1px, transparent 1px) !important;
}

/* ── Control Bar Dividers ── */
[data-theme="light"] .market-control-bar {
  border-bottom-color: rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .tab-vertical-divider {
  background: rgba(0, 0, 0, 0.08) !important;
}

/* ── "全部类型" Dropdown Selector ── */
[data-theme="light"] .type-drop-btn {
  background: transparent !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #000000 !important;
  border-radius: 6px !important;
}
[data-theme="light"] .type-drop-btn:hover {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}
[data-theme="light"] .type-drop-btn .arrow-icon {
  color: #000000 !important;
}
[data-theme="light"] .type-drop-menu {
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .type-menu-item {
  color: rgba(0, 0, 0, 0.7) !important;
}
[data-theme="light"] .type-menu-item:hover {
  color: #000000 !important;
  background: rgba(0, 0, 0, 0.03) !important;
}
[data-theme="light"] .type-menu-item.active {
  color: #000000 !important;
  background: rgba(0, 0, 0, 0.05) !important;
}

/* ── Category Pill Tabs ── */
[data-theme="light"] .market-tabs {
  background: transparent !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  padding: 3px !important;
  border-radius: 8px !important;
}
[data-theme="light"] .market-tab {
  color: rgba(0, 0, 0, 0.5) !important;
  border-radius: 6px !important;
}
[data-theme="light"] .market-tab:hover:not(.active) {
  color: #000000 !important;
  background: rgba(0, 0, 0, 0.03) !important;
}
[data-theme="light"] .market-tab.active {
  background: #000000 !important; /* 纯黑底 */
  color: #ffffff !important; /* 纯白字 */
  box-shadow: none !important;
}

/* ── Expandable Search Bar ── */
[data-theme="light"] .search-toggle-btn {
  background: transparent !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #000000 !important;
}
[data-theme="light"] .search-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}
[data-theme="light"] .search-expand-input-wrap {
  background: transparent !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  border-radius: 6px !important;
}
[data-theme="light"] .search-expand-input-wrap:focus-within {
  border-color: rgba(0, 0, 0, 0.2) !important;
  box-shadow: none !important;
}
[data-theme="light"] .search-expand-input-wrap input {
  color: #000000 !important;
}
[data-theme="light"] .search-expand-input-wrap input::placeholder {
  color: rgba(0, 0, 0, 0.35) !important;
}
[data-theme="light"] .search-clear-btn {
  color: rgba(0, 0, 0, 0.4) !important;
}
[data-theme="light"] .search-clear-btn:hover {
  color: #000000 !important;
  background: rgba(0, 0, 0, 0.06) !important;
}

/* ── Checkbox & Filter Button ── */
[data-theme="light"] .filter-checkbox-wrap {
  color: rgba(0, 0, 0, 0.7) !important;
}
[data-theme="light"] .custom-checkbox {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}
[data-theme="light"] .filter-checkbox-wrap input:checked + .custom-checkbox {
  background: #000000 !important;
  border-color: #000000 !important;
}
[data-theme="light"] .filter-checkbox-wrap input:checked + .custom-checkbox::after {
  color: #ffffff !important;
}
[data-theme="light"] .btn-filter-toggle {
  background: transparent !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: rgba(0, 0, 0, 0.7) !important;
  border-radius: 6px !important;
}
[data-theme="light"] .btn-filter-toggle:hover {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  color: #000000 !important;
}
[data-theme="light"] .btn-filter-toggle.active {
  background: #000000 !important;
  border-color: #000000 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* ── Advanced Filter Drawer ── */
[data-theme="light"] .advanced-filter-drawer {
  background: transparent !important;
  border-color: transparent !important;
}
[data-theme="light"] .advanced-filter-drawer.open {
  background: transparent !important;
  border-color: transparent !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  box-shadow: none !important;
}
[data-theme="light"] .drawer-col h4 {
  color: rgba(0, 0, 0, 0.35) !important;
}
[data-theme="light"] .drawer-option {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: rgba(0, 0, 0, 0.7) !important;
  border-radius: 6px !important;
}
[data-theme="light"] .drawer-option:hover {
  border-color: rgba(0, 0, 0, 0.2) !important;
  color: #000000 !important;
}
[data-theme="light"] .drawer-option.active {
  background: #000000 !important;
  border-color: #000000 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* ── Commission Notice Bar ── */
[data-theme="light"] .mk-notice {
  background: transparent !important;
  border: none !important;
  color: #000000 !important;
  box-shadow: none !important;
  padding: 0 !important;
}
[data-theme="light"] .mk-notice strong {
  color: var(--acid) !important;
}
[data-theme="light"] .mk-notice-left svg,
[data-theme="light"] .mk-notice-left [data-lucide] {
  color: #000000 !important;
}
[data-theme="light"] .mk-notice .market-count-label {
  color: rgba(0, 0, 0, 0.5) !important;
}
[data-theme="light"] .mk-notice .market-count-label .count-num {
  color: #000000 !important;
}

/* ── Cards Structure & Hover ── */
[data-theme="light"] .task-card-web3,
[data-theme="light"] .good-card-web3 {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01) !important;
  border-radius: 8px !important;
}
[data-theme="light"] .task-card-web3:hover,
[data-theme="light"] .good-card-web3:hover {
  border-color: rgba(0, 0, 0, 0.12) !important;
  background: #ffffff !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04) !important;
  transform: translateY(-3px) !important;
}

/* ── Tasks Card Inner Details ── */
[data-theme="light"] .task-card-title {
  color: #000000 !important;
}
[data-theme="light"] .task-card-desc {
  color: rgba(0, 0, 0, 0.6) !important;
}
[data-theme="light"] .task-card-footer {
  border-top-color: rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .est-time {
  color: rgba(0, 0, 0, 0.4) !important;
}
[data-theme="light"] .usdt-price {
  color: #10B981 !important;
}
[data-theme="light"] .task-status-badge {
  background: transparent !important;
  color: rgba(0, 0, 0, 0.7) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* ── Good Cards Inner Details ── */
[data-theme="light"] .good-logo-wrap {
  color: #ffffff !important;
}
[data-theme="light"] .good-title {
  color: #000000 !important;
}
[data-theme="light"] .good-desc {
  color: rgba(0, 0, 0, 0.6) !important;
}
[data-theme="light"] .good-stats-row {
  color: rgba(0, 0, 0, 0.4) !important;
}
[data-theme="light"] .good-stats-row .divider {
  color: rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .good-stats-row .rating {
  color: #000000 !important;
}
[data-theme="light"] .good-footer {
  border-top-color: rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .good-price {
  color: #000000 !important;
}
[data-theme="light"] .good-card-web3 .btn-primary {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #000000 !important;
  border-radius: 6px !important;
}
[data-theme="light"] .good-card-web3 .btn-primary:hover {
  background: var(--acid) !important;
  color: #ffffff !important;
  border-color: var(--acid) !important;
}

/* ── Badge Colors for Light Mode ── */
[data-theme="light"] .badge-video {
  background: rgba(168, 85, 247, 0.05) !important;
  color: #8B5CF6 !important;
  border-color: rgba(168, 85, 247, 0.12) !important;
}
[data-theme="light"] .badge-image {
  background: rgba(6, 182, 212, 0.05) !important;
  color: #0891B2 !important;
  border-color: rgba(6, 182, 212, 0.12) !important;
}
[data-theme="light"] .badge-voice {
  background: rgba(249, 115, 22, 0.05) !important;
  color: #EA580C !important;
  border-color: rgba(249, 115, 22, 0.12) !important;
}
[data-theme="light"] .badge-manga {
  background: rgba(236, 72, 153, 0.05) !important;
  color: #DB2777 !important;
  border-color: rgba(236, 72, 153, 0.12) !important;
}
[data-theme="light"] .badge-longvideo {
  background: rgba(14, 165, 233, 0.05) !important;
  color: #0284C7 !important;
  border-color: rgba(14, 165, 233, 0.12) !important;
}

/* ── Card Footer Avatar & Rating ── */
[data-theme="light"] .mk-foot {
  border-top-color: rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .mk-seller-av {
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .mk-seller-nm {
  color: rgba(0, 0, 0, 0.6) !important;
}
[data-theme="light"] .mk-rating {
  color: #000000 !important;
}

/* ── Pagination Buttons ── */
[data-theme="light"] .page-btn {
  background: transparent !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: rgba(0, 0, 0, 0.6) !important;
  border-radius: 6px !important;
}
[data-theme="light"] .page-btn:hover:not(.active) {
  border-color: #000000 !important;
}
[data-theme="light"] .page-btn.active {
  background: var(--text-primary) !important;
  color: #ffffff !important;
  border-color: var(--text-primary) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
}
[data-theme="light"] .next-btn {
  color: var(--text-primary) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}

/* ── Xiaohongshu Masonry Card Layout Styles ── */
.card-cover-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
  line-height: 0;
}

.card-cover-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: block;
}

.good-card-web3:hover .card-cover-img,
.task-card-web3:hover .card-cover-img {
  transform: scale(1.035);
}

.floating-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  color: #ffffff;
  background: rgba(15, 15, 15, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 2;
  pointer-events: none;
}

.floating-badge.badge-good {
  border-color: rgba(6, 182, 212, 0.25);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.1);
}

.floating-badge.badge-need {
  border-color: rgba(200, 255, 0, 0.25);
  box-shadow: 0 0 10px rgba(200, 255, 0, 0.1);
}

.card-content-wrap {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.good-title, .task-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.good-desc, .task-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seller-social-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.seller-info {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 75%;
}

.seller-avatar-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.seller-name {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.likes-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.good-card-web3:not(.has-cover) .good-card-top,
.task-card-web3:not(.has-cover) .good-card-top {
  padding: 16px 16px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.good-cat-static {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 4px;
}

.task-card-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
}

/* Light Theme overrides */
[data-theme="light"] .good-title,
[data-theme="light"] .task-card-title {
  color: #000000 !important;
}

[data-theme="light"] .seller-name,
[data-theme="light"] .likes-count {
  color: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="light"] .seller-social-row {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .good-cat-static {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .floating-badge {
  background: rgba(255, 255, 255, 0.7);
  color: #000000;
  border-color: rgba(0, 0, 0, 0.08);
}

/* ── Layout Switch Styles (Classic Mode Overrides) ── */

/* 1. 简约模式下的网格布局还原 */
.mk-grid.layout-classic {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
  column-count: unset !important; /* 彻底清除瀑布流列属性 */
}

/* 2. 简约模式卡片回退为原本的 Flex 扁平结构 */
.mk-grid.layout-classic .task-card-web3,
.mk-grid.layout-classic .good-card-web3 {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-height: 200px !important;
  height: auto !important;
  padding: 24px !important; /* 恢复大内边距 */
  margin-bottom: 0 !important; /* 清除瀑布流卡片下边距 */
}

/* 3. 隐藏封面、毛玻璃标签与作者社交栏 */
.mk-grid.layout-classic .card-cover-wrap {
  display: none !important;
}

.mk-grid.layout-classic .seller-social-row {
  display: none !important;
}

/* 4. 恢复简约模式下的卡片分类头部 */
.mk-grid.layout-classic .task-cat-top {
  display: flex !important;
}
.mk-grid.layout-classic .good-card-web3.has-cover .good-card-top {
  display: flex !important;
}

/* 5. 简约模式下文字内边距清除（直接由卡片大 padding 覆盖） */
.mk-grid.layout-classic .card-content-wrap {
  padding: 0 !important;
  gap: 14px !important; /* 维持稍微紧凑的间距 */
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  height: 100% !important;
}

/* 6. 恢复商品原本的已售和评分统计行 */
.mk-grid.layout-classic .good-stats-row-classic {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 6px;
}

.mk-grid.layout-classic .good-stats-row-classic .rating {
  color: white;
  display: flex;
  align-items: center;
  gap: 3px;
}
[data-theme="light"] .mk-grid.layout-classic .good-stats-row-classic .rating {
  color: #000000 !important;
}

/* 7. 简约模式下画廊版的漂浮标签等隐藏 */
.mk-grid.layout-classic .floating-badge {
  display: none !important;
}

/* 8. 简约模式下响应式回退 */
@media (max-width: 992px) {
  .mk-grid.layout-classic {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 560px) {
  .mk-grid.layout-classic {
    grid-template-columns: 1fr !important;
  }
}

/* 9. 画廊（瀑布流）模式下的样式适配（防止干扰经典卡片） */
.mk-grid:not(.layout-classic) .task-cat-top {
  display: none !important;
}

.mk-grid:not(.layout-classic) .good-card-web3.has-cover .good-card-top {
  display: none !important;
}

.mk-grid:not(.layout-classic) .good-stats-row-classic {
  display: none !important;
}


