:root {
  --bg-color: #0b1016;
  --bg-surface: #141b25;
  --bg-hover: #1c2636;
  --text-primary: #e6e6e6;
  --text-secondary: #9da6b4;
  --accent-color: #f1c40f; /* Yellow accent like IMDb/themes */
  --accent-hover: #f39c12;
  --badge-bg: #e50914; /* Keeping red for UNIFIX, or switch to blue */
  --badge-quality: #2ecc71; /* Green HD badge */
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  --border-color: rgba(255, 255, 255, 0.05);
}

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

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

a {
  text-decoration: none;
  color: inherit;
}

/* Navbar */
header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.logo {
  font-family: 'Arial Black', Impact, sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: #E50914;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  text-transform: uppercase;
  transition: color 0.2s;
}

nav a:hover, nav a.active {
  color: var(--accent-color);
}

/* Main Container */
main {
  max-width: 1300px;
  margin: 2rem auto;
  padding: 0 2%;
}

/* Category Sections */
.movie-section {
  margin-bottom: 3rem;
  background: var(--bg-surface);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.8rem;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-color);
  text-transform: uppercase;
  border-left: 4px solid var(--accent-color);
  padding-left: 0.8rem;
}

/* Movie Grid */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}

/* Movie Card (Poster) */
.movie-card {
  position: relative;
  background: var(--bg-hover);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.poster-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background-color: #000;
}

.poster-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Badges */
.quality-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: var(--badge-quality);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  z-index: 2;
  text-transform: uppercase;
}

.rating-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: var(--accent-color);
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Hover Overlay indicating Play */
.poster-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

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

.play-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-color);
  color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.play-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  margin-left: 3px;
}

/* Card Info Details */
.card-info {
  padding: 0.8rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

.btn-primary {
  background-color: var(--accent-color);
  color: #000;
}
.btn-primary:hover {
  background-color: var(--accent-hover);
}

/* Player View Updates for Dark UI */
.player-container {
  padding: 2rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  margin-bottom: 2rem;
}

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

.video-info {
  background: var(--bg-surface);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.video-info h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.video-meta-tags {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-badge {
  background: rgba(255,255,255,0.1);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Admin Panel */
.admin-container {
  padding: 2rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}
.admin-header h1 {
  margin-bottom: 2rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.stat-card {
  background: var(--bg-surface);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--border-color);
}
.stat-title {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
}
.admin-section {
  background: var(--bg-surface);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
th {
  color: var(--text-secondary);
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}
.form-control {
  width: 100%;
  padding: 0.8rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: white;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
}
.btn-small { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.btn-secondary { background: #333; color: white; }
.btn-danger { background: #e50914; color: white; }

/* Responsive adjustments */
@media (max-width: 768px) {
  .movie-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 480px) {
  .movie-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .movie-section {
    padding: 1rem;
  }
}
