@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
  --fontPri: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Oxygen, Ubuntu, Cantarell, "Open Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --fontTit: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Oxygen, Ubuntu, Cantarell, "Open Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --spacer: 1.6rem;
  --cor-fundo: #f7f7f7;
  --cor-principal: #333;
  --cor-destaque: #f05423;
  /* Laranja Blender */
  --cor-rodape: #222;
  --cor02: linear-gradient(#3d3d3d 1%, #191919 99%);
  --cor03: #d0253f;
  --bg: #0f0f10;
  --line: #2a2a2a;
  --text: #ededed;
  --led-on: #49d24a;
  /* verde do LED aceso */
  --led-off: #d0253f;
  /*#193119;       / * tom escuro quando apagado */
  --glow: 0 0 12px rgba(73, 210, 74, 0.45);
  --size: 0.75rem;
  /* diâmetro do LED */
  --line-height: 3px;
}

* {
  margin: 0;
  padding: 0;
  font-family: var(--fontPri);
  line-height: var(--spacer);
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
  /* Essencial para legibilidade */
  background: #f6f8fa;
}

.status-card {
  width: 100%;
  height: 1.5rem;
  /* padding:18px 22px; */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
  position: fixed;
  bottom: 2rem;
  left: 0;
  z-index: 900;
}

.status-line {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 2px 12px;
  background: var(--bg);
  padding-left: var(--margem);
}

.status-line::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 0.01rem;
  /* var(--line-height);*/
  background: var(--line);
  top: 51%;
  /* centraliza verticalmente */
  transform: translateY(-50%);
  /* centraliza pixel-perfect */
  border-radius: 4px;
  z-index: 0;
}

.led {
  --s: var(--size);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  position: relative;
  z-index: 2;
  /* acima da linha */
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6) inset;
  display: inline-block;
  flex: 0 0 var(--s);
  /* não cresce */
  cursor: pointer;
  transition: box-shadow 180ms linear, background-color 180ms linear, transform 120ms ease;
  background: var(--led-on);
  outline: none;
}

.led.off {
  background: var(--led-off);
  box-shadow: none;
  transform: scale(.98);
}

.led.on {
  background: radial-gradient(circle at 30% 30%, #a9ffd0 6%, var(--led-on) 40%);
  box-shadow: var(--glow);
  transform: scale(1.02);
}

@keyframes pulse-led {
  0% {
    box-shadow: 0 0 0px rgba(73, 210, 74, 0.0);
    transform: scale(1.00);
  }

  50% {
    box-shadow: 0 0 24px rgba(73, 210, 74, 1);
    transform: scale(1.06);
  }

  100% {
    box-shadow: 0 0 0px rgba(73, 210, 74, 0.0);
    transform: scale(1.00);
  }
}

.led.blink.on {
  animation: pulse-led 900ms ease-in-out infinite;
}

.status-text {
  position: relative;
  z-index: 2;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text);
  user-select: none;
}

.hint {
  margin-top: 10px;
  color: #a9a9a9;
  font-size: 0.875rem;
}

/* acessibilidade: reduz movimento se usuário preferir */
@media (prefers-reduced-motion: reduce) {
  .led.blink.on {
    animation: none;
  }

  .led {
    transition: none;
  }
}

/* responsividade */
@media (max-width:520px) {
  .status-line {
    gap: 10px;
    padding: 14px;
  }

  .status-text {
    font-size: 0.98rem;
  }
}

header {
  position: fixed;
  top: 15px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1002;
  transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1),
    left 1s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.6s ease;
}

header img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  z-index: 10;
}

header h1 {
  font-size: 1.5rem;
  color: #222;
  transition: all 0.5s ease;
}

/* Logo animado ao abrir o menu */
header.move-right {
  left: calc(100% - 70%);
  transform: translateX(-50%);
}

header.move-right h1 {
  opacity: 0;
  left: calc(-150%);
  transform: translate(-50%);
  color: #fff;
}

/* BOTÃO DO MENU */
.menu-btn {
  position: fixed;
  top: 15px;
  right: 20px;
  z-index: 1001;
  cursor: pointer;
  width: 35px;
  height: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-btn span {
  display: block;
  height: 4px;
  width: 100%;
  background: #fff;
  border-radius: 4px;
  transition: 0.3s;
}

/* MENU */
nav {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1a2e2a, #0b0f0e);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  clip-path: circle(0% at 100% 0);
  transition: clip-path 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  top: 0rem;
  z-index: 998;
}

.glass {
  background: rgba(26, 46, 42, 0.6);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

nav.open {
  clip-path: circle(150% at 50% 50%);
  top: 0rem;
}

/* Animação do botão */
.menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
  background: #fff;
}

.menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
  background: #fff;
}

/* Itens do menu */
nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

nav ul li {
  margin: 20px 0;
  opacity: 0;
  transform: scale(0.8);
}

nav.open ul li {
  animation: fadeIn 0.6s ease forwards;
}

nav.open ul li:nth-child(1) {
  animation-delay: 0.1s;
}

nav.open ul li:nth-child(2) {
  animation-delay: 0.2s;
}

nav.open ul li:nth-child(3) {
  animation-delay: 0.3s;
}

nav.open ul li:nth-child(4) {
  animation-delay: 0.4s;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.9);
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

main {
  background-color: #fff;
  border-radius: .5rem;
  box-shadow: 0 0 0.8rem rgba(0, 0, 0, .3);
  color: #333;
  padding: 2.4rem;
  position: relative;
  word-break: break-word;
  margin: -4rem 15vw 2rem 15vw;
}

.hero {
  text-align: center;
  padding-top: 100px;
  padding-bottom: 100px;
  background-color: white;
  /* Conteúdo principal em branco */
  background: url(https://static.todamateria.com.br/upload/pa/is/paisagem-natural-og.jpg) no-repeat center;
  background-size: cover;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 400;
  line-height: 200%;
  margin-bottom: .4rem;
  margin-left: var(--margem);
  margin-right: 2.4rem;
  position: relative;
  z-index: 1;
  text-align: left;
  color: #fff;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.hero h1 strong {
  font-weight: 800;
}

.hero p {
  color: #fff;
  text-align: left;
  margin-left: var(--margem);
  width: 45%;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

h1 {
  font-size: 3em;
  margin-bottom: 0.5em;
}

h2 {
  font-size: 2em;
  margin-top: 0;
  margin-bottom: 1em;
  border-bottom: 2px solid var(--cor-destaque);
  display: inline-block;
  padding-bottom: 5px;
}

/* Tabs */
.tabs-container {
  margin: 2rem 10%;
  padding: 1rem 3rem;
  border-radius: .3rem;
  background: #f1f1f1;
  border: 0.01rem solid #ddd;
  min-height: 200px;
}

.tab-content {
  display: block;
  margin-top: 1.5rem;
}

.tab-content.hidden {
  display: none;
}

.tab-buttons button {
  width: 30%;
}

.tab-buttons button.active {
  background-color: gray;
}

.image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  /* Espaçamento entre imagens */
  justify-content: center;
  margin-top: 40px;
}

.image-gallery img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 4px;
  /* Cantos arredondados suaves */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  /* Sombra sutil */
}

footer {
  background: var(--cor-rodape);
  color: white;
  padding: 40px 0;
  text-align: center;
  box-shadow: none;
  position: relative;
}

footer a {
  color: var(--cor-destaque);
  text-decoration: none;
  margin: 0 10px;
}

textarea {
  width: 100%;
  height: 160px;
  padding: 10px;
  font-family: monospace;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.preview {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  /* box-shadow: 0 2px 5px rgba(0, 0, 0, .08); */
  margin-top: 16px;
  margin-bottom: 3rem;
}

pre {
  border-radius: 8px;
  padding: 0;
  /* highlight.js já fornece padding no .hljs (ajustamos) */
  overflow: auto;
  margin: 12px 0;
  background: transparent;
}

.hljs {
  padding: 12px;
  display: block;
}

/* garante padding no bloco de código */
/* Plugin usa uma tabela interna; ajustamos estilo para que apareça bem */
table.hljs-ln {
  border-collapse: collapse;
  width: 100%;
}

td.hljs-ln-numbers {
  text-align: right;
  color: #9aa0a6;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
  padding: 0.5rem;
  user-select: none;
  white-space: nowrap;
}

td.hljs-ln-code {
  padding: 0;
}

/* Remove espaçamento do código dentro da célula para que o highlight ocupe toda a largura */
td.hljs-ln-code>pre {
  margin: 0;
  padding: 12px;
  background: transparent;
  border-radius: 0;
}

/* pequenas melhorias visuais para tema atom-one-dark */
.hljs-ln-numbers {
  background: rgba(0, 0, 0, 0.08);
}

/* ====== LAYOUT PARA TELAS MAIORES ====== */
@media (min-width: 768px) {
  :root {
    --margem: 10rem;
  }

  body {
    padding-top: 70px;
    /* reserva espaço para o menu fixo */
  }

  .status-card {
    top: 0;
  }

  .menu-btn {
    display: none;
  }

  nav {
    position: fixed;
    top: 1.95rem;
    left: 0;
    right: 0;
    height: 70px;
    background: #fff;
    clip-path: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    z-index: 999;
  }

  nav ul {
    display: flex;
    gap: 30px;
    text-align: right;
    justify-content: end;
    width: 100%;
    margin-right: var(--margem);
  }

  nav ul li {
    opacity: 1;
    transform: none;
    margin: 0;
    animation: none;
  }

  nav ul li a {
    color: #333;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    height: 70px;
  }

  nav ul li a:hover {
    color: #8e2de2;
  }

  #logo-header {
    font-size: 1.4rem;
    font-weight: 600;
    color: #4a00e0;
    margin-left: var(--margem);
    margin-top: 2.5rem;
    transition: top 0.5s ease;
  }

  .logo-header-desce {
    top: -2rem;
    transition: top 0.3s ease;
  }

  /* Estado "shrink" ao rolar */
  nav.shrink {
    top: 0;
    height: 60px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
  }

  nav.shrink .logo {
    font-size: 1.2rem;
  }

  main {
    margin: -3rem var(--margem) 3rem var(--margem);
  }

  footer::before {
    content: "";
    height: 2rem;
    width: 100%;
    display: block;
    background-image: linear-gradient(-1deg, var(--cor-rodape) 49%, transparent 50%);
    position: absolute;
    top: -1.9rem;
    /* background: linear-gradient(#d0253f, #cc0041); */
  }

}

/* Ajuste para telas muito largas */
@media (min-width: 1400px) {
  nav {
    padding: 0 100px;
  }
}

/* códigos */

.editor-toolbar {
  display: flex;
  gap: 6px;
  background: #1e1e1e;
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.editor-toolbar button {
  background: #333;
  color: white;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: 0.2s;
}

.editor-toolbar button:hover {
  background: #555;
}

.hidden-editor {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

td.hljs-ln-numbers {
  width: 2rem;
  text-align: center;
  padding-right: 1rem;
}

.hljs-ln-line {
  padding-left: 1rem;
}

.image-repo {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: 260px;
  max-height: 300px;
  overflow-y: auto;
  background: #111;
  color: #fff;
  border: 2px solid #444;
  padding: 10px;
  border-radius: 8px;
  font-family: sans-serif;
  z-index: 9999;
}

.repo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.repo-grid img {
  width: 100%;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 5px;
  transition: transform .2s;
}

.repo-grid img:hover {
  transform: scale(1.05);
}

.repo-item {
  position: relative;
}

.repo-delete {
  position: absolute;
  top: -6px;
  right: -6px;
  background: red;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  line-height: 20px;
  box-shadow: 0 0 4px #000;
  transition: background .2s;
}

.repo-delete:hover {
  background: #b30000;
}

.auth-only,
.guest-only {
  display: none;
}