:root {
  --bg-primary: #0a0a0c;
  --bg-secondary: #141418;
  --bg-tertiary: #1f1f25;
  --accent-primary: #e50914;
  --accent-hover: #f40612;
  --accent-secondary: #0071eb;
  --accent-download: #10b981;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.navbar {
  padding: 1.5rem 5%;
  background: linear-gradient(to bottom, rgba(10,10,12,0.9) 0%, rgba(10,10,12,0) 100%);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
}

.logo {
  font-size: 1.8rem; font-weight: 700; color: var(--accent-primary);
  text-transform: uppercase; letter-spacing: 2px;
}

.main-content { padding-top: 80px; }

.movie-header {
  max-width: 1200px; margin: 0 auto; padding: 1rem 5% 0.5rem;
}

.movie-title {
  font-size: 2rem; font-weight: bold; margin-bottom: 0.5rem;
}

.movie-meta {
  display: flex; gap: 1rem; color: var(--text-secondary); font-size: 0.9rem; align-items: center;
}

.imdb-rating { color: #f5c518; font-weight: bold; }
.quality-badge { background: rgba(255,255,255,0.9); color: black; padding: 0 4px; border-radius: 3px; font-size: 0.8rem; font-weight: bold; }

/* Player */
.player-container {
  position: relative; width: 100%; max-width: 1200px; margin: 0 auto 2rem;
  background-color: #000; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0,0,0,0.8); aspect-ratio: 16 / 9;
}

.player-video { width: 100%; height: 100%; object-fit: contain; cursor: pointer; }

.player-overlay {
  position: absolute; inset: 0; background-size: cover; background-position: center; cursor: pointer;
}

.player-overlay-dark {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background-color: rgba(0,0,0,0.5);
}

.play-button {
  width: 80px; height: 80px; border-radius: 50%; background-color: rgba(229, 9, 20, 0.9);
  display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.play-button:hover { transform: scale(1.1); background-color: var(--accent-hover); }
.play-icon {
  border-top: 15px solid transparent; border-left: 25px solid white; border-bottom: 15px solid transparent; margin-left: 5px;
}

.custom-controls {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  padding: 20px 15px 10px; display: none; flex-direction: column; gap: 10px; z-index: 20;
}

.progress-container { width: 100%; height: 4px; background: rgba(255,255,255,0.3); border-radius: 2px; }
.progress-bar { height: 100%; width: 0%; background: var(--accent-primary); border-radius: 2px; }

.controls-row { display: flex; justify-content: space-between; align-items: center; }
.controls-left { display: flex; align-items: center; gap: 15px; }
.control-btn { color: white; padding: 5px; opacity: 0.9; transition: 0.2s; }
.control-btn:hover { opacity: 1; transform: scale(1.1); }
.icon-muted { color: white; opacity: 0.8; width: 20px; }
.time-display { color: white; font-size: 0.85rem; font-family: monospace; }

/* Actions */
.actions-container {
  display: flex; flex-wrap: wrap; gap: 1rem; max-width: 1200px; margin: 0 auto 3rem; padding: 0 5%;
}

.btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.5rem; border-radius: var(--radius-md); font-size: 1rem; font-weight: 600; flex: 1; min-width: 150px;
}

.btn-primary { background-color: var(--accent-primary); color: white; }
.btn-secondary { background-color: var(--bg-tertiary); color: white; border: 1px solid var(--border-color); }
.btn-download { background-color: rgba(16, 185, 129, 0.1); color: var(--accent-download); border: 1px solid var(--accent-download); }

/* Info Section */
.movie-info-section {
  display: flex; flex-wrap: wrap; gap: 2rem; max-width: 1200px; margin: 0 auto 3rem; padding: 0 5%;
}
.info-left { flex: 1 1 300px; }
.section-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 1.5rem; color: white; }
.description { color: var(--text-secondary); margin-bottom: 1.5rem; }
.grid-info { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1.5rem; font-size: 0.95rem; color: white; }
.muted { color: var(--text-muted); }

.info-right { flex: 1 1 300px; background-color: var(--bg-tertiary); padding: 2rem; border-radius: var(--radius-md); }
.info-right h3 { margin-bottom: 1rem; font-size: 1.2rem; }
.grid-info-small { display: grid; grid-template-columns: auto 1fr; gap: 0.8rem 1.5rem; font-size: 0.9rem; color: var(--text-secondary); }

/* Screenshots */
.screenshots-section { max-width: 1200px; margin: 0 auto 4rem; padding: 0 5%; }
.screenshots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.screenshot-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--border-color); }

/* Popup */
.popup-overlay {
  position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.8); backdrop-filter: blur(5px);
  display: none; align-items: center; justify-content: center; z-index: 1000;
}

.popup-content {
  background: linear-gradient(135deg, #141418 0%, #1f1f25 100%);
  border: 1px solid var(--accent-primary); border-radius: var(--radius-lg);
  padding: 2.5rem; max-width: 450px; width: 90%; text-align: center; position: relative; overflow: hidden;
  box-shadow: 0 0 40px rgba(229, 9, 20, 0.4);
}

.film-strip-top, .film-strip-bottom {
  position: absolute; left: 0; right: 0; height: 12px;
  background: repeating-linear-gradient(90deg, #000 0px, #000 8px, transparent 8px, transparent 16px);
}
.film-strip-top { top: 0; }
.film-strip-bottom { bottom: 0; }

.popup-icon-container { display: flex; justify-content: center; margin: 2rem 0 1rem; color: var(--accent-primary); }
.popup-icon { width: 54px; height: 54px; }
.popup-title { font-family: monospace; text-transform: uppercase; letter-spacing: 2px; color: var(--accent-primary); margin-bottom: 1.5rem; }

.popup-text-area { text-align: left; margin-bottom: 1.5rem; padding: 0 1rem; }
.popup-desc { font-size: 1.05rem; color: #ddd; margin-bottom: 1rem; text-align: center; }
.popup-list { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.8; padding-left: 1.5rem; }

.offers-container { display: flex; flex-direction: column; gap: 15px; }
.offer-btn {
  background-color: rgba(229, 9, 20, 0.1); border: 1px solid var(--accent-primary); color: white;
  padding: 1rem; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: bold; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; transition: 0.2s;
}
.offer-btn:hover { background-color: var(--accent-primary); }
.loading-text { color: var(--text-secondary); }
.popup-footer { margin-top: 20px; font-size: 0.8rem; color: var(--text-muted); }

@media (max-width: 768px) {
  .player-container { border-radius: 0; }
  .btn { flex: 1 1 45%; }
  .movie-info-section { flex-direction: column; }
  .screenshots-grid { grid-template-columns: 1fr; }
  
  /* Popup Mobile Compression */
  .popup-content { padding: 1.2rem 1rem; width: 95%; max-height: 95vh; overflow-y: auto; }
  .popup-icon-container { margin: 1rem 0 0.5rem; }
  .popup-icon { width: 35px; height: 35px; }
  .popup-title { font-size: 1.2rem; margin-bottom: 0.5rem; }
  .popup-text-area { margin-bottom: 0.5rem; padding: 0 0.5rem; }
  .popup-desc { font-size: 0.9rem; margin-bottom: 0.5rem; }
  .popup-list { font-size: 0.85rem; padding-left: 1.2rem; margin-bottom: 0; }
  .offers-container { gap: 10px; margin-top: 5px; }
  .offer-btn { padding: 0.75rem; font-size: 0.8rem; }
  .popup-footer { margin-top: 10px; font-size: 0.75rem; }
}
