body {
  font-family: "Poppins", sans-serif;
  background-color: #f9f9f9;
  color: #2c3e50;
  margin: 40px auto;
  max-width: 800px;
  line-height: 1.7;
  padding: 0 20px;
}

h1,
h2,
h3 {
  font-family: "Poppins", sans-serif;
  color: #1a1a1a;
  margin-top: 1.5em;
}

h1 {
  font-size: 2.2em;
  border-bottom: 2px solid #000000;
  padding-bottom: 0.3em;
  background-color: #3498db10;
  border-left: 6px solid #000000;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
}

h1.fade-in {
  animation: fadeSlide 1s ease-out forwards;
}

@keyframes fadeSlide {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.decorated-title {
  font-size: 2.2em;
  padding-left: 10px;
  border-bottom: 3px solid #000000;
  display: inline-block;
}

h2 {
  font-size: 1.5em;
  border-left: 4px solid #000000;
  padding-left: 0.5em;
}

code {
  background-color: #ecf0f1;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  transition: background-color 0.3s, color 0.3s;
}

code:hover {
  background-color: #dfe6e9;
  color: #000000;
}

pre code {
  background: #ecf0f1;
  padding: 10px;
  display: block;
  border-radius: 5px;
  overflow-x: auto;
  background-color: #000000;
  color: #abb2bf;
}

pre code:hover {
  background-color: #000000 !important;
  color: #abb2bf !important;
}

pre code.hljs {
  background-color: #000000 !important;
  color: #ffffff !important;
  border-radius: 30px;
  padding: 16px;
}

ul,
ol {
  padding-left: 1.2em;
}

a {
  color: #2980b9;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 2em 0;
}
.link-list {
  list-style: none;
  padding: 0;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.link-list li {
  margin: 10px 0;
  width: 130px;
  box-sizing: border-box;
}

.link-list a {
  display: block;
  background-color: #005f99;
  color: white;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transform: scale(1);
  border: 2px solid transparent;
  transition: background-color 0.3s ease, color 0.3s ease, border 0.3s ease,
    transform 0.3s ease;
}

.link-list a:hover {
  background-color: transparent;
  color: #005f99;
  border: 2px solid #005f99;
  transform: scale(1.05);
}

.download-link {
  display: inline-block;
  background-color: #c54512;
  color: white;
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border 0.3s ease,
    transform 0.3s ease;
  border: 2px solid transparent;
}

.download-link:hover {
  background-color: transparent;
  transform: scale(1.05);
  color: #c54512;
  border: 2px solid #c54512;
  text-decoration: none;
}
 
::selection {
  background: #b90b4e;
  color: #ffffffff;
}

.atalhos-section {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin-top: 30px;
}

.atalho-bloco {
  flex: 1 1 300px;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.atalho-bloco h3 {
  margin-top: 0;
  font-size: 1.2em;
}

.atalho-bloco ul {
  list-style-type: none;
  padding-left: 0;
}

.atalho-bloco li {
  margin-bottom: 10px;
}

.atalho-bloco code {
  background: #e7e7e7;
  padding: 2px 6px;
  border-radius: 5px;
  font-family: "Courier New", monospace;
}

.atalho-bloco li small {
  display: block;
  color: #555;
  margin-top: 4px;
  font-size: 0.9em;
  line-height: 1.4;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.download-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
  justify-content: left;
}

.download-link {
  flex: 0 0 200px;
  text-align: center;
}

.download-container li {
  list-style: none;
}

.h2-com-botao {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.h2-com-botao h2 {
  margin: 0;
  font-size: 1.5em;
  flex: 1; /* permite que o h2 ocupe o espaço restante */
}

.botao-h2 {
  position: relative;
  display: inline-block;
  background-color: black;
  color: white;
  padding: 8px 16px;
  border-radius: 30px;
  border: 2px solid black;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  overflow: hidden;
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.3s ease;
  z-index: 0;
}

.botao-h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  z-index: -1;
  transition: width 0.8s ease;
}

.botao-h2:hover {
  color: black;
  background-color: transparent;
  transform: scale(1.05);
  text-decoration: none;
}

.botao-h2:hover::before {
  width: 0%;
}

.botoes-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.botao-link-pessoal {
  display: inline-block;
  padding: 12px 24px;
  background-color: #000;
  color: white;
  text-decoration: none;
  border: 2px solid #000;
  border-radius: 30px;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.botao-link-pessoal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  z-index: -1;
  transition: width 0.6s ease;
}

.botao-link-pessoal:hover {
  background-color: transparent;
  color: black;
  transform: scale(1.05);
  text-decoration: none;
}

.botao-link-pessoal:hover::before {
  width: 0%;
}

footer {
  text-align: center;
  padding: 20px;
  color: #777;
  font-size: 14px;
}
.bloco-math-recursos {
  margin-top: 40px;
}

.tabela-math {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 15px;
  background-color: #f9f9f9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.tabela-math th,
.tabela-math td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.tabela-math th {
  background-color: #82888b;
  color: white;
  font-weight: bold;
}

.tabela-math tr:hover {
  background-color: rgb(231, 231, 231);
}

.tabela-math code {
  background-color: #eee;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 14px;
}

/* Tema escuro aplicado ao body */
body.modo-escuro {
  background-color: #121212;
  color: #f5f5f5;
}

/* Ajuste para cabeçalhos */
body.modo-escuro h1,
body.modo-escuro h2,
body.modo-escuro h3 {
  color: #ffffff;
}

/* Fundo de seções */
body.modo-escuro section {
  background-color: #1e1e1e;
}

/* Estilo de botões no modo escuro */
body.modo-escuro .botao-h2 {
  background-color: white;
  color: white;
  border: 2px solid white;
}

body.modo-escuro .botao-h2:hover {
  background-color: white;
  color: rgb(0, 0, 0);
  border-color: white;
}

body.modo-escuro .caixa-titulo {
  background-color: #1e1e1e;
}

body.modo-escuro h2 {
  border-left: 4px solid white;
}

body.modo-escuro .caixa-titulo {
  background-color: #1a1a1a;
  border-left: 6px solid white;
  border-bottom: 1px solid white;
}

body.modo-escuro .bloco-atalho {
  background-color: #1a1a1a;
  color: #ffffff;
  border: 1px solid #888;
}

body.modo-escuro .tabela-math {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 15px;
  background-color: rgb(0, 0, 0);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

body.modo-escuro .tabela-math th {
  background-color: #ffffff;
  color: rgb(0, 0, 0);
  font-weight: bold;
}

body.modo-escuro .tabela-math tr:hover {
  background-color: rgb(255, 255, 255);
  color: #000;
}

body.modo-escuro .tabela-math code {
  background-color: #272727;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 14px;
}

body.modo-escuro .atalho-bloco {
  flex: 1 1 300px;
  background-color: #000000;
  border: 1px solid #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
body.modo-escuro .atalho-bloco h3 {
  margin-top: 0;
  font-size: 1.2em;
}

body.modo-escuro .atalho-bloco ul {
  list-style-type: none;
  padding-left: 0;
}

body.modo-escuro .atalho-bloco li {
  margin-bottom: 10px;
}

body.modo-escuro .atalho-bloco code {
  background: #272727;
  padding: 2px 6px;
  border-radius: 5px;
  font-family: "Courier New", monospace;
}

body.modo-escuro .atalho-bloco li small {
  display: block;
  color: #ffffff;
  margin-top: 4px;
  font-size: 0.9em;
  line-height: 1.4;
}

body.modo-escuro code:hover {
  background-color: #ffffff;
  color: #000000;
}

body.modo-escuro pre code.hljs {
  background-color: #1e1e1e !important;
  color: #ffffff !important;
  padding: 16px;
  font-family: "Courier New", monospace;
  overflow-x: auto;
}

body.modo-escuro .botao-link-pessoal {
  background-color: rgb(0, 0, 0);
  color: rgb(255, 255, 255);
  border: 2px solid white;
}

body.modo-escuro .botao-link-pessoal:hover {
  background-color: rgb(255, 255, 255);
  color: rgb(0, 0, 0);
  border-color: white;
}

#editor {
  width: 100%;
  font-family: "Courier New", monospace;
  font-size: 1em;
  background-color: #1e1e1e;
  color: #f8f8f2;
  border: 1px solid #ccc;
  padding: 12px;
  border-radius: 8px;
  margin-top: 10px;
}

#resultado {
  background-color: #272727;
  color: #00ff90;
  padding: 10px;
  margin-top: 10px;
  border-radius: 6px;
  font-family: "Courier New", monospace;
  white-space: pre-wrap;
}

#digital-clock {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 1.2em;
  font-weight: bold;
  background-color: #000000;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  cursor: move;
  user-select: none;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.modo-escuro .digital-clock {
  color: #f5f5f5;
  background-color: #1e1e1e;
  border: 2px solid #ffffff;
}

#toggle-tema {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
}

#resetar-rel {
  position: fixed;
  top: 60px;
  left: 20px;
  z-index: 1000;
  padding: 8px 14px;
  background-color: #000000;
  color: none;
  border: none;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  font-size: 14px;
}

#resetar-rel:hover {
  transform: scale(1.05);
  color: white;
}

@keyframes voltarPosicao {
  0% {
    transform: scale(1.1) translateY(-10px);
    opacity: 0.5;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

#digital-clock.animando-reset {
  animation: voltarPosicao 0.6s ease-out;
}
.copiar-btn {
  background-color: #282929;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  margin-top: 6px;
  transition: background-color 0.3s;
}

.copiar-btn:hover {
  background-color: #ffffff;
  color: #000;
}
/* Estilo do botão */
.toggle-fullscreen {
  margin-top: 8px;
  background-color: #ffffff;
  color: rgb(0, 0, 0);
  border: none;
  padding: 3px 6px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.3s, color 0.3s;
}

.toggle-fullscreen:hover {
  background-color: #dadada;
  color: #000000;
}

/* Estilo do editor em tela cheia */
#editor.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  font-size: 16px;
  padding: 20px;
  border-radius: 0;
  background: #1e1e1e;
  color: #f5f5f5;
}
.fechar-fullscreen {
  display: none; /* só aparece no fullscreen */
  position: fixed;
  top: 10px;
  right: 10px;
  background: none;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  z-index: 10000;
  transition: background 0.3s;
}

.fechar-fullscreen:hover {
  background: none;
}
.no-scroll {
  overflow: hidden;
  height: 100vh; /* trava a altura */
}
#editor::placeholder {
  color: #888;   /* cinza claro */
  font-style: italic;
  opacity: 0.7;
}
.editor-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

#editor {
  width: 100%;
  height: 200px;
  padding: 10px;
  font-size: 14px;
}

/* Botão fullscreen no canto */
.toggle-fullscreen {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.toggle-fullscreen:hover {
  background: rgba(0, 0, 0, 0.85);
}
