/* ===== RESET ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #e8e3d8;
  font-family: Georgia, "Times New Roman", serif;
}

/* ===== NOTEBOOK ===== */
.notebook {
  width: 800px;
  height: 500px;
  perspective: 2000px;
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 6px;
  padding-left: 12px;
  margin-bottom: 8px;
}

.tabs button {
  padding: 8px 16px;
  background: #d6cfc4;
  border: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 -1px 0 rgba(0,0,0,0.15) inset;
  transition: background 0.2s ease;
}

.tabs button:hover {
  background: #c9c1b6;
}

/* ===== PAGE STACK ===== */
.pages {
  position: relative;
  width: 100%;
  height: 100%;
  background: #f5f1ea;
  overflow: hidden;
  border-radius: 0 6px 6px 6px;
  box-shadow:
    0 20px 40px rgba(0,0,0,0.25),
    inset 0 0 0 1px #c8c3bb;
}

/* ===== INDIVIDUAL PAGE ===== */
.page {
  position: absolute;
  inset: 0;
  padding: 48px;
  background: #fffdf8;
  transform-origin: left center;
  transform: rotateY(0deg);
  transition: transform 0.8s ease;
  backface-visibility: hidden;
  z-index: 1;

  /* subtle paper texture */
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 100% 24px;
}

/* ===== TURNED PAGES ===== */
.page.turned {
  transform: rotateY(-180deg);
  z-index: 0;
}

/* ===== ACTIVE PAGE ===== */
.page.active {
  z-index: 10;
}

/* ===== PAGE SHADOW DURING TURN ===== */
.page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset -30px 0 40px rgba(0,0,0,0.15);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.page.turned::after {
  opacity: 1;
}

/* ===== PAGE CONTENT ===== */
.page h1 {
  margin-bottom: 16px;
  font-size: 32px;
}

.page p {
  line-height: 1.6;
  font-size: 16px;
}

/* ===== OPTIONAL: NOTEBOOK SPINE ===== */
.pages::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 16px;
  height: 100%;
  background: linear-gradient(
    to right,
    #b7afa2,
    #d8d2c8
  );
  z-index: 20;
}
