﻿/* ══ 量化军火库 · 清爽金融风 v3 ══ */
*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
:root {
  --bg:        #f5f6f8;
  --bg2:       #ffffff;
  --bg3:       #f0f2f5;
  --bg4:       #e8eaed;
  --border:    #e2e5ea;
  --border2:   #d0d4db;
  --gold:      #e6a817;
  --gold-l:    #fef3d0;
  --gold-d:    #c48a0a;
  --green:     #16a34a;
  --green-l:   #dcfce7;
  --red:       #dc2626;
  --red-l:     #fee2e2;
  --blue:      #2563eb;
  --blue-l:    #dbeafe;
  --text:      #111827;
  --text2:     #374151;
  --text3:     #6b7280;
  --text4:     #9ca3af;
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --radius:    12px;
  --radius-sm: 8px;
  --radius-xs: 5px;
}
html {
  font-family: 'PingFang SC', 'Microsoft YaHei', ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5; -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
body { background: var(--bg); color: var(--text); font-size: 14px; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; background: none; border: none; outline: none; padding: 0; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; outline: none; }
h1,h2,h3,h4,h5,h6 { font-size: inherit; font-weight: inherit; margin: 0; }

/* ══ App Shell ══ */
#app-root {
  max-width: 1280px; min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  display: flex; flex-direction: column;
}

/* ══ TOP BAR ══ */
.top-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky; top: 0; z-index: 300;
  box-shadow: var(--shadow);
}
.top-bar-left { display: flex; align-items: center; gap: 6px; }
.top-bar-right { display: flex; align-items: center; gap: 8px; }

/* Logo */
.site-logo-wrap {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 800;
  color: var(--text);
  letter-spacing: -.3px;
  margin-right: 24px;
}
.logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold) 0%, #f59e0b 100%);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(230,168,23,.35);
}
.site-name { color: var(--text); }
.site-name em { color: var(--gold-d); font-style: normal; }

/* 顶部导航 */
.top-nav {
  display: flex; align-items: center; gap: 2px;
}
.top-nav a {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  color: var(--text3);
  transition: all .15s;
  white-space: nowrap;
}
.top-nav a:hover { color: var(--text); background: var(--bg3); }
.top-nav a.active { color: var(--gold-d); font-weight: 700; background: var(--gold-l); }

/* 上架按钮 */
.btn-list-ea {
  display: flex; align-items: center; gap: 5px;
  background: var(--gold);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700;
  transition: background .15s;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(230,168,23,.3);
}
.btn-list-ea:hover { background: var(--gold-d); }

/* 搜索按钮 */
.btn-search {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); font-size: 16px;
  transition: all .15s;
  border: 1px solid var(--border);
  background: var(--bg3);
}
.btn-search:hover { background: var(--bg4); color: var(--text); border-color: var(--border2); }

/* ══ 筛选 Tab 栏 ══ */
.filter-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex; align-items: center; gap: 0;
  overflow-x: auto; scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

.f-tab {
  flex-shrink: 0;
  padding: 14px 18px;
  font-size: 13px; font-weight: 500;
  color: var(--text3);
  border-bottom: 2px solid transparent;
  cursor: pointer; transition: all .15s;
  white-space: nowrap;
  background: none; border-top: none; border-left: none; border-right: none;
}
.f-tab:hover { color: var(--text); }
.f-tab.active { color: var(--gold-d); border-bottom-color: var(--gold); font-weight: 700; }

.f-sep { width: 1px; height: 18px; background: var(--border); margin: 0 8px; flex-shrink: 0; }

/* ══ 卡片网格布局 (区别于原站列表) ══ */
.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg);
}

.s-card {
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.s-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--gold);
}

/* 缩略图 */
.s-card-thumb {
  width: 100%; aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg3);
  position: relative; flex-shrink: 0;
}
.s-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform .3s;
}
.s-card:hover .s-card-thumb img { transform: scale(1.04); }
.s-card-thumb-ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; background: var(--bg3);
}
.s-card-badge {
  position: absolute; top: 8px; left: 8px;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px;
  background: var(--blue); color: #fff;
  letter-spacing: .3px;
}
.s-card-badge.mt5 { background: #059669; }

/* 收益率角标 */
.s-card-yield-badge {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(22,163,74,.9);
  color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px;
}

/* 卡片内容 */
.s-card-body {
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.s-card-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.s-card-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text3); flex-wrap: wrap;
}
.s-card-meta .price-free {
  color: var(--green); font-weight: 700;
  background: var(--green-l); padding: 2px 8px; border-radius: 4px;
}
.s-card-meta .price-paid {
  color: var(--red); font-weight: 700;
  background: var(--red-l); padding: 2px 8px; border-radius: 4px;
}
.s-meta-item { display: flex; align-items: center; gap: 3px; }

/* 底部数据行 */
.s-card-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  margin: 0 -16px -14px;
  padding: 10px 16px;
  background: var(--bg3);
}
.s-stat-item { text-align: center; }
.s-stat-yield {
  font-size: 15px; font-weight: 800;
  color: var(--green); line-height: 1.2;
}
.s-stat-yield.neg { color: var(--red); }
.s-stat-label { font-size: 10px; color: var(--text4); margin-top: 2px; }
.s-stat-winrate { font-size: 13px; font-weight: 700; color: var(--blue); line-height: 1.2; }
.s-stat-dl { font-size: 13px; font-weight: 600; color: var(--text3); line-height: 1.2; }

/* ══ 页面内容 ══ */
.page-content { flex: 1; }

/* ══ CTA Banner ══ */
.cta-banner {
  margin: 0 24px 24px;
  background: linear-gradient(135deg, #fffbeb 0%, #f0fdf4 100%);
  border: 1px solid rgba(230,168,23,.35);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow);
}
.cta-banner .cta-icon { font-size: 36px; margin-bottom: 10px; }
.cta-banner h3 { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.cta-banner p  { font-size: 13px; color: var(--text3); margin-bottom: 18px; }
.cta-btn {
  display: inline-block;
  background: var(--gold); color: #fff;
  padding: 10px 32px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700;
  transition: background .15s;
  box-shadow: 0 2px 8px rgba(230,168,23,.3);
}
.cta-btn:hover { background: var(--gold-d); }

/* ══ Section ══ */
.section { padding: 24px; border-bottom: 1px solid var(--border); background: var(--bg2); }
.section-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.section-title::before {
  content: '';
  display: inline-block; width: 3px; height: 16px;
  background: var(--gold); border-radius: 2px;
}

/* ══ Form ══ */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.form-label .req { color: var(--red); margin-left: 2px; }
.form-input, .form-textarea, .form-select {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  padding: 10px 14px; font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(230,168,23,.15);
  background: var(--bg2);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--text4); margin-top: 4px; }
.btn-primary {
  width: 100%; background: var(--gold); color: #fff;
  border: none; border-radius: var(--radius-sm); padding: 12px;
  font-size: 15px; font-weight: 700; transition: background .15s;
  box-shadow: 0 2px 8px rgba(230,168,23,.3);
}
.btn-primary:hover { background: var(--gold-d); }

/* ══ Tags ══ */
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.tag-mt4 { background: var(--blue-l); color: var(--blue); }
.tag-mt5 { background: #d1fae5; color: #059669; }

/* ══ 底部导航 (手机) ══ */
.bottom-nav {
  display: none;
  position: sticky; bottom: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  z-index: 200;
  box-shadow: 0 -2px 8px rgba(0,0,0,.06);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 8px 4px 10px; gap: 3px;
  color: var(--text3); font-size: 11px; transition: color .15s;
}
.bottom-nav a.active { color: var(--gold-d); }
.bottom-nav a .nav-icon { font-size: 20px; line-height: 1; }

/* ══ 响应式 ══ */
@media (max-width: 767px) {
  body { background: var(--bg); }
  #app-root { max-width: 100%; }

  .top-bar {
    padding: 0 14px; height: 56px;
    justify-content: center;
  }
  .top-bar-left { justify-content: center; }
  .top-bar-right { display: none; }
  .top-nav { display: none; }
  .btn-list-ea { display: none; }
  .site-logo-wrap { margin-right: 0; }
  .f-tab { padding: 11px 12px; font-size: 12px; }

  .card-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px; padding: 12px;
  }
  .s-card-body { padding: 10px 12px; gap: 7px; }
  .s-card-title { font-size: 13px; }
  .s-card-stats { margin: 0 -12px -10px; padding: 8px 12px; }
  .s-stat-yield { font-size: 13px; }

  .bottom-nav { display: flex; }
  .cta-banner { margin: 0 12px 16px; padding: 22px 16px; }
  .section { padding: 16px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  #app-root { max-width: 100%; }
  .card-list { grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 16px; }
}

@media (min-width: 1024px) {
  .card-list { grid-template-columns: repeat(4, 1fr); }
}
