* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: #141414;
  color: #fff;
}

/* Navbar Styling */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
}

.navbar img {
  height: 40px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.search-bar {
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #333;
  background: #333;
  color: #fff;
  width: 200px;
  transition: width 0.3s ease;
}

.search-bar:focus {
  outline: none;
  width: 250px;
}

/* Banner Section */
.banner {
  height: 50vh;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-position: center;
}

.banner h1 {
  background: rgba(0, 0, 0, 0.7);
  padding: 15px 30px;
  font-size: 36px;
  font-weight: bold;
}

/* Content Row Section */
.row {
  margin: 20px;
}

.row h2 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
}

/* List Section (Movies, TV Shows, Anime) */
.list {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 20px; /* Space for scrolling */
}

.list::-webkit-scrollbar {
  display: none;  /* Hide scrollbar in Webkit browsers */
}

.list img {
  width: 180px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.list img:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
  z-index: 2;
}

/* Modal Styling */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.modal-content {
  background: #222;
  padding: 20px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  text-align: center;
  border-radius: 10px;
}

.modal-body {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 20px;
}

.modal-body img {
  width: 35%;
  border-radius: 6px;
}

.modal-text {
  flex: 1;
  text-align: left;
}

.stars {
  color: gold;
}

.close {
  position: absolute;
  top: 10px;
  right: 20px;
  cursor: pointer;
  font-size: 28px;
  color: white;
}

.server-selector {
  margin: 15px 0;
  text-align: left;
}

/* Search Modal Styling */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 15;
}

.search-modal input {
  width: 300px;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #333;
  color: #fff;
  font-size: 14px;
}

.search-modal .results {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.search-modal img {
  width: 120px;
  border-radius: 6px;
  cursor: pointer;
}

.search-modal .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 30px;
}

/* Mobile Display Adjustments */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .search-bar {
    width: 100%;
    margin-top: 10px;
  }

  .banner {
    height: 30vh;
  }

  .modal-body {
    align-items: center;
  }

  .modal-body img {
    width: 40%;
  }

  .modal-text {
    text-align: center;
  }

  .list {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .list img {
    width: 150px;
  }

  .search-modal input {
    margin-top: 50px;
    width: 90%;
  }

  .search-modal .results {
    justify-content: center;
    grid-template-columns: repeat(auto-fill, minmax(45%, 1fr));
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
  }
}

@media (max-width: 480px) {
  .banner h1 {
    font-size: 20px;
    padding: 5px;
  }

  .row h2 {
    font-size: 18px;
  }

  .modal-content {
    width: 95%;
    padding: 15px;
  }

  .modal-body img {
    width: 40%;
  }

  .search-modal .close {
    font-size: 24px;
    top: 10px;
    right: 20px;
  }
}

/* Footer Styling */
.footer {
  background: #141414;
  color: #ccc;
  padding: 20px;
  text-align: center;
  margin-top: 40px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-links a {
  color: red;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #fff;
}

/* Responsive adjustments for footer */
@media (max-width: 600px) {
  .footer-content {
    font-size: 14px;
  }

  .footer-links {
    flex-direction: row;
    gap: 8px;
  }
}
