/* ========== IMPORT DA FONTE CHAMATIVA ========== */
@import url('https://fonts.googleapis.com/css2?family=Audiowide&display=swap');

/* ========== ESTILOS GERAIS ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Arial, sans-serif;
  background-color: #000000;
  color: #fff;
  overflow-x: hidden;
  padding-bottom: 80px;
}
header {
  display: flex; align-items: center; justify-content: center;
  background-color: #000; padding: 20px;
}
.logo { height: 40px; margin-right: 12px; }
h1 {
  font-family: 'Audiowide', sans-serif; font-size: 2.2rem;
  color: #8a2be2; letter-spacing: 1px;
}
/* NEON LINE */
.neon-line {
  width: 100%; height: 4px;
  background: linear-gradient(270deg, #8a2be2, #4b0082, #8a2be2);
  background-size: 600% 600%;
  box-shadow: 0 0 8px #8a2be2, 0 0 16px #8a2be2, 0 0 24px #4b0082;
  animation: neonGlow 3s ease infinite;
}
@keyframes neonGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
main { padding: 20px; }

/* GRID DE CARDS */
#video-list, #category-video-list, #favorites-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 32px;
  margin-top: 32px;
  justify-items: center;
}

/* CARD DE VÍDEO */
.video-card {
  position: relative; width: 200px;
  background: rgba(20, 0, 40, 0.75);
  backdrop-filter: blur(14px);
  border-radius: 20px; border: 2px solid transparent;
  box-shadow: 0 12px 24px rgba(0,0,0,0.8), 0 0 16px rgba(138,43,226,0.9);
  cursor: pointer; transform-style: preserve-3d;
  transition: transform 0.3s, box-shadow 0.3s, border 0.3s;
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0;
}
.video-card::before {
  content: ""; position: absolute; top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: 22px;
  background: linear-gradient(45deg, #8a2be2, #4b0082, #8a2be2);
  background-size: 400% 400%; z-index: -1; filter: blur(8px);
  animation: neonBorder 4s ease infinite;
}
@keyframes neonBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.video-card:hover {
  transform: perspective(1000px) translateY(-14px) rotateX(10deg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.9), 0 0 20px rgba(138,43,226,1);
  border: 2px solid rgba(138,43,226,0.8);
}
/* Miniatura vídeo */
.video-thumb {
  width: 180px; height: 110px;
  object-fit: cover;
  background-color: #000;
  border-radius: 12px;
  border: 2px solid rgba(138,43,226,0.6);
  box-shadow: 0 4px 8px rgba(0,0,0,0.5), 0 0 8px rgba(138,43,226,0.7);
}
/* Título */
.video-title {
  font-family: 'Audiowide', sans-serif;
  font-size: 1rem;
  color: #fff;
  text-shadow: 0 0 6px rgba(138,43,226,0.8);
  text-align: center; padding: 0 8px; margin: 4px 0 0 0;
}
/* Botão "ver" */
.btn-ver {
  background-color: #9c3cff; color: #fff;
  font-family: 'Audiowide', sans-serif;
  font-size: 0.9rem; border: none; border-radius: 10px;
  padding: 8px 16px; margin: 8px 0 4px 0; cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5), 0 0 8px rgba(138,43,226,0.7);
  transition: background-color 0.2s, transform 0.2s;
}
.btn-ver:hover { background-color: #bf5fff; transform: translateY(-2px) scale(1.03); }
/* Favorito */
.favorite-btn {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; font-size: 1.2rem;
  color: #ddd; cursor: pointer; transition: color 0.2s;
}
.favorite-btn:hover { color: #9c3cff; }

/* ========== PLAYER DE VÍDEO NO MODAL ========== */
#custom-video-player {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 220px;
  width: 100%;
  padding: 18px 0 0 0;
  background: transparent;
  position: relative;
}

/* Botão play roxo, redondo, centralizado - SEMPRE 150x150 */
.custom-play-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 60% 30%, #8a2be2 80%, #2b1c41 100%);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 150px;
  height: 150px;
  font-size: 3.5em;
  margin: 36px auto 16px auto;
  box-shadow: 0 2px 18px #8a2be266;
  cursor: pointer;
  transition: transform 0.14s, background 0.19s;
  position: relative;
  z-index: 2;
  outline: none;
}
.custom-play-btn:hover {
  background: radial-gradient(circle at 60% 30%, #b67cff 85%, #43266e 100%);
  transform: scale(1.08);
}
.custom-play-btn span {
  display: block;
  margin-left: 7px;
  font-size: 1.1em;
  filter: drop-shadow(0 0 4px #fff);
  pointer-events: none;
}
/* Garante o mesmo tamanho no mobile */
@media (max-width: 480px) {
  .custom-play-btn {
    width: 150px;
    height: 150px;
    font-size: 3.5em;
    margin: 24px auto 10px auto;
  }
}

/* Player do vídeo real */
.modal-video-player {
  width: 100%;
  max-width: 410px;
  max-height: 60vh;
  display: block;
  margin: 24px auto 10px auto;
  background: #181028;
  border-radius: 17px;
  box-shadow: 0 6px 22px #22005e33, 0 1px 6px #0002;
  object-fit: cover;
  outline: none;
  transition: box-shadow 0.2s;
}
@media (max-width: 460px) {
  .modal-video-player {
    max-width: 99vw;
    margin: 10px auto 8px auto;
    border-radius: 12px;
  }
}

/* BANNER */
.banner-container { width: 100%; max-height: 180px; overflow: hidden; margin-top: 20px; }
.banner-slide { display: none; width: 100%; }
.banner-slide.active { display: block; }
.banner-slide img { display: block; width: 100%; height: 180px; object-fit: cover; }

/* BARRA DE PESQUISA */
.search-container { width: 100%; max-width: 600px; margin: 20px auto; padding: 0 20px; }
#search-input {
  width: 100%; padding: 12px 16px; font-size: 1rem;
  border: 2px solid #8a2be2; border-radius: 8px;
  background: rgba(20,0,40,0.8); color: #fff;
}
#search-input::placeholder { color: #ccc; }

/* MENSAGENS DE ESTADO */
.loading, .empty, .error {
  grid-column: 1 / -1; text-align: center;
  font-size: 1rem; color: #fff;
}

/* VIEWS */
.view { display: none; }
.view.visible { display: block; }
.view-title {
  font-family:'Audiowide',sans-serif;
  text-align:center; color:#8a2be2; margin:16px 0;
}

/* LISTA DE CATEGORIAS */
.category-list-index { list-style: none; padding: 0 20px; }
.category-list-index li {
  padding: 12px; margin: 8px 0; background: rgba(20,0,40,0.8);
  border-radius: 8px; border: 2px solid #8a2be2;
  color: #fff; text-align: center; cursor: pointer; transition: background 0.2s;
}
.category-list-index li:hover,
.category-list-index li.selected { background: #8a2be2; color: #000; }

/* MODAL */
.modal {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center;
  z-index: 999; padding: 20px;
}
.modal.open { display: flex; }
.modal-content {
  background: rgba(20,20,20,0.95); border-radius: 12px; padding: 20px;
  max-width: 640px; width: 90%; position: relative;
  box-shadow: 0 8px 16px rgba(0,0,0,0.8), 0 0 12px rgba(138,43,226,0.7);
  overflow-y: auto; max-height: 90vh;
}
.modal-close {
  position: absolute; top: 12px; right: 12px; background: none; border: none;
  font-size: 1.8rem; color: #fff; cursor: pointer; transition: color 0.2s;
}
.modal-close:hover { color: #8a2be2; }
#modal-title {
  font-family: 'Audiowide',sans-serif; font-size: 2rem;
  color: #fff; text-shadow: 0 0 8px rgba(138,43,226,0.9);
  margin-bottom: 16px; text-align: center;
}

/* ========== BOTTOM NAV ========== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0;
  width: 100%; height: 64px;
  display: flex; justify-content: space-around; align-items: center;
  background: rgba(20,20,20,0.8);
  backdrop-filter: blur(12px);
  border-top: 2px solid #4b0082;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.8);
  z-index: 1000;
}
.nav-btn {
  flex: 1; margin: 0 8px; height: 44px;
  background: rgba(138,43,226,0.2);
  color: #8a2be2;
  font-family:'Audiowide',sans-serif;
  font-size: 0.9rem; border: none; border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5), 0 0 8px rgba(138,43,226,0.7);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, color 0.2s;
}
.nav-btn.active, .nav-btn:hover {
  background: rgba(138,43,226,0.6); transform: translateY(-2px); color: #fff;
}

/* MODAL BUTTONS */
.modal-buttons {
  display: flex; gap: 12px; justify-content: center; margin-top: 16px;
  flex-wrap: wrap; align-items: center;
}
.btn-fonte, .btn-download {
  font-family: 'Audiowide',sans-serif; font-size: 0.9rem;
  padding: 10px 20px; border-radius: 8px; border: 2px solid #4b0082;
  cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center;
  transition: background-color 0.2s, transform 0.2s, color 0.2s;
}
.btn-fonte::before, .btn-download::before {
  content: ""; display: inline-block;
  width: 18px; height: 18px; margin-right: 8px;
  background-size: contain; background-repeat: no-repeat; background-position: center;
}
.btn-fonte { background-color: #8a2be2; color: #fff; }
.btn-fonte.instagram::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='4' width='16' height='16' rx='4' ry='4' stroke='%23FFFFFF' fill='none' stroke-width='2'/%3E%3Ccircle cx='12' cy='12' r='4' stroke='%23FFFFFF' fill='none' stroke-width='2'/%3E%3Ccircle cx='17' cy='7' r='1' fill='%23FFFFFF'/%3E%3C/svg%3E");
}
.btn-fonte.tiktok::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2v14.5A4.5 4.5 0 1 1 9.5 12V8h4V2h-1z' fill='%23FFFFFF'/%3E%3C/svg%3E");
}
.btn-fonte:hover { background-color: #9c3cff; transform: translateY(-2px) scale(1.03); }
.btn-download {
  font-size: 1.02rem; padding: 14px 32px; border-radius: 12px;
  border: 2.5px solid #a968ff; background-color: #8a2be2; color: #fff;
  box-shadow: 0 0 18px 2px #8a2be2b8, 0 0 40px 5px #4b008288;
  text-shadow: 0 0 4px #8a2be2, 0 0 2px #fff6;
  position: relative; z-index: 1;
}
.btn-download::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12M12 15l4-4M12 15l-4-4M4 21h16' stroke='%23FFFFFF' fill='none' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  width: 20px; height: 20px; margin-right: 10px;
}
.btn-download:hover {
  background: #a968ff; color: #fff;
  box-shadow: 0 0 28px 8px #a968ffaa, 0 0 60px 8px #8a2be266;
  transform: scale(1.04) translateY(-2px);
}
/* Denunciar */
.btn-report {
  font-family: 'Audiowide',sans-serif; font-size: 0.65rem;
  padding: 2.5px 8px; border-radius: 7px; border: 1px solid #aa3636;
  background: rgba(226,43,43,0.05); color: #aa3636;
  cursor: pointer; display: block; margin: 16px auto 0 auto;
  opacity: 0.5; box-shadow: none;
  transition: background 0.18s, transform 0.18s, color 0.18s;
  min-width: 74px; text-align: center;
}
.btn-report:hover { background: rgba(226,43,43,0.17); color: #fff; opacity: 1; }

/* RESPONSIVO */
@media screen and (max-width: 480px) {
  #video-list, #category-video-list, #favorites-list {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 24px;
  }
  .video-card { width: 160px; padding: 10px 0; }
  .video-thumb { width: 140px; height: 90px; }
  .btn-ver { padding: 6px 12px; font-size: 0.8rem; margin: 6px 0 2px 0; }
  .video-title { font-size: 0.85rem; margin: 2px 0 0 0; }
  #modal-title { font-size: 1.5rem; }
  .modal-buttons { flex-direction: column; gap: 4px; }
  .btn-fonte, .btn-download { width: 100%; justify-content: center; font-size: 0.9rem; margin: 0; }
  .btn-download { font-size: 1rem; padding: 11px 0; margin-bottom: 0; border-radius: 9px; }
  .btn-fonte::before, .btn-download::before { width: 16px; height: 16px; margin-right: 6px; }
  .btn-report { font-size: 0.57rem; padding: 2px 6px; min-width: 60px; margin: 10px auto 0 auto; border-radius: 6px; opacity: 0.36; }
}

/* FORM LOGIN */
#auth-form input {
  display: block; width: 100%; padding: 11px 12px; border-radius: 7px;
  border: 2px solid #4b0082; background: #19102b; color: #fff; font-size: 1rem;
  margin-bottom: 10px; font-family: 'Audiowide',sans-serif;
}
#auth-toggle { display: flex; gap: 0; margin-bottom: 12px; }
#auth-toggle .nav-btn {
  flex: 1; margin: 0; border-radius: 0; border-bottom: 3px solid transparent;
  background: #19102b; color: #8a2be2;
}
#auth-toggle .nav-btn.active {
  background: #8a2be2; color: #fff; border-bottom: 3px solid #fff;
}
