/* ===== 交互增强样式 ===== */

/* 可点击元素 */
.js-btn {
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.js-btn:hover {
  opacity: 0.8;
}

/* 导航当前页高亮 */
.nav-active {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}

/* 表单字段校验高亮 */
.field-highlight {
  outline: 2px solid #e07b4f;
  outline-offset: 3px;
  border-radius: 2px;
}

/* Toast 容器（fixed 覆盖在画布之上） */
#app-toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.toast-item {
  background: rgba(28, 28, 28, 0.96);
  border: 1px solid #666;
  border-radius: 10px;
  color: #f5f5f5;
  font-size: 15px;
  line-height: 1.5;
  padding: 10px 20px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  animation: toast-in 0.25s ease;
}

.toast-item.out {
  animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(10px); }
}

/* ===== 动态覆盖层通用 ===== */
.dyn-layer {
  color: #f5f5f5;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
}
.dyn-layer * {
  box-sizing: border-box;
}

.dyn-layer h3, .dyn-layer h4 {
  margin: 0 0 12px;
  font-weight: 600;
}

.dyn-layer button {
  cursor: pointer;
  border: 1px solid #4a4a4a;
  background: #262626;
  color: #f5f5f5;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  transition: background 0.2s, border-color 0.2s;
}
.dyn-layer button:hover {
  background: #3a3a3a;
  border-color: #8a8a8a;
}
.dyn-layer button.primary {
  background: #c9a06a;
  border-color: #c9a06a;
  color: #141414;
  font-weight: 600;
}
.dyn-layer button.primary:hover {
  background: #dbb381;
}
.dyn-layer button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dyn-layer input[type="number"],
.dyn-layer input[type="text"],
.dyn-layer select {
  width: 100%;
  background: #1d1d1d;
  border: 1px solid #4a4a4a;
  border-radius: 8px;
  color: #f5f5f5;
  padding: 8px 10px;
  font-size: 14px;
  outline: none;
}
.dyn-layer input:focus {
  border-color: #c9a06a;
}

.dyn-layer::-webkit-scrollbar {
  width: 8px;
}
.dyn-layer::-webkit-scrollbar-thumb {
  background: #4a4a4a;
  border-radius: 4px;
}

/* ===== 市场页 ===== */
.filter-block {
  margin-bottom: 18px;
}
.filter-title {
  font-size: 13px;
  color: #9a9a9a;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: #cfcfcf;
  cursor: pointer;
}
.filter-option:hover {
  background: #222;
}
.filter-option.active {
  background: #2c2c2c;
  color: #fff;
  font-weight: 600;
}
.filter-option .count {
  color: #777;
  font-size: 12px;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-row input {
  width: 100%;
}

.mkt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.mkt-search {
  flex: 1;
  min-width: 200px;
}
.mkt-result-count {
  font-size: 13px;
  color: #999;
  white-space: nowrap;
}
.mkt-sort {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #bbb;
}
.mkt-sort button {
  padding: 5px 12px;
  font-size: 13px;
}
.mkt-sort button.active {
  border-color: #c9a06a;
  color: #c9a06a;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.product-card {
  background: #1d1d1d;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.product-card:hover {
  border-color: #8a8a8a;
  transform: translateY(-2px);
}
.product-thumb {
  height: 120px;
  border-radius: 8px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  background: #141414;
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-thumb .thumb-fallback {
  position: absolute;
  inset: 0;
}
.product-thumb .tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
}
.product-name {
  font-size: 14px;
  font-weight: 600;
  color: #f5f5f5;
  line-height: 1.3;
  height: 38px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product-price {
  font-size: 16px;
  color: #c9a06a;
  font-weight: 700;
  margin: 6px 0;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
}
.product-actions {
  display: flex;
  gap: 8px;
}
.product-actions button {
  flex: 1;
  font-size: 13px;
  padding: 7px 0;
}

.mkt-load-more {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  font-size: 15px;
}

.empty-tip {
  text-align: center;
  color: #888;
  padding: 60px 0;
  font-size: 15px;
}

/* ===== 购物车抽屉 ===== */
#cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #c9a06a;
  color: #141414;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 400px;
  background: #161616;
  border-left: 1px solid #3a3a3a;
  z-index: 99990;
  transform: translateX(105%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  color: #f5f5f5;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
}
.cart-panel.open {
  transform: translateX(0);
}
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #2c2c2c;
  font-size: 16px;
  font-weight: 600;
}
.cart-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 20px;
}
.cart-empty {
  text-align: center;
  color: #777;
  padding: 60px 0;
  font-size: 14px;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #262626;
}
.cart-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  flex-shrink: 0;
}
.cart-info {
  flex: 1;
  min-width: 0;
}
.cart-name {
  font-size: 13px;
  color: #eee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-sub {
  font-size: 12px;
  color: #999;
  margin-top: 3px;
}
.cart-ctrl {
  display: flex;
  align-items: center;
  gap: 4px;
}
.cart-ctrl button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid #4a4a4a;
  background: #222;
  color: #fff;
  cursor: pointer;
  line-height: 1;
}
.cart-ctrl span {
  min-width: 20px;
  text-align: center;
  font-size: 13px;
}
.cart-del {
  background: none;
  border: none;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}
.cart-foot {
  padding: 16px 20px;
  border-top: 1px solid #2c2c2c;
}
.cart-total {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 12px;
}
.cart-total b {
  color: #c9a06a;
  font-size: 18px;
}
.cart-checkout {
  width: 100%;
  padding: 13px;
  background: #c9a06a;
  border: none;
  border-radius: 10px;
  color: #141414;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

/* ===== 模态框 ===== */
.app-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99980;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-modal {
  width: 460px;
  max-width: 92vw;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 14px;
  color: #f5f5f5;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.app-modal h3 {
  margin: 0 0 14px;
  font-size: 18px;
}
.app-modal p {
  color: #bbb;
  font-size: 14px;
  line-height: 1.6;
  margin: 8px 0;
}
.app-modal .modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}
.app-modal input[type="text"],
.app-modal textarea {
  width: 100%;
  background: #222;
  border: 1px solid #4a4a4a;
  border-radius: 8px;
  color: #f5f5f5;
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
  margin-bottom: 12px;
}
.app-modal textarea {
  min-height: 80px;
  resize: vertical;
}

/* ===== 下拉选择器 ===== */
.select-options {
  position: absolute;
  background: #1e1e1e;
  border: 1px solid #4a4a4a;
  border-radius: 10px;
  z-index: 200;
  min-width: 180px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.select-options .opt {
  padding: 10px 16px;
  font-size: 14px;
  color: #ddd;
  cursor: pointer;
}
.select-options .opt:hover,
.select-options .opt.active {
  background: #2e2e2e;
  color: #fff;
}

/* ===== 数据页图表 ===== */
.chart-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.chart-svg {
  flex: 1;
  width: 100%;
}
.chart-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #999;
}
.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

/* ===== 社区帖子 ===== */
.post-card {
  background: #1c1c1c;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.post-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.post-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #141414;
  font-weight: 700;
  font-size: 14px;
}
.post-username {
  font-weight: 600;
  font-size: 14px;
}
.post-time {
  font-size: 12px;
  color: #777;
}
.follow-btn {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 20px;
}
.follow-btn.following {
  background: transparent;
  border-color: #c9a06a;
  color: #c9a06a;
}
.post-body {
  font-size: 14px;
  color: #ddd;
  line-height: 1.6;
  margin-bottom: 10px;
}
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.post-tag {
  font-size: 12px;
  color: #8ab4f8;
  cursor: pointer;
}
.post-foot {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: #999;
}
.post-foot button {
  background: none;
  border: none;
  color: inherit;
  padding: 0;
  font-size: 13px;
}
.post-foot button:hover {
  color: #fff;
}
.post-foot .liked {
  color: #e07b4f;
}

/* 侧栏快捷块 */
.side-block {
  background: #1c1c1c;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}
.side-block h4 {
  font-size: 14px;
  margin: 0 0 10px;
  color: #ddd;
}
.side-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 13px;
  color: #ccc;
  cursor: pointer;
}
.side-item:hover {
  color: #fff;
}
.side-item .n {
  color: #777;
  font-size: 12px;
}

/* ===== 详情页 ===== */
.shop-info-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 6px;
}
.shop-info-price {
  font-size: 30px;
  color: #c9a06a;
  font-weight: 700;
  margin: 8px 0;
}
.shop-verified {
  display: inline-block;
  background: #2b4a3a;
  color: #7fd8a0;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.shop-desc {
  font-size: 14px;
  color: #bbb;
  line-height: 1.7;
  margin: 10px 0;
}
.shop-desc.expanded {
  white-space: normal;
}
.shop-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  margin: 14px 0;
}
.shop-meta-grid .kv {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #aaa;
  border-bottom: 1px solid #2a2a2a;
  padding: 6px 0;
}
.shop-meta-grid .kv b {
  color: #eee;
  font-weight: 500;
}
.qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  font-size: 14px;
  color: #ccc;
}
.qty-ctrl {
  display: flex;
  align-items: center;
  gap: 4px;
}
.qty-ctrl button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}
.qty-ctrl span {
  min-width: 34px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}
.shop-btns {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.shop-btns button {
  flex: 1;
  padding: 13px 0;
  font-size: 15px;
}

/* Tab 内容面板 */
.tab-content {
  font-size: 14px;
  color: #ccc;
  line-height: 1.7;
}
.tab-content table {
  width: 100%;
  border-collapse: collapse;
}
.tab-content td {
  padding: 9px 6px;
  border-bottom: 1px solid #2a2a2a;
  font-size: 13px;
}
.tab-content td:first-child {
  color: #999;
  width: 40%;
}

/* ===== 鉴定页 ===== */
.form-block {
  margin-bottom: 14px;
}
.form-label {
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.select-field {
  background: #1d1d1d;
  border: 1px solid #4a4a4a;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 14px;
  color: #eee;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.select-field:hover {
  border-color: #8a8a8a;
}
.select-field .caret {
  color: #888;
}
.upload-zone {
  border: 1px dashed #4a4a4a;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  color: #aaa;
  font-size: 13px;
}
.upload-zone:hover {
  border-color: #c9a06a;
  color: #eee;
}

/* 数据页列表行 */
.data-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid #2a2a2a;
  font-size: 14px;
}
.data-row:hover {
  background: #222;
}
.data-row .thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  flex-shrink: 0;
}
.data-row .name {
  flex: 1;
  color: #eee;
}
.data-row .price {
  color: #c9a06a;
  font-weight: 600;
  white-space: nowrap;
}
.data-row .meta {
  color: #888;
  font-size: 12px;
  white-space: nowrap;
}

/* ===== 绑定式交互：高亮 / 置灰（不改变布局） ===== */
.mkt-dim {
  opacity: 0.28;
  filter: grayscale(0.85);
  transition: opacity 0.25s, filter 0.25s;
}
.mkt-dim-img {
  opacity: 0.3;
  filter: grayscale(0.9) brightness(0.6);
  transition: opacity 0.25s, filter 0.25s;
}
.mkt-hit {
  color: #c9a06a !important;
  font-weight: 700 !important;
  text-shadow: 0 0 12px rgba(201, 160, 106, 0.35);
}
.mkt-like {
  color: #ff4d6d !important;
  font-weight: 700 !important;
}
.mkt-following {
  color: #c9a06a;
}

/* ===== 下拉浮层（不改变布局） ===== */
.auth-dropdown {
  position: fixed;
  z-index: 99990;
  background: #1d1d1d;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.auth-option {
  padding: 10px 16px;
  font-size: 14px;
  color: #e8e8e8;
  cursor: pointer;
  white-space: nowrap;
}
.auth-option:hover {
  background: #2c2c2c;
  color: #c9a06a;
}

/* ===== 搜索弹窗 ===== */
.search-input {
  width: 100%;
  box-sizing: border-box;
  background: #141414;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  color: #f5f5f5;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.search-input:focus {
  border-color: #c9a06a;
}
.search-result {
  margin-top: 12px;
  max-height: 320px;
  overflow: auto;
}
.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  color: #eee;
  font-size: 14px;
}
.search-item:hover {
  background: #2c2c2c;
}
.search-item b {
  margin-left: auto;
  color: #c9a06a;
}
.search-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
}
.empty-tip {
  color: #888;
  font-size: 14px;
  padding: 16px 0;
  text-align: center;
}

/* ===== 发帖 / 支付模态组件 ===== */
.post-text {
  width: 100%;
  box-sizing: border-box;
  min-height: 96px;
  background: #141414;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  color: #f5f5f5;
  padding: 10px 12px;
  font-size: 14px;
  resize: vertical;
  outline: none;
}
.post-foot-btns {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  justify-content: flex-end;
}
.modal-btn {
  background: #c9a06a;
  color: #141414;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.modal-btn.ghost {
  background: transparent;
  color: #bbb;
  border: 1px solid #3a3a3a;
}
.modal-btn.ghost:hover {
  color: #fff;
  border-color: #666;
}
.pay-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #2a2a2a;
  font-size: 14px;
  color: #ddd;
}
.pay-row b {
  color: #fff;
}
.pay-total {
  margin-top: 12px;
  text-align: right;
  font-size: 15px;
  color: #ddd;
}
.pay-total b {
  color: #c9a06a;
  font-size: 18px;
}