/* Base */
body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #000;
  color: #fff;
}
.fundo {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: -1;
}

/* Header */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #111;
  border-bottom: 2px solid #0f0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1500;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hamburger {
  font-size: 22px;
  cursor: pointer;
  background: none;
  border: none;
  color: #0f0;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}
.logo {
  height: 38px;
}
.brand {
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #0f0;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-right: 32px; /* ✅ espaçamento aumentado */
}
.btn-top {
  background: #0f0;
  color: #000;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s ease;
  white-space: nowrap;
}
.btn-top:hover {
  background: #0c0;
}
.btn-out {
  background: #e50914;
  color: #fff;
}
.btn-out:hover {
  background: #ff1e27;
}
.btn-theme {
  cursor: pointer;
  border: none;
}

/* Sidebar */
#menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1400;
}
#menu-overlay.active {
  display: block;
}
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 260px;
  background: #1a1a1a;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 2000;
  padding: 16px;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
}
.sidebar.open {
  transform: translateX(0);
}
.sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.sidebar-title {
  color: #0f0;
  font-weight: 700;
}
.sidebar-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.side-link {
  color: #ccc;
  text-decoration: none;
  padding: 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.side-link:hover {
  background: #0f0;
  color: #000;
}
.side-out {
  background: #e50914;
  color: #fff;
}
.side-out:hover {
  background: #ff1e27;
}

/* Main */
main {
  padding-top: 92px;
  padding-bottom: 80px;
}

/* Home propaganda */
.home-box {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}
.home-content {
  background: rgba(0, 0, 0, 0.85);
  padding: 28px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  max-width: 520px;
  width: 90%;
}
.home-content h1 {
  font-size: 26px;
  color: #0f0;
  margin-bottom: 8px;
}
.home-content p {
  font-size: 17px;
  margin-bottom: 18px;
}
.home-content .button {
  display: inline-block;
  background: #0f0;
  color: #000;
  font-weight: bold;
  padding: 12px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 16px;
}
.home-content .button:hover {
  background: #0c0;
}
.info {
  margin-top: 16px;
  font-size: 14px;
  color: #aaa;
}

/* Footer */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #111;
  color: #fff;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  z-index: 999;
}

/* Robô */
.robozinho {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 100px;
  height: 100px;
  z-index: 1000;
  animation: flutuar 3s ease-in-out infinite;
}
.robozinho img {
  width: 100%;
  height: auto;
}
@keyframes flutuar {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Aviso modal */
.modal-aviso {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 3000;
}
.aviso-conteudo {
  background: #ff4444;
  color: #fff;
  padding: 20px;
  border-radius: 8px;
  max-width: 420px;
  margin: 12% auto;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  font-weight: 600;
}
.aviso-fechar {
  position: absolute;
  top: 6px;
  right: 10px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.aviso-conteudo p {
  margin: 0;
}

/* Toasts */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  padding: 12px 18px;
  border-radius: 8px;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateX(100%);
  animation: slideIn 0.35s forwards, fadeOut 0.45s 4.5s forwards;
}
.toast.sucesso {
  background: #0f0;
  color: #000;
}
.toast.erro {
  background: #e50914;
}
.toast.info {
  background: #2196f3;
}
@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Tema claro */
body.light-mode {
  background: #f7f7f7;
  color: #111;
}
body.light-mode .topbar {
  background: #f3f3f3;
  border-bottom-color: #111;
}
body.light-mode .brand {
  color: #111;
}
body.light-mode .home-content {
  background: rgba(255, 255, 255, 0.9);
  color: #111;
body.light-mode .btn-top:hover {
  background: #333;
}
body.light-mode .btn-out {
  background: #e50914;
  color: #fff;
}
body.light-mode footer {
  background: #f3f3f3;
  color: #111;
}
body.light-mode .side-link:hover {
  background: #111;
  color: #fff;
}

/* Responsivo */
@media (max-width: 768px) {
  .topbar {
    padding: 10px 12px;
  }

  .topbar-right {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding-right: 16px;
  }

  .btn-top {
    width: 100%;
    text-align: right;
  }

  .top-clock {
    margin-top: 6px;
    margin-left: 0;
    padding-right: 0;
  }

  .sidebar {
    width: 85vw;
  }
}
