.view-movie-detail .synopsis { max-width: 70ch; }

/* ===== Movies · Categories */
.view-movies-cats { --movie-cat-cols: 5; }

.view-movies-cats .list {
  display: grid; 
  grid-template-columns: repeat(var(--movie-cat-cols), minmax(0, 1fr));
  gap: 14px;
}

.view-movies-cats .list-item {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: clamp(60px, 7vh, 110px);
  padding: 16px 14px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.view-movies-cats .list-item__title {
  font-weight: 700;
  color: var(--txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-movies-cats .count-badge { display: none; }

.view-movies-cats [data-focusable].is-focus::after {
  border-radius: calc(var(--radius) + 6px);
}

@media (max-width: 1800px) { .view-movies-cats { --movie-cat-cols: 5; } }
@media (max-width: 1600px) { .view-movies-cats { --movie-cat-cols: 4; } }
@media (max-width: 1366px) { .view-movies-cats { --movie-cat-cols: 3; } }
@media (max-width: 1100px) { .view-movies-cats { --movie-cat-cols: 2; } }
@media (max-width: 800px)  { .view-movies-cats { --movie-cat-cols: 1; } }

/* ===== Movies · List  */
.view-movies-list { --movie-cols: 5; }

.view-movies-list .grid-movies {
  display: grid;
  grid-template-columns: repeat(var(--movie-cols), minmax(0, 1fr));
  gap: 18px;
}

.view-movies-list .movie-card {
  position: relative;           
  overflow: visible;            
  border: none;
}

.view-movies-list .movie-card:focus,
.view-movies-list .movie-card *:focus {
  outline: none;
}

.view-movies-list .movie-card__poster {
  width: 100%;
  aspect-ratio: 2 / 3;            
  object-fit: cover;
  display: block;
  background: #0f0e18;
}

.view-movies-list .movie-card__title {
  padding: 12px;
  font-weight: 800;
  color: var(--txt);
  font-size: clamp(14px, 1.05vw, 20px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-movies-list [data-focusable].is-focus::after {
  border-radius: calc(var(--radius) + 6px);
}

@media (max-width: 1800px) { .view-movies-list { --movie-cols: 4; } }
@media (max-width: 1500px) { .view-movies-list { --movie-cols: 3; } }
@media (max-width: 1100px) { .view-movies-list { --movie-cols: 2; } }
@media (max-width: 760px)  { .view-movies-list { --movie-cols: 1; } }

/* ===== Movies · Detail · Controles personalizados ===== */
.view-movie-detail #mdControls.md-controls {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(10,10,16,0.55);
  border-radius: 12px;
  backdrop-filter: blur(6px);
}

.view-movie-detail #mdControls .btn {
  min-width: 56px;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 18px;
  font-weight: 800;
  border-radius: 12px;
}

.view-movie-detail #mdControls [data-focusable].is-focus,
.view-movie-detail #btnBackToMovies.is-focus {
  outline: 3px solid #ffcc00;
  outline-offset: 2px;
  box-shadow: 0 0 10px rgba(255,204,0,.6);
}

.view-movie-detail video:focus { outline: none; }

/*SUMMARY*/

:root{
  --gap: 24px;
  --fg: #f6f7fb;
  --muted: #a9afc6;
  --card-bg: #141726;
  --ring: #ffd54a;
}

.view.view-movie-summary{
  padding: 24px;
  color: var(--fg);
}
.summary__layout{
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: var(--gap);
  align-items: start;
}

.summary__media{
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
}
.backchip{
  width: 44px; height: 44px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid transparent;
}
.backchip img{ width: 22px; height: 22px; }

.poster-wrap{
  background: var(--card-bg);
  border-radius: 16px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
.poster-wrap img{
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.summary__main{
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 20px;
}
.summary__title{
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 10px;
}
.summary__meta{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 6px 18px;
  color: var(--muted);
  margin-bottom: 12px;
}
.summary__desc{
  margin: 8px 0 18px;
  color: var(--fg);
}

.summary__actions{
  display: flex;
  gap: 12px;
}
.btn{
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #1b2137;
  color: var(--fg);
  font-weight: 600;
}
.btn-primary{
  background: #4c6fff;
  border-color: #4c6fff;
  color: white;
}

@media (max-width: 1280px){
  .summary__layout{
    grid-template-columns: 300px 1fr;
  }
}

@media (max-width: 960px){
  .summary__layout{
    grid-template-columns: 1fr;
  }
  .summary__meta{
    grid-template-columns: 1fr;
  }
}

.summary__gate {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2, #0f172a);
  font-size: 1rem;
  line-height: 1.4;
}

.modal-backdrop[hidden],
.modal[hidden] { display: none; }

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(1px);
  z-index: 9998;
}

.modal {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  z-index: 9999;
}

.modal__card {
  width: min(520px, 92vw);
  background: var(--bg);
  color: var(--txt, #fff);
  border-radius: calc(var(--radius, 12px) + 2px);
  box-shadow: 0 12px 45px rgba(0,0,0,0.35);
  padding: 20px 18px;
  outline: none;
}

.modal__title {
  margin: 0 0 8px 0;
  font-size: clamp(18px, 1.2vw, 22px);
  font-weight: 800;
}

.modal__msg {
  margin: 0 0 16px 0;
  opacity: .9;
}

.modal__actions {
  display: flex; gap: 10px; justify-content: flex-end;
}

.btn {
  padding: 10px 14px;
  background: var(--panel-bg, rgba(255,255,255,0.06));
  border: 1px solid var(--panel-border, rgba(255,255,255,0.12));
  border-radius: 10px;
  font-weight: 700;
}
.btn-primary {
  background: var(--brand, #7a5cff);
  border-color: transparent;
  color: white;
}

.modal [data-modal-focus].is-focus,
.modal [data-modal-focus]:focus-visible {
  outline: 2px solid var(--brand, #7a5cff);
  outline-offset: 2px;
  border-radius: 12px;
}

body.modal-open .view-tv-list {
  pointer-events: none;
  user-select: none;
}

.summary__actions .fav-btn{
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: transparent;
  transition: background-color .18s ease, box-shadow .18s ease, filter .18s ease;
}

.summary__actions .fav-btn img{
  width: 22px; height: 22px;
  transition: filter .18s ease, transform .12s ease;
}

.summary__actions .fav-btn.is-added{
  background: rgba(239, 68, 68, .18);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .7) inset;
}
.summary__actions .fav-btn.is-added img{
  filter: invert(15%) sepia(98%) saturate(7440%) hue-rotate(-5deg) brightness(95%) contrast(110%);
  transform: scale(1.05);
}

.summary__layout{
  display: grid;
  grid-template-columns: 360px 1fr; 
  gap: var(--gap);
  align-items: start;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 20px;
}

.summary__main{
  background: transparent;
  border: 0;
  padding: 0;
}

.poster-wrap{
  background: transparent;
  border: 0;
  padding: 0;
}
.poster-wrap img{
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  border-radius: 12px; 
}

@media (max-width: 1280px){
  .summary__layout{ grid-template-columns: 300px 1fr; }
}
@media (max-width: 960px){
  .summary__layout{ grid-template-columns: 1fr; }
  .summary__main{ padding-top: 0; }
}

.view-movie-detail #btnBackToMovies {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12);
}

.view-movie-detail #btnBackToMovies img {
  width: 22px;
  height: 22px;
  display: block;
}

