/* === GLOBAL RESET === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #0f0f0f;
  color: #fff;
  line-height: 1.6;
}

/* === NAVIGATION BAR === */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #121212;
  padding: 20px 40px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-menu {
  display: flex;
  gap: 25px;
}

.nav-menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  transition: color 0.3s ease;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  background: red;
  bottom: -5px;
  left: 0;
  transition: 0.3s;
}

.nav-menu a:hover {
  color: red;
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-right {
  flex-shrink: 0;
}

.search-bar {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  background: #2c2c2c;
  color: #fff;
  width: 220px;
}

/* === HERO BANNER SECTION === */
.hero-banner {
  position: relative;
  height: 75vh;
  color: white;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 60px 40px;
  box-sizing: border-box;
}

.hero-banner img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.2));
  z-index: -1;
}

.banner-content {
  max-width: 600px;
  z-index: 1;
}

.banner-content h1 {
  font-size: 3rem;
  margin: 0 0 20px;
  font-weight: bold;
}

.banner-content p {
  font-size: 1.2rem;
  margin-bottom: 25px;
  line-height: 1.5;
  color: #ccc;
}

.banner-buttons {
  display: flex;
  gap: 15px;
}

.btn-watch,
.btn-info {
  padding: 10px 20px;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s;
}

.btn-watch {
  background: #e50914;
  color: white;
}

.btn-info {
  background: rgba(255,255,255,0.7);
  color: #000;
}

.btn-watch:hover {
  background: #f6121d;
}

.btn-info:hover {
  background: white;
}

/* === TRENDING ROWS === */
.row {
  padding: 40px 60px;
}

.row h2 {
  margin-bottom: 20px;
  font-size: 1.8rem;
  font-weight: 600;
}

.list {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-behavior: smooth;
}

.list::-webkit-scrollbar {
  height: 6px;
}
.list::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

.list img {
  width: 160px;
  height: 240px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.list img:hover {
  transform: scale(1.07);
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.5);
}

/* === MODAL === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.modal-content {
  background: #222;
  padding: 20px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border-radius: 10px;
  text-align: center;
}

.modal-body {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.modal-body img {
  width: 30%;
  border-radius: 5px;
}

.modal-text {
  flex: 1;
  text-align: left;
}

.stars {
  color: gold;
}

.close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: red;
}

/* === SERVER SELECTOR === */
.server-selector {
  margin: 15px 0;
  text-align: left;
  font-size: 0.95rem;
}

.server-selector select {
  padding: 6px 10px;
  border-radius: 4px;
  background: #333;
  color: white;
  border: none;
}

/* === SEARCH MODAL === */
.search-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
}

.search-modal input {
  width: 300px;
  padding: 10px;
  border-radius: 5px;
  border: none;
  margin-bottom: 20px;
  background: #222;
  color: #fff;
}

.search-modal .results {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-height: 70vh;
  overflow-y: auto;
}

.search-modal img {
  width: 120px;
  border-radius: 5px;
  cursor: pointer;
}

.search-modal .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 30px;
  cursor: pointer;
}

/* === FOOTER === */
.footer {
  background: #141414;
  color: #aaa;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: red;
  text-decoration: none;
  transition: 0.3s;
}

.footer-links a:hover {
  color: white;
}
/* === GENRE NAVIGATION === */
.genre-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-x: auto;
  white-space: nowrap;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #333;
  padding: 12px 20px;
  margin: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.genre-nav::-webkit-scrollbar {
  display: none;
}
.genre-button {
  flex: 0 0 auto;
  padding: 14px 24px;
  font-size: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: none;
  margin-right: 10px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: all 0.3s ease;
  min-width: max-content;
}
.genre-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* === HORIZONTAL MOVIE LIST === */
.genre-row {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  gap: 16px;
  padding: 20px;
  scrollbar-width: none;
}
.genre-row::-webkit-scrollbar {
  display: none;
}

/* === INDIVIDUAL MOVIE CARD === */
.genre-card {
  flex: 0 0 auto;
  min-width: 160px;
  max-width: 180px;
  background: #111;
  color: #fff;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease;
  position: relative;
}
.genre-card:hover {
  transform: scale(1.05);
}
.genre-card img {
  width: 100%;
  display: block;
  border-bottom: 1px solid #333;
}
.genre-card h3 {
  font-size: 14px;
  margin: 10px 8px;
  line-height: 1.2em;
}

/* === MOVIE DESCRIPTION ON HOVER === */
.genre-description {
  position: absolute;
  top: 0;
  left: 170px;
  width: 300px;
  background: rgba(18, 18, 18, 0.75);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 15px;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 10px;
  z-index: 5;
  pointer-events: none;
}
.genre-card:hover .genre-description {
  opacity: 1;
  pointer-events: auto;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
  .genre-button {
    font-size: 14px;
    padding: 10px 16px;
  }
  .genre-row {
    padding: 10px 15px;
    gap: 12px;
  }
  .genre-card {
    min-width: 140px;
  }
  .genre-card h3 {
    font-size: 13px;
  }
  .genre-description {
    display: none;
  }
}
