:root{
  --book-size: min(92vw, 640px); /* keeps it square */
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0,0,0,.18);
  --paper: #fffdf8;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(circle at 20% 10%, #fff 0%, #f6f2ea 35%, #efe7db 100%);
  color:#222;
}

.topbar{
  padding:16px;
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  flex-wrap:wrap;
  gap:12px;
}

.brand .title{ font-weight:900; font-size:18px; line-height:1; }
.brand .sub{ font-size:12px; opacity:.65; margin-top:4px; }

.controls{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

button{
  border:0;
  background:#222;
  color:#fff;
  padding:10px 14px;
  border-radius:12px;
  font-weight:800;
  cursor:pointer;
}
button:disabled{ opacity:.4; cursor:not-allowed; }

.pill{
  padding:10px 14px;
  border-radius:12px;
  background:rgba(255,255,255,.7);
  backdrop-filter: blur(6px);
  border:1px solid rgba(0,0,0,.06);
  font-size:13px;
}

.pill.file{
  position:relative;
  overflow:hidden;
  cursor:pointer;
}
.pill.file input{
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
}

.wrap{
  padding:18px 16px 18px;
  display:flex;
  justify-content:center;
}

.flipbook{
  width: var(--book-size);
  height: var(--book-size);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--paper);
}

/* Turn.js pages */
.page{
  width: 100%;
  height: 100%;
  background: var(--paper);
  border-radius: var(--radius);
  overflow:hidden;
  position:relative;
}

/* PDF canvas fills page */
.page canvas{
  width:100%;
  height:100%;
  display:block;
  background:#fff;
}

/* Optional CreativeBeeBook blur mask (for future text overlay) */
.mask{
  position:absolute;
  left:10%;
  width:80%;
  height:20%;
  bottom:6%;
  border-radius:18px;
  background: rgba(255,255,255,.30);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
  pointer-events:none;
}

.footer{
  text-align:center;
  padding:10px 16px 16px;
  font-size:12px;
  opacity:.65;
}