:root {
  --bg: #f4fff8;
  --card: rgba(255, 255, 255, 0.86);
  --text: #153d30;
  --muted: #547f70;
  --primary: #149568;
  --accent: #d6f7e7;
  --line: rgba(20, 149, 104, 0.2);
  --shadow: 0 18px 44px rgba(20, 90, 66, 0.12);
}

body.theme-red {
  --bg: #fff7f7;
  --card: rgba(255,255,255,0.92);
  --text: #4a2323;
  --muted: #a05a5a;
  --primary: #e14c4c;
  --line: rgba(225, 76, 76, 0.18);
  --shadow: 0 18px 44px rgba(225, 76, 76, 0.10);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(circle at 100% 0%, rgba(184, 238, 209, 0.42), transparent 36%),
    radial-gradient(circle at 0% 100%, rgba(255, 219, 177, 0.42), transparent 35%),
    linear-gradient(180deg, #f8fffb 0%, #edfbf3 52%, #f8fffb 100%);
}

.container {
  width: min(1100px, calc(100vw - 2.4rem));
  margin: 0 auto;
}

.page-head {
  position: sticky;
  top: 12px;
  z-index: 9;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(10, 76, 53, 0.1);
}

.brand {
  display: inline-flex;
  text-decoration: none;
  align-items: center;
  gap: 0.6rem;
  color: var(--primary-strong);
  font-weight: 800;
}

.brand-mark {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 12px;
  display: block;
  flex: 0 0 auto;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 10px 24px rgba(22, 143, 103, 0.14);
}

.head-nav {
  display: inline-flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.head-nav a {
  text-decoration: none;
  color: var(--primary-strong);
  background: var(--accent, #ffeaea);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.34rem 0.72rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.hero {
  margin-top: 1.3rem;
  padding: clamp(1.2rem, 2.8vw, 2.2rem);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(232, 252, 241, 0.9)),
    repeating-linear-gradient(
      -45deg,
      rgba(168, 234, 202, 0.12) 0,
      rgba(168, 234, 202, 0.12) 8px,
      rgba(255, 255, 255, 0.12) 8px,
      rgba(255, 255, 255, 0.12) 16px
    );
  box-shadow: var(--shadow);
}

.kicker {
  margin: 0;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--primary-strong);
  font-weight: 700;
}

h1 {
  margin: 0.55rem 0 0;
  font-size: clamp(1.45rem, 3.2vw, 2.5rem);
}

.hero p:last-child {
  margin: 0.8rem 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.section {
  margin-top: 1.2rem;
}

.section h2 {
  margin: 0;
  font-size: 1.28rem;
}

#year-list {
  position: relative;
  isolation: isolate;
  padding: 0.35rem;
  border-radius: 18px;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.86), rgba(231, 252, 243, 0.85)),
    repeating-linear-gradient(
      -45deg,
      rgba(136, 228, 187, 0.11) 0,
      rgba(136, 228, 187, 0.11) 10px,
      rgba(255, 255, 255, 0.11) 10px,
      rgba(255, 255, 255, 0.11) 20px
    );
  border: 1px solid rgba(20, 149, 104, 0.16);
  box-shadow: 0 12px 30px rgba(13, 101, 68, 0.1);
}

#year-list::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(54, 206, 145, 0.24), rgba(246, 188, 91, 0.2));
  filter: blur(14px);
  z-index: -1;
  opacity: 0.75;
}

#year-list button {
  appearance: none;
  border: 1px solid rgba(20, 149, 104, 0.16);
  background: linear-gradient(180deg, #f2fff7, #e2f8eb);
  color: var(--primary-strong);
  padding: 0.42rem 0.82rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 4px 14px rgba(20, 149, 104, 0.1);
}

#year-list button:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(17, 123, 86, 0.34);
  box-shadow: 0 9px 20px rgba(20, 120, 80, 0.18);
}

#year-list button.active {
  color: var(--primary);
  border-color: rgba(13, 102, 70, 0.38);
  background:
    linear-gradient(140deg, #cefbdf 0%, #b5f2cf 55%, #f8e7c7 100%);
  box-shadow:
    0 11px 24px rgba(20, 120, 80, 0.21),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.card {
  text-decoration: none;
  color: inherit;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: var(--card);
  box-shadow: 0 12px 28px rgba(24, 88, 66, 0.1);
  padding: 0.95rem;
  transition: transform 0.2s ease;
}

.card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(20, 149, 104, 0.15);
  margin-bottom: 0.62rem;
  background: rgba(197, 240, 218, 0.4);
}

.card:hover {
  transform: translateY(-4px);
}

.tag {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(194, 239, 216, 0.5);
  color: var(--primary-strong);
  padding: 0.2rem 0.55rem;
  font-size: 0.74rem;
}

.card h3 {
  margin: 0.58rem 0 0;
  font-size: 1rem;
  line-height: 1.4;
}

.card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  line-height: 1.62;
}

.search-panel {
  margin-top: 0.8rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  padding: 0.8rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
}

.search-panel input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(20, 149, 104, 0.23);
  background: rgba(247, 255, 250, 0.9);
  outline: none;
  padding: 0.62rem 0.8rem;
  font-size: 0.95rem;
}

.search-panel .count {
  display: grid;
  place-items: center;
  border-radius: 12px;
  padding: 0 0.8rem;
  color: var(--primary-strong);
  font-weight: 700;
  background: rgba(197, 240, 218, 0.58);
  border: 1px solid rgba(20, 149, 104, 0.22);
}

.page-foot {
  margin: 1.4rem 0 2rem;
  text-align: center;
  color: #588070;
}

@media (max-width: 960px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .page-head {
    flex-wrap: wrap;
  }

  .head-nav {
    width: 100%;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}
