* {
  box-sizing: border-box;
}

:root {
  --主色: #23374d;
  --次色: #6b8db3;
  --底色: #f5f1e8;
  --卡片: #ffffff;
  --線條: rgba(35, 55, 77, 0.1);
  --文字: #243447;
}

body {
  margin: 0;
  font-family: "Microsoft JhengHei", sans-serif;
  color: var(--文字);
  background:
    radial-gradient(circle at top left, rgba(255, 190, 93, 0.38), transparent 26%),
    radial-gradient(circle at top right, rgba(72, 142, 232, 0.32), transparent 22%),
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.48), transparent 20%),
    linear-gradient(180deg, #fff6e8 0%, #f7edd9 42%, #efe1c4 100%);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 20px 48px;
  background:
    linear-gradient(135deg, rgba(24, 40, 68, 0.96), rgba(77, 107, 150, 0.92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cdefs%3E%3Cpattern id='p' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Cpath d='M8 16h18l4 4h22v24H8z' fill='none' stroke='rgba(255,255,255,0.18)' stroke-width='2'/%3E%3Cpath d='M18 22h10M18 30h18M18 38h14' stroke='rgba(255,255,255,0.18)' stroke-width='2'/%3E%3Ccircle cx='48' cy='42' r='4' fill='rgba(255,255,255,0.18)'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='180' height='180' fill='url(%23p)'/%3E%3C/svg%3E");
  color: #fff;
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 25%, rgba(255, 224, 160, 0.28), transparent 18%),
    radial-gradient(circle at 84% 20%, rgba(191, 221, 255, 0.22), transparent 22%),
    radial-gradient(circle at 72% 76%, rgba(255, 255, 255, 0.12), transparent 20%);
  pointer-events: none;
}

.hero__art {
  position: absolute;
  display: flex;
  gap: 14px;
  flex-direction: column;
  font-size: 42px;
  opacity: 0.95;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.hero__art span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero__art--left {
  left: 26px;
  top: 24px;
}

.hero__art--right {
  right: 26px;
  bottom: 24px;
  transform: rotate(-6deg);
}

.hero__content,
.main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero__logo {
  display: block;
  width: min(150px, 42vw);
  height: auto;
  margin-bottom: 18px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.18));
}

.hero__tag {
  display: inline-block;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  letter-spacing: 0.08em;
  font-size: 14px;
}

.hero h1 {
  margin: 16px 0 12px;
  display: grid;
  gap: 8px;
}

.hero__title {
  position: relative;
  width: fit-content;
  padding-right: 84px;
  cursor: default;
}

.hero__title::after {
  content: "📖";
  position: absolute;
  top: 6px;
  right: 0;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateX(-8px) scale(0.92) rotate(-10deg);
  transition: 0.25s ease;
}

.hero__title:hover::after {
  opacity: 1;
  transform: translateX(0) scale(1) rotate(0);
}

.hero__title-line {
  display: block;
  line-height: 1.06;
}

.hero__title-line--small {
  font-size: clamp(18px, 2.2vw, 26px);
  letter-spacing: 0.22em;
  color: #ffe2a4;
}

.hero__title-line--main {
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  font-family: "DFKai-SB", "BiauKai", "KaiTi", "標楷體", serif;
}

.hero__title-line--accent {
  font-size: clamp(16px, 2vw, 22px);
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.08em;
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}

.hero__title-line--small {
  font-family: "DFKai-SB", "BiauKai", "KaiTi", "標楷體", serif;
  font-weight: 700;
}

.hero__text {
  max-width: 760px;
  margin: 0;
  font-size: 18px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.9);
}

.main {
  padding: 28px 0 60px;
}

.panel {
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid var(--線條);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(35, 55, 77, 0.08);
}

.form-panel {
  margin-bottom: 24px;
}

.panel__head p {
  margin: 0 0 18px;
  color: #5a6a7b;
  line-height: 1.7;
}

.filters-group {
  display: grid;
  gap: 18px;
}

.filters-block h3 {
  margin: 0 0 10px;
  font-size: 17px;
  color: var(--主色);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.book-form {
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field span {
  font-weight: 700;
  color: var(--主色);
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid rgba(35, 55, 77, 0.16);
  border-radius: 18px;
  padding: 14px 16px;
  font: inherit;
  color: var(--文字);
  background: linear-gradient(180deg, #fff, #f7fbff);
  outline: none;
  transition: 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #5c84c2;
  box-shadow: 0 0 0 4px rgba(92, 132, 194, 0.14);
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.form-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  background: linear-gradient(180deg, #24415f, #182c42);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(24, 44, 66, 0.18);
}

.form-btn:hover {
  transform: translateY(-1px);
}

.filter-btn {
  border: 1px solid rgba(35, 55, 77, 0.12);
  padding: 11px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, #f4f8ff);
  color: #395066;
  cursor: pointer;
  font-size: 15px;
  transition: 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(180deg, #24415f, #182c42);
  color: #fff;
  border-color: var(--主色);
  transform: translateY(-1px);
}

.book-list {
  display: grid;
  gap: 22px;
}

.book-item {
  display: grid;
  grid-template-columns: 240px 1fr;
  overflow: hidden;
  border: 1px solid var(--線條);
  border-radius: 26px;
  background: var(--卡片);
  box-shadow: 0 16px 34px rgba(35, 55, 77, 0.08);
}

.book-item__cover {
  min-height: 210px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  position: relative;
}

.book-item__cover::after,
.book-item__cover::before {
  content: "";
  position: absolute;
  inset: 0;
}

.book-item__cover::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.2));
}

.book-item__cover::before {
  opacity: 0.34;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.5), transparent 12%),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.35), transparent 10%),
    radial-gradient(circle at 50% 74%, rgba(255, 255, 255, 0.24), transparent 16%);
}

.book-cover__brand,
.book-cover__title,
.book-cover__title small,
.book-cover__title h3 {
  position: relative;
  z-index: 1;
}

.book-cover__brand {
  display: inline-block;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.book-cover__title small {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
}

.book-cover__title h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.3;
  color: #fff;
}

.book-item__content {
  padding: 22px 22px 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 255, 0.92)),
    radial-gradient(circle at top right, rgba(255, 213, 112, 0.12), transparent 28%);
}

.book-item__meta {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--次色);
}

.book-item h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.35;
  color: var(--主色);
}

.book-item__lead {
  margin: 0 0 14px;
  line-height: 1.8;
  color: #526071;
}

.book-item ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
  color: #617083;
}

.book-item__info {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
  border: 1px solid rgba(35, 55, 77, 0.08);
}

.book-item__info p {
  margin: 0;
  color: #526071;
  line-height: 1.75;
}

.book-detail {
  border-top: 1px dashed rgba(35, 55, 77, 0.16);
  padding-top: 12px;
}

.book-detail summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--主色);
  list-style: none;
}

.book-detail summary::-webkit-details-marker {
  display: none;
}

.book-detail div {
  padding-top: 12px;
  color: #526071;
  line-height: 1.8;
}

.book-detail ol {
  margin: 10px 0 0;
  padding-left: 18px;
}

.cover--1 { background: linear-gradient(160deg, #20435c, #7f9ec2); }
.cover--2 { background: linear-gradient(160deg, #8a5f2b, #ffbe5d); }
.cover--3 { background: linear-gradient(160deg, #165e69, #40b7b5); }
.cover--4 { background: linear-gradient(160deg, #6f2f59, #e86c8f); }
.cover--5 { background: linear-gradient(160deg, #2f4c74, #6ea8ff); }
.cover--6 { background: linear-gradient(160deg, #153a78, #6d7dff); }
.cover--7 { background: linear-gradient(160deg, #24563e, #79d17d); }
.cover--8 { background: linear-gradient(160deg, #5b2f7a, #c375ff); }
.cover--9 { background: linear-gradient(160deg, #8b1f2d, #ff6f79); }
.cover--10 { background: linear-gradient(160deg, #55731f, #c7f05f); }
.cover--11 { background: linear-gradient(160deg, #7a4f1d, #ffb35d); }

.is-hidden {
  display: none;
}

@media (max-width: 720px) {
  .hero {
    padding-top: 54px;
  }

  .panel {
    padding: 18px;
  }

  .filter-btn {
    width: 100%;
    text-align: center;
  }

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

  .form-actions {
    justify-content: stretch;
  }

  .form-btn {
    width: 100%;
  }

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

  .book-item__cover {
    min-height: 180px;
  }

  .hero__art {
    display: none;
  }

  .hero__title {
    padding-right: 0;
  }

  .hero__title::after {
    display: none;
  }
}
