/* RESET BÁSICO E VARIÁVEIS */
:root {
  --bg-main: #0f1116;
  --bg-panel: #161922;
  --bg-panel-alt: #1d2030;

  --text-main: #e6e6e6;
  --text-soft: #b9bccb;
  --text-muted: #8b8fa3;

  --accent: #8fd3ff;
  --accent-soft: #5fa8d3;
  --warning: #ffb454;

  --border-pixel: #2a2e40;
  --shadow-pixel: #000000;
  
  padding: 5px;
}

* {
  box-sizing: border-box;
}

/* Fonte (títulos / UI)*/ 
@font-face {
  font-family: 'W95FA';
  src: url('W95FA.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

body {
  margin: 0;  
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: 'W95FA', monospace;
  line-height: 1.7;
  font-size: 22px;
}

/* Limita largura para leitura longa */
.container { 
  padding: 5px;
}

.header-title {
  text-align: center;
}

.header-title h1 {
  font-size: 1.8rem;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.quest-icon {
  image-rendering: pixelated;
}

h2 {
  font-size: 2rem;
  color: var(--accent-soft);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.75rem;
}

p {
  color: var(--text-main);
  margin-bottom: 1rem;
}

i {
  color: var(--text-soft);
}

b {
  color: var(--accent);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: #b7e4ff;
  text-decoration: underline;
}

.speech-frame {
  background-color: var(--bg-panel);
  padding: 1.25rem;
  border: 2px solid var(--border-pixel);
  box-shadow: 4px 4px 0 var(--shadow-pixel);
}

.galeria {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.galeria img {
  max-width: 100%;
  height: auto;
  image-rendering: auto;
  border: 2px solid var(--border-pixel);
  box-shadow: 3px 3px 0 var(--shadow-pixel);
}

/* Pixel-art friendly */
.galeria img.pixel,
.zoom-container img {
  image-rendering: pixelated;
}

.zoom-container {
  cursor: zoom-in;
}

.lista {
  list-style: none;
  padding-left: 0;
}

.lista li {
  margin-bottom: 0.1rem;
}

.card {
  background-color: var(--bg-panel-alt);
  padding: 1rem;
  border: 2px solid var(--border-pixel);
  box-shadow: 3px 3px 0 var(--shadow-pixel);
  flex: 1 1 240px;
}

.card p {
  margin-bottom: 0.75rem;
}

.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.open {
  display: flex;
}

.modal-card {
  background-color: var(--bg-panel);
  padding: 1.5rem;
  border: 2px solid var(--border-pixel);
  box-shadow: 6px 6px 0 var(--shadow-pixel);
  max-width: 90%;
}

.modal-card img {
  max-width: 100%;
  image-rendering: pixelated;
}

.close {
  margin-top: 1rem;
  background-color: var(--bg-panel-alt);
  color: var(--text-main);
  border: 2px solid var(--border-pixel);
  font-size: 1.65rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.close:hover {
  background-color: #23274a;
}

.overlay {
  pointer-events: none;
}

/* Responsividade */
@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  h2 {
    font-size: 1.75rem;
  }

  .header-title h1 {
    font-size: 1.2rem;
  }
}

.day {
  box-shadow: 1px 1px 0 #000;
}

.pixel-calendar {
  border-collapse: separate;
  border-spacing: 2px;
}

.pixel-calendar th {
  color: #b9bccb;
  font-size: 0.75rem;
  padding-right: 6px;
  text-align: right;
}

.pixel-calendar td {
  width: 14px;
  height: 14px;
  background-color: #2a2e40; /* cinza padrão */
  box-shadow: 1px 1px 0 #000;
}

/* Cores dos dias Na Tabela */
.otimo {
  background-color: #acdeb2 ; /* Ótimo dia */
}
.bom {
  background-color: #e1eab5 ; /*  Bom dia */
}
.normal {
  background-color: #edad9e ; /*  Normal / Neutro */
}
.melancolico {
  background-color: #fe4b74; /*  Dia Melancólico */
}
.triste {
  background-color: #390d2d; /* Dia Triste */
}
.cinza { /* Neutro */
  background-color: #2a2e40; /* Vazio */
}

/* FORÇAR estilos da tabela */
table.pixel-calendar td {
  width: 14px;
  height: 14px;
  background-color: #2a2e40 !important;
  box-shadow: 1px 1px 0 #000;
}

/* Cores */
table.pixel-calendar td.otimo {
  background-color: #acdeb2 !important;
}                                      
table.pixel-calendar td.bom {          
  background-color: #e1eab5  !important;
}                                      
table.pixel-calendar td.normal {       
  background-color: #edad9e  !important;
}                                      
table.pixel-calendar td.melancolico {  
  background-color: #fe4b74  !important;
}                                    
table.pixel-calendar td.triste {       
  background-color: #390d2d !important;
}

.legenda {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  font-size: 1.2rem;
}

.legenda li {
  margin-bottom: 4px;
}

.box {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  box-shadow: 1px 1px 0 #000;
}

.rpg-dialog {
  position: relative;
  max-width: 640px;
  margin: 20px auto;
  padding: 16px 16px 28px;
  background-color: #161922;
  border: 2px solid #2a2e40;
  box-shadow: 4px 4px 0 #000;
  src: url('W95FA.otf') format('opentype');
  color: #e6e6e6;
  
}

/* Nome do personagem */
.rpg-name {
  position: absolute;
  top: -20px;
  left: 12px;

  background-color: #161922;
  padding: 2px 8px;

  font-size: 0.75rem;
  color: #8fd3ff;

  border: 2px solid #2a2e40;
  box-shadow: 2px 2px 0 #000;
  font-size: 1rem;
}

/* Texto - Dialog */
.rpg-text {
  line-height: 1.6;
  font-size: 1.2rem;
}

/* Seta para baixo no Dialog */
.rpg-arrow {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: #f5d547;

  animation: rpg-blink 1s steps(2, end) infinite;
}

/* Animação - pisca seta Dialog */
@keyframes rpg-blink {
  0%   { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 1; }
}

.setaMoveL {
    height: auto;
    transition: transform 0.5s ease;
}
.setaMoveL:hover {
    transform: translateY(-3px) rotate(4deg) scale(1.1);
}

/* BOTÃO PIXEL ART RPG — FIXADO */
.pixel-button {
  all: unset; /* REMOVE Bootstrap e resets invisíveis */

  display: inline-block;

  font-family: 'W95FA', monospace;
  font-size: 1rem;
  letter-spacing: 1px;

  padding: 6px 14px;

  color: var(--text-main);
  background-color: var(--bg-panel);

  border: 2px solid var(--border-pixel);

  box-shadow:
    2px 2px 0 #000,
    inset -2px -2px 0 #0f1116,
    inset 2px 2px 0 #2a2e40;

  cursor: pointer;
  user-select: none;

  image-rendering: pixelated;
   display: inline-flex;
  align-items: center;
}

/* HOVER — brilho estável */
.pixel-button:hover {
  background-color: #1d2030;
  filter: brightness(1.2);
}

/* CLICK — botão afunda corretamente */
.pixel-button:active {
  transform: translate(2px, 2px);

  box-shadow:
    1px 1px 0 #000,
    inset 2px 2px 0 #0f1116,
    inset -2px -2px 0 #2a2e40;
}

/* BOTÃO IMPORTANTE */
.pixel-button.important {
  color: #000;
  background-color: #f5d547;

  box-shadow:
    2px 2px 0 #000,
    inset -2px -2px 0 #c9a800,
    inset 2px 2px 0 #fff1a8;
}
.pixel-button,
.pixel-button:hover,
.pixel-button:visited,
.pixel-button:active {
  text-decoration: none;
}

/* Manter as cores do livro */
.book {
  border: 7px solid #333;
  background-color: white;
  border-radius: 15px;
  max-width: 100%;
  color: #383838;
  font-family: "W95FA", sans-serif;
  font-size: 1.2rem;
}

.pageL, .pageR {
  flex: 1;
  height: 100%;
  position: relative;
  border-radius: 10px;
  padding: 18px;
  display: flex;
  max-height: 80%;
  overflow: hidden;
  flex-direction: column;
}

.pageL img, .pageR img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pageL {
  border-right: 1px solid grey;
}

.pageR {
  border-left: 1px solid grey;
}

.seam {
  width: 10px;
  background: linear-gradient(to right, white, grey, white);
  flex: 0 0 10px;
}

/* Ajustes para telas menores */
@media (max-width: 768px) {
  .book {
    flex-direction: column;
    max-width: 100%;
    max-height: 100%;
  }
  
  .pageL, .pageR {
    flex: none;
    width: 100%;
    border: none;
  }
  
  .seam {
    display: none;
  }
}
