*{
  margin: 0;
  padding: 0;
  user-select: none;
  cursor: auto;
  box-sizing: border-box;
  font-family: 'Pacifico', cursive;
}
body {
  margin: 0;
  background: #f0ebe3;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: 'Segoe UI', sans-serif;
}

.book {
  position: relative;
  width: 300px;
  height: 400px;
  perspective: 2000px;
}

.page {
  width: 100%;
  height: 100%;
  position: absolute;
  transform-style: preserve-3d;
  transform-origin: left;
  transition: transform 1s ease;
  cursor: pointer;
  border: 3px solid #888;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  background: white;
}

.page .front,
.page .back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.page .front img,
.page .back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 2px solid #444;
  border-radius: 6px;
  box-sizing: border-box;
}

.page .back {
  transform: rotateY(180deg);
}

.page.flipped {
  transform: rotateY(-180deg);
}

.intro-content, .end-content {
  text-align: center;
  border: 3px solid black;
  padding: 10px;
  border-radius: 15%;
}

.intro-content h1 {
  font-size: 24px;
  color: #fb18c2;
  margin-bottom: 10px;
}

.intro-content p {
  font-size: 14px;
  color: #555;
}

.intro-content,.end-content {
  background: linear-gradient(135deg, #f5f7fa, #e0e4e8);
  width: 100%;
  height: 100%;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.end-content h2 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #333;
}

.end-content span {
  font-size: 14px;
  color: #777;
}