/* ===========================================================
   journalStyle.css
   Estética: diário/scrapbook — fundo xadrez, sidebar verde-oliva,
   "livro" aberto com efeito de página, estrelas decorativas.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,700&family=Space+Mono:wght@400;700&display=swap');

:root{
  --sidebar-green:      #282828;
  --sidebar-green-dark: #5a1a1a;
  --gold:               #ffffff;
  --gold-soft:          #ffffff;
  --cream:              #ffffff;
  --cream-dark:         #ffffff;
  --ink:                #2b2b1f;
  --star-orange:        #ef9b3d;
}

*{ box-sizing: border-box; }

html, body{
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Space Mono', monospace;
  color: var(--ink);
}

/* ---------- fundo xadrez (gingham) ---------- */
body{
  background-image: url('https://i.pinimg.com/736x/2e/4a/97/2e4a97416ca91d89c4c234ad3c198c25.jpg');
  background-repeat: repeat; /* ou no-repeat, dependendo da imagem */
  background-size: auto;      /* ou "cover" se for pra preencher a tela toda com 1 imagem só */
  display: flex;
  min-height: 100vh;
}

/* ================= SIDEBAR / NAV ================= */
#nav{
  width: 300px;
  min-width: 260px;
  background: var(--sidebar-green);
  color: var(--cream);
  padding: 28px 24px;
  box-shadow: 4px 0 18px rgba(0,0,0,0.25);
}

#nav a{
  color: var(--gold-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#nav a:hover{ text-decoration: underline; }

#nav a img.inline{
  width: 16px;
  height: 16px;
  transform: rotate(180deg); /* seta apontando pra esquerda */
}

#nav h1{
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 2.6em;
  color: var(--gold);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  margin: 18px 0 16px;
}

#nav > p{
  background: var(--sidebar-green-dark);
  border: 1px solid var(--gold-soft);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 0.82em;
  line-height: 1.5;
  color: var(--cream);
  margin-bottom: 24px;
}

#entries ul{
  list-style: none;
  margin: 0;
  padding: 0;
}

#entries li{
  position: relative;
  padding-left: 16px;
  margin-bottom: 12px;
  font-size: 0.9em;
  line-height: 1.4;
}

#entries li::before{
  content: "•";
  color: var(--gold);
  position: absolute;
  left: 0;
}

#entries li a{
  color: var(--gold-soft);
  text-decoration: underline;
  font-weight: 700;
}

#entries li em{
  font-style: normal;
  background: var(--gold-soft);
  color: var(--sidebar-green-dark);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 0.75em;
  margin-left: 6px;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════
   noise noisy grain grainnny
   ═══════════════════════════════════════════════════ */


#noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw; 
  height: 100vh; 
  pointer-events: none;
  z-index: 999999;
  background-image: url('pngs/assets/ns02.png');
  background-repeat: repeat;
  background-size: auto;
  
  opacity: 0.15; 
}


/* ================= MAIN / BOOK AREA ================= */
#main{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  position: relative;
  padding: 40px;
}

/* estrelinhas decorativas nas laterais */
#main::before,
#main::after{
  content: "";
  position: absolute;
  top: 50%;
  width: 70px;
  height: 70px;
  transform: translateY(-50%);
  background: var(--star-orange);
  clip-path: polygon(
    50% 0%, 61% 35%, 98% 35%, 68% 57%,
    79% 91%, 50% 70%, 21% 91%, 32% 57%,
    2% 35%, 39% 35%
  );
  opacity: 0.9;
}
#main::before{ left: 6%; }
#main::after{ right: 6%; }

#book{
  width: min(65vw, 850px);
  aspect-ratio: 1.414 / 1;   /* proporção real de papel A (ISO 216) aberto */
  background: var(--cream);
  border: 8px solid var(--sidebar-green-dark);
  border-radius: 14px;
  box-shadow:
    0 20px 40px rgba(0,0,0,0.35),
    inset 0 0 0 2px var(--gold-soft);
  transform: rotate(-1.2deg);
  overflow: hidden;
  position: relative;
}

/* linha central simulando a lombada do livro aberto */
#book::before{
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: rgba(0,0,0,0.15);
  box-shadow: 0 0 12px rgba(0,0,0,0.15);
  z-index: 2;
}

#book iframe{
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
}

.pageChange{
  cursor: pointer;
  opacity: 0.85;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 3;
}
.pageChange:hover{ opacity: 1; transform: scale(1.08); }
.pageChange img{ width: 42px; display: block; }

/* fallback caso as imagens de seta ainda não existam */
#previous, #next{
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sidebar-green-dark);
  border-radius: 50%;
  color: var(--gold);
  font-size: 20px;
}

/* ---------- responsividade simples ---------- */
@media (max-width: 900px){
  body{ flex-direction: column; }
  #nav{ width: 100%; }
  #main{ padding: 24px 10px; }
  #main::before, #main::after{ display: none; }
  #book{ width: 92vw; aspect-ratio: 3/4; transform: rotate(0deg); }
}
