/* Video Modal Styles */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999; /* Valor extremamente alto para garantir sobreposição */
  display: none;
  overflow-y: auto;
  font-family: "Inter", sans-serif;
}

.video-modal.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.video-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  z-index: 1;
  cursor: pointer;
}

.video-modal-container {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2;
}

.video-modal-content {
  position: relative;
  background: var(--card-bg);
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  margin: 20px auto;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transform: translateY(0);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.video-modal.active .video-modal-content {
  animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  pointer-events: auto;
}

.video-modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.1);
  border-top: 1px solid var(--border-color);
}

.dont-show-again {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s;
}

.dont-show-again:hover {
  color: var(--text-primary);
}

.dont-show-again input {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--accent-color);
}

.btn-close-video {
  padding: 8px 20px;
  background: var(--accent-color);
  color: #121212;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  pointer-events: auto;
  position: relative;
  z-index: 10;
}

.btn-close-video:hover {
  background: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .video-modal-container {
    padding: 10px;
    align-items: flex-start;
  }

  .video-modal-content {
    margin: 10px auto;
  }

  .video-modal-footer {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .btn-close-video {
    width: 100%;
  }

  .video-modal-close {
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .video-wrapper {
    padding-bottom: 75%; /* Mais altura para mobile */
  }

  .dont-show-again {
    font-size: 13px;
  }
}

/* Acessibilidade */
.video-modal-close:focus,
.btn-close-video:focus,
.dont-show-again input:focus {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* Dark/Light mode compatibility */
body.light-mode .video-modal-content {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body.light-mode .video-modal-footer {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .dont-show-again {
  color: var(--text-secondary);
}

/* Estilo para o botão Vídeo no menu */
.nav-links #videoBtn {
  transition: all 0.3s ease;
}

.nav-links #videoBtn:hover {
  color: var(--accent-color);
  transform: translateY(-2px);
}

.nav-links #videoBtn .fa-video {
  margin-right: 8px;
}

/* Efeito ativo quando o modal está aberto */
.nav-links #videoBtn.active-video {
  color: var(--accent-color);
  background: rgba(187, 134, 252, 0.1);
}
