:root {
  --bg: #0b0f1a;
  --panel: rgba(255, 255, 255, 0.06);
  --text: #e9eefc;
  --muted: rgba(233, 238, 252, 0.75);
  --border: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(110, 160, 255, 0.25), transparent 60%),
              radial-gradient(900px 500px at 10% 20%, rgba(255, 140, 0, 0.15), transparent 55%),
              var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

a { color: inherit; }

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.2);
}

.site-title {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.4px;
}

.site-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.nav {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

main {
  padding: 26px 0 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  align-items: start;
}

.card {
  grid-column: span 12;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.card h2 { margin: 0 0 10px; }
.card p { margin: 0 0 12px; color: var(--muted); line-height: 1.5; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  font-weight: 600;
}

.button:hover { background: rgba(255, 255, 255, 0.14); }

.site-footer {
  padding: 18px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

/* Flipbook */

.reader-shell {
  display: grid;
  gap: 14px;
}

.reader-topbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.reader-topbar .left,
.reader-topbar .right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.pill {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
}

.book-wrap {
  display: grid;
  place-items: center;
}

.book {
  width: min(900px, 94vw);
  aspect-ratio: 3 / 4;
  position: relative;
  perspective: 2200px;
}

.sheet {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform 850ms cubic-bezier(.2,.7,.1,1);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}

.sheet .side {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.25);
}

.sheet .side img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(0,0,0,0.35);
}

.sheet .back {
  transform: rotateY(180deg);
}

.sheet.flipped {
  transform: rotateY(-180deg);
}

.hint {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}
