/* ====== Global ====== */
a, u {
  text-decoration: none;
}

.category:nth-of-type(odd) {
  background-color: #272723; /* dark */
  color: #fff;
}

.category:nth-of-type(even) {
  background-color: #191919; /* slightly lighter */
  color: #fff;
}

.category {
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 10px;
  margin-bottom: 10px;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #000;
  color: #eee;
}

/* ====== Header ====== */
header {
  background: #111;
  padding: 1rem;
  display: flex;
  align-items: center;
  position: relative;
}

.logo {
  font-size: 1.5rem;
  color: rgb(222,175,58);
  font-weight: bold;
}

nav {
  margin-left: auto;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: left;
}

nav li {
  margin-left: 20px;
}

nav a {
  color: #eee;
  text-decoration: none;
  display: block;
  padding: 4px 0;
}

#menuSearch {
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  border: none;
  background: #222;
  color: #eee;
  font-size: 0.9rem;
}

/* ====== Hamburger Menu ====== */
.menu-toggle {
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #eee;
  cursor: pointer;
  display: none;
  position: absolute;
  right: 1rem;
  top: 1rem;
}

@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    background: #111;
    position: absolute;
    right: 0;
    top: 60px;
    width: 180px;
    z-index: 1000;
    padding: 0.5rem;
  }

  nav ul.show {
    display: flex;
  }

  nav li {
    margin-left: 0;
    border-bottom: 1px solid #222;
  }

  nav a {
    padding: 0.5rem 1rem;
  }

  .menu-toggle {
    display: block;
  }
}

/* ====== Main ====== */
main {
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ====== Category Header ====== */
.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.category-header h2,
.category-header h1 {
  color: rgb(222,175,58);
  border-left: 4px solid rgb(222,175,58);
  padding-left: 8px;
  margin: 0;
  font-size: 1.2rem;
}

.view-all {
  color: rgb(222,175,58);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.view-all:hover {
  color: #fff;
  transform: translateX(3px);
}

/* ====== Movie Grid ====== */

.movie-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* 👈 aligns items to the left */
    margin-top: 1rem;
    gap: 1rem; /* optional: adds nice spacing between items */
    min-height: 10px;
}

/* ====== Movie Card ====== */
.movie-card {
  background: #111;
  border-radius: 6px;
  overflow: hidden;
  width: 23%;
  margin-bottom: 1rem;
  text-align: left;
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
  transition: transform 0.2s ease;
}

.movie-card:hover {
  transform: scale(1.03);
}

.movie-card img {
  width: 100%;
  height: auto;
  display: block;
}

.movie-info {
  padding: 2px;
}

.movie-info {
  color:#fff;
}

.movie-info h2 {
  font-size: 1rem;
  color: #fff;
  margin: 0.3rem 0;
}

.movie-tags {
  padding:4px;
}

.movie-tags span {
  display: inline-block;
  background: #222;
  color: rgb(222,175,58);
  padding: 2px 6px;
  margin-right: 4px;
  border-radius: 3px;
  font-size: 0.75rem;
}

.movie-tags a {
  display: inline-block;
  background: #222;
  color: rgb(222,175,58);
  padding: 2px 6px;
  margin-right: 4px;
  margin-top: 4px;
  border-radius: 3px;
  font-size: 0.75rem;
}

.movie-info p {
  color: #bbb;
  font-size: 0.8rem;
  margin: 0.3rem 0 0;
}

/* ====== Pagination ====== */
.pagination {
  text-align: center;
  margin: 2rem 0;
}

.pagination a {
  display: inline-block;
  color: #eee;
  background: #222;
  padding: 6px 10px;
  margin: 0 4px;
  text-decoration: none;
  border-radius: 4px;
}

.pagination a.active,
.pagination a:hover {
  background: rgb(222,175,58);
  color: #000;
}

/* ====== Footer ====== */
footer {
  text-align: center;
  padding: 1rem;
  background: #111;
  color: #aaa;
}

/* ====== Responsive ====== */
@media (max-width:1024px){ .movie-card{width:31%;} }
@media (max-width:768px){ .movie-card{width:48%;} }
@media (max-width:480px){ .movie-card{width:46%;} }


/* ====== Video Player ====== */
.plyr--video {
  width: 100%;
  margin-bottom: 2rem;
}

.plyr--full-ui input[type=range] {
  color: rgb(222,175,58);
}

.plyr__control.custom-skip:hover {
  opacity: 1;
}

.plyr__control.custom-skip svg {
  width: 22px;
  height: 22px;
  vertical-align: middle;
}

/* ====== Movie Details ====== */
.details {
  text-align: center;
  margin-bottom: 4rem;
}

.details h2 {
  color: rgb(222,175,58);
  margin-bottom: 0.5rem;
}

.details .meta,
.details .rating {
  font-size: 0.9rem;
  color: #ccc;
  margin: 0.3rem 0;
}

.details .description {
  color: #ddd;
  max-width: 800px;
  margin: 1rem auto 0;
  line-height: 1.5;
}

/* ====== Related Movies ====== */
.related-section {
  margin-top: 2rem;
}

.related-title {
  color: rgb(222,175,58);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

@media (max-width: 768px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.related-card {
  background: #111;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s;
  cursor: pointer;
}

.related-card:hover {
  transform: scale(1.05);
}

.related-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.related-card h4 {
  margin: 0.5rem;
  text-align: center;
  color: #eee;
  font-size: 1rem;
}
