body {
  font-family: Georgia, serif;
  background: #eee;
  margin: 0;
  padding: 7vh;
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
}

#buch-container {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1px;
  perspective: 2000px;
}
.seite {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: white;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 1px solid #ccc;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
  position: relative;
  
}






.seite-links {
  border-right: none;
  border-radius: 3px 0 0 3px;
}

.seite-rechts {
  border-left: none;
  border-radius: 0 3px 3px 0;
}


.buchruecken {
  width: 6px;
  background: linear-gradient(to bottom, #fff, #fff);
  height: 100%;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.3);
  z-index: 1;
}
body.darkmode .buchruecken {
width: 6px;
  background: linear-gradient(to bottom, #222, #444);
  height: 100%;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.3);
  z-index: 1;
}

body.darkmode {
  background: #111;
  color: #f0f0f0;
}

body.darkmode .seite {
  background: #1e1e1e;
  border-color: #444;
  box-shadow: 0 0 20px rgba(255,255,255,0.1);
}

body.darkmode .pfeil-links,
body.darkmode .pfeil-rechts {
  color: #f0f0f0;
}

body.darkmode .fussbereich {
  border-top-color: #444;
}


#darkmode-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  background: #eee;
  color: #111;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  border-radius: 5px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

body.darkmode #darkmode-toggle {
  background: #333;
  color: #f0f0f0;
}


@keyframes blattLinks {
  0%   { transform: rotateY(0deg); }
  100% { transform: rotateY(20deg); }
}

@keyframes blattRechts {
  0%   { transform: rotateY(0deg); }
  100% { transform: rotateY(-20deg); }
}

.seite.blatt-links {
	animation: blattLinks 0.7s ease forwards;
}

.seite.blatt-rechts {
	animation: blattRechts 0.7s ease forwards;
}


.inhalt {
  flex-grow: 1;
}

.fussbereich {
  font-size: 0.75em;
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  border-top: 1px solid #ccc;
  padding-top: 0.5rem;
}

.pfeil-links, .pfeil-rechts {
  cursor: pointer;
  font-size: 2.5rem;
  user-select: none;
  color: #333;
  font-weight: bold;
}

.fussnote {
  max-width: 90%;
}

.nur-mobil {
  display: none;
}



#seite-rechts {
    display: yes;
  }


.number {
  position: absolute;
  width: 45%;
  border-bottom: 0px solid #ddd;
  #page-break-after: always;
  font-size: 100%;
  text-align: center;

}

.kapitel {
  #position: absolute;
  width: 65%;
  border-bottom: 0px solid #ddd;
  #page-break-after: always;
  font-size: 140%;
  text-align: left;

}

.page {
  position: relative;
  width: 90%;
  border-bottom: 0px solid #ddd;
  page-break-after: always;
  font-size: 120%;

}

 .page-header {
      display: flex;
      justify-content: space-between;
      font-weight: bold;
      margin-bottom: 1px;
    }
.hr {size: 0.5; color:#ddd;}










@media (max-width: 768px) {
  #buch-container {
    flex-direction: column;
    align-items: center;
  }

  .seite {
    width: 90%;
  }

 
  #seite-rechts {
    display: none;
  }
 
  
/* off-beginn */
  .pfeil-links, .pfeil-rechts {
    position: static;
    display: inline-block;
    font-size: 0rem;
    padding: 0.5rem 1rem;
    margin: 1rem 0.5rem 0 0.5rem;
}
 .fussbereich {
    text-align: center;
    flex-direction: column;
    align-items: center;
  }
.pfeil-links {
  right: 0px;
}

.pfeil-rechts {
  right: 0px;
}
/* off-ende */


.nur-mobil {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
  }

  #mobile-blätter button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    background: #333;
    color: white;
    cursor: pointer;
  }


  body.darkmode #mobile-blätter button {
    background: #f0f0f0;
    color: #111;
 
}

@keyframes blattLinks {
  0%   { transform: rotateY(0deg); }
  100% { transform: rotateY(-0deg); }
}

@keyframes blattRechts {
  0%   { transform: rotateY(0deg); }
  100% { transform: rotateY(0deg); }
}

.seite.blatt-links {
	animation: blattLinks 0.6s ease forwards;
}

.seite.blatt-rechts {
	animation: blattRechts 0.6s ease forwards;
}


}
