:root {
  color-scheme: dark;
  --bg-top: #07111c;
  --bg-bottom: #03070c;
  --panel-border: rgba(143, 211, 255, 0.14);
  --text: #eef5ff;
  --muted: #a7b6c8;
  --accent: #8fd3ff;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  --menu-width: min(280px, 82vw);
  --logo-width: min(148px, 28vw);
  --page-width: 320px;
  --page-height: 454px;
  --book-width: 640px;
  --zoom: 1;
  --pan-x: 0px;
  --pan-y: 0px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at top, rgba(76, 120, 168, 0.18), transparent 34%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  color: var(--text);
  font-family: Consolas, "Courier New", monospace;
}

body {
  position: relative;
}

#waves {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  user-select: none;
  pointer-events: none;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6.25rem 1.5rem 3rem;
}

.logo {
  width: 100%;
  height: auto;
  min-height: 64px;
  display: block;
  transition: opacity 180ms ease;
}

.links-card {
  width: min(988px, calc(100vw - 3rem));
  padding: clamp(1.25rem, 2.7vw, 2rem);
  border: 1px solid rgba(143, 211, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.82);
  box-shadow: var(--shadow);
  overflow: visible;
}

h1 {
  margin: 0 0 1.25rem;
  color: var(--accent);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.title-strip {
  display: block;
  width: min(100%, 540px);
  height: auto;
  margin: -0.2rem 0 1.15rem;
  opacity: 0.95;
}

.blog-text {
  position: relative;
  min-height: 460px;
  padding-right: 9em;
}

.intro-layout {
  position: relative;
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.08rem);
}

.blog-card p {
  font-size: 1em;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.blog-card p + p {
  margin-top: 0.35rem;
}

.coaster-stack {
  position: absolute;
  top: -8.7em;
  right: -6em;
  width: 10.8em;
  height: calc(100% - 0.75em);
  min-height: 24em;
  perspective: 1400px;
  pointer-events: none;
}

.coaster-disc {
  position: absolute;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  top: var(--disc-top, 0);
  right: 0;
  transform: translateX(var(--disc-shift-x, 0)) rotate(var(--disc-tilt, 0deg)) translateZ(0);
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.34));
  pointer-events: auto;
}

.coaster-disc-1 {
  --disc-top: 0%;
  --disc-shift-x: 0em;
  --disc-tilt: -5deg;
}

.coaster-disc-2 {
  --disc-top: 32%;
  --disc-shift-x: -2.75em;
  --disc-tilt: 6deg;
  width: 108%;
}

.coaster-disc-3 {
  --disc-top: 60%;
  --disc-shift-x: -0.2em;
  --disc-tilt: -7deg;
}

.coaster-disc-4 {
  --disc-top: 90%;
  --disc-shift-x: -1.1em;
  --disc-tilt: 5deg;
  width: 98%;
}

.coaster-disc-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform-style: preserve-3d;
  transition: transform 760ms cubic-bezier(0.22, 0.7, 0.14, 1);
  will-change: transform;
}

.coaster-disc:hover .coaster-disc-inner,
.coaster-disc:focus-within .coaster-disc-inner {
  transform: rotateY(180deg);
}

.coaster-disc:hover {
  z-index: 2;
}

.coaster-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  backface-visibility: hidden;
  border-radius: 50%;
  user-select: none;
  -webkit-user-drag: none;
}

.coaster-face-back {
  transform: rotateY(180deg);
}

.ratings-section {
  margin-top: clamp(1.5rem, 4vh, 2.75rem);
}

.ratings-table-wrap {
  width: 100%;
  margin-top: 0.85rem;
  overflow-x: auto;
  border: 1px solid rgba(143, 211, 255, 0.16);
  border-radius: 8px;
  scrollbar-color: rgba(143, 211, 255, 0.45) rgba(3, 7, 12, 0.65);
  scrollbar-width: thin;
}

.ratings-table-wrap::-webkit-scrollbar {
  height: 0.6rem;
}

.ratings-table-wrap::-webkit-scrollbar-track {
  background: rgba(3, 7, 12, 0.65);
}

.ratings-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(143, 211, 255, 0.45);
  border-radius: 999px;
}

.ratings-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  background: rgba(3, 7, 12, 0.62);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.ratings-table th,
.ratings-table td {
  padding: 0.62rem 0.7rem;
  border-bottom: 1px solid rgba(143, 211, 255, 0.12);
  border-right: 1px solid rgba(143, 211, 255, 0.1);
  text-align: left;
  vertical-align: top;
}

.ratings-table th:last-child,
.ratings-table td:last-child {
  border-right: 0;
}

.ratings-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(7, 17, 28, 0.96);
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ratings-table tbody tr:last-child td {
  border-bottom: 0;
}

.ratings-table tbody tr:hover {
  background: rgba(143, 211, 255, 0.06);
}

.ratings-table td:nth-child(6) {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.ratings-table td:nth-child(4),
.ratings-table td:nth-child(5) {
  white-space: nowrap;
}

.book-stage {
  position: relative;
  width: 100%;
  height: min(64svh, 560px);
  min-height: 390px;
  margin-top: clamp(2rem, 5vh, 3.25rem);
  padding: clamp(1rem, 2.2vw, 1.35rem);
  border: 1px solid rgba(143, 211, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(8, 16, 28, 0.92), rgba(2, 6, 12, 0.78)),
    radial-gradient(circle at top, rgba(143, 211, 255, 0.08), transparent 48%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(143, 211, 255, 0.05),
    0 22px 40px rgba(0, 0, 0, 0.24);
  display: grid;
  place-items: end center;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}

.book-zoom {
  width: var(--book-width);
  height: var(--page-height);
  transform: translate(var(--pan-x), var(--pan-y)) scale(var(--zoom));
  transform-origin: center center;
  transition: transform 90ms ease;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.42));
}

.flipbook {
  width: var(--book-width);
  height: var(--page-height);
}

.flipbook .page {
  width: var(--page-width);
  height: var(--page-height);
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(143, 211, 255, 0.14);
}

.flipbook .page img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

.book-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1rem;
}

.nav-button {
  width: 2.65rem;
  height: 2.35rem;
  border: 1px solid rgba(143, 211, 255, 0.22);
  border-radius: 6px;
  background: rgba(3, 7, 12, 0.86);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.nav-button:hover {
  color: var(--accent);
  border-color: rgba(143, 211, 255, 0.45);
  transform: translateY(-1px);
}

.nav-button:active {
  transform: translateY(1px);
}

.nav-button:disabled {
  cursor: default;
  opacity: 0.34;
  transform: none;
}

.nav-button span {
  font-size: 1.1rem;
  line-height: 1;
}

.page-status {
  min-width: 7.25rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(143, 211, 255, 0.18);
  border-radius: 6px;
  background: rgba(3, 7, 12, 0.7);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 720px) {
  html,
  body {
    overflow-y: auto;
  }

  .shell {
    min-height: 100svh;
    align-items: flex-start;
    padding-top: 10rem;
    padding-bottom: 2rem;
  }

  .links-card {
    max-height: none;
    overflow: visible;
    width: min(100vw - 1.2rem, 988px);
    padding: 1rem 0.85rem 1.2rem;
  }

  h1 {
    margin-bottom: 1rem;
    font-size: 1.12rem;
    letter-spacing: 0.08em;
  }

  h2 {
    font-size: 0.98rem;
    letter-spacing: 0.06em;
  }

  .title-strip {
    width: min(100%, 420px);
    margin: -0.1rem 0 0.9rem;
  }

  .blog-text {
    min-height: 0;
    padding-right: 0;
  }

  .blog-card p {
    font-size: 0.98rem;
    line-height: 1.58;
  }

  .blog-card p + p {
    margin-top: 0.55rem;
  }

  .coaster-stack {
    position: relative;
    top: auto;
    right: auto;
    width: min(280px, 100%);
    min-height: 0;
    margin: 0.9rem auto 0.3rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .coaster-disc {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    transform: rotate(var(--disc-tilt, 0deg)) translateZ(0);
  }

  .book-stage {
    height: 58svh;
    min-height: 360px;
    padding: 0.85rem;
  }

  .ratings-section {
    margin-top: 1.35rem;
  }

  .ratings-table-wrap {
    margin-top: 0.7rem;
    border-radius: 10px;
  }

  .ratings-table {
    min-width: 720px;
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .ratings-table th,
  .ratings-table td {
    padding: 0.58rem 0.56rem;
  }

  .ratings-table td:nth-child(2),
  .ratings-table td:nth-child(3),
  .ratings-table td:nth-child(7) {
    min-width: 8.5rem;
  }

  .book-controls {
    gap: 0.7rem;
    margin-top: 0.85rem;
  }

  .page-status {
    min-width: 6.6rem;
    font-size: 0.84rem;
  }
}
