/* 网页拍卖行 / 藏宝阁 共享样式 · Q版浅色（搭配 styles.css 基础件） */
:root {
  --t-blue: #2f7fc4;
  --t-red: #d9534f;
  --t-goldtext: #9a6a08;
}

.trade-shell {
  position: relative;
  z-index: 1;
  flex: 1;
  width: min(100% - 32px, 1060px);
  margin: 0 auto;
  padding: 30px 0 56px;
}

.panel {
  background: var(--card);
  border: 2px solid var(--forest);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard);
  padding: 22px 24px;
  margin-bottom: 18px;
}
.panel h1 { margin: 0 0 4px; font-family: var(--font-title); font-size: 24px; color: var(--forest); letter-spacing: 2px; }
.panel .sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }

.notice { min-height: 22px; font-size: 14px; margin: 8px 0; }
.notice.error { color: var(--t-red); }
.notice.success { color: var(--forest); }

/* 登录 */
.login-view form { display: grid; gap: 14px; max-width: 380px; }
.login-view label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--forest); }
.login-view input, .filters input, .filters select, .sell-form input {
  background: #fff;
  border: 2px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
}
.login-view input:focus, .filters input:focus, .sell-form input:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(255, 191, 46, 0.35);
}
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row input { width: 120px; }
.captcha-image { border-radius: var(--radius-md); border: 2px solid var(--line); cursor: pointer; }
.register-hint { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.register-hint a { color: var(--t-goldtext); font-weight: 700; text-decoration: none; }
.register-hint a:hover { text-decoration: underline; }

button.primary-action, button.buy-btn, button.sell-btn {
  color: #5b3d05;
  background: var(--gold);
  border: 2px solid var(--gold-deep);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--gold-deep);
  font-weight: 700;
  padding: 10px 22px;
  font-size: 15px;
  letter-spacing: 1px;
  cursor: pointer;
}
button.primary-action:hover, button.buy-btn:hover, button.sell-btn:hover { filter: brightness(1.05); }
button.primary-action:active, button.buy-btn:active, button.sell-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--gold-deep); }
button.primary-action:disabled { opacity: 0.5; cursor: default; }

button.ghost-btn {
  background: #fff;
  border: 2px solid var(--forest);
  color: var(--forest);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
button.ghost-btn:hover { background: var(--forest); color: #fff; }
button.ghost-btn.danger:hover { border-color: var(--t-red); background: var(--t-red); color: #fff; }
button.ghost-btn:disabled { opacity: 0.4; cursor: default; }

/* 筛选 */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.filters .spacer { flex: 1; }

/* 列表 */
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th {
  text-align: left;
  color: var(--forest);
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: 1px;
  padding: 10px 8px;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
table.list td { padding: 10px 8px; border-bottom: 1px dashed var(--line); vertical-align: middle; }
table.list tbody tr { cursor: pointer; transition: background 0.15s; }
table.list tbody tr:hover { background: #f2f8ec; }
table.list tbody tr.selected { background: #fff3d6; outline: 2px solid var(--gold-deep); outline-offset: -2px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; border: 2px solid var(--line); color: var(--muted); }
.tag.item { color: var(--t-blue); border-color: #bcd9f2; background: #eef6fd; }
.tag.pet { color: var(--forest); border-color: #b5d9b5; background: #eef8ee; }
.row-icon { width: 22px; height: 22px; vertical-align: -6px; margin-right: 4px; image-rendering: pixelated; }
.price { color: var(--t-goldtext); font-weight: 700; white-space: nowrap; }
.muted { color: var(--muted); }

.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 14px; }

/* 模态框 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(25, 87, 54, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal-mask[hidden] { display: none; }
.modal {
  background: var(--card);
  border: 2px solid var(--forest);
  border-radius: var(--radius-lg);
  width: 640px;
  max-width: 96vw;
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px 24px;
  box-shadow: var(--shadow-hard-lg);
}
.modal.wide { width: 760px; }
.modal h2 { margin: 0 0 4px; font-family: var(--font-title); font-size: 21px; color: var(--forest); letter-spacing: 1px; }
.modal .modal-sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.modal-close-row { display: flex; justify-content: space-between; align-items: flex-start; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; margin: 10px 0; }
.detail-grid .cell { background: var(--grass); border-radius: 12px; padding: 8px 10px; font-size: 14px; }
.detail-grid .cell small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }

.section-title {
  display: flex; align-items: center; gap: 8px;
  color: var(--forest); font-family: var(--font-title); font-size: 16px; letter-spacing: 1px;
  margin: 18px 0 8px; padding-bottom: 6px;
  border-bottom: 2px dashed var(--line);
}
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 8px; }
.slot-card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 8px;
  font-size: 13px;
  min-height: 64px;
}
.slot-card .s-name { color: var(--ink); font-weight: 600; word-break: break-all; }
.slot-card .s-desc { color: var(--muted); font-size: 12px; margin-top: 3px; word-break: break-all; }
.slot-card .s-thumb {
  display: block; margin: 0 auto 4px; max-width: 64px; max-height: 64px;
  image-rendering: pixelated;
}
.slot-card.clickable { cursor: pointer; }
.slot-card.clickable:hover { border-color: var(--gold-deep); background: #fffaf0; }
.slot-card.empty { opacity: 0.35; }

.pet-img-wrap { text-align: center; margin-bottom: 8px; }
.pet-img-wrap img { max-width: 128px; max-height: 128px; image-rendering: pixelated; }

.pet-skills-block { margin-top: 10px; }
.pet-skills { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 6px; }
.skill-chip {
  display: inline-block; padding: 4px 10px; font-size: 13px;
  background: #fff3d0; border: 2px solid var(--line); border-radius: 999px;
  color: var(--ink); font-weight: 600;
}

/* 角色职业技能 chips */
.profskill-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.profskill-grid[hidden] { display: none; }
.profskill-grid .skill-chip { background: #eaf4e0; border-color: var(--line); }
.profskill-grid .prof-skill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 11px 3px 4px;
}
.profskill-grid .prof-skill img {
  width: 22px; height: 22px; image-rendering: pixelated; display: block;
}

.buy-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-top: 18px; padding-top: 14px; border-top: 2px dashed var(--line);
}
.buy-bar select, .buy-bar input {
  background: #fff; border: 2px solid var(--line); color: var(--ink);
  border-radius: var(--radius-md); padding: 8px 10px; font-size: 14px;
}

.confirm-box { text-align: center; padding: 10px 0; }
.confirm-box p { font-size: 15px; line-height: 1.9; margin: 8px 0; }
.confirm-box .big { font-size: 18px; color: var(--t-goldtext); font-weight: 700; }
.rename-row { margin: 12px 0 4px; text-align: left; }
.rename-row label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.rename-row input {
  width: 100%; box-sizing: border-box;
  background: #fff; border: 2px solid var(--line); color: var(--ink);
  border-radius: var(--radius-md); padding: 10px 12px; font-size: 15px; outline: none;
}
.rename-row input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(255, 191, 46, 0.35); }
.confirm-error { color: var(--t-red); font-size: 14px; font-weight: 700; margin: 10px 0 0; }
.confirm-error[hidden] { display: none; }
.confirm-actions { display: flex; gap: 14px; justify-content: center; margin-top: 18px; }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs button {
  background: #fff; border: 2px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 8px 18px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.tabs button:hover { border-color: var(--forest); color: var(--forest); }
.tabs button.active { color: #fff; border-color: var(--forest); background: var(--forest); }

.label-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.label-tab {
  background: #fff; border: 2px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 4px 14px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.label-tab:hover { border-color: var(--forest); color: var(--forest); }
.label-tab.active { color: #fff; border-color: var(--forest); background: var(--forest); }

.sell-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.sell-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--forest); }
.sell-form select {
  background: #fff;
  border: 2px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
  min-width: 150px;
}
.sell-form select:disabled { opacity: 0.5; }
.sell-form #sellAssetSelect { min-width: 260px; max-width: 360px; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.8; }

/* 游戏内同款资产详情布局 */
.pet-detail { display: flex; gap: 18px; align-items: flex-start; margin: 10px 0; }
.pet-side {
  flex: 0 0 150px;
  background: var(--grass);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}
.pet-img { width: 120px; height: 120px; object-fit: contain; image-rendering: pixelated; }
.pet-name { color: var(--forest); font-weight: 700; margin-top: 8px; word-break: break-all; }
.pet-freename { color: #2f8f5b; font-size: 12px; margin-top: 4px; word-break: break-all; }
.pet-grid { flex: 1; margin: 0; }
.item-desc {
  background: var(--grass);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.8;
  margin: 0 0 10px;
  flex: 1;
}
@media (max-width: 640px) {
  .pet-detail { flex-direction: column; }
  .pet-side { flex: none; width: 100%; }
}

@media (max-width: 720px) {
  table.list th:nth-child(5), table.list td:nth-child(5) { display: none; }
  table.list td { padding: 8px 4px; }
  table.list .ghost-btn { padding: 5px 10px; font-size: 12.5px; border-width: 1.5px; }
}

/* ---------- 仿游戏人物/宠物属性面板 ---------- */
.char-panel {
  display: flex;
  gap: 18px;
  background: var(--grass);
  border: 2px solid var(--forest);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}
.char-panel .cp-col { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cp-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 13px;
}
.cp-row span { color: var(--muted); font-weight: 700; white-space: nowrap; }
.cp-row b { color: var(--forest); font-size: 14px; text-align: right; word-break: break-all; }
.cp-elems {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}
.cp-elem { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cp-elem span { color: var(--muted); font-weight: 700; width: 16px; text-align: center; }
.cp-elem b { color: var(--forest); width: 28px; text-align: right; font-size: 13px; }
.cp-elem .bar {
  flex: 1;
  height: 12px;
  background: #dcebd2;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.cp-elem .bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(180deg, #7ed07e, #3f9e4d);
  border-radius: 5px;
  transition: width 0.25s ease;
}
.cp-sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--goldtext, #9a6a08);
  background: #fff7df;
  border: 1px dashed var(--gold-deep);
  border-radius: 8px;
  padding: 4px 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.pet-panel { margin-top: 4px; }
@media (max-width: 560px) {
  .char-panel { flex-direction: column; }
}

.grid-more { grid-column: 1 / -1; justify-self: center; margin-top: 2px; }

/* 四属性条配色：地绿 / 水浅蓝 / 火红 / 风亮黄 */
#cpBarEarth, #ppBarEarth { background: linear-gradient(180deg, #7ed07e, #3f9e4d); }
#cpBarWater, #ppBarWater { background: linear-gradient(180deg, #8fd4f7, #4da3e8); }
#cpBarFire, #ppBarFire { background: linear-gradient(180deg, #f58a7e, #d94336); }
#cpBarWind, #ppBarWind { background: linear-gradient(180deg, #ffe873, #f0b429); }

/* ---------- 会员点商城 ---------- */
.mall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.mall-card {
  background: #fffdf4;
  border: 2px solid var(--gold-deep, #c89b3c);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  box-shadow: 0 2px 0 rgba(120, 80, 10, 0.18);
}
.mall-imgwrap {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f0d8;
  border: 1px dashed var(--gold-deep, #c89b3c);
  border-radius: 10px;
  overflow: hidden;
}
.mall-imgwrap img { max-width: 68px; max-height: 68px; image-rendering: pixelated; }
.mall-name {
  font-weight: 800;
  font-size: 14px;
  color: #6b4a12;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mall-label { font-size: 12px; color: var(--muted, #8a7a55); }
.mall-price { font-size: 13px; color: #6b4a12; }
.mall-buy { width: 100%; }
.mall-buy-info {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 8px 0 12px;
}
.mall-buy-info span#buyImage img {
  max-width: 84px;
  max-height: 84px;
  image-rendering: pixelated;
  background: #f7f0d8;
  border: 1px dashed var(--gold-deep, #c89b3c);
  border-radius: 10px;
}
