/* Custom CSS for Novum Security */
@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.pulse-whatsapp {
  animation: pulse-green 2s infinite;
}

html {
  scroll-behavior: smooth;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #020822;
}
::-webkit-scrollbar-thumb {
  background: #FF2200;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #D01A00;
}

/* ===================================================
   SEÇÃO TOTEM: COMPOSIÇÃO DARK NAVY & OPERAÇÕES
   =================================================== */

#totem {
  background: radial-gradient(circle at 50% 20%, #0a1728 0%, #050b14 100%) !important;
  position: relative;
}

#totem3d-container {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}

#totem3d-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 600px;
  border-radius: 28px;
  background: radial-gradient(circle at 50% 30%, #0a1728 0%, #050b14 85%);
  border: 1px solid rgba(0, 168, 255, 0.22);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 100, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  transition: background 0.8s ease, border-color 0.8s ease, box-shadow 0.8s ease;
}

#totem3d-canvas-wrapper:active {
  cursor: grabbing;
}

#totem3d-canvas-wrapper.night-mode {
  background: radial-gradient(circle at 50% 25%, #071224 0%, #02060e 92%);
  border-color: rgba(0, 210, 255, 0.40);
  box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.95), 0 0 55px rgba(0, 210, 255, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#totem3d-canvas-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
  outline: none;
  touch-action: none;
}

/* Overlay e Controles */
.totem3d-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 22px;
  z-index: 10;
}

.totem3d-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

.totem3d-badge {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(3, 10, 24, 0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 9999px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.badge-pill {
  background: #FF2200;
  color: #ffffff;
  padding: 2px 9px;
  border-radius: 9999px;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 10px rgba(255, 34, 0, 0.50);
}

.totem3d-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00d2ff;
  box-shadow: 0 0 10px #00d2ff;
  animation: pulse-indicator 1.8s infinite;
}

@keyframes pulse-indicator {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.totem3d-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.totem3d-btn {
  background: rgba(3, 10, 24, 0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  user-select: none;
}

.totem3d-btn:hover {
  background: rgba(255, 34, 0, 0.90);
  border-color: #ff2200;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 34, 0, 0.40);
}

.totem3d-btn.active {
  border-color: #00d2ff;
  color: #38bdf8;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.30);
}

.totem3d-footer {
  text-align: center;
  pointer-events: none;
}

.totem3d-hint {
  display: inline-block;
  background: rgba(3, 10, 24, 0.80);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 9999px;
}

/* ── HOTSPOTS INTERATIVOS PULSANTES NO MODELO 3D ── */
.totem-hotspot {
  position: absolute;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  margin-top: -13px;
  cursor: pointer;
  z-index: 25;
  pointer-events: auto;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.totem-hotspot:hover {
  transform: scale(1.30);
}

.hs-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #00d2ff;
  background: rgba(0, 210, 255, 0.22);
  animation: hs-pulse 2.2s infinite ease-out;
}

.hs-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px #00d2ff, 0 0 20px #00d2ff;
}

@keyframes hs-pulse {
  0% { transform: scale(0.7); opacity: 1; }
  60% { transform: scale(2.3); opacity: 0; }
  100% { transform: scale(2.3); opacity: 0; }
}

.totem-tooltip {
  position: absolute;
  z-index: 35;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  width: 250px;
  background: rgba(4, 12, 28, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 210, 255, 0.40);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.70), 0 0 25px rgba(0, 210, 255, 0.20);
  border-radius: 14px;
  padding: 12px 16px;
  color: #e2e8f0;
}

.totem-tooltip.open,
.totem-tooltip.hover-open,
.totem-hotspot:hover + .totem-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.totem-tooltip strong {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #00d2ff;
  margin-bottom: 5px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.totem-tooltip p {
  font-size: 11px;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0;
}

/* ── CONTROLE DIRECIONAL 3D (D-PAD) ── */
.totem3d-dpad {
  position: absolute;
  bottom: 20px;
  left: 20px;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(3, 10, 24, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 210, 255, 0.28);
  border-radius: 18px;
  padding: 8px 8px 6px 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.70), 0 0 20px rgba(0, 168, 255, 0.15);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  z-index: 20;
  transition: all 0.3s ease;
}

#totem3d-canvas-wrapper.night-mode .totem3d-dpad {
  border-color: rgba(0, 210, 255, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 210, 255, 0.25);
}

.dpad-mid {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dpad-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(12, 28, 56, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  padding: 0;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
}

.dpad-btn:hover {
  background: rgba(0, 168, 255, 0.35);
  border-color: #00d2ff;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.45);
  transform: scale(1.08);
}

.dpad-btn:active {
  background: #ff2200;
  border-color: #ff2200;
  color: #ffffff;
  transform: scale(0.95);
  box-shadow: 0 0 15px rgba(255, 34, 0, 0.60);
}

.dpad-center {
  border-radius: 50%;
  font-size: 14px;
  background: rgba(4, 20, 48, 0.85);
  border-color: rgba(0, 210, 255, 0.40);
  color: #38bdf8;
}

.dpad-center:hover {
  background: rgba(0, 210, 255, 0.40);
  color: #ffffff;
}

.dpad-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 3px;
  user-select: none;
}

@media (max-width: 640px) {
  #totem3d-canvas-wrapper {
    height: 500px;
    border-radius: 20px;
  }
  .totem3d-overlay {
    padding: 14px 16px;
  }
  .totem3d-btn {
    padding: 6px 11px;
    font-size: 11px;
  }
  .totem3d-dpad {
    bottom: 12px;
    left: 12px;
    padding: 6px 6px 5px 6px;
    gap: 3px;
    border-radius: 14px;
  }
  .dpad-mid {
    gap: 3px;
  }
  .dpad-btn {
    width: 28px;
    height: 28px;
    font-size: 11px;
    border-radius: 8px;
  }
  .dpad-center {
    font-size: 12px;
  }
  .dpad-tag {
    font-size: 8px;
  }
  .totem-tooltip {
    width: 210px;
    font-size: 10px;
  }
}
