/* ===== 无畏契约昵称册 · 浅色 VALORANT 官网风 ===== */

@import url("https://fonts.googleapis.com/css2?family=Tektur:wght@500;700;900&display=swap");

:root {
  --bg: #fffbf5;
  --bg-raise: #f5efe4;
  --card: #ffffff;
  --line: #e8e0d2;
  --ink: #0f1923;
  --accent: #ff4655;
  --accent-soft: rgba(255, 70, 85, 0.12);
  --muted: #8a8172;
  --radius: 4px;
  --cut: 12px;
}

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

html { scrollbar-color: #d8d0c0 var(--bg); }

body {
  background:
    radial-gradient(1100px 460px at 50% -180px, rgba(255, 70, 85, 0.10), transparent 70%),
    radial-gradient(760px 380px at 88% 108%, rgba(15, 25, 35, 0.06), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* 背景斜纹肌理 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    115deg,
    transparent 0 90px,
    rgba(15, 25, 35, 0.028) 90px 92px
  );
  pointer-events: none;
  z-index: 0;
}

header, .toolbar, main, .footer, .empty { position: relative; z-index: 1; }

/* ===== Hero ===== */
.hero {
  padding: 72px 24px 12px;
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-family: "Tektur", monospace;
  font-size: 12px;
  letter-spacing: 6px;
  text-transform: uppercase;
}
.hero-tag::before, .hero-tag::after {
  content: "";
  width: 36px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent));
}
.hero-tag::after { background: linear-gradient(90deg, var(--accent), transparent); }

.hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 900;
  letter-spacing: 6px;
  line-height: 1.1;
  color: var(--ink);
}
.hero h1 .accent {
  color: var(--accent);
  text-shadow: 0 3px 0 rgba(15, 25, 35, 0.08);
}

/* ===== 工具栏 ===== */
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 720px;
  margin: 34px auto 36px;
  padding: 0 24px;
  width: 100%;
}

#search {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 14px 18px 14px 44px;
  font-size: 15px;
  outline: none;
  box-shadow: 0 2px 10px rgba(15, 25, 35, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a89f8f' viewBox='0 0 16 16'><path d='M11.74 10.33a7 7 0 1 0-1.41 1.41l3.38 3.38a1 1 0 0 0 1.41-1.41zM3 7a4 4 0 1 1 8 0 4 4 0 0 1-8 0'/></svg>");
  background-repeat: no-repeat;
  background-position: 16px center;
}
#search::placeholder { color: #b0a894; }
#search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 4px 16px rgba(255, 70, 85, 0.10);
}

.count {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.count b { color: var(--accent); }

/* ===== 分组 ===== */
#sections { max-width: 1120px; margin: 0 auto; padding: 0 24px; width: 100%; }

.group { scroll-margin-top: 16px; }

.group-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 34px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.group-title span {
  font-family: "Tektur", monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.group-title span::after { content: ""; margin-left: 10px; }
.group-title i {
  font-style: normal;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 10px;
  font-variant-numeric: tabular-nums;
}

/* ===== 右侧字母快捷导航 ===== */
.rail {
  position: fixed;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 5;
  padding: 8px 4px;
  background: rgba(255, 251, 245, 0.9);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(15, 25, 35, 0.08);
}
.rail a {
  font-family: "Tektur", monospace;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
  padding: 1px 4px;
  transition: color 0.15s, background 0.15s;
}
.rail a:hover { color: #fff; background: var(--accent); }

@media (max-width: 900px) {
  .rail { display: none; }
}

/* ===== 卡片网格 ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  padding-bottom: 8px;
}

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 25, 35, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  animation: rise 0.4s ease backwards;
}
/* 左上斜切角 + 右下红条,VALORANT 风格 */
.card::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  border-style: solid;
  border-width: 0 var(--cut) var(--cut) 0;
  border-color: transparent var(--bg) transparent transparent;
  transition: border-color 0.18s ease;
}
.card::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 70, 85, 0.55);
  box-shadow: 0 12px 28px rgba(15, 25, 35, 0.14), 0 0 0 1px rgba(255, 70, 85, 0.2);
}
.card:hover::before { border-top-color: var(--accent); }
.card:hover::after { transform: scaleX(1); }
.card:active { transform: scale(0.97); }

.idx {
  position: absolute;
  top: 10px; right: 16px;
  font-family: "Tektur", monospace;
  font-size: 12px;
  color: #d8d0c0;
  transition: color 0.18s;
}
.card:hover .idx { color: rgba(255, 70, 85, 0.75); }

.nick {
  font-size: 16px;
  font-weight: 600;
  word-break: break-all;
  padding-right: 40px;
  line-height: 1.45;
}

.tag-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tag {
  font-size: 13px;
  color: var(--accent);
  font-family: ui-monospace, Menlo, monospace;
  letter-spacing: 1px;
}
.notag { color: #b0a894; font-size: 12px; }

.date {
  margin-left: auto;
  font-size: 10px;
  color: #c9c1b1;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.18s;
}
.card:hover .date { opacity: 0; }

.copy-hint {
  font-size: 11px;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s, transform 0.18s, color 0.18s;
  white-space: nowrap;
}
.card:hover .copy-hint { opacity: 1; transform: translateX(0); color: var(--accent); }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ===== 空态 / 页脚 ===== */
.empty { text-align: center; color: var(--muted); padding: 48px 24px; letter-spacing: 1px; }
.hidden { display: none; }

.footer {
  margin-top: auto;
  padding: 24px;
  color: #b0a894;
  font-size: 12px;
  letter-spacing: 1px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  border-top: 1px solid var(--line);
}
.footer .brand { font-family: "Tektur", monospace; color: var(--muted); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(24px) skewX(-6deg);
  background: var(--accent);
  color: #fff;
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 8px 30px rgba(255, 70, 85, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 10;
  max-width: 90vw;
  word-break: break-all;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) skewX(-6deg); }

.grid.replay .card { animation-delay: calc(var(--i, 0) * 18ms); }

/* 底部留白 */
#sections { padding-bottom: 48px; }

@media (max-width: 640px) {
  .hero { padding-top: 48px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .nick { font-size: 14px; }
}
