@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap");

:root {
  --bg: #141414;
  --card-bg: #181818;
  --primary: #e50914; /* Netflix Red */
  --text: #fff;
  --gray: #b3b3b3;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
  text-decoration: none;
  list-style: none;
  outline: none;
}

body {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* --- Navbar --- */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: 70px;
  padding: 0 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.7) 10%,
    rgba(0, 0, 0, 0)
  );
  z-index: 1000;
  transition: 0.3s;
}
nav.black {
  background: #141414;
}

.logo {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 20px;
}
.nav-links a {
  color: var(--text);
  font-size: 14px;
  transition: 0.3s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--gray);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 18px;
  cursor: pointer;
}
.profile-icon {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  object-fit: cover;
}

/* --- Hero Section --- */
.hero {
  height: 85vh;
  width: 100%;
  position: relative;
  background: url("https://images.unsplash.com/photo-1626814026160-2237a95fc5a0?q=80&w=1600")
    center/cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to top, var(--bg), transparent);
}
.hero-content {
  position: absolute;
  bottom: 150px;
  left: 4%;
  max-width: 500px;
  z-index: 2;
}
.hero-title {
  font-size: 60px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.hero-desc {
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 20px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn {
  padding: 10px 25px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: 0.2s;
}
.btn-play {
  background: white;
  color: black;
}
.btn-play:hover {
  background: rgba(255, 255, 255, 0.8);
}
.btn-more {
  background: rgba(109, 109, 110, 0.7);
  color: white;
  margin-left: 10px;
}
.btn-more:hover {
  background: rgba(109, 109, 110, 0.4);
}

/* --- Movie Sliders (Netflix Style) --- */
.row {
  padding: 20px 4%;
  overflow: hidden;
}
.row-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #e5e5e5;
}
.row-posters {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 20px 0;
  scroll-behavior: smooth;
}
.row-posters::-webkit-scrollbar {
  display: none;
}

.poster {
  width: 200px;
  height: 300px;
  object-fit: cover;
  border-radius: 4px;
  transition: 0.3s;
  cursor: pointer;
  flex-shrink: 0;
}
.poster:hover {
  transform: scale(1.1);
  margin: 0 15px;
  z-index: 100;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

/* --- Grid Layout (For Search/Movies Page) --- */
.grid-container {
  padding: 100px 4% 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}

/* --- Video Player Page --- */
.player-wrapper {
  width: 100%;
  height: 100vh;
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.back-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  z-index: 10;
}
video {
  width: 100%;
  max-height: 100vh;
}

/* --- Login Page --- */
.login-body {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("https://assets.nflxext.com/ffe/siteui/vlv3/f841d4c7-10e1-40af-bcae-07a3f8dc141a/f6d7434e-d6de-4185-a6d4-c77a2d08737b/US-en-20220502-popsignuptwoweeks-perspective_alpha_website_medium.jpg");
  background-size: cover;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box {
  background: rgba(0, 0, 0, 0.75);
  padding: 60px;
  width: 450px;
  border-radius: 4px;
}
.login-input {
  width: 100%;
  padding: 16px 20px;
  background: #333;
  border: none;
  border-radius: 4px;
  color: white;
  margin-bottom: 20px;
  font-size: 16px;
}
.login-btn {
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 40px;
  }
  .nav-links {
    display: none;
  } /* Hide text links on mobile */
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
