/* ==========================================================
   RETRO CINE X - THEME NOIR CINEMA
   ========================================================== */

:root {
  --bg-primary: #0b0c10;
  --bg-secondary: #14161f;
  --bg-card: #191b26;
  --bg-card-hover: #222534;
  --text-main: #f0f2f5;
  --text-muted: #9aa1b2;
  --gold: #D4AF37;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --red: #E50914;
  --red-glow: rgba(229, 9, 20, 0.35);
  --border-color: #272b3c;
  --radius: 8px;
  --font-serif: 'Cinzel', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================
   HEADER
   ========================================================== */
.site-header {
  background: linear-gradient(180deg, #12141c 0%, #0b0c10 100%);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  cursor: pointer;
}

.logo-icon {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 0 10px var(--gold-glow));
  transition: transform 0.3s ease;
}

.brand-logo:hover .logo-icon {
  transform: rotate(45deg);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffffff;
}

.text-gold {
  color: var(--gold);
}

.text-red {
  color: var(--red);
  text-shadow: 0 0 12px var(--red-glow);
}

.logo-tagline {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-weight: 600;
}

/* SEARCH */
.search-box {
  position: relative;
  flex: 1;
  max-width: 500px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 10px 40px 10px 42px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  color: #fff;
  font-size: 14px;
  transition: all 0.25s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 15px var(--gold-glow);
  background: #171a26;
}

.clear-search {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.clear-search:hover {
  color: #fff;
}

.catalog-badge {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/* DECADES BAR */
.decades-bar {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.decades-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
}

.decade-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.decade-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.decade-btn.active {
  background: var(--gold);
  color: #0b0c10;
  font-weight: 700;
  box-shadow: 0 0 12px var(--gold-glow);
}

/* ==========================================================
   MAIN CONTENT
   ========================================================== */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px 60px;
  flex: 1;
  width: 100%;
}

.filter-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  gap: 20px;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.custom-select {
  background: var(--bg-secondary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.custom-select:focus {
  outline: none;
  border-color: var(--gold);
}

/* MOVIES GRID */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

/* MOVIE CARD */
.movie-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px var(--gold-glow);
  background: var(--bg-card-hover);
}

.card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.movie-card:hover .card-thumb {
  transform: scale(1.06);
}

.card-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-year-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--gold);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.card-play-hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-play-hover {
  opacity: 1;
}

.card-play-icon {
  width: 48px;
  height: 48px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--red-glow);
}

.card-play-icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  margin-left: 3px;
}

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.card-decade {
  color: var(--gold);
  font-weight: 600;
}

/* PAGINATION */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
}

.page-nav-btn {
  background: var(--bg-secondary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.page-nav-btn:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
}

.page-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-indicator {
  font-size: 14px;
  color: var(--text-muted);
}

/* ==========================================================
   MODAL PLAYER
   ========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  max-width: 1000px;
  width: 100%;
  max-height: 94vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 26px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--red);
  border-color: var(--red);
}

.player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.movie-info-panel {
  padding: 24px 28px;
}

.modal-movie-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.modal-badges {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.badge-year, .badge-duration, .badge-decade, .badge-hd {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.badge-year {
  background: var(--gold);
  color: #000;
}

.badge-duration {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: #fff;
}

.badge-decade {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
  border: 1px solid var(--gold);
}

.badge-hd {
  background: var(--red);
  color: #fff;
  letter-spacing: 0.5px;
}

.modal-cast-section {
  padding: 12px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
  font-size: 14px;
}

.cast-label {
  color: var(--gold);
  font-weight: 600;
  margin-right: 8px;
}

.cast-names {
  color: #fff;
}

.modal-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 24px;
  margin-top: auto;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 13px;
  max-width: 500px;
  margin-top: 6px;
}

.footer-legal-links {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.footer-legal-links a {
  color: var(--gold);
  font-size: 12px;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.footer-legal-links a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.rta-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.ad-container-native {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  text-align: center;
}

.ad-placeholder {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.footer-meta {
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
}

.disclaimer {
  color: #e57373;
  margin-top: 4px;
}

/* UTILS */
.hidden {
  display: none !important;
}

.btn-gold {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
}

/* RESPONSIVO */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box {
    max-width: 100%;
  }
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .footer-meta {
    text-align: center;
  }
}
