/* ====== 基础重置与变量 ====== */
:root {
  --primary: #6c5ce7;
  --primary-dark: #5a4bd1;
  --primary-light: #a29bfe;
  --secondary: #00cec9;
  --accent: #fd79a8;
  --bg: #0a0a1a;
  --bg-card: #141428;
  --bg-card-hover: #1c1c3a;
  --text: #e8e8f0;
  --text-muted: #8888aa;
  --border: #2a2a4a;
  --success: #00b894;
  --warning: #fdcb6e;
  --danger: #e17055;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ====== 导航栏 ====== */
.navbar {
  background: rgba(20,20,40,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon { font-size: 1.6rem; }

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  background: var(--border);
  color: var(--text);
}

/* ====== 主内容 ====== */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}

.page { display: none; }
.page.active { display: block; }
.page h2 { font-size: 1.8rem; margin-bottom: 8px; }
.page-desc { color: var(--text-muted); margin-bottom: 24px; }

/* ====== Hero ====== */
.hero {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 60px 0 40px;
}

.hero-content { flex: 1; }
.hero-content h1 { font-size: 2.8rem; line-height: 1.2; margin-bottom: 16px; }
.hero-content h1 em { color: var(--secondary); font-style: normal; }
.hero-content p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 32px; max-width: 500px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat-num { display: block; font-size: 1.8rem; font-weight: 700; color: var(--primary-light); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

.hero-actions { display: flex; gap: 12px; }

/* ====== Hero 可视化 ====== */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chain-visual {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cube {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 16px;
  animation: float 3s ease-in-out infinite;
  box-shadow: 0 0 30px rgba(108,92,231,0.3);
}

.cube:nth-child(1) { animation-delay: 0s; }
.cube:nth-child(3) { animation-delay: 1.5s; }
.cube:nth-child(5) { animation-delay: 0.8s; }

.chain-links {
  width: 40px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-light), var(--secondary));
  border-radius: 2px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ====== Features ====== */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 40px 0;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-icon { font-size: 2.4rem; margin-bottom: 12px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; }

/* ====== 按钮 ====== */
.btn {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); }

.btn-warning { background: var(--warning); color: #2d2d2d; }
.btn-warning:hover { opacity: 0.9; }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { opacity: 0.9; }

.btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: rgba(225,112,85,0.1); }

.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }

/* ====== 表单 ====== */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 600px;
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 0.9rem; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
}

textarea { resize: vertical; font-family: inherit; }

/* ====== 物品网格 ====== */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-bar input { max-width: 300px; }
.filter-bar select { max-width: 180px; }

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s;
}

.item-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.item-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
}

.item-name { font-size: 1.15rem; font-weight: 600; }

.item-badge {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.badge-available { background: rgba(0,184,148,0.15); color: var(--success); }
.badge-exchanged { background: rgba(225,112,85,0.15); color: var(--danger); }

.item-meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 8px; }
.item-meta span { margin-right: 12px; }

.item-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 12px; line-height: 1.5; }

.item-actions { display: flex; gap: 8px; }

.item-wanted {
  background: rgba(108,92,231,0.1);
  border: 1px solid rgba(108,92,231,0.2);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--primary-light);
  margin-bottom: 12px;
  display: inline-block;
}

/* ====== 交换中心 ====== */
.exchange-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.tab-btn.active, .tab-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.exchange-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.exchange-card .exchange-items {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.exchange-item {
  flex: 1;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  text-align: center;
}

.exchange-arrow { font-size: 1.5rem; color: var(--text-muted); }

.exchange-meta { color: var(--text-muted); font-size: 0.85rem; }
.exchange-actions { margin-top: 12px; display: flex; gap: 8px; }

/* ====== 区块链浏览器 ====== */
.chain-status {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.status-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-item span:first-child { font-size: 0.8rem; color: var(--text-muted); }
.status-item span:last-child { font-size: 1.3rem; font-weight: 600; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.badge-valid { background: rgba(0,184,148,0.15); color: var(--success); }
.badge-invalid { background: rgba(225,112,85,0.15); color: var(--danger); }

.blocks-list { margin-top: 24px; }

.block-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.block-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
}

.block-header:hover { background: var(--bg-card-hover); }
.block-number { font-weight: 700; color: var(--primary-light); }
.block-hash { font-family: monospace; font-size: 0.8rem; color: var(--text-muted); }

.block-body {
  padding: 0 20px 16px;
  display: none;
}

.block-body.open { display: block; }

.tx-item {
  background: var(--bg);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.tx-item .tx-label {
  color: var(--primary-light);
  font-weight: 500;
  margin-bottom: 4px;
}

.tx-item .tx-data { color: var(--text-muted); word-break: break-all; }

/* ====== 个人中心 ====== */
.profile-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.profile-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.profile-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.profile-info h3 {
  margin-bottom: 12px;
  margin-top: 20px;
}

.profile-info h3:first-child { margin-top: 0; }

/* ====== Toast ====== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 500;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success { background: var(--success); color: white; }
.toast-error { background: var(--danger); color: white; }
.toast-info { background: var(--primary); color: white; }

/* ====== 工具类 ====== */
.loading { color: var(--text-muted); text-align: center; padding: 40px; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }

/* ====== 响应式 ====== */
@media (max-width: 768px) {
  .hero { flex-direction: column; padding: 30px 0; }
  .hero-content h1 { font-size: 2rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
  .chain-status { grid-template-columns: repeat(2, 1fr); }
  .profile-card { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 0; }
  .exchange-card .exchange-items { flex-direction: column; }
  .nav-links { gap: 0; overflow-x: auto; }
  .nav-link { font-size: 0.8rem; padding: 8px 10px; white-space: nowrap; }
  .hero-visual { display: none; }
}
/* ====== 社区论坛 ====== */
.forum-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.forum-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.forum-toolbar input {
  flex: 1;
}

.forum-thread-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.forum-thread-card:hover {
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.forum-thread-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.forum-thread-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.forum-cat-badge {
  background: rgba(108,92,231,0.15);
  color: var(--primary-light);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.forum-thread-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.forum-thread-preview {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.forum-thread-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.forum-thread-detail h3 {
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.forum-thread-content {
  margin-top: 16px;
  line-height: 1.7;
  font-size: 0.95rem;
  color: var(--text);
  white-space: pre-wrap;
}

.forum-reply-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 10px;
}

.forum-reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 4px;
}

.forum-reply-content {
  line-height: 1.6;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.forum-toolbar select, .forum-toolbar input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 0.9rem;
}

.forum-toolbar select:focus, .forum-toolbar input:focus {
  outline: none;
  border-color: var(--primary);
}

#forumDetail .form-card h4 {
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .forum-toolbar { flex-direction: column; }
  .forum-thread-meta { gap: 8px; }
}

/* ====== 注册弹窗 ====== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  padding: 20px;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

/* ====== 导航栏用户状态 ====== */
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
  flex-shrink: 0;
}

.nav-user-icon {
  font-size: 1.2rem;
}

.nav-user-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .nav-user { margin-left: 0; }
}

/* ====== 平台规则页面 ====== */
.rules-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.rules-section h3 {
  margin-bottom: 12px;
  font-size: 1.1rem;
  color: var(--primary-light);
}

.rules-section p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.9rem;
}

.rules-section ol {
  padding-left: 20px;
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.9rem;
}

.rules-section ol li {
  margin-bottom: 4px;
}

.rules-footer {
  text-align: center;
  padding: 20px;
}

/* ====== 底部导航 ====== */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 20px 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--primary-light);
}

.footer-sep {
  color: var(--border);
  font-size: 0.85rem;
}

/* ====== 操作记录 ====== */
.log-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.log-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}

.log-toolbar select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 0.9rem;
}

.log-toolbar select:focus {
  outline: none;
  border-color: var(--primary);
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log-entry {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: background 0.2s;
}

.log-entry:hover {
  background: var(--bg-card-hover);
}

.log-icon {
  font-size: 1.3rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 8px;
  flex-shrink: 0;
}

.log-body {
  flex: 1;
  min-width: 0;
}

.log-type {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.log-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.log-meta {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.log-footer {
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

@media (max-width: 768px) {
  .log-stats { grid-template-columns: repeat(2, 1fr); }
  .log-toolbar { flex-direction: column; }
}

/* ====== 登录提示 ====== */
.login-prompt {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.login-prompt-content {
  text-align: center;
  padding: 40px;
}

.login-prompt-content h3 {
  margin: 12px 0 8px;
  font-size: 1.3rem;
}

.login-prompt-content p {
  margin-bottom: 20px;
}


/* ====== 物品图片展示 ====== */
.item-images {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.item-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid var(--border);
}
.item-thumb:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.image-viewer-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.image-viewer-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.image-viewer-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.image-preview-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.preview-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.preview-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.preview-name {
  font-size: 0.7rem;
  color: var(--text-muted);
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-item-images {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.profile-item-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}
input[type="file"] {
  padding: 8px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}
input[type="file"]:hover {
  border-color: var(--primary);
}

/* ====== 物品详情弹窗 ====== */
.detail-images {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.detail-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s;
  border: 1px solid var(--border);
}

.detail-image:hover {
  transform: scale(1.05);
}

.detail-info {
  margin-bottom: 16px;
}

.detail-meta {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.detail-owner {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.detail-desc {
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
}

.detail-wanted {
  font-size: 0.85rem;
  color: var(--primary-light);
  margin: 8px 0;
}

.detail-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.detail-section {
  background: var(--bg);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.section-title {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.history-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.history-item:last-child {
  border-bottom: none;
}

.history-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.history-type {
  font-weight: 500;
}

.history-time {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.history-data {
  color: var(--text-muted);
  margin-bottom: 2px;
}

.history-block {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Leaderboard */
#leaderboardList table { font-size: 0.9rem; }
#leaderboardList th { background: var(--bg-card); position: sticky; top: 0; }

/* ====== Exchange Timeline ====== */
.ex-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.ex-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.ex-detail-items {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.ex-item-info {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ex-item-name { font-weight: 600; font-size: 0.9rem; }
.ex-arrow { color: var(--text-muted); font-size: 1.1rem; }
.ex-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.stage-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px 0;
  position: relative;
}
.stage-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  position: relative;
  padding: 4px 0;
}
.stage-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  background: var(--bg);
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.stage-dot.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}
.stage-dot.done {
  border-color: var(--success);
  background: var(--success);
  color: white;
}
.stage-content { flex: 1; min-width: 0; }
.stage-title { font-size: 0.85rem; font-weight: 500; }
.stage-time { font-size: 0.75rem; color: var(--text-muted); }
.stage-line {
  width: 2px;
  height: 16px;
  background: var(--border);
  margin-left: 15px;
}
.stage-line.done { background: var(--success); }
.meetup-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0;
}
.meetup-row {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  padding: 3px 0;
}
.meetup-label { color: var(--text-muted); min-width: 50px; }
.city-tag {
  display: inline-block;
  background: rgba(108,92,231,0.15);
  color: var(--primary-light);
  font-size: 0.75rem;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.status-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}
.status-pending { background: rgba(253,203,110,0.15); color: var(--warning); }
.status-accepted { background: rgba(0,206,201,0.15); color: var(--secondary); }
.status-done { background: rgba(0,184,148,0.15); color: var(--success); }
.status-cancelled { background: rgba(225,112,85,0.15); color: var(--danger); }
.text-center { text-align: center; }

/* ====== Exchange Tabs ====== */
.tab-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.tab-btn:hover:not(.active) {
  background: var(--bg-card-hover);
}

/* ====== Item Exchange Button ====== */
.item-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}
