:root {
  --book-bg: #0e1210;
  --book-bg-soft: #121a16;
  --book-panel: #1a231c;
  --book-stroke: rgba(110, 134, 106, 0.35);
  --book-text: #f0f7f0;
  --book-muted: #a8b7a7;
  --book-accent: #9dcc7a;
}

body {
  background:
    radial-gradient(1200px 620px at 30% -10%, rgba(80, 120, 80, 0.2), transparent 62%),
    radial-gradient(900px 520px at 80% 10%, rgba(120, 90, 60, 0.2), transparent 65%),
    linear-gradient(180deg, #0b0f0c 0%, #0f1511 40%, #0a0f0b 100%);
  color: var(--book-text);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 40px;
  background: rgba(10, 14, 11, 0.88);
  border-bottom: 1px solid rgba(130, 156, 118, 0.24);
  backdrop-filter: blur(10px);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.nav__name {
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #f6fbf6;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav__links a {
  color: #c7d7c5;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1px;
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: #ffffff;
}

.nav__cta {
  background: rgba(157, 204, 122, 0.18);
  border: 1px solid rgba(157, 204, 122, 0.45);
  color: #d4f0b9;
  border-radius: 999px;
  padding: 7px 16px;
}

@media (max-width: 760px) {
  .nav {
    padding: 12px 14px;
    gap: 12px;
  }

  .nav__links {
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .nav__links a {
    flex: 0 0 auto;
    font-size: 0.78rem;
  }
}

.book-page {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.book-hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--book-stroke);
  background: linear-gradient(140deg, rgba(19, 27, 20, 0.96), rgba(12, 18, 12, 0.96));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

.book-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 360px at 75% 30%, rgba(70, 120, 78, 0.25), transparent 70%),
    repeating-linear-gradient(90deg, rgba(35, 46, 34, 0.3) 0px, rgba(35, 46, 34, 0.3) 2px, transparent 2px, transparent 18px),
    linear-gradient(180deg, rgba(14, 20, 13, 0.2), rgba(12, 18, 12, 0.9));
  opacity: 0.8;
}

.book-hero__content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
}

.book-hero__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 280px);
  gap: 20px;
  align-items: start;
}

.book-hero__cover {
  height: 300px;
  border-radius: 10px;
  background: #0f1511;
  border: 1px solid rgba(110, 134, 106, 0.45);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--book-muted);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

.book-hero__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: #b5d7aa;
  margin-bottom: 12px;
  font-weight: 700;
}

.book-hero__meta h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.15;
  margin-bottom: 0;
}

.book-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 16px;
  margin-bottom: 10px;
}

.book-shelf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 5px;
}

.book-shelf-tags span {
  border: 1px solid rgba(236, 189, 88, 0.48);
  border-radius: 999px;
  background: rgba(236, 189, 88, 0.16);
  color: #f6d589;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 10px;
}

.book-hero__author {
  color: var(--book-muted);
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.book-about-compact {
  max-width: 740px;
  margin: 0 0 16px;
  border: 1px solid rgba(110, 134, 106, 0.3);
  border-radius: 12px;
  background: rgba(8, 13, 9, 0.48);
  padding: 13px 15px;
}

.book-about-compact h2 {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 6px;
}

.book-about-compact p {
  color: #d6e3d2;
  line-height: 1.45;
  font-size: 0.95rem;
}

.book-about-compact p.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-about-compact button {
  margin-top: 7px;
  border: 0;
  background: transparent;
  color: #f1c866;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0;
}

.book-hero__info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.book-hero__info span {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--book-stroke);
  background: rgba(18, 26, 20, 0.6);
  color: #d4e4d1;
  font-size: 0.85rem;
}

.book-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.book-review-box {
  margin-top: 18px;
  border: 1px solid rgba(157, 204, 122, 0.28);
  border-radius: 14px;
  background: rgba(10, 15, 11, 0.62);
  padding: 14px 16px;
  max-width: 820px;
}

.book-review-box strong {
  display: block;
  margin-bottom: 7px;
  color: #d4f0b9;
  font-size: 0.92rem;
}

.book-review-box p {
  color: var(--book-text);
  line-height: 1.45;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.book-review-box span,
.community-review span {
  color: #f3c85d;
  letter-spacing: 0.04em;
}

.book-review-form {
  margin-top: 18px;
  border: 1px solid rgba(236, 189, 88, 0.34);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(236, 189, 88, 0.08), rgba(8, 13, 9, 0.72)),
    rgba(10, 15, 11, 0.82);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  padding: 16px;
  max-width: 820px;
}

.book-review-form__head,
.book-review-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.book-review-form__head {
  margin-bottom: 14px;
}

.book-review-form__head span,
.book-review-form label,
.book-review-form__actions span {
  color: var(--book-muted);
  font-size: 0.82rem;
}

.book-review-form__head strong {
  display: block;
  color: #f7fbf2;
  font-size: 1rem;
  margin-top: 2px;
}

.book-review-form__close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(236, 189, 88, 0.28);
  background: rgba(8, 13, 9, 0.78);
  color: #f3dca3;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.rating-control {
  display: flex;
  gap: 6px;
  margin: 7px 0 12px;
}

.rating-control button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(157, 204, 122, 0.22);
  background: rgba(16, 24, 17, 0.72);
  color: rgba(240, 247, 240, 0.36);
  cursor: pointer;
  font-size: 1.1rem;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.rating-control button:hover,
.rating-control button.active {
  border-color: rgba(236, 189, 88, 0.72);
  background: rgba(236, 189, 88, 0.16);
  color: #f3c85d;
  transform: translateY(-1px);
}

.book-review-form textarea {
  width: 100%;
  margin: 7px 0 12px;
  resize: vertical;
  min-height: 118px;
  border-radius: 12px;
  border: 1px solid rgba(157, 204, 122, 0.28);
  background: rgba(6, 11, 7, 0.75);
  color: var(--book-text);
  padding: 12px;
  font: inherit;
  line-height: 1.45;
}

.book-review-form textarea:focus {
  outline: 2px solid rgba(236, 189, 88, 0.28);
  border-color: rgba(236, 189, 88, 0.62);
}

.book-hero__details {
  border: 1px solid var(--book-stroke);
  border-radius: 14px;
  background: rgba(9, 14, 10, 0.68);
  padding: 16px;
  color: var(--book-text);
}

.book-hero__details h3 {
  font-family: var(--font-serif);
  margin-bottom: 12px;
}

.book-details {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.book-details__card {
  background: rgba(15, 22, 16, 0.88);
  border: 1px solid var(--book-stroke);
  border-radius: 12px;
  padding: 18px 20px;
  color: var(--book-text);
}

.book-details__card h2,
.book-details__card h3 {
  font-family: var(--font-serif);
  margin-bottom: 12px;
}

#bookMetaList {
  list-style: none;
  display: grid;
  gap: 10px;
}

#bookMetaList li {
  color: var(--book-muted);
}

.critic-reviews-card {
  grid-column: 1 / -1;
}

.community-reviews-card {
  grid-column: 1 / -1;
}

.community-review-list {
  display: grid;
  gap: 12px;
}

.community-review {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(157, 204, 122, 0.22);
  border-radius: 12px;
  background: rgba(9, 14, 10, 0.55);
}

.community-review div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.community-review p,
.community-review-empty {
  color: var(--book-muted);
  line-height: 1.5;
}

.critic-review-list {
  display: grid;
  gap: 12px;
}

.critic-review {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(157, 204, 122, 0.22);
  border-radius: 12px;
  background: rgba(9, 14, 10, 0.55);
  max-width: 760px;
}

.critic-review .btn {
  justify-self: start;
}

.critic-review strong {
  color: #f3fbef;
}

.critic-review span,
.critic-review p,
.critic-review-empty {
  color: var(--book-muted);
  line-height: 1.5;
}

@media (max-width: 880px) {
  .book-hero__content {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .book-hero__cover {
    margin: 0 auto;
    max-width: 220px;
  }

  .book-title-row,
  .book-hero__actions {
    justify-content: center;
  }

  .book-details {
    grid-template-columns: 1fr;
  }
}
