* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: rgb(253, 244, 227);
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 20px;
}

.book-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 900px;
}

.page-container {
    width: 100%;
    max-width: 700px;
    height: auto;
    background: rgb(253, 244, 227);
    border-radius: 8px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}



/* Controls */
.controls {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

button {
    padding: 10px 20px;
    border: none;
    background: #333;
    color: #fff;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #555;
}

/* Footer */
footer {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #333;
    font-weight: bold;
    padding: 10px 0;
}

/* Page Flip Animation */
.page-flip {
    animation: curlFlip 1s ease forwards;
}

@keyframes curlFlip {
    0% {
        transform: rotateY(0deg);
        transform-origin: right center;
        box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    }
    50% {
        transform: rotateY(-120deg);
        transform-origin: right center;
        box-shadow: -15px 0 20px rgba(0,0,0,0.4);
    }
    100% {
        transform: rotateY(0deg);
        transform-origin: left center;
        box-shadow: none;
    }
}

/* Desktop View */
@media (min-width: 1024px) {
    .page-container {
        max-width: 700px;
        height: 90vh; /* Full height for big display */
    }

    .page-container img {
        width: auto;
        height: 100%; /* Fill height without distortion */
    }
}

/* Mobile View */
@media (max-width: 768px) {
    .page-container {
        height: auto;
        max-height: 75vh;
        border-radius: 0;
    }

    .page-container img {
        width: 100%;
        height: auto;
    }
}

/* --- Topbar & ad button --- */
.topbar{
  width:100%;
  max-width:900px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:14px;
}
.brand{ font-weight:700; color:#594c3b; }
.topbar .ad-btn{
  display:inline-block;
  padding:8px 14px;
  border-radius:8px;
  background:#1f2937;
  color:#fff;
  text-decoration:none;
  font-size:14px;
}
.topbar .ad-btn:hover{ background:#374151; }

/* keep topbar nice on mobile */
@media (max-width:768px){
  .topbar{ padding:0 6px; }
  .brand{ font-size:14px; }
  .topbar .ad-btn{ font-size:13px; padding:7px 12px; }
}

.site-header {
  background: rgb(253,244,227);
  padding: 8px 0;
  border-bottom: 1px solid rgba(91,74,54,0.15);
}
.site-header .container {
  max-width: 900px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: bold;
  color: #5b4a36;
}
.main-nav {
  display: flex;
  gap: 10px;
}
.nav-btn {
  background: #1f2937;
  color: #fff;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  transition: background 0.3s;
}
.nav-btn:hover {
  background: #374151;
}
.nav-btn.active {
  background: #2563eb;
}
