     body {
      margin: 0;
      background: #f3f3f3;
      font-family: "Georgia", serif;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      align-items: center;
      height: 100vh;
    }

    .book-container {
      flex: 1;
      width: 90%;
      max-width: 1000px;
      overflow: hidden;
      display: flex;
      justify-content: center;
      align-items: center;
      margin-top: 8px;
      position: relative;
      cursor: grab;
    }

    #flipbook {
      width: 100%;
      max-width: 900px;
      height: 85vh;
      box-shadow: 0 0 10px rgba(0,0,0,0.15);
      background: white;
      border-radius: 8px;
      transition: transform 0.35s ease;
      transform-origin: center center;
    }

.page {
  width: 100%;
  height: 100%;
  background-color: white;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

    .page img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      user-select: none;
      -webkit-user-drag: none;
    }

.text-page {
  font-family: 'Georgia', 'Times New Roman', serif;
  padding: 24px 36px; 
  font-size: 16px; 
  line-height: 1.7; 
  color: #1a1a1a; 
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  max-height: 100%;
  overflow: hidden;
  word-wrap: break-word;
}

.text-page h1 {
  font-size: 22px;
  margin: 20px 0 12px;
  font-weight: bold;
  line-height: 1.3;
}

.text-page h2 {
  font-size: 20px;
  margin: 18px 0 10px;
  font-weight: bold;
  line-height: 1.35;
}

.text-page h3 {
  font-size: 18px;
  margin: 14px 0 8px;
  font-weight: bold;
  line-height: 1.4;
}

.text-page p {
  margin: 0 0 16px;
}

.text-page img {
  max-width: 100%;
  margin: 20px 0;
  display: block;
}

    .controls {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 10px;
      margin: 8px 0;
      background: rgba(255, 255, 255, 0.95);
      padding: 8px 12px;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      flex-wrap: wrap;
      z-index: 10;
    }

    .controls button {
      background: #1f2a3d;
      color: white;
      border: none;
      padding: 0;
      font-size: clamp(14px, 2vw, 20px);
      border-radius: 8px;
      cursor: pointer;
      transition: background 0.3s, transform 0.2s;
      width: clamp(36px, 4vw, 50px);
      height: clamp(36px, 4vw, 50px);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .controls button:hover {
      background: #2b3a55;
      transform: scale(1.05);
    }

    #pageInput {
      width: 70px;
      padding: 6px;
      border-radius: 6px;
      border: 1px solid #ccc;
      text-align: center;
      font-size: 16px;
    }

    #totalPages {
      font-size: 16px;
      font-weight: bold;
      color: #1f2a3d;
    }

    .fullscreen {
      background: #000;
      overflow: hidden;
      height: 100dvh;
    }

    .fullscreen .book-container {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 60px;
      width: 100vw;
      height: calc(100vh - 60px);
      max-width: none;
      justify-content: center;
      align-items: center;
      margin: 0;
    }

    .fullscreen #flipbook {
      width: 95vw;
      height: 95vh;
      max-width: none;
    }

    .fullscreen .controls {
      position: fixed;
      bottom: 10px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 999;
    }

    #exitFullscreenBtn {
      display: none;
      position: fixed;
      top: 12px;
      right: 12px;
      background: rgba(255, 255, 255, 0.9);
      border: none;
      color: #000;
      font-size: 22px;
      border-radius: 8px;
      padding: 8px 10px;
      cursor: pointer;
      z-index: 1000;
      box-shadow: 0 4px 10px rgba(0,0,0,0.3);
      transition: transform 0.2s, background 0.2s;
    }

    #exitFullscreenBtn:hover {
      transform: scale(1.1);
      background: white;
    }

    body.fullscreen #exitFullscreenBtn {
      display: block;
    }

    @media (max-width: 768px) {
      .controls {
        gap: 6px;
        padding: 6px;
      }
      .controls button {
        width: 34px;
        height: 34px;
        font-size: 14px;
      }
      #pageInput { width: 50px; font-size: 14px; padding: 4px; }
      #totalPages { font-size: 14px; }
    }

