
/* 1. Variáveis e reset */
html { scroll-behavior: smooth; }
:root {
  --primary: #3498db;
  --secondary: #2980b9;
  --accent: #e74c3c;
  --dark: #2c3e50;
  --light: #ecf0f1;
  --shadow: 0 4px 6px rgba(0,0,0,0.1);
  --transition: 0.3s ease;
}
* { margin:0; padding:0; box-sizing:border-box; font-family:sans-serif; }

/* 2. Layout básico */
body { background: var(--light); color: #333; }
header {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #fff; padding: 1rem; position: fixed; top: 0; width: 100%; z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
nav {
  max-width: 1200px; margin: auto;
  display: flex; justify-content: space-between; align-items: center;
}
nav a { color: #fff; text-decoration: none; font-weight: bold; font-size: 1.2rem; }

main.main {
  max-width: 1200px; margin: 6rem auto 2rem; padding: 0 1rem;
}
main.main h1 {
  font-size: 2rem; margin-bottom: 1rem;
  opacity: 0; animation: slideDown 0.6s ease-out forwards;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 3. Navegação de temas */
.themes {
  display: flex; justify-content: center; gap: .5rem; margin: 1rem 0;
}
.themes button {
  padding: .5rem 1rem; border: none; border-radius: 20px;
  background: var(--light); cursor: pointer;
  transition: transform var(--transition), background var(--transition);
}
.themes button.active {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #fff;
}
.themes button:hover {
  transform: translateY(-2px) scale(1.05);
}

/* 4. Grid de vídeos com perspectiva */
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px,1fr));
  gap: 1.5rem;
  perspective: 1000px;
}
.card {
  background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer;
  transform-style: preserve-3d;
  opacity: 0; transform: translateY(20px);
  animation: fadeInUp 0.5s forwards;
  animation-delay: var(--delay);
  transition: transform var(--transition), box-shadow var(--transition);
}
@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}
.card:hover {
  transform: translateY(-10px) rotateY(5deg) rotateX(2deg);
  box-shadow: 0 15px 25px rgba(0,0,0,0.2);
}

/* 5. Thumbnail e play */
.thumb { position: relative; height: 150px; overflow: hidden; }
.thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--transition);
}
.card:hover .thumb img {
  transform: scale(1.1);
}
.play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(0,0,0,.6); opacity: 0;
  display: flex; align-items: center; justify-content: center;
  transition: opacity var(--transition), transform var(--transition);
}
.play:after {
  content: '';
  border-left: 15px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}
.card:hover .play {
  opacity: 1;
  transform: translate(-50%,-50%) scale(1.1);
}

/* 6. Info do vídeo */
.info { padding: 1rem; }
.info h3 { margin-bottom: .5rem; font-size: 1.1rem; color: var(--dark); }
.info small { color: #777; }

/* 7. Modal com zoom */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.8);
  justify-content: center; align-items: center;
}
.modal.active { display: flex; }
.modal-content {
  position: relative;
  background: #000; border-radius: 8px; overflow: hidden;
  animation: zoomIn 0.4s ease forwards;
}
@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.modal-content iframe {
  width: 100%; height: 450px; border: none;
}
.modal-close {
  position: absolute; top: 8px; right: 12px;
  color: #fff; font-size: 2rem; cursor: pointer;
}
