body {
  margin: 0;
  font-family: "EB Garamond", serif;
  background: #1b1b1b;
  display: flex;
  justify-content: center;
}

/* MAIN WRAPPER */
#main-wrapper {
  display: flex;
  width: 100%;
  max-width: 1200px;
  height: 100vh;
}

/* FLIPBOOK */
#flipbook {
  position: relative;
  flex: 1;
  height: 100%;
  perspective: 2000px;
  overflow: hidden;
  touch-action: pan-y; /* allows vertical scroll + horizontal swipe */
}

.page {
  background: #f2f2f2;
  color: #222;
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
  transform-origin: left;
  transition: transform 0.6s ease;
  overflow-y: auto;
}

.page:not(:first-child) {
  transform: rotateY(180deg);
}

.page-number {
  position: absolute;
  bottom: 10px;
  right: 15px;
  opacity: 0.5;
  font-size: 12px;
}

/* SIDE MENU */
#side-menu-container {
  width: 140px;
  background: #ffffff;
  padding: 10px;
  overflow-y: auto;
}

#side-menu button {
  width: 100%;
  margin-bottom: 5px;
  padding: 6px;
  font-size: 12px;
  cursor: pointer;
}

#lang-buttons {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

#lang-buttons button {
  font-size: 11px;
  padding: 4px 6px;
  cursor: pointer;
}





body {
  margin: 0;
  font-family: "EB Garamond", serif;
  background: url('men1.png') center/cover no-repeat;
  display: flex;
  justify-content: center;
  padding: 20px;
}
:root {
  --page-bg: #f2f7ff;
  --text: #2a2a2a;
  --cover-bg: #0d1526;
  --cover-text: #d4b068;
}
#main-wrapper {
  display: flex;
  justify-content: center;
  gap: 30px;
  width: 80%;
  max-width: 1200px;
  margin-top: 20px;
}
#side-menu {
  width: 150px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: rgba(255,255,255,0.9);
  border-radius: 12px;
}
#side-menu button {
  font-size: 9px;
  background: #333;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  text-align: center;
}
#flipbook {
  position: relative;
  width: 70vw;
  height: 90vh;
  perspective: 2000px;
}
.page {
  background: var(--page-bg);
  color: var(--text);
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 35px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0,0,0,0.25);
  transform-origin: left;
  transition: transform 0.7s ease;
  overflow-y: auto;
}
.page:not(:first-child) { transform: rotateY(180deg); }
.page h2 { margin-top: 0; }
.page-number {
  position: absolute;
  bottom: 15px;
  right: 20px;
  opacity: 0.5;
}
#cover, #back-cover {
  background: var(--cover-bg);
  color: var(--cover-text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}





/* MOBILE */
@media (max-width: 768px) {
  #main-wrapper {
    flex-direction: column;
  }

  #side-menu-container {
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  #side-menu {
    display: flex;
    overflow-x: auto;
    gap: 5px;
  }

  #side-menu button {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}
