/*
Theme Name: BlackFlix
Theme URI: https://example.com/blackflix
Author: BlackFlix Demo
Author URI: https://example.com
Description: Tema de streaming legal estilo Netflix/BlackFlix. Demonstração de interface moderna com catálogo, busca, filtros e player modal. Ideal para portfólio ou base de projeto de streaming licenciado.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blackflix
Tags: streaming, movies, dark, modern, full-width, custom-menu
*/

:root {
  --bg: #0a0a0c;
  --red: #e50914;
  --muted: #9a9a9f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: #fff;
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  color: inherit;
}

/* ========== NAV ========== */
.nav {
  height: 72px;
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  background: #050505df;
  backdrop-filter: blur(15px);
  border-bottom: 1px solid #ffffff15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
}

.brand {
  font-weight: 950;
  font-size: 25px;
  font-style: italic;
  letter-spacing: -1.5px;
  text-decoration: none;
  color: #fff;
}

.brand span {
  color: var(--red);
}

.navlinks {
  display: flex;
  gap: 25px;
  margin-left: 35px;
}

.navlinks a {
  color: #aaa;
  text-decoration: none;
  font-size: 14px;
}

.navlinks a:hover {
  color: white;
}

.left,
.right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.search {
  border-radius: 25px;
  background: #ffffff12;
  border: 1px solid #ffffff20;
  padding: 10px 15px;
  color: #fff;
  width: 225px;
  outline: none;
}

.search:focus {
  border-color: var(--red);
}

.iconbtn {
  background: transparent;
  font-size: 21px;
}

/* ========== HERO ========== */
.hero {
  min-height: 650px;
  height: 82vh;
  max-height: 900px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 110px 8vw 75px;
  overflow: hidden;
  background: linear-gradient(90deg, #0a0a0c 0%, #0a0a0cbf 43%, transparent 100%),
              linear-gradient(0deg, #0a0a0c 0%, transparent 58%),
              url('https://images.pexels.com/photos/3137890/pexels-photo-3137890.jpeg?auto=compress&cs=tinysrgb&w=1800') center/cover;
}

.hero-content {
  max-width: 650px;
  position: relative;
}

.eyebrow {
  color: #ff404a;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  font-weight: 800;
}

.hero h1 {
  font-size: clamp(43px, 6vw, 78px);
  line-height: .97;
  letter-spacing: -3px;
  margin: 20px 0;
}

.hero h1 span {
  color: var(--red);
}

.hero p {
  color: #d0d0d2;
  line-height: 1.75;
  font-size: 16px;
  max-width: 560px;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.primary,
.secondary {
  border-radius: 28px;
  padding: 14px 25px;
  font-weight: 800;
  display: flex;
  gap: 9px;
  align-items: center;
}

.primary {
  background: var(--red);
}

.primary:hover {
  background: #bd0710;
}

.secondary {
  background: #ffffff20;
  backdrop-filter: blur(8px);
}

.secondary:hover {
  background: #ffffff32;
}

/* ========== MAIN / CATALOG ========== */
.main {
  padding: 0 5vw 65px;
  position: relative;
  margin-top: -24px;
}

.categories {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding: 15px 0 30px;
  scrollbar-width: none;
}

.chip {
  background: #ffffff0d;
  color: #aaa;
  padding: 10px 19px;
  border-radius: 24px;
  white-space: nowrap;
}

.chip.active,
.chip:hover {
  background: var(--red);
  color: #fff;
}

.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 20px;
}

.sectionhead h2 {
  font-size: 25px;
  margin: 0;
}

.sectionhead small {
  color: #f44;
}

.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

.movie {
  min-width: 0;
  cursor: pointer;
  transition: transform .2s;
}

.movie:hover {
  transform: translateY(-6px);
}

.poster {
  aspect-ratio: 2/3;
  position: relative;
  overflow: hidden;
  border-radius: 11px;
  background: #202024;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.movie:hover .poster img {
  transform: scale(1.06);
}

.poster:after {
  content: '▶';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 29px;
  background: #0008;
  opacity: 0;
  transition: opacity .2s;
}

.movie:hover .poster:after {
  opacity: 1;
}

.movie h3 {
  font-size: 14px;
  margin: 11px 0 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta {
  display: flex;
  justify-content: space-between;
  color: #85858c;
  font-size: 12px;
}

.rating {
  color: #ffd34e;
}

.empty {
  color: #aaa;
  padding: 35px 0;
}

/* ========== FOOTER ========== */
.footer {
  border-top: 1px solid #ffffff10;
  background: #050505;
  text-align: center;
  color: #777;
  padding: 35px 15px;
  font-size: 13px;
}

.footer b {
  color: #bbb;
}

.footer .brand {
  display: inline-block;
  margin-bottom: 8px;
}

/* ========== MODAL ========== */
.modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  background: #000d;
  backdrop-filter: blur(7px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.modal.show {
  display: flex;
}

.dialog {
  width: min(1000px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #141416;
  border-radius: 22px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: 0 25px 90px #000;
}

.close {
  position: absolute;
  right: 13px;
  top: 13px;
  z-index: 2;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background: #0009;
  font-size: 23px;
}

.player {
  background: #000;
  min-height: 340px;
  display: grid;
  place-items: center;
  aspect-ratio: 16/9;
}

.player iframe {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
}

.details {
  padding: 45px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 17px;
}

.details h2 {
  font-size: clamp(27px, 3.5vw, 43px);
  letter-spacing: -1.6px;
  margin: 0;
  line-height: 1.04;
}

.details p {
  color: #c7c7cc;
  line-height: 1.7;
  margin: 0;
}

.tag {
  font-size: 11px;
  letter-spacing: 2px;
  color: #ff4650;
  font-weight: 800;
  text-transform: uppercase;
}

.note {
  padding: 13px;
  border: 1px solid #ffffff15;
  background: #ffffff08;
  border-radius: 12px;
  color: #999;
  font-size: 12px;
  line-height: 1.5;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1050px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .nav {
    height: 64px;
    padding: 0 18px;
  }

  .navlinks {
    display: none;
  }

  .search {
    width: 150px;
    padding: 9px 12px;
  }

  .hero {
    min-height: 600px;
    height: 78vh;
    padding: 105px 24px 65px;
    background-position: 60% center;
  }

  .hero h1 {
    letter-spacing: -2px;
  }

  .hero p {
    font-size: 14px;
  }

  .main {
    padding: 0 20px 45px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 19px 13px;
  }

  .sectionhead h2 {
    font-size: 21px;
  }

  .dialog {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }

  .player,
  .player iframe {
    min-height: 210px;
  }

  .details {
    padding: 25px;
  }

  .details .actions {
    margin-top: 0;
  }

  .details .primary,
  .details .secondary {
    padding: 12px 17px;
  }

  .right {
    gap: 8px;
  }
}

@media (min-width: 701px) and (max-width: 850px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
