* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: radial-gradient(circle at 50% 0%, #241d14 0%, #12100d 55%, #0b0a08 100%);
  color: #ede6d8;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 28px 14px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand img { width: 52px; height: 52px; display: block; }
.brand h1 {
  font-size: 26px;
  letter-spacing: 6px;
  color: #ffd98a;
}
.brand p {
  margin-top: 3px;
  font-family: Consolas, monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: #8d8271;
}

nav { display: flex; gap: 10px; }
nav a {
  font-family: Consolas, monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: #e8dfcd;
  background: rgba(28, 23, 18, 0.9);
  border: 1px solid #4a3f31;
  border-radius: 999px;
  padding: 8px 18px;
  text-decoration: none;
}
nav a:hover { border-color: #c6802c; color: #ffd98a; }

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 6px 28px 26px;
}

.lead {
  font-size: 13.5px;
  line-height: 1.8;
  color: #9b9284;
  margin: 4px 0 22px;
}

.progress {
  margin: -10px 0 20px;
  font-family: Consolas, monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: #8d8271;
}
.progress b { color: #ffd98a; font-weight: 700; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 20px;
}

.card {
  display: block;
  background: #1b1712;
  border: 2px solid #3d3428;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: #c6802c;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .45);
}

.thumb {
  position: relative;
  aspect-ratio: 450 / 280;
  background: #0e0c0a;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .38s ease;
}
.card:not(.locked):hover .thumb img { transform: scale(1.045); }
.card:not(.locked):active { transform: translateY(-1px); }
.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 8, 6, 0) 55%, rgba(10, 8, 6, .7) 100%);
}

.stageNo {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-family: Consolas, monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: #2b2724;
  background: #ffd34e;
  border: 2px solid #2b2724;
  border-radius: 999px;
  padding: 3px 12px;
  box-shadow: 0 3px 0 rgba(43, 39, 36, .8);
}

.diff {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: 13px;
  letter-spacing: 2px;
  color: #ffd34e;
  text-shadow: 0 1px 3px #000;
}

.info { padding: 14px 16px 16px; }
.info h2 {
  font-size: 19px;
  letter-spacing: 2px;
  color: #ffe9b8;
}
.mechanic {
  display: inline-block;
  margin: 8px 0 8px;
  font-size: 11px;
  letter-spacing: 1px;
  color: #8fe4ff;
  border: 1px solid rgba(143, 228, 255, .35);
  border-radius: 999px;
  padding: 2px 10px;
}
.info p {
  font-size: 12.5px;
  line-height: 1.75;
  color: #9b9284;
  min-height: 44px;
}

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #3a332a;
  font-family: Consolas, monospace;
  font-size: 11.5px;
  color: #b7ac9a;
}
.meta .go {
  color: #ffd34e;
  letter-spacing: 1px;
  transition: letter-spacing .2s ease;
}
.card:not(.locked):hover .meta .go { letter-spacing: 2.5px; }

/* ===== 存档 / 最佳星级 ===== */
.record {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: #b7ac9a;
}
.record .rlabel {
  font-family: Consolas, monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: #8d8271;
}
.record .rstars {
  font-size: 13px;
  letter-spacing: 2px;
  color: #ffd34e;
}
.record .rstars.empty { color: #5b5347; }
.record .rstate {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: .5px;
  color: #b7ac9a;
  border: 1px solid #4a3f31;
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}
.record .rstate.done {
  color: #c9f58a;
  border-color: rgba(201, 245, 138, .4);
}

.clearTag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  font-family: Consolas, monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: #c9f58a;
  background: rgba(20, 28, 16, .8);
  border: 1px solid rgba(201, 245, 138, .42);
  border-radius: 999px;
  padding: 3px 10px;
}

/* ===== 锁定关卡 ===== */
.card.locked {
  cursor: not-allowed;
  border-color: #2e2820;
  background: #16130f;
}
.card.locked:hover {
  transform: none;
  border-color: #2e2820;
  box-shadow: none;
}
.card.locked .thumb img { filter: grayscale(1) brightness(.42); }
.card.locked .info h2 { color: #9b9284; }
.card.locked .info p { color: #6f675b; }
.card.locked .diff { opacity: .3; }
.card.locked .meta,
.card.locked .record { opacity: .65; }
.card.locked .meta .go { color: #8d8271; }

.lockTag {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(10, 8, 7, .52);
  color: #ffd98a;
  font-size: 13px;
  letter-spacing: 3px;
}
.lockTag svg { width: 30px; height: 30px; }

footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 28px 30px;
  font-family: Consolas, monospace;
  font-size: 11px;
  letter-spacing: .5px;
  color: #6f675b;
}
