/* -------------------------------------------------------------
 * Pure Cinema CSS Design System
 * ------------------------------------------------------------- */

:root {
  --bg-body: #08070d;
  --bg-card: rgba(18, 16, 28, 0.9);
  --bg-card-hover: rgba(30, 26, 46, 0.95);
  --border: rgba(255, 255, 255, 0.08);
  --accent-indigo: #6366f1;
  --accent-blue: #0087fc;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #0087fc 100%);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
}

.container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 7, 13, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.5px;
}

.brand-icon {
  color: var(--accent-indigo);
  font-size: 1.4rem;
}

.brand-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Search Wrapper */
.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 520px;
}

.search-wrapper input {
  width: 100%;
  padding: 12px 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.search-wrapper input:focus {
  border-color: var(--accent-indigo);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

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

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

/* Filters Card */
.main {
  padding: 30px 20px;
  flex: 1;
}

.filters-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 90px;
}

.filter-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.pill:hover {
  border-color: var(--accent-indigo);
}

.pill.active {
  background: var(--accent-gradient);
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Grid & Section Header */
.heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.heading-row h2 {
  font-size: 1.4rem;
  font-weight: 700;
}

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

.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.movie-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  cursor: pointer;
}

.movie-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--accent-indigo);
  box-shadow: var(--shadow);
}

.poster-box {
  position: relative;
  width: 100%;
  padding-top: 145%;
  background: #141021;
  overflow: hidden;
}

.poster-box img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.badge-quality {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.card-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.action-btn {
  margin-top: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
}

.movie-card:hover .action-btn {
  background: var(--accent-gradient);
  border-color: transparent;
}

/* Skeleton Loading */
.skeleton {
  height: 380px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, #12101c 25%, #201b33 50%, #12101c 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.page-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: #fff;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover, .page-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: #110f1a;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 30px;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  display: flex;
  gap: 24px;
}

.modal-poster {
  width: 220px;
  flex-shrink: 0;
}

.modal-poster img {
  width: 100%;
  border-radius: var(--radius-md);
}

.modal-info {
  flex: 1;
}

.modal-info h2 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.modal-synopsis {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Video Player */
.video-player-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
}

.video-player-container video {
  width: 100%;
  height: 100%;
}

.player-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Resolution & Provider List */
.resolutions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.res-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.res-header {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.providers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.provider-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
}

.provider-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: auto;
}

@media (max-width: 768px) {
  .header-inner { flex-direction: column; align-items: stretch; }
  .modal-content { flex-direction: column; }
  .modal-poster { width: 100%; max-width: 180px; margin: 0 auto; }
}
