/* ==========================================================================
   CineDark - Estilos Principais (Dark / Black Modern Theme)
   ========================================================================== */

:root {
  /* Cores Principais do Tema Dark Preto */
  --bg-main: #0a0a0d;
  --bg-surface: #121216;
  --bg-card: #18181f;
  --bg-card-hover: #21212b;
  --bg-glass: rgba(18, 18, 22, 0.75);
  --bg-glass-strong: rgba(10, 10, 13, 0.88);
  
  /* Cores de Destaque */
  --accent-primary: #e50914;
  --accent-primary-hover: #f40612;
  --accent-glow: rgba(229, 9, 20, 0.35);
  --accent-gold: #ffb703;
  --accent-cyan: #00d2ff;
  
  /* Cores de Texto */
  --text-primary: #ffffff;
  --text-secondary: #a3a3b3;
  --text-muted: #69697d;
  
  /* Bordas e Linhas */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(229, 9, 20, 0.5);
  --border-card: rgba(255, 255, 255, 0.05);

  /* Sombras */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.85);
  --shadow-glow: 0 0 20px rgba(229, 9, 20, 0.25);

  /* Tipografia */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Transições */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Dimensões */
  --max-width: 1540px;
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 18px;
  --border-radius-full: 9999px;
}

/* Reset Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: #252530;
  border-radius: var(--border-radius-full);
  border: 2px solid var(--bg-main);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Ambient Glow Backgrounds */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}

.glow-top {
  top: -150px;
  right: 10%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
}

.glow-bottom {
  bottom: -200px;
  left: 5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #3a0d5c 0%, transparent 70%);
}

/* App Wrapper */
.app-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   Header & Search Bar (Minimalista, sem menu, com Lupa)
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 24px;
  transition: padding var(--transition-normal);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Search Bar Centralizada com Lupa */
.search-box-container {
  width: 100%;
  max-width: 680px;
  position: relative;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--border-radius-full);
  padding: 2px 8px;
  transition: all var(--transition-normal);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.search-wrapper:focus-within {
  background: #1c1c24;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-glow), inset 0 2px 4px rgba(0,0,0,0.4);
}

.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 14px;
  padding-right: 10px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.search-wrapper:focus-within .search-icon {
  color: var(--accent-primary);
}

.search-icon svg {
  width: 20px;
  height: 20px;
}

.search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 6px;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.clear-search-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 12px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.clear-search-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.1);
}

.clear-search-btn svg {
  width: 16px;
  height: 16px;
}

.search-wrapper.has-text .clear-search-btn {
  display: flex;
}

/* Header Stats */
.header-stats {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.catalog-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--border-radius-full);
  letter-spacing: 0.3px;
}

/* ==========================================================================
   Genre Chips / Quick Filter
   ========================================================================== */

.filters-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 24px;
  overflow-x: auto;
  white-space: nowrap;
}

.filters-bar::-webkit-scrollbar {
  height: 4px;
}

.filters-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 8px;
}

.genre-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: var(--border-radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.genre-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.genre-chip.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 10px var(--accent-glow);
  font-weight: 600;
}

/* ==========================================================================
   Main Section & Controls
   ========================================================================== */

.main-content {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 30px 24px 60px;
}

/* ==========================================================================
   5-Column Gallery Grid Layout (Requisito Principal)
   ========================================================================== */

.movies-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px 20px;
  margin-bottom: 40px;
}

/* Card de Filme */
.movie-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 1px solid var(--border-card);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  user-select: none;
}

.movie-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(229, 9, 20, 0.4);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(229, 9, 20, 0.2);
  z-index: 10;
}

/* Poster Container (Aspect Ratio 2:3) */
.poster-container {
  position: relative;
  width: 100%;
  padding-top: 150%; /* 2:3 Aspect ratio */
  background: #14141a;
  overflow: hidden;
}

.poster-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.movie-card:hover .poster-image {
  transform: scale(1.08);
}

/* Overlay no Hover com Botão Rápido */
.poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 13, 0.95) 0%, rgba(10, 10, 13, 0.4) 50%, rgba(0,0,0,0.1) 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.movie-card:hover .poster-overlay {
  opacity: 1;
}

.quick-play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: scale(0.8);
  transition: transform var(--transition-bounce), background var(--transition-fast);
}

.movie-card:hover .quick-play-btn {
  transform: scale(1);
}

.quick-play-btn svg {
  width: 24px;
  height: 24px;
  margin-left: 2px;
}

/* Informações do Filme no Card */
.card-info {
  padding: 14px 12px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--bg-card);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition-fast);
}

.movie-card:hover .card-title {
  color: #ffffff;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-duration-label {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.card-year {
  font-weight: 600;
  color: var(--text-secondary);
}

/* ==========================================================================
   Empty State (Nenhum resultado)
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: var(--bg-surface);
  border-radius: var(--border-radius-lg);
  border: 1px dashed var(--border-subtle);
  max-width: 550px;
  margin: 30px auto;
}

.empty-state.hidden {
  display: none;
}

.empty-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  color: var(--text-muted);
}

.empty-icon svg {
  width: 100%;
  height: 100%;
}

.empty-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.btn-reset-search {
  background: var(--accent-primary);
  color: #fff;
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 24px;
  border-radius: var(--border-radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-reset-search:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* ==========================================================================
   Pagination System (Para mais de 25 imagens/filmes)
   ========================================================================== */

.pagination-section {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.pagination-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--border-radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  user-select: none;
}

.page-btn:hover:not(:disabled):not(.active) {
  background: #252532;
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.page-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.page-btn-nav {
  padding: 0 16px;
  gap: 6px;
}

.page-btn-nav svg {
  width: 16px;
  height: 16px;
}

.page-ellipsis {
  color: var(--text-muted);
  font-weight: 700;
  padding: 0 6px;
  user-select: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 24px;
  text-align: center;
  margin-top: auto;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-text strong {
  color: var(--text-secondary);
}

/* ==========================================================================
   Movie Detail Modal (Popup)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-lg);
  overflow-y: auto;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(0, 0, 0, 0.9);
  transform: scale(0.92) translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-backdrop.open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(10, 10, 13, 0.75);
  border: 1px solid var(--border-subtle);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--accent-primary);
  transform: rotate(90deg);
}

.modal-close-btn svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  position: relative;
  padding: 32px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  z-index: 2;
  align-items: start;
}

.modal-poster-col {
  flex-shrink: 0;
}

.modal-poster-img {
  width: 100%;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(0,0,0,0.8);
  border: 2px solid rgba(255, 255, 255, 0.15);
  aspect-ratio: 2/3;
  object-fit: cover;
}

.modal-info-col {
  display: flex;
  flex-direction: column;
}

.modal-badges-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.badge-year, .badge-duration {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 4px;
}

.modal-tagline {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.modal-synopsis-box {
  margin-bottom: 24px;
}

.modal-subheading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.modal-synopsis-text {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.modal-actions-row {
  display: flex;
  gap: 14px;
  margin-top: auto;
}

.btn-buy-movie {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  background: linear-gradient(135deg, #e50914 0%, #b8060f 100%);
  border: none;
  border-radius: var(--border-radius-md);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: all var(--transition-fast);
}

.btn-buy-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-buy-movie svg {
  width: 20px;
  height: 20px;
}

.btn-buy-movie:hover {
  background: linear-gradient(135deg, #f40612 0%, #d10711 100%);
  box-shadow: 0 6px 25px rgba(229, 9, 20, 0.5);
  transform: translateY(-2px);
}

.badge-price {
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 14px;
  border-radius: var(--border-radius-full);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.5px;
  color: #fff;
}

/* ==========================================================================
   Checkout View inside Modal (Clean, Centered, No Duplicate Images)
   ========================================================================== */

.checkout-modal-body {
  display: flex !important;
  justify-content: center;
  align-items: center;
  padding: 28px 24px 36px;
  width: 100%;
  box-sizing: border-box;
}

.checkout-modal-body.hidden {
  display: none !important;
}

.checkout-direct-card {
  width: 100%;
  max-width: 520px;
  background: #111117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 auto;
}

.checkout-header-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.checkout-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkout-header-movie {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkout-header-price {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 4px 10px;
  border-radius: 6px;
}

.btn-back-details {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-back-details:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-back-details svg {
  width: 14px;
  height: 14px;
}

.checkout-step-panel {
  width: 100%;
}

.checkout-step-panel.hidden {
  display: none !important;
}

.panel-heading {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.panel-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 20px;
  line-height: 1.4;
}

/* Formulário de Checkout */
.pix-form .form-group {
  margin-bottom: 14px;
}

.pix-form label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background: #111116;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-generate-pix {
  width: 100%;
  justify-content: center;
  margin-top: 18px;
  padding: 13px;
  font-size: 0.95rem;
}

.checkout-error {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 8px;
}

.checkout-error.hidden {
  display: none;
}

/* Etapa do QR Code Pix */
.pix-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 183, 3, 0.12);
  border: 1px solid rgba(255, 183, 3, 0.3);
  color: var(--accent-gold);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--border-radius-full);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.pulsing-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-gold);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-gold);
  animation: pulseAnimation 1.5s infinite;
}

@keyframes pulseAnimation {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.qrcode-wrapper {
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  width: 180px;
  height: 180px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

.qrcode-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pix-copy-box {
  margin-bottom: 16px;
}

.pix-copy-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.pix-input-group {
  display: flex;
  gap: 8px;
}

.pix-code-input {
  flex: 1;
  background: #0f0f14;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: monospace;
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: 6px;
  outline: none;
}

.btn-copy {
  background: #252532;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 0 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.pix-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.pix-info-row strong {
  color: #fff;
}

/* Etapa de Sucesso (Google Drive) */
.success-icon-wrapper {
  width: 60px;
  height: 60px;
  background: #10b981;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}

.success-icon-wrapper svg {
  width: 32px;
  height: 32px;
}

.success-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin-bottom: 6px;
}

.success-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 22px;
  line-height: 1.5;
}

.btn-drive-access {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 800;
  padding: 16px 28px;
  border-radius: var(--border-radius-md);
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4);
  transition: all var(--transition-fast);
  margin-bottom: 16px;
  width: 100%;
}

.btn-drive-access:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.6);
}

.btn-drive-access svg {
  width: 22px;
  height: 22px;
}

.drive-url-copy {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   Trailer Modal Player
   ========================================================================== */

.trailer-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.trailer-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.trailer-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
}

.video-responsive-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  background: #000;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0,0,0,0.9), 0 0 30px rgba(229, 9, 20, 0.3);
}

.video-responsive-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.trailer-close-btn {
  position: absolute;
  top: -45px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.trailer-close-btn:hover {
  color: var(--accent-primary);
}

.trailer-close-btn svg {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   Media Queries & Responsividade Avançada
   ========================================================================== */

/* Telas Ultra-Wide / 4K (> 1440px): 5 Colunas Espaçosas */
@media (min-width: 1440px) {
  :root {
    --max-width: 1480px;
  }
  .movies-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 28px 24px;
  }
}

/* Telas Desktop Padrão (1140px a 1439px): 5 Colunas */
@media (min-width: 1140px) and (max-width: 1439px) {
  .movies-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px 16px;
  }
}

/* Laptops / Desktops Pequenos (900px a 1139px): 4 Colunas */
@media (min-width: 900px) and (max-width: 1139px) {
  .movies-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 14px;
  }
  .modal-card {
    max-width: 820px;
  }
  .modal-body {
    grid-template-columns: 180px 1fr;
    gap: 24px;
  }
}

/* Tablets em Orientação Paisagem e Retrato (640px a 899px): 3 Colunas */
@media (min-width: 640px) and (max-width: 899px) {
  .header {
    padding: 14px 20px;
  }
  .main-content {
    padding: 24px 18px 50px;
  }
  .movies-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 12px;
  }
  
  .modal-backdrop {
    padding: 16px;
  }
  .modal-card {
    max-height: 92vh;
  }
  .modal-body {
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 24px;
  }
  .modal-title {
    font-size: 1.6rem;
  }
}

/* Smartphones / Mobile (< 640px): 2 Colunas Limpas e Modernas */
@media (max-width: 639px) {
  .header {
    padding: 12px 14px;
  }
  .search-box-container {
    max-width: 100%;
  }
  .search-input {
    font-size: 0.9rem;
    padding: 10px 4px;
  }
  
  .main-content {
    padding: 16px 10px 40px;
  }
  
  .movies-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 8px;
    margin-bottom: 30px;
  }
  
  .card-info {
    padding: 10px 8px 12px;
  }
  .card-title {
    font-size: 0.88rem;
    line-height: 1.25;
    margin-bottom: 4px;
  }
  .card-meta {
    font-size: 0.75rem;
  }
  
  /* Modal no Mobile */
  .modal-backdrop {
    padding: 8px 6px;
    align-items: flex-end;
  }
  
  .modal-card {
    max-height: 94dvh;
    border-radius: 18px 18px 0 0;
    max-width: 100%;
    margin-bottom: 0;
  }
  
  .modal-close-btn {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }
  
  .modal-body {
    grid-template-columns: 1fr;
    padding: 24px 16px 28px;
    gap: 16px;
  }
  
  .modal-poster-col {
    display: flex;
    justify-content: center;
  }
  
  .modal-poster-img {
    width: 130px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  }
  
  .modal-info-col {
    text-align: center;
  }
  
  .modal-badges-row {
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
  }
  
  .modal-title {
    font-size: 1.35rem;
    line-height: 1.25;
    margin-bottom: 6px;
  }
  
  .modal-tagline {
    font-size: 0.85rem;
    margin-bottom: 12px;
  }
  
  .modal-synopsis-box {
    text-align: left;
    margin-bottom: 16px;
  }
  
  .modal-synopsis-text {
    font-size: 0.86rem;
    line-height: 1.5;
  }
  
  .btn-buy-movie {
    padding: 14px 16px;
    font-size: 0.95rem;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .btn-buy-left {
    justify-content: center;
  }
  
  .badge-price {
    font-size: 1.05rem;
    padding: 4px 12px;
  }
  
  /* Checkout no Mobile */
  .checkout-modal-body {
    padding: 16px 12px 24px;
  }
  
  .checkout-direct-card {
    padding: 18px 14px;
    border-radius: 12px;
  }
  
  .checkout-header-bar {
    margin-bottom: 14px;
    padding-bottom: 10px;
  }
  
  .checkout-header-movie {
    font-size: 0.88rem;
    max-width: 150px;
  }
  
  .panel-heading {
    font-size: 1.15rem;
    text-align: center;
  }
  
  .panel-sub {
    font-size: 0.82rem;
    text-align: center;
    margin-bottom: 14px;
  }
  
  .qrcode-wrapper {
    width: 150px;
    height: 150px;
    padding: 8px;
    margin-bottom: 12px;
  }
  
  .pix-input-group {
    flex-direction: column;
  }
  
  .btn-copy {
    padding: 10px;
    width: 100%;
  }
  
  /* Paginação no Mobile */
  .pagination-wrapper {
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 0.82rem;
  }
  
  .page-btn-nav {
    padding: 0 10px;
  }
}

/* Telas Muito Pequenas (< 360px) */
@media (max-width: 359px) {
  .movies-grid {
    gap: 8px 6px;
  }
  .card-info {
    padding: 8px 6px;
  }
  .card-title {
    font-size: 0.82rem;
  }
  .page-btn {
    min-width: 32px;
    height: 32px;
    font-size: 0.78rem;
  }
}
