:root {
  --bg: #0B1E24;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-hover: rgba(255, 255, 255, 0.13);
  --primary: #48E5C2;
  --accent: #FF6B9D;
  --text: #E2F1F0;
  --muted: #8FB3B5;
  --border: rgba(72, 229, 194, 0.18);
  --border-strong: rgba(72, 229, 194, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --font-heading: 'Noto Serif JP', 'Yu Mincho', serif;
  --font-body: 'Noto Sans JP', 'Hiragino Sans', sans-serif;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --glow: 0 0 20px rgba(72, 229, 194, 0.25);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(72, 229, 194, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 85% 15%, rgba(255, 107, 157, 0.08), transparent),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(72, 229, 194, 0.06), transparent);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary);
}

img {
  display: block;
  max-width: 100%;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

/* ===== 容器 ===== */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 头部 ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 30, 36, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
  text-shadow: 0 0 18px rgba(72, 229, 194, 0.4);
}

.logo:hover {
  color: var(--primary);
}

.logo::before {
  content: "◆";
  color: var(--primary);
  margin-right: 8px;
  font-size: 14px;
  vertical-align: middle;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 999px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav a:hover {
  color: var(--primary);
  background: var(--surface);
}

.nav a.active {
  color: var(--bg);
  background: var(--primary);
  font-weight: 600;
}

.search-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: var(--glow);
}

.search-box input {
  width: 160px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-box button {
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s ease;
}

.search-box button:hover {
  background: rgba(72, 229, 194, 0.12);
}

/* ===== 轮播 Hero ===== */
.hero {
  position: relative;
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  background-color: #0a181d;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(11, 30, 36, 0.96) 0%,
    rgba(11, 30, 36, 0.65) 40%,
    rgba(11, 30, 36, 0.15) 100%
  );
  pointer-events: none;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 3px,
    transparent 4px
  );
  pointer-events: none;
  z-index: 1;
}

.hero-info {
  position: relative;
  z-index: 2;
  padding: 36px 40px;
  max-width: 640px;
}

.hero-info h2 {
  font-size: 30px;
  margin-bottom: 10px;
  color: var(--text);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.hero-info p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 26px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 18px rgba(72, 229, 194, 0.3);
}

.btn:hover {
  color: var(--bg);
  background: #6ff0d4;
  box-shadow: 0 0 28px rgba(72, 229, 194, 0.55);
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  color: var(--primary);
  box-shadow: none;
}

.btn.ghost:hover {
  background: rgba(72, 229, 194, 0.12);
  box-shadow: var(--glow);
}

/* ===== 区块 ===== */
.sec {
  margin: 40px 0;
}

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.sec-title {
  position: relative;
  font-size: 22px;
  color: var(--text);
  padding-left: 16px;
}

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  box-shadow: 0 0 12px rgba(72, 229, 194, 0.5);
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.sec-more:hover {
  color: var(--primary);
}

.sec-more::after {
  content: " →";
}

/* ===== 网格与卡片 ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow), var(--glow);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0a181d;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-cover img {
  transform: scale(1.06);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 30, 36, 0.55), transparent 45%);
  pointer-events: none;
}

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bg);
  background: var(--primary);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(72, 229, 194, 0.5);
}

.card-info {
  padding: 10px 12px 12px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 分类列表 ===== */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.cat-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface-hover);
  box-shadow: var(--glow);
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(72, 229, 194, 0.1);
  padding: 1px 8px;
  border-radius: 999px;
}

/* ===== 排行榜 ===== */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: var(--surface);
}

.rank-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.rank-item:nth-child(1) .rank-num {
  color: var(--bg);
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 14px rgba(72, 229, 194, 0.5);
}

.rank-item:nth-child(2) .rank-num {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.rank-item:nth-child(3) .rank-num {
  color: var(--primary);
  border-color: var(--primary);
}

.rank-title {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-score {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

/* ===== 详情页 ===== */
.detail {
  margin: 32px 0;
}

.detail-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 24px rgba(72, 229, 194, 0.15);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.detail-meta h1 {
  font-size: 28px;
  color: var(--text);
  margin-bottom: 4px;
}

.detail-meta p {
  display: flex;
  gap: 6px;
}

.detail-meta p strong {
  color: var(--text);
  font-weight: 500;
  flex-shrink: 0;
}

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--bg);
  background: linear-gradient(135deg, var(--primary), #6ff0d4);
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(72, 229, 194, 0.45);
}

.detail-body {
  margin-top: 24px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}

.detail-body h2 {
  font-size: 20px;
  margin: 20px 0 12px;
  padding-left: 14px;
  border-left: 3px solid var(--primary);
}

.detail-body p {
  margin-bottom: 12px;
  color: var(--text);
}

/* ===== 标签 ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 12px;
  color: var(--primary);
  background: rgba(72, 229, 194, 0.08);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.tag:hover {
  color: var(--bg);
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--glow);
}

/* ===== 分页 ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0;
}

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.pg:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--glow);
}

.pg.current {
  color: var(--bg);
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 18px rgba(72, 229, 194, 0.5);
}

.pg.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ===== 友情链接 ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 20px 0;
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.link-item:hover {
  color: var(--primary);
}

/* ===== 页脚 ===== */
.footer {
  margin-top: 60px;
  padding: 36px 0 28px;
  border-top: 1px solid var(--border);
  background: rgba(11, 30, 36, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 2;
}

.footer a {
  color: var(--muted);
}

.footer a:hover {
  color: var(--primary);
}

/* ===== 面包屑 ===== */
.crumbs {
  padding: 16px 0;
  font-size: 13px;
  color: var(--muted);
}

.crumbs a {
  color: var(--muted);
}

.crumbs a:hover {
  color: var(--primary);
}

.crumbs span {
  margin: 0 6px;
  opacity: 0.5;
}

/* ===== 搜索高亮 ===== */
.hl {
  color: var(--bg);
  background: var(--primary);
  padding: 0 3px;
  border-radius: 3px;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(72, 229, 194, 0.5);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .detail-head {
    grid-template-columns: 200px 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .wrap {
    padding: 0 14px;
  }

  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }

  .logo {
    font-size: 18px;
  }

  .nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .nav a {
    padding: 5px 12px;
    font-size: 13px;
  }

  .search-box {
    margin-left: auto;
  }

  .search-box input {
    width: 110px;
    padding: 6px 12px;
  }

  .search-box button {
    padding: 6px 12px;
  }

  .hero {
    margin: 16px 0;
  }

  .hero-slide {
    min-height: 260px;
  }

  .hero-info {
    padding: 20px 18px;
  }

  .hero-info h2 {
    font-size: 20px;
  }

  .hero-info p {
    font-size: 13px;
    margin-bottom: 14px;
  }

  .btn {
    padding: 8px 20px;
    font-size: 13px;
  }

  .sec {
    margin: 28px 0;
  }

  .sec-title {
    font-size: 18px;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .card-info {
    padding: 8px 10px 10px;
  }

  .card-title {
    font-size: 13px;
  }

  .card-meta {
    font-size: 11px;
  }

  .cat-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .cat-item {
    padding: 10px 12px;
    font-size: 13px;
  }

  .rank-list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .rank-item {
    padding: 10px 8px;
  }

  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px;
  }

  .detail-cover {
    max-width: 200px;
    margin: 0 auto;
  }

  .detail-meta h1 {
    font-size: 20px;
  }

  .detail-score {
    font-size: 16px;
  }

  .detail-body {
    padding: 18px;
    font-size: 14px;
  }

  .detail-body h2 {
    font-size: 17px;
  }

  .pg {
    min-width: 34px;
    height: 34px;
    font-size: 13px;
  }

  .footer {
    margin-top: 40px;
    padding: 24px 0 20px;
  }
}