* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --bg: #111;
  --text: #fff;
  --navbar: #141414;
  --banner-btn: rgba(51,51,51,0.5);
  --footer: #141414;
  --poster-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
  transition: background 0.3s, color 0.3s;
}
.navbar {
  display: flex;
  align-items: center;
  padding: 20px;
  background-color: var(--navbar);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: padding 0.3s, box-shadow 0.3s;
}
.navbar.shrink {
  padding: 8px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.theme-toggle {
  margin-left: 15px;
  background: none;
  border: 1px solid #fff;
  color: #fff;
  border-radius: 16px;
  padding: 5px 14px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
}
.theme-light {
  --bg: #f7f7f7;
  --text: #222;
  --navbar: #fff;
  --banner-btn: rgba(200,200,200,0.7);
  --footer: #eee;
}
.navbar .logo {
  font-size: 24px;
  color: red;
  font-weight: bold;
  margin-right: 30px;
}
.navbar a {
  color: inherit;
  text-decoration: none;
  margin: 0 10px;
}
.banner {
  background-image: url('https://image.tmdb.org/t/p/original/xDMIl84Qo5Tsu62c9DGWhmPI67A.jpg');
  background-size: cover;
  background-position: center;
  height: 60vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 40px;
}
.banner-content {
  max-width: 500px;
  animation: fadeInBanner 1.2s ease;
}
@keyframes fadeInBanner {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
.banner h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}
.banner p {
  font-size: 1rem;
  margin-bottom: 20px;
}
.banner button {
  padding: 10px 20px;
  background-color: var(--banner-btn);
  border: none;
  color: var(--text);
  margin-right: 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.row {
  margin-top: 20px;
  padding: 20px;
}
.row h2 {
  margin-bottom: 10px;
}
.row-posters {
  display: flex;
  overflow-x: scroll;
  padding-bottom: 10px;
}
.row-posters::-webkit-scrollbar {
  display: none;
}
.row-posters img {
  width: 150px;
  object-fit: contain;
  margin-right: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 4px;
  box-shadow: none;
}
.row-posters img:hover {
  transform: scale(1.08);
  box-shadow: var(--poster-shadow);
  z-index: 2;
}
.navbar-search {
  flex: 1;
  display: flex;
  align-items: center;
  margin-left: 20px;
}
.navbar-search input {
  width: 180px;
  padding: 6px 10px;
  border-radius: 3px;
  border: none;
  outline: none;
  margin-right: 15px;
}
.navbar-profile {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: url('https://randomuser.me/api/portraits/men/32.jpg') center/cover;
  border: 2px solid #fff;
  margin-left: 10px;
  cursor: pointer;
}
.poster-container {
  position: relative;
  display: inline-block;
}
.poster-hover {
  display: none;
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  background: rgba(20,20,20,0.95);
  color: #fff;
  padding: 10px;
  font-size: 0.9rem;
  border-radius: 0 0 4px 4px;
  z-index: 10;
}
.poster-container:hover .poster-hover {
  display: block;
}
footer {
  background: var(--footer);
  color: #aaa;
  text-align: center;
  padding: 30px 10px 10px 10px;
  margin-top: 40px;
  font-size: 0.95rem;
}
#scrollTopBtn {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 3000;
  background: #e50914;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: background 0.2s;
}
#scrollTopBtn:hover {
  background: #b0060f;
}
@media screen and (max-width: 768px) {
  .navbar-search input {
    width: 90px;
  }
  .banner h1 {
    font-size: 2rem;
  }
  .row-posters img {
    width: 100px;
  }
}
.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 11;
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  font-size: 1.6rem;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fav-btn.favorited {
  color: #e50914;
  background: #fff;
}
.fav-btn:hover {
  color: #e50914;
  background: #fff;
} 