/* ========== 90-round12.css - iter51 星际贸易站系统 ========== */
/* 深色赛博朋克风格，金色高亮贸易主题，与游戏整体一致 */

/* ========== 贸易站面板 ========== */
.trade-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 2, 15, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(12px) saturate(1.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
}
.trade-overlay.open { display: flex; }
.trade-box {
  background: rgba(20, 12, 35, 0.93);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 2px;
  width: 640px;
  max-width: 95vw;
  max-height: 88vh;
  padding: 28px 24px 24px;
  color: #e0e0e0;
  position: relative;
  box-shadow: 0 8px 32px rgba(251, 191, 36, 0.3), 0 0 40px rgba(251, 191, 36, 0.15), inset 0 1px 0 rgba(255,255,255,0.05);
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.5;
}
.trade-box::-webkit-scrollbar { width: 6px; }
.trade-box::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.trade-box::-webkit-scrollbar-thumb { background: rgba(251, 191, 36, 0.5); }
.trade-close-btn { color: #fbbf24 !important; }
.trade-body { font-size: 13px; }

/* ========== 顶部：贸易积分 + 累计统计 ========== */
.trade-header {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 2px;
  padding: 14px 16px;
  margin-bottom: 14px;
  text-align: center;
}
.trade-points {
  font-size: 22px;
  font-weight: 900;
  color: #fbbf24;
  margin-bottom: 10px;
  letter-spacing: 1px;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.6), 0 0 30px rgba(251, 191, 36, 0.3);
}
.trade-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.trade-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 8px;
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 2px;
  font-size: 11px;
  color: #9ca3af;
}
.trade-stat-item span:last-child {
  color: #fbbf24;
  font-weight: 700;
  font-size: 14px;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}

/* ========== 区块标题通用 ========== */
.trade-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
}

/* ========== 当前加成 ========== */
.trade-bonuses {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 2px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.trade-bonus-info {
  font-size: 12px;
  color: #d1d5db;
  text-align: center;
}
.trade-bonus-info strong,
.trade-bonus-info b { color: #fbbf24; font-weight: 700; }

/* ========== 通用区块容器 ========== */
.trade-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 2px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.trade-section:last-child { margin-bottom: 0; }

/* ========== 合约卡片列表 ========== */
.trade-contract-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.trade-contract-card {
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-left: 3px solid #fbbf24;
  border-radius: 2px;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.trade-contract-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(251, 191, 36, 0.6);
  transform: translateX(2px);
}
.trade-contract-card.disabled {
  opacity: 0.55;
  filter: grayscale(0.5);
  border-left-color: #6b7280;
}
.trade-contract-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.trade-contract-icon {
  font-size: 22px;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}
.trade-contract-name {
  font-size: 14px;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.5px;
}
.trade-contract-info {
  flex: 1;
  margin-bottom: 10px;
}
.trade-contract-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 12px;
  color: #d1d5db;
}
.trade-contract-row span:first-child { color: #9ca3af; }
.trade-contract-row span:last-child {
  color: #e5e7eb;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}
.trade-contract-row span.profit { color: #10b981; }
.trade-contract-btn {
  width: 100%;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.15));
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fbbf24;
  padding: 9px 4px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'JetBrains Mono', monospace;
}
.trade-contract-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.35), rgba(245, 158, 11, 0.25));
  border-color: rgba(251, 191, 36, 0.9);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
  transform: translateY(-1px);
}
.trade-contract-btn:active:not(:disabled) { transform: translateY(0); }
.trade-contract-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(107, 114, 128, 0.2);
  border-color: rgba(107, 114, 128, 0.4);
  color: #9ca3af;
}

/* ========== 活跃合约列表 ========== */
.trade-active-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trade-active-empty {
  text-align: center;
  color: #6b7280;
  font-size: 12px;
  padding: 16px 8px;
  font-style: italic;
}
.trade-active-item {
  padding: 10px 12px;
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 2px;
}
.trade-active-name {
  font-size: 13px;
  font-weight: 700;
  color: #22d3ee;
  margin-bottom: 6px;
}
.trade-active-progress {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.trade-active-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #22d3ee, #67e8f9);
  background-size: 200% 100%;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
  transition: width 0.3s ease;
  animation: trade-progress-shimmer 2s linear infinite;
}
@keyframes trade-progress-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.trade-active-time {
  font-size: 11px;
  color: #9ca3af;
  text-align: right;
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
}

/* ========== 积分兑换列表 ========== */
.trade-exchange-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.trade-exchange-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(168, 85, 247, 0.06);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-left: 3px solid #a855f7;
  border-radius: 2px;
  transition: all 0.15s ease;
}
.trade-exchange-item:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.5);
}
.trade-exchange-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.trade-exchange-icon {
  font-size: 20px;
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
  flex-shrink: 0;
}
.trade-exchange-name {
  font-size: 13px;
  font-weight: 700;
  color: #c084fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trade-exchange-cost {
  font-size: 13px;
  font-weight: 700;
  color: #fbbf24;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.trade-exchange-btn {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(217, 70, 239, 0.15));
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #c084fc;
  padding: 7px 14px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.trade-exchange-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(217, 70, 239, 0.25));
  border-color: rgba(168, 85, 247, 0.9);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
  transform: translateY(-1px);
}
.trade-exchange-btn:active:not(:disabled) { transform: translateY(0); }
.trade-exchange-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(107, 114, 128, 0.2);
  border-color: rgba(107, 114, 128, 0.4);
  color: #9ca3af;
}

/* ========== 响应式：移动端适配 ========== */
@media (max-width: 600px) {
  .trade-box {
    width: 100%;
    padding: 24px 14px 18px;
    font-size: 12px;
  }
  .trade-points { font-size: 18px; }
  .trade-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .trade-stat-item { padding: 5px 4px; font-size: 10px; }
  .trade-stat-item span:last-child { font-size: 12px; }
  .trade-contract-card { padding: 10px; }
  .trade-contract-icon { font-size: 20px; }
  .trade-contract-name { font-size: 13px; }
  .trade-contract-row { font-size: 11px; }
  .trade-contract-btn { padding: 8px 4px; font-size: 12px; }
  .trade-exchange-item {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px;
  }
  .trade-exchange-btn { width: 100%; padding: 8px; }
  .trade-exchange-cost { text-align: center; }
}
