* {
  box-sizing: border-box;
}

/* ---------- Footer ---------- */

footer {
  background-color: #111820;
  color: #D8E1E8;
  padding: 40px 20px;
  font-family: Arial, sans-serif;
}

footer div {
  margin-bottom: 30px;
}

footer h4 {
  margin-bottom: 10px;
  font-size: 18px;
  color: #42C6E8;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer ul li {
  margin-bottom: 8px;
}

footer ul li a {
  text-decoration: none;
  color: #9BAAB5;
  transition: color 0.3s;
}

footer ul li a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  text-align: center;
  font-size: 14px;
  color: #6F7D87;
  border-top: 1px solid #28333C;
  padding-top: 20px;
  margin-top: 40px;
}

@media (min-width: 768px) {
  footer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    align-items: start;
  }

  .footer-bottom {
    grid-column: 1 / -1;
  }
}

/* ---------- Body ---------- */

body {
  margin: 0;
  font-family: Arial;
  font-size: 16px;
  line-height: 1.6;
  color: #D8E1E8;
  background-color: #0B1117;
}

/* ---------- Links ---------- */

a {
  color: #D8E1E8;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #42C6E8;
}

b, h3 {
  color: #D8E1E8;
  font-weight: bold;
}

td, tr {
  border: 0px solid;
  padding: 0px;
  color: #9BAAB5;
}

/* ---------- Header ---------- */

header {
  background: #0E151D;
  color: #D8E1E8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  position: relative;
  border-bottom: 2px solid #283845;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

.header-left,
.header-center,
.header-right {
  display: flex;
  align-items: center;
}

.header-left {
  flex: 1;
}

.header-center {
  flex: 2;
  justify-content: center;
}

.header-right {
  flex: 1;
  justify-content: flex-end;
  gap: 20px;
}

/* ---------- Logo ---------- */

.logo a {
  color: #D8E1E8;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.logo a:hover {
  color: #42C6E8;
}

/* ---------- Search ---------- */

.search-bar {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 400px;
}

.search-bar input[type="text"] {
  flex: 1;
  height: 34px;
  padding: 6px 10px;
  font-size: 16px;
  font-family: Arial, sans-serif;
  border: 1px solid #42C6E8;
  border-radius: 4px 0 0 4px;
  background: #17212B;
  color: #D8E1E8;
  outline: none;
  margin: 0;
}

.search-bar input::placeholder {
  color: #8998A5;
}

.search-bar button {
  height: 34px;
  padding: 6px 12px;
  background: #42C6E8;
  color: #081016;
  font-size: 16px;
  font-family: Arial, sans-serif;
  cursor: pointer;
  border: none;
  border-radius: 0 4px 4px 0;
  font-weight: bold;
}

.search-bar button:hover {
  background: #8DDDF1;
}

/* ---------- Navigation ---------- */

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  color: #D8E1E8;
  font-size: 16px;
}

.nav-links a:hover {
  color: #42C6E8;
}

/* ---------- Dropdown ---------- */

.dropdown {
  position: relative;
}

.dropbtn {
  background-color: transparent;
  color: #D8E1E8;
  border: none;
  cursor: pointer;
  font-size: 22px;
  padding: 0;
}

.dropbtn:hover {
  color: #42C6E8;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #17212B;
  min-width: 180px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.35);
  z-index: 1000;
  right: 0;
  top: 100%;
  border-radius: 6px;
  overflow: visible;
}

.dropdown-content > a,
.submenu > a {
  color: #D8E1E8;
  padding: 12px 16px;
  display: block;
  font-size: 15px;
}

.dropdown-content > a:hover,
.submenu > a:hover {
  background-color: #24333F;
  color: #42C6E8;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* ---------- Submenus ---------- */

.submenu {
  position: relative;
}

.submenu > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
}

.submenu-arrow {
  font-size: 14px;
  color: #42C6E8;
}

.submenu-content {
  display: none;
  position: absolute;
  right: 100%;
  top: 0;
  min-width: 190px;
  max-height: 500px;
  overflow-y: auto;
  background-color: #17212B;
  box-shadow: 0 8px 16px rgba(0,0,0,0.35);
  border-radius: 6px;
  overflow-x: hidden;
  z-index: 1001;
}

.submenu-content a {
  color: #D8E1E8;
  padding: 12px 16px;
  display: block;
  font-size: 15px;
  white-space: nowrap;
}

.submenu-content a:hover {
  background-color: #24333F;
  color: #42C6E8;
}

.submenu:hover .submenu-content {
  display: block;
}

/* ---------- Posters ---------- */

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.poster-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
}

.poster-item .title {
  margin-top: 8px;
  font-weight: bold;
  text-align: center;
}

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: stretch;
  }

  .header-left,
  .header-center,
  .header-right {
    flex: none;
    justify-content: center;
    margin-bottom: 10px;
  }

  .header-right {
    justify-content: center;
    flex-wrap: wrap;
  }

  .search-bar {
    width: 100%;
    max-width: none;
    padding: 0 20px;
  }

  .dropdown-content {
    right: 50%;
    transform: translateX(50%);
  }

  .submenu-content {
    position: static;
    width: 100%;
    min-width: 0;
    max-height: none;
    box-shadow: none;
    border-radius: 0;
  }

  .submenu:hover .submenu-content {
    display: block;
  }

  .submenu > a {
    padding: 12px 16px;
  }

  .submenu-content a {
    padding-left: 30px;
  }
}