* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-image: url('https://wallpaperaccess.com/full/229832.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
}

/* ===== Navbar ===== */
.navbar {
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  padding: 30px; 
  background: #222;
}

.navbar img { height: 40px; }

.nav-links { display: flex; align-items: center; gap: 10px; }
.nav-links a { color: white; text-decoration: none; margin: 0 5px; transition: background 0.2s, color 0.2s; }
.nav-links a:hover { color: #f39c12; }

.fa-home {
  font-size: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 44px;
  border-radius: 8px;
  background: transparent;
  transition: background 0.2s, color 0.2s;
}

.fa-home:hover {
  background: #333;
  color: #f39c12;
}

.search-bar {
  padding: 10px; 
  border-radius: 5px; 
  border: none;
  outline: none;
  background: #fff;
  color: #222;
  font-size: 1em;
}

/* ===== Banner ===== */
.banner {
  height: 50vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  padding: 20px;
  position: relative;
}

.banner h1 {
  background: rgba(0,0,0,0.7);
  padding: 10px 18px;
  color: #fff;
  border-radius: 6px;
  font-size: 2.5em;
  font-weight: 700;
  margin: 0;
}

/* ===== Rows for Movie/TV/Anime ===== */
.row {
  margin: 20px 0;
  padding: 0 20px;
}

.row h2 {
  margin-bottom: 10px;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  font-size: 1.4em;
}

.list {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: #333 #222;
}

.list img {
  width: 150px;
  height: 220px;
  margin-right: 10px;
  cursor: pointer;
  border-radius: 5px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.11);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.list img:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
  z-index: 2;
}

/* ===== Modal Styles ===== */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #222;
  padding: 20px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 6px 40px rgba(0,0,0,0.35);
}

.modal-body {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.modal-body img {
  width: 30%;
  border-radius: 5px;
  object-fit: cover;
}

.modal-text {
  flex: 1;
  text-align: left;
  color: #fff;
}

#modal-title {
  font-size: 1.5em;
  margin-bottom: 10px;
}

.stars { color: gold; margin-bottom: 7px; display: inline-block; }

#modal-description {
  color: #ccc;
  margin: 0 0 10px 0;
  font-size: 1em;
}

/* Close button */
.close {
  position: absolute;
  top: 10px; right: 20px;
  cursor: pointer;
  font-size: 24px;
  color: #fff;
  font-weight: bold;
  z-index: 10;
}

/* Server selector */
.server-selector {
  margin: 15px 0;
  text-align: left;
  color: #fff;
}

.server-selector label {
  color: #bbb;
}

#server {
  border-radius: 5px;
  padding: 5px 10px;
  border: none;
  margin-left: 5px;
  font-size: 1em;
}

/* Modal video iframe */
#modal-video {
  margin-top: 12px;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  background: #000;
  border: none;
}

/* ===== Search Modal Styles ===== */
.search-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  justify-content: center;
  align-items: flex-start;
  flex-direction: column;
  z-index: 1500;
  padding: 30px 10vw;
}

.search-modal input {
  width: 300px;
  max-width: 92vw;
  padding: 10px;
  border-radius: 5px;
  border: none;
  margin-bottom: 20px;
  font-size: 1em;
  outline: none;
}

.search-modal .results {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
}

.search-modal img {
  width: 120px;
  border-radius: 5px;
  cursor: pointer;
  object-fit: cover;
  margin-bottom: 6px;
  border: 2px solid transparent;
  transition: border 0.2s;
}
.search-modal img:hover {
  border: 2px solid #f39c12;
}

.search-modal .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 30px;
  color: #fff;
  z-index: 50;
}

/* ===== Footer ===== */
.footer {
  background: #222;
  color: #ccc;
  padding: 20px 0;
  text-align: center;
  margin-top: 40px;
  width: 100vw;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-links a {
  color: red;
  text-decoration: none;
  transition: color 0.3s;
  font-size: 1em;
}

.footer-links a:hover {
  color: #fff;
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  height: 7px;
  width: 7px;
  background: #232323;
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 5px;
}

/* ===== Responsive: Tablet and Mobile ===== */
@media (max-width: 900px) {
  .modal-content {
    max-width: 98vw;
  }
  .search-modal {
    padding: 16px 2vw;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 8px;
    gap: 12px;
  }
  .navbar img {
    align-self: center;
    margin-bottom: 5px;
  }
  .nav-links {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
  .nav-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    font-size: 2em;
  }
  .fa-home {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 2em;
  }
  .search-bar {
    width: 100%;
    margin-top: 0;
  }
  .banner {
    height: 30vh;
    padding: 12px;
  }
  .banner h1 {
    font-size: 1.3em;
    padding: 5px 10px;
  }
  .row {
    margin: 12px 0;
    padding: 0 8px;
  }
  .row h2 {
    font-size: 1.1em;
  }
  .list img {
    width: 100px;
    height: 150px;
  }
  .modal-content {
    width: 98vw;
    padding: 10px 2vw;
  }
  .modal-body {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .modal-body img {
    width: 60vw;
    max-width: 230px;
    min-width: 100px;
    margin-bottom: 10px;
  }
  .modal-text {
    text-align: center;
    width: 100%;
  }
  #modal-video {
    min-height: 160px;
    margin-top: 8px;
  }
  .search-modal input {
    margin-top: 30px;
    width: 95vw;
    max-width: 95vw;
  }
  .search-modal .results {
    gap: 7px;
    justify-content: center;
    padding: 10px 0;
  }
  .footer-content {
    font-size: 14px;
  }
  .footer-links {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .banner h1 {
    font-size: 18px;
    padding: 4px 8px;
  }
  .row h2 {
    font-size: 16px;
  }
  .modal-content {
    width: 99vw;
    padding: 6px 1vw;
  }
  .modal-body img {
    width: 80vw;
    max-width: 150px;
  }
  .search-modal .close {
    font-size: 22px;
    top: 8px;
    right: 12px;
  }
  .footer-content {
    font-size: 13px;
  }
}

/* ===== End of CSS ===== */
