/* Long Tail Risk Monitor - Clean Light Theme */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
  padding-bottom: 40px;
}

/* 页眉 */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 24px 16px;
  text-align: center;
}

.header h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 8px;
}

.gen-time {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* 归因行 */
.attribution {
  background: #e8ecf1;
  color: #666;
  font-size: 0.8rem;
  text-align: center;
  padding: 6px;
}

/* 示例横幅 */
.sample-banner {
  background: #fff3cd;
  color: #856404;
  padding: 10px 16px;
  text-align: center;
  font-size: 0.9rem;
  border-bottom: 1px solid #ffeeba;
}

.sample-banner.hidden {
  display: none;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: #666;
}

/* 筛选按钮 */
.filter-group {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: #f0f0f0;
}

.filter-btn.active {
  background: #667eea;
  color: #fff;
  border-color: #667eea;
}

/* 代币列表 */
.token-list {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
}

.token-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.token-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.token-rank {
  font-size: 0.85rem;
  color: #999;
}

.token-symbol {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
}

/* 结论徽章 */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
}

.badge.no-touch {
  background: #fee2e2;
  color: #dc2626;
}

.badge.small-watch {
  background: #fef3c7;
  color: #d97706;
}

.badge.watch {
  background: #e0e7ff;
  color: #4f46e5;
}

/* 价格信息 */
.token-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin: 10px 0;
  flex-wrap: wrap;
  gap: 8px;
}

.price-cell {
  font-size: 1.1rem;
  font-weight: bold;
}

.chg-cell {
  font-size: 0.9rem;
  min-width: 60px;
  text-align: right;
}

.chg-cell.positive {
  color: #16a34a;
}

.chg-cell.negative {
  color: #dc2626;
}

/* 详情网格 */
.token-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  font-size: 0.85rem;
  color: #555;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed #eee;
}

.detail-label {
  color: #888;
}

/* 三关口 */
.gates-row {
  background: #f8fafc;
  padding: 10px;
  border-radius: 6px;
  margin-top: 10px;
  font-size: 0.85rem;
}

.gates-title {
  color: #666;
  margin-bottom: 6px;
}

.gates-values {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.gate-item {
  color: #444;
}

/* 理由 */
.token-reason {
  margin-top: 10px;
  padding: 10px;
  background: #f9fafb;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.5;
}

/* 加载错误 */
.load-error {
  background: #fee2e2;
  color: #dc2626;
  padding: 20px;
  text-align: center;
  margin: 20px 16px;
  border-radius: 10px;
}

.load-error.hidden {
  display: none;
}

/* 方法口径 */
.methodology {
  max-width: 800px;
  margin: 24px auto 0;
  padding: 20px 16px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.methodology h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #333;
}

.method-content {
  font-size: 0.85rem;
  color: #555;
}

.method-item {
  margin-bottom: 10px;
  line-height: 1.6;
}

.method-item:last-child {
  margin-bottom: 0;
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 20px;
  color: #888;
  font-size: 0.85rem;
}

/* 响应式 */
@media (max-width: 480px) {
  .header h1 {
    font-size: 1.4rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .token-details {
    grid-template-columns: 1fr;
  }

  .filter-group {
    gap: 6px;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}

.token-name {
  color: #666;
  font-size: 0.9em;
  margin-left: 6px;
}
