:root {
  --laranja: #ed8c00;
  --link: #ffa217;
  --fundo: #fefefe;
  --sidebar: #f2f2f2;
  --texto: #333333;
  --texto-suave: #666666;
  --borda: #e2e2e2;
  --texto-sidebar: #555;
  --laranja-sidebar: #f5940b50;
  --laranja-sidetitle: #e08402;
}
body.dark {
  --fundo: #333333;
  --sidebar: #262626;
  --texto: #fefefe;
  --texto-suave: #D0D0D0;
  --borda: #3a3a3a;
  --texto-sidebar: #f1f1f1;
}

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

body {
  font-family: 'Lato', Arial;
  background: var(--fundo);
  color: var(--texto);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: background 0.2s, color 0.2s;
}

h1 {
  font-family: 'Passion One', sans-serif;
  font-weight: normal;
}

h2 {
  font-family: 'Oswald', sans-serif;
  font-weight: normal;
}

h3 {
  font-family: 'Lato', sans-serif;
  font-weight: normal;
}

/* Navbar + Meio */
header {
  font-family: 'Oswald';
  background: var(--laranja);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Botão hambúrguer mobile */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px; height: 34px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 24px; height: 3px;
  background: #fff;
  border-radius: 2px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 32px;
  cursor: pointer;
  font-family: 'Passion One';
  text-shadow: 2px 2px 4px #33333350;
}
.logo .avatar {
  width: 32px; height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 6px;
}
.logo .sparkly { color: #e63946; }
.logo .wiki { color: #0a2463; }
body.dark .logo .wiki { color: #7aa7ff; }

.nav-top {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px #33333350;  
}
.nav-top a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.15s;
}
.nav-top a:hover { opacity: 0.8; }
#toggle-tema {
  background: none; border: none;
  color: #fff; cursor: pointer;
  font-size: 20px; line-height: 1;
}

.container { display: flex; flex: 1; overflow: hidden; }

/* Sidebar */
.sidebar {
  width: 240px;
  background: var(--sidebar);
  border-right: 1px solid var(--borda);
  padding: 20px 0;
  overflow-y: auto;
  flex-shrink: 0;
  font-weight: 800;
}
.sidebar h3 {
  font-size: 18px;
  color: var(--laranja-sidetitle);
  padding: 16px 20px 4px;
  font-weight: 900;
}
.sidebar h3:first-child { padding-top: 0; }
.sidebar a {
  display: block;
  padding: 6px 20px 6px 28px;
  color: var(--texto-sidebar);
  text-decoration: none;
  font-size: 16px;
  cursor: pointer;
  transition: color 0.15s;
}
.sidebar a:hover { color: var(--laranja); }
.sidebar a.ativo {
  color: var(--laranja);
  font-weight: 600;
  border-left: 3px solid var(--laranja);
  padding-left: 25px;
}

/* Responsividade Stuff */
.overlay {
  display: none;
  position: fixed;
  inset: 56px 0 0 0;
  background: rgba(0,0,0,0.45);
  z-index: 15;
}

/* Textos Gerais */
.conteudo {
  flex: 1;
  padding: 40px 60px;
  overflow-y: auto;
  border-left: 3px solid var(--laranja-sidebar);
}

/* Textos */
.conteudo h1 { font-size: 40px; margin-bottom: 8px; color: var(--laranja); }
.conteudo h2 { font-family: 'Lato'; font-weight: 900; font-size: 24px; margin: 28px 0 10px; border-bottom: 2px solid var(--borda); padding-bottom: 6px; }
.conteudo h3 { font-size: 19px; margin: 20px 0 8px; font-weight: 700;}
.conteudo p  { margin: 12px 0; line-height: 1.7; }
.conteudo ul, .conteudo ol { margin: 12px 0 12px 24px; line-height: 1.8; }
.conteudo a { color: var(--laranja-escuro); }
.conteudo code { background: var(--sidebar); padding: 2px 6px; border-radius: 4px; font-family: 'Consolas', monospace; font-size: 0.9em; }
.conteudo pre { background: var(--sidebar); padding: 14px; border-radius: 8px; overflow-x: auto; margin: 14px 0; }
.conteudo pre code { background: none; padding: 0; }
.conteudo blockquote { border-left: 4px solid var(--laranja); padding: 4px 16px; margin: 14px 0; color: var(--texto-suave); background: var(--sidebar); border-radius: 0 6px 6px 0; }
.conteudo table { border-collapse: collapse; margin: 14px 0; width: 100%; }
.conteudo th, .conteudo td { border: 1px solid var(--borda); padding: 8px 12px; text-align: left; }
.conteudo th { background: var(--laranja); color: #fff; }
.conteudo img { max-width: 100%; border-radius: 8px; }
.conteudo ul li::marker { color: var(--laranja); }


/* Cards */
.home { text-align: center; }
.home .logo-hero { max-width: 640px; width: 100%; margin: 10px auto 24px; display: block; }
.home .title { font-family: 'Passion One', sans-serif;color: var(--laranja); font-size: 40px; margin-bottom: 16px; }
.home .subtitulo { font-family: 'Lato'; color: var(--texto); max-width: 560px; margin: 0 auto 36px; line-height: 1.6; font-size: 16px; font-weight: bold;}
.home .subtitulo a { color: var(--link); font-weight: 600; }
.home .question { color: var(--laranja); font-size: 28px; font-weight: 800; margin-bottom: 24px; }

.cards {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.card {
  width: 180px;
  border: 3px solid;
  border-radius: 2px;
  padding: 18px 14px 14px;
  background: var(--sidebar);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 8px 18px rgba(0,0,0,0.18); }
.card img { width: 96px; height: 96px; object-fit: contain; image-rendering: pixelated; }
.card span { font-size: 18px; font-weight: 700; color: var(--texto); }

.card.terrenos     { border-image: linear-gradient(45deg, #45BF3F, #704F21) 1; }
.card.economia     { border-image: linear-gradient(45deg, #453FBF, #70214F) 1; }
.card.mcmmo        { border-image: linear-gradient(45deg, #B2057E, #089FAF) 1; }
.card.itens-custom { border-image: linear-gradient(45deg, #CC0000, #eb731d) 1; }

.home .rodape-dica { font-family: 'Lato'; color: var(--texto-suave); font-size: 14px; margin-top: 8px; font-weight: bold;}

/* Responsividade Geral */

@media (max-width: 768px) {

  .menu-toggle { display: flex; }

  .logo { font-size: 24px; }
  .nav-top { gap: 16px; font-size: 15px; }

  .sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 20;
    box-shadow: 2px 0 12px rgba(0,0,0,0.25);
  }
  .sidebar.aberta { transform: translateX(0); }

  .overlay.ativa { display: block; }

  .conteudo { padding: 28px 20px; border-left: none; }

  /* Home */
  .home .logo-hero { max-width: 100%; }
  .home .title { font-size: 28px; }
  .home .question { font-size: 22px; }

  /* Cards */
  .cards { gap: 12px; }
  .card { width: calc(50% - 6px); max-width: 220px; }
}


@media (max-width: 480px) {
  
  .logo .h1 { display: none; }

  .nav-top { gap: 12px; font-size: 13px; }

  .home .title { font-size: 24px; }
  .home .question { font-size: 20px; }

  /* Cards */
  .card { width: 100%; max-width: 280px; }
}
