/* MoviesMod Main CSS */
:root {
  --brand: #E50914;
  --brand-dark: #b20710;
  --brand-glow: rgba(229, 9, 20, 0.25);
  --surface: #0f0f0f;
  --surface-card: #161616;
  --surface-raised: #1e1e1e;
  --surface-border: #2a2a2a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body { background: var(--surface); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

.scrollbar-none::-webkit-scrollbar { display: none; }
.scrollbar-none { -ms-overflow-style: none; scrollbar-width: none; }

/* Movie Card */
.movie-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
  text-decoration: none;
  color: inherit;
}

.movie-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(229,9,20,0.2);
}

.movie-card .poster-wrap {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--surface-raised);
}

.movie-card .poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.06);
}

.movie-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.movie-card:hover .overlay { opacity: 1; }

.movie-card .play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.movie-card:hover .play-btn { opacity: 1; }

.movie-card .play-btn svg {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.8));
}

.quality-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--brand);
  color: white;
  text-transform: uppercase;
}

.quality-badge.hd { background: #1a9e4a; }
.quality-badge.fhd, .quality-badge[data-q="1080p"] { background: #1a6ec1; }
.quality-badge[data-q="4K"] { background: #7c3aed; }
.quality-badge.cam { background: #92400e; }

.movie-card .card-info {
  padding: 8px 10px 10px;
}

.movie-card .card-title {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: #e5e5e5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card .card-year {
  font-size: 11px;
  color: #6b7280;
  margin-top: 3px;
}

/* Movie Skeleton */
.movie-skeleton {
  border-radius: 10px;
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  overflow: hidden;
}

.movie-skeleton::before {
  content: '';
  display: block;
  aspect-ratio: 2/3;
  background: linear-gradient(90deg, var(--surface-raised) 25%, #232323 50%, var(--surface-raised) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.movie-skeleton::after {
  content: '';
  display: block;
  height: 48px;
  margin: 8px 10px 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--surface-raised) 25%, #232323 50%, var(--surface-raised) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Sidebar Items */
.sidebar-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.sidebar-item:hover { background: rgba(255,255,255,0.04); }
.sidebar-item img { width: 44px; height: 62px; object-fit: cover; border-radius: 5px; flex-shrink: 0; background: var(--surface-raised); }
.sidebar-item .si-info { flex: 1; min-width: 0; }
.sidebar-item .si-title { font-size: 12px; font-weight: 500; color: #e0e0e0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.sidebar-item .si-meta { font-size: 11px; color: #6b7280; margin-top: 3px; }
.sidebar-item .si-views { font-size: 11px; color: var(--brand); margin-top: 2px; }

/* Genre Pills */
.genre-pill {
  white-space: nowrap;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--surface-border);
  color: #9ca3af;
  text-decoration: none;
  transition: all 0.15s;
}
.genre-pill:hover, .genre-pill.active {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

/* Sort Buttons */
.sort-btn {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--surface-border);
  color: #9ca3af;
  text-decoration: none;
  transition: all 0.15s;
}
.sort-btn:hover, .sort-btn.active {
  background: var(--surface-raised);
  color: white;
  border-color: #444;
}

/* Detail row */
.detail-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.detail-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  min-width: 80px;
  flex-shrink: 0;
  padding-top: 1px;
}
.detail-value {
  font-size: 13px;
  color: #e0e0e0;
  flex: 1;
}

/* Tag Pills */
.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  background: var(--surface-raised);
  border: 1px solid var(--surface-border);
  color: #9ca3af;
  text-decoration: none;
  transition: all 0.15s;
}
.tag-pill:hover { border-color: var(--brand); color: var(--brand); }

/* Player iframe container */
.player-wrap {
  position: relative;
  width: 100%;
  height: 600px;
  background: #000;
}
.player-wrap iframe, .player-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Screenshot thumbnails */
.screenshot-thumb {
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--surface-border);
  transition: transform 0.2s, border-color 0.2s;
  width: 100%;
}
.screenshot-thumb:hover {
  transform: scale(1.02);
  border-color: var(--brand);
}

/* Pagination */
.page-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface-raised);
  border: 1px solid var(--surface-border);
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.page-btn:hover, .page-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Admin: not in this file - see admin.css */

/* Lightbox */
#lightbox { backdrop-filter: blur(4px); }

/* View counter badge */
.view-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #6b7280;
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .movie-card .card-title { font-size: 11px; }
  .movie-card .card-info { padding: 6px 8px 8px; }
}