:root {
  --bg: #0a0a16;
  --bg2: #12122a;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #f2f3ff;
  --muted: #9aa0c7;
  --neon: #7c5cff;
  --neon2: #ff5ca8;
  --neon3: #2ce8d5;
  --gold: #ffd166;
  --radius: 18px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 背景流动光斑 */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
  animation: float 18s ease-in-out infinite;
}
.blob.a { width: 420px; height: 420px; background: var(--neon); top: -120px; left: -80px; }
.blob.b { width: 380px; height: 380px; background: var(--neon2); bottom: -120px; right: -60px; animation-delay: -6s; }
.blob.c { width: 320px; height: 320px; background: var(--neon3); top: 40%; left: 55%; animation-delay: -12s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 30px) scale(0.95); }
}

.wrap { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 18px 80px; }

/* 顶部 */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 4px; position: relative; z-index: 2;
}
.logo { font-size: 22px; font-weight: 800; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px; }
.logo .star { background: linear-gradient(135deg, var(--neon), var(--neon2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
header a.back { color: var(--muted); text-decoration: none; font-size: 14px; border: 1px solid var(--card-border); padding: 7px 14px; border-radius: 999px; transition: 0.2s; }
header a.back:hover { color: var(--text); border-color: var(--neon); }

/* 英雄区 */
.hero { text-align: center; padding: 38px 10px 26px; }
.hero h1 {
  font-size: clamp(30px, 6vw, 56px); font-weight: 900; line-height: 1.1;
  background: linear-gradient(120deg, #fff, var(--neon3), var(--neon2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(124, 92, 255, 0.25);
}
.hero p { color: var(--muted); margin-top: 14px; font-size: clamp(14px, 2.4vw, 18px); }
.hero .count { color: var(--gold); font-weight: 800; }

/* 搜索 */
.search {
  margin: 26px auto 0; max-width: 620px; display: flex; gap: 10px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 999px;
  padding: 8px 8px 8px 20px; backdrop-filter: blur(10px);
}
.search input {
  flex: 1; background: transparent; border: none; outline: none; color: var(--text);
  font-size: 16px;
}
.search input::placeholder { color: var(--muted); }
.search button {
  border: none; border-radius: 999px; padding: 11px 22px; font-size: 15px; font-weight: 700;
  color: #fff; cursor: pointer; background: linear-gradient(135deg, var(--neon), var(--neon2));
  transition: 0.2s; white-space: nowrap;
}
.search button:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(124, 92, 255, 0.4); }

/* 快捷按钮 */
.quick { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.quick button {
  border: 1px solid var(--card-border); background: var(--card); color: var(--text);
  padding: 12px 20px; border-radius: 14px; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: 0.2s; backdrop-filter: blur(10px);
}
.quick button:hover { border-color: var(--neon3); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(44, 232, 213, 0.25); }
.quick .dice { background: linear-gradient(135deg, var(--neon3), var(--neon)); color: #07121a; border: none; }

/* 分类胶囊 */
.chips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }
.chip {
  border: 1px solid var(--card-border); background: rgba(255,255,255,0.04); color: var(--muted);
  padding: 8px 16px; border-radius: 999px; font-size: 14px; cursor: pointer; transition: 0.2s;
}
.chip:hover { color: var(--text); }
.chip.active { color: #fff; background: linear-gradient(135deg, var(--neon), var(--neon2)); border-color: transparent; font-weight: 700; }
.chip b { color: var(--gold); margin-left: 6px; font-weight: 800; }

/* 区块标题 */
.section-title { display: flex; align-items: center; gap: 10px; margin: 46px 4px 18px; font-size: 22px; font-weight: 800; }
.section-title .bar { width: 5px; height: 24px; border-radius: 3px; background: linear-gradient(var(--neon), var(--neon2)); }
.section-title small { color: var(--muted); font-weight: 500; font-size: 14px; }

/* 网格 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: 0.22s; position: relative; backdrop-filter: blur(8px);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); border-color: var(--neon); box-shadow: 0 14px 36px rgba(124, 92, 255, 0.3); }
.thumb { aspect-ratio: 16/10; width: 100%; object-fit: cover; background: linear-gradient(135deg, #2a2a55, #4a2a55); display: block; }
.thumb.fallback { display: flex; align-items: center; justify-content: center; font-size: 42px; }
.card .emoji {
  position: absolute; top: 8px; left: 8px; font-size: 22px;
  background: rgba(0,0,0,0.45); border-radius: 10px; padding: 4px 8px; backdrop-filter: blur(4px);
}
.card .body { padding: 10px 12px 12px; }
.card .title { font-size: 14px; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 7px; }
.card .meta .plays { color: var(--neon3); }
.card .meta .rate { color: var(--gold); }
.card .cat-tag {
  display: inline-block; margin-top: 8px; font-size: 11px; color: var(--muted);
  border: 1px solid var(--card-border); border-radius: 999px; padding: 2px 9px;
}

/* 排序条 */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 4px 0; }
.toolbar .info { color: var(--muted); font-size: 14px; }
.toolbar select {
  background: var(--card); color: var(--text); border: 1px solid var(--card-border);
  border-radius: 10px; padding: 8px 12px; font-size: 14px; outline: none;
}

.sentinel { height: 1px; }
.more { text-align: center; color: var(--muted); padding: 24px; font-size: 14px; }

/* 加载屏 */
.loader {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  transition: opacity 0.5s;
}
.loader.hide { opacity: 0; pointer-events: none; }
.loader .ring {
  width: 64px; height: 64px; border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.1); border-top-color: var(--neon);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader .lt { font-size: 16px; color: var(--muted); }
.loader .lt b { color: var(--gold); }

footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 50px; position: relative; z-index: 1; }
footer a { color: var(--neon3); text-decoration: none; }

.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, var(--neon), var(--neon2)); color: #fff;
  padding: 13px 22px; border-radius: 14px; font-weight: 700; z-index: 60;
  opacity: 0; transition: 0.3s; box-shadow: 0 10px 30px rgba(124,92,255,0.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* AI 推荐官 */
.airec { margin: 30px auto 0; max-width: 720px; }
.airec-box {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, rgba(124,92,255,0.14), rgba(44,232,213,0.10));
  border: 1px solid var(--neon); border-radius: 999px;
  padding: 8px 8px 8px 18px; backdrop-filter: blur(10px);
  box-shadow: 0 0 30px rgba(124,92,255,0.25);
}
.airec-ic { font-size: 24px; filter: drop-shadow(0 0 8px var(--neon3)); }
.airec-box input {
  flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-size: 16px;
}
.airec-box input::placeholder { color: var(--muted); }
.airec-box button {
  border: none; border-radius: 999px; padding: 12px 24px; font-size: 15px; font-weight: 800; color: #07121a;
  cursor: pointer; background: linear-gradient(135deg, var(--neon3), var(--neon)); transition: 0.2s; white-space: nowrap;
}
.airec-box button:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(44,232,213,0.45); }
.airec-tip { color: var(--muted); font-size: 13px; margin-top: 10px; text-align: center; }

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .search { flex-wrap: nowrap; }
}
