*{margin:0;padding:0;box-sizing:border-box;font-family:'Segoe UI',sans-serif;}
body{background:#141414;color:#fff;}

/* NAVBAR */
nav{position:sticky;top:0;z-index:1000;background:#111;padding:15px 30px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #222;}
.logo{font-size:1.7rem;font-weight:800;color:#e50914;cursor:pointer;}
.nav-links{display:flex;gap:25px;}
.nav-item{position:relative;}
.nav-item a{color:#fff;text-decoration:none;font-weight:600;cursor:pointer;}
.nav-item:hover a{color:#e50914;}
.dropdown{display:none;position:absolute;top:32px;left:0;background:#141414;border-radius:4px;box-shadow:0 2px 10px rgba(229,9,20,0.6);}
.dropdown a{display:block;padding:8px 15px;color:#ccc;text-decoration:none;}
.dropdown a:hover{background:#e50914;color:#fff;}
.nav-item:hover .dropdown{display:block;}

/* SEARCH & PROFILE */
.search-profile{display:flex;align-items:center;gap:20px;}
#search-input{background:#333;border:none;padding:7px 12px;border-radius:3px;color:#fff;}
#search-input:focus{outline:none;background:#444;}
.profile-icon{width:32px;height:32px;border-radius:4px;background:#222;cursor:pointer;border:2px solid transparent;transition:.3s;}
.profile-icon:hover{border-color:#e50914;}

/* HERO */
.hero{position:relative;height:450px;background-size:cover;background-position:center;display:flex;flex-direction:column;justify-content:flex-end;padding:40px;box-shadow:inset 0 -100px 150px rgba(20,20,20,0.9);}
.hero h1{font-size:3rem;font-weight:800;margin-bottom:15px;text-shadow:2px 2px 8px rgba(0,0,0,0.8);}
.hero p{max-width:600px;margin-bottom:15px;color:#ddd;}
.hero-buttons{display:flex;gap:20px;}
.btn{background:#e50914;border:none;padding:12px 30px;border-radius:4px;color:#fff;cursor:pointer;font-weight:700;transition:.3s;}
.btn:hover{background:#f40612;}

/* MOVIE ROWS */
.row{margin:30px auto;width:90%;}
.row h2{margin-bottom:12px;font-weight:700;}
.row-posters{display:flex;gap:10px;overflow-x:auto;padding-bottom:10px;}
.movie-card{min-width:150px;border-radius:6px;overflow:hidden;cursor:pointer;transition:.3s;background:#222;flex-shrink:0;}
.movie-card img{width:100%;height:225px;object-fit:cover;}
.movie-info{padding:8px;font-weight:600;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.movie-card:hover{transform:scale(1.1);box-shadow:0 8px 16px rgba(229,9,20,0.8);}

/* POPUP */
#movie-popup{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.85);display:none;align-items:center;justify-content:center;padding:20px;}
.popup-box{background:#111;padding:20px;border-radius:8px;max-width:800px;width:90%;}
.popup-box img{width:100%;border-radius:8px;margin-bottom:15px;}
.close-btn{background:#e50914;padding:8px 15px;border:none;border-radius:4px;cursor:pointer;float:right;margin-top:-10px;}

/* LOGIN MODAL */
.modal{display:none;position:fixed;z-index:3000;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,0.9);justify-content:center;align-items:center;}
.modal-content{background:#111;padding:30px;border-radius:8px;width:90%;max-width:400px;display:flex;flex-direction:column;gap:15px;}
.modal-content input{padding:12px;border:none;border-radius:6px;background:#222;color:#fff;}
.modal-content input:focus{outline:none;background:#333;}
.modal-content button{background:#e50914;border:none;padding:12px;border-radius:6px;color:#fff;cursor:pointer;font-weight:700;}
.modal-content button:hover{background:#f40612;}
.modal-content .close{color:#fff;font-size:1.5rem;position:absolute;right:20px;top:10px;cursor:pointer;}

/* AVATAR MODAL */
.avatar-grid{display:flex;flex-wrap:wrap;gap:15px;justify-content:center;margin:20px 0;}
.avatar-grid img{width:70px;height:70px;border-radius:50%;cursor:pointer;border:2px solid transparent;transition:.3s;}
.avatar-grid img.selected{border-color:#e50914;transform:scale(1.1);}
#save-avatar-btn{background:#e50914;border:none;padding:12px;border-radius:6px;color:#fff;cursor:pointer;font-weight:700;width:100%;}
#save-avatar-btn:hover{background:#f40612;}

.profile-dropdown {
  display: none;
  position: absolute;
  top: 55px;
  right: 10px;
  background: #141414;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 15px;
  width: 200px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
  flex-direction: column;
  transition: all 0.3s ease;
  z-index: 1000;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.avatar-display {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #333;
  background-size: cover;
  background-position: center;
  border: 2px solid #e50914;
}

.profile-info p {
  color: #fff;
  font-weight: 600;
  margin: 0;
  flex: 1;
}

#logout-btn {
  background: #e50914;
  border: none;
  padding: 10px;
  color: #fff;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

#logout-btn:hover {
  background: #f40612;
}

.profile-dropdown {
  position: absolute;
  top: 60px;
  right: 20px;
  background: #111;
  border: 1px solid #222;
  padding: 15px;
  border-radius: 8px;
  display: none;
  flex-direction: column;
  gap: 10px;
  z-index: 1001;
}
.profile-dropdown img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}
.profile-dropdown button {
  background:#e50914; color:white; border:none; padding:8px; border-radius:5px; cursor:pointer;
}

