/* ===== Global Styles ===== */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background-color: #111;
  color: #fff;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; }

/* ===== Header ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #141414;
}

header h1 { margin: 0; font-size: 24px; color: #e50914; }
header input {
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 4px;
  border: none;
  outline: none;
  max-width: 150px;
}

/* ===== Tabs ===== */
#tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  background-color: #141414;
  flex-wrap: wrap;
}

#tabs button {
  padding: 8px 15px;
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  transition: 0.3s;
}

#tabs button.active,
#tabs button:hover {
  color: #e50914;
  font-weight: bold;
}

/* ===== Hero Carousel ===== */
#recommended-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 15px;
  position: relative;
  flex-wrap: wrap;
}

#hero-container { position: relative; text-align: center; }

.hero-thumbnail {
  position: relative;
  width: 500px;
  max-width: 90vw;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

.hero-thumbnail img {
  width: 100%;
  display: block;
  border-radius: 10px;
}

#hero-title {
  text-align: center;
  margin-bottom: 8px;
  font-size: 28px;
  color: #e50914;
}

#hero-description {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  padding: 8px;
  border-radius: 6px;
  max-width: 70%;
  font-size: 14px;
  color: #fff;
}

/* Arrows */
.arrow {
  font-size: 40px;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  padding: 10px;
  transition: 0.3s;
  user-select: none;
}

.arrow:hover { background: rgba(0,0,0,0.8); }

/* ===== Movie/Series/Youtubers Grid ===== */
#movies-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  padding: 15px;
}

.movie-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
  background-color: #1a1a1a;
}

.movie-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px #e50914;
}

.movie-card img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

.movie-card .title {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  padding: 5px;
  background: rgba(0,0,0,0.7);
  text-align: center;
  font-weight: bold;
  font-size: 14px;
}

.movie-card .description {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 5px;
  font-size: 12px;
  background: rgba(0,0,0,0.7);
  text-align: center;
}

/* ===== Video Modal ===== */
#video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 10px;
  box-sizing: border-box;
}

#video-modal.hidden { display: none; }

.modal-content {
  position: relative;
  width: 80%;
  max-width: 900px;
}

#close-modal {
  position: absolute;
  top: -15px;
  right: -15px;
  font-size: 35px;
  color: #fff;
  cursor: pointer;
}

#video-description {
  margin-top: 8px;
  color: #fff;
  font-size: 16px;
}

/* ===== Responsive Mobile ===== */
@media (max-width: 768px) {
  header { flex-direction: column; align-items: flex-start; gap: 10px; }
  header input { max-width: 100%; }
  #tabs { gap: 10px; }
  #hero-title { font-size: 22px; }
  #hero-description { font-size: 12px; max-width: 80%; }
  .hero-thumbnail { width: 90%; }
  .arrow { font-size: 30px; padding: 8px; }
  #movies-container { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; padding: 10px; }
  .movie-card .title { font-size: 12px; }
  .movie-card .description { font-size: 10px; }
  #video-modal .modal-content { width: 95%; }
  #close-modal { font-size: 30px; top: -10px; right: -10px; }
}

@media (max-width: 480px) {
  #hero-title { font-size: 18px; }
  #hero-description { font-size: 11px; }
  .arrow { font-size: 25px; padding: 6px; }
}