* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background-color: #000;
}

button,
select,
input {
  font-family: "Poppins", sans-serif;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 7px;
}

.navbar {
  position: sticky;
  top: 12px;
  margin: auto;
  max-width: 1280px;
  width: 95%;
  z-index: 9999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(38, 38, 38, 0.500);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 1.5rem;
  padding: 0 20px;
}

.navbar img {
  height: 50px;
}

.navbar a {
  color: #fff;
  text-decoration: none;
  padding: 0 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 15px;
  transition: 0.3s;
  font-size: larger;
}

.navbar a svg {
  stroke: #fff;
  width: 24px;
  height: 24px;
  transition: 0.3s ease;
}

.navbar a:hover {
  color: white;
  border-radius: 15px;
  background-color: #ffffff18;
}

.navbar a:hover svg {
  stroke: white;
}

.navbar-item.liveitem {
  background-color: rgba(255, 0, 0, 0.598) !important;
  color: rgb(255, 208, 208) !important;
  border-radius: 1rem;
  display: none;
}

.liveitem svg{
  stroke: rgb(255, 208, 208) !important;
}

.navbar-end {
  display: flex;
  align-items: center;
}

.navbar-item.active {
  background: #ffffff31;
  backdrop-filter: blur(24px);
  pointer-events: none;
  color: white;
  border-radius: 15px;
  font-weight: bold;
}

.languages {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.languages span {
  width: 35px;
  height: 25px;
  border-radius: 6px;
}

.fi {
  border-radius: 4px;
}

.navbar-item.active svg {
  stroke: white;
}

@media (min-width: 768px) and (max-width: 1500px) {
  .navbar {
    max-width: 1200px;
  }

  .endfeed {
    width: 100%;
    max-width: 1200px !important;
  }

  footer {
    max-width: 1200px;
  }
}

/* =========CONTENT============ */

.content {
  padding-top: 15px;
  padding-bottom: 80px;
  max-width: 1350px;
  width: 95%;
  height: auto;
  margin: auto;
}

.episode-list {
  height: auto;
}

#recent-episodes {
  padding: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: -25px;
}

.episode-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 15px;
  overflow: hidden;
  transition: 0.3s;
  backdrop-filter: blur(50px);
}

.episode-card:hover {
  background: #252525;
  backdrop-filter: blur(100px);
  -webkit-backdrop-filter: blur(100px);
  border: 2px solid rgba(255, 255, 255, 0.04);
  padding: 10px;
  transform: scale(1.12) !important;
  z-index: 999;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.53);
  outline: 3px solid white; /* a borda */
  outline-offset: 2px;
}

.episode-img {
  position: relative; /* necessário para o ::after ficar sobre a imagem */
  width: 100%;
  border-radius: 10px;
  aspect-ratio: 16/9;
  overflow: hidden;
  transition: 0.2s;
}

.episode-img::after {
  content: "";
  position: absolute;
  bottom: 15px;
  left: 25px;
  width: 40px;
  height: 40px;
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 36 36" width="36" height="36" data-icon="PlayCircleLarge" data-icon-id=":r19:" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" role="img"><path fill="white" fill-rule="evenodd" d="M34 18a16 16 0 1 1-32 0 16 16 0 0 1 32 0m2 0a18 18 0 1 1-36 0 18 18 0 0 1 36 0m-10 0-12-7.5v15z" clip-rule="evenodd"></path></svg>');
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.episode-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.episode-info {
  padding-top: 10px;
}

.episode-title {
  font-size: 18px;
  font-weight: 600;
  margin-top: 0;
}

.episode-subtitle {
  color: rgba(255, 255, 255, 0.722);
  font-weight: 500;
  margin-bottom: -0px;
  font-size: medium;
}

.time-ago {
  position: absolute;
  bottom: 18px;
  right: 25px;
  background: black;
  padding: 4px 10px;
  font-size: 0.85rem;
  border-radius: 7px;
  font-weight: 500;
  color: #e2e2e2;
  backdrop-filter: blur(6px);
}

#title-section {
  font-size: 1.6em;
  margin-left: 40px;
  margin-top: 18px;
  margin-bottom: -25px;
}

.cards-container-posters {
  display: flex;
  width: 100%;
  overflow-y: auto;
  gap: 10px;
  padding: 40px;
  margin-bottom: -20px;
}

.card-poster {
  width: 300px;
  height: 300px;
  border-radius: 1.1rem;
  background: rgba(25, 25, 25, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: 0.3s;
  cursor: pointer;
  position: relative;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.card-poster:hover {
  outline: 3px solid white; /* a borda */
  outline-offset: 3px;
  backdrop-filter: blur(20px); /* distância entre o card e a borda */
  transform: scale(1.05);
  z-index: 999;
}

#embreve {
  position: absolute;
  bottom: 0px;
  text-align: center;
  background-color: #0f0f0f;
  border: 1px solid #ffffff0a;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: small;
  font-weight: 500;
  bottom: 8px;
  left: 10px;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.endfeed {
  width: 100%;
  max-width: 1270px;
  height: 200px; /* altura maior para a imagem ficar bem grande */
  margin: auto;
  display: flex;
  background: rgba(25, 25, 25, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  border-radius: 1.5rem;
  margin-top: 70px;
  align-items: stretch; /* faz as divs ocuparem toda a altura */
}

.endfeed1 {
  flex: 1; /* ocupa metade do espaço */
  display: flex;
  flex-direction: column;
  justify-content: center; /* centraliza verticalmente o texto */
  padding: 20px;
  color: #fff;
  text-align: center;
}

.endfeed1 h2 {
  font-size: 1.5rem;
  line-height: 1.4;
}

.endfeed1 button {
  margin-top: 10px;
  padding: 10px 25px;
  border: none;
  background: #353535;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 14px;
  font-weight: 600;
  color: #fff;
  text-transform: capitalize;
  cursor: pointer;
  font-size: 1.1rem;
  transition: 0.3s;
}

.endfeed1 button:hover {
  opacity: 0.8;
}

.endfeed2 {
  width: 50%; /* deixa a imagem maior que o texto */
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-start; /* foca no topo */
  justify-content: flex-end;
}

.endfeed2 img {
  height: 550%; /* aumenta para focar no topo e cobrir o bloco */
  object-fit: cover;
  object-position: center -100px; /* sempre mostra a parte de cima */
  display: block;
  margin-right: -300px;
}
footer {
  max-width: 1300px;
  margin: auto;
  padding: 20px;
  color: rgba(255, 255, 255, 0.686);
  display: flex;
  justify-content: space-between; /* links esquerda, social direita */
  align-items: flex-start;
  flex-wrap: wrap; /* para mobile os elementos quebrem linha */
  gap: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.686);
}

.footer-social {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.footer-social svg {
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.686);
}

.footer-credits {
  width: 100%;
  margin-top: 15px;
}

.footer-credits p {
  margin: 0;
}

/* =========== MEDIA QUERY MOBILE =========== */
@media (max-width: 768px) {
  /* Ajustar padding do content */
  .content {
    padding-top: 18px !important;
    padding-bottom: 100px; /* espaço para o bottom menu */
    width: 100%;
    height: auto;
    margin-bottom: 170px;
    padding: 15px;
  }

  /* Recent Episodes - Grid responsivo com scroll horizontal */
  #recent-episodes {
    padding: 20px !important;
    margin-bottom: 10px;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 15px;
    grid-template-columns: none; /* remove o grid */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  #recent-episodes::-webkit-scrollbar {
    display: none;
  }

  .episode-card {
    min-width: 270px;
    scroll-snap-align: start;
  }

  .episode-card:hover {
    transform: none !important;
    padding: 0px !important;
    outline: none;
    background-color: transparent;
    box-shadow: none;
    border: none;
  }

  .episode-title {
    font-size: 19px;
  }

  .episode-subtitle {
    font-size: 16px;
  }

  .time-ago {
    font-size: 0.75rem;
    padding: 3px 10px;
    right: 15px;
    bottom: 12px;
    color: white;
  }

  .cards-container-posters {
    overflow-x: auto;
    overflow-y: hidden;
    gap: 12px;
    margin-bottom: 10px;
    padding: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .cards-container-posters::-webkit-scrollbar {
    display: none;
  }

  .card-poster {
    min-width: 155px;
    height: 235px;
    scroll-snap-align: start;
    border: none;
  }

  .card-poster:hover {
    transform: none;
    outline: none;
    box-shadow: none;
  }

  #embreve {
    font-size: small;
    padding: 2px 5px !important;
  }

  /* Title Section */
  #title-section {
    font-size: 1.25em;
    margin-left: 0px;
    margin-bottom: -10px;
    margin-top: 10px;
  }

  /* End Feed */
  .endfeed {
    flex-direction: column;
    height: auto;
    margin-top: 30px;
    width: 100%;
    border-radius: 1rem;
  }

  .endfeed1 {
    padding: 30px 20px;
  }

  .endfeed1 h2 {
    font-size: 1.2rem;
  }

  .endfeed1 button {
    font-size: 1rem;
    padding: 8px 20px;
  }

  .endfeed2 {
    width: 100%;
    height: 200px;
  }

  .endfeed2 img {
    width: 100%;
    height: 100%;
    object-position: center top;
    margin-right: 0;
  }

  /* Footer */
  footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
  }

  .footer-links {
    display: block;
    gap: 20px;
  }

  .footer-links a {
    margin: 8px;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-credits {
    text-align: center;
  }

  /* Body background blur ajustado */
  body::before {
    filter: blur(100px) brightness(0);
  }
}

/* Tablet - ajustes intermediários */
@media (min-width: 769px) and (max-width: 1024px) {
  #recent-episodes {
    grid-template-columns: repeat(2, 1fr);
    padding: 30px;
  }

  .cards-container-posters {
    padding: 30px;
  }

  .card-poster {
    width: 250px;
    height: 250px;
  }
}

.search {
  cursor: pointer;
}
