/* 竞赛速查 —— 样式
   配色以 #fa9c9c（粉）为强调色，深底衬托。 */

:root {
  --bg:        #121016;
  --surface:   #1b1922;
  --surface-2: #23202c;
  --border:    #302c3c;
  --text:      #ece9f2;
  --muted:     #9a94ab;
  --accent:    #fa9c9c;
  --accent-dim: rgba(250, 156, 156, .14);
  --ok:        #7fcf9f;
  --js:        #e8c37a;
  --bad:       #e07a7a;
  --radius:    12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Hero：粒子背景只在这一屏 ---------- */

.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

#particles-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* 底部渐变，把粒子淡出到页面底色，避免和下方列表硬切 */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 32px 20px;
  max-width: 720px;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: .22em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 18px;
  opacity: .9;
}

.hero h1 {
  font-size: clamp(30px, 6vw, 52px);
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: .02em;
}

.hero p {
  color: var(--muted);
  font-size: clamp(13px, 2.6vw, 15px);
  margin: 0;
}

.hero .scroll-hint {
  margin-top: 34px;
  font-size: 12px;
  color: var(--muted);
  opacity: .65;
  animation: nudge 2.4s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ---------- 筛选栏 ---------- */

.filters {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(18, 16, 22, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
}

.filters-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

#search {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: border-color .18s;
}
#search:focus { border-color: var(--accent); }
#search::placeholder { color: var(--muted); }

.count-badge {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.dim-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 9px;
}

.dim {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all .16s;
}
.dim:hover { color: var(--text); }
.dim.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.month-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .16s;
  font-family: inherit;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- 列表 ---------- */

.grid {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 20px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .18s, transform .18s;
}
.card:hover {
  border-color: rgba(250, 156, 156, .45);
  transform: translateY(-2px);
}

.card-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.card-idx {
  flex: 0 0 auto;
  min-width: 30px;
  height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.card-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
}

.card-note {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  padding-left: 40px;
}

.card-stages {
  padding-left: 40px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

.stage-line .stage-name { color: #d8d2e4; }
.stage-line + .stage-line { margin-top: 1px; }

/* 折叠态：除第一条外的阶段都藏起来 */
.card:not(.expanded) .stage-line.extra { display: none; }

.stage-more {
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  border-bottom: 1px dashed rgba(250, 156, 156, .45);
  margin-left: 6px;
}

.time-todo {
  padding-left: 40px;
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
}
.time-todo .todo-flag { color: var(--js); font-style: normal; }

.season-tag { color: var(--muted); opacity: .85; }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-left: 40px;
  flex-wrap: wrap;
  font-size: 12px;
}

.month-tag {
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.site-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.dot.ok  { background: var(--ok); }
.dot.js  { background: var(--js); }
.dot.bad { background: var(--bad); }

.verify {
  font-size: 11px;
  color: var(--muted);
  opacity: .8;
}

.no-site {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px 40px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}

@media (max-width: 640px) {
  .hero { min-height: 52vh; }
  .grid { grid-template-columns: 1fr; padding: 20px 14px 60px; gap: 11px; }
  .filters { padding: 12px 14px; }
  .card-foot, .card-note, .card-stages, .time-todo { padding-left: 0; }
}

/* 尊重系统"减少动态效果" */
@media (prefers-reduced-motion: reduce) {
  .hero .scroll-hint { animation: none; }
  .card { transition: none; }
}
