/* ============================================
   Netflix-style Landing Page - Premium UI
   ============================================ */

:root {
  --netflix-red: #e50914;
  --netflix-red-hover: #f40612;
  --netflix-red-glow: rgba(229, 9, 20, 0.4);
  --bg-dark: #141414;
  --bg-darker: #0d0d0d;
  --bg-card: #181818;
  --bg-footer: #0d0d0d;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #808080;
  --overlay-dark: rgba(0, 0, 0, 0.4);
  --overlay-darker: rgba(0, 0, 0, 0.75);
  --overlay-hero: linear-gradient(to top, #141414 0%, transparent 25%, transparent 60%, rgba(0,0,0,0.5) 100%);
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.35s ease;
  --navbar-height: 68px;
  --poster-width: 200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.4;
  overflow-x: hidden;
}

/* ========== Navigation ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
  z-index: 100;
  background: transparent;
  transition: background-color 0.4s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: var(--bg-darker);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.logo {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--netflix-red);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color var(--transition-fast), filter var(--transition-fast);
}

.logo:hover {
  color: var(--netflix-red-hover);
  filter: drop-shadow(0 0 8px var(--netflix-red-glow));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-left: 2.5rem;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--text-primary);
  transition: width var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--text-secondary);
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 102;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.icon-btn:hover {
  transform: scale(1.12);
  color: var(--text-secondary);
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--netflix-red);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.profile-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 0 12px var(--netflix-red-glow);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay-darker);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.mobile-nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.mobile-nav-links a:hover {
  color: var(--netflix-red);
}

/* ========== Hero Banner ========== */
.hero {
  position: relative;
  height: 90vh;
  min-height: 450px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 12%;
  padding-left: 4%;
  padding-right: 4%;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: transform 8s ease-out;
}

.hero:hover .hero-backdrop {
  transform: scale(1.06);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-hero);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 580px;
}

.hero-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 0.85rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.02em;
}

.hero-description {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
  opacity: 0.95;
}

.hero-buttons {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.6rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-smooth);
  font-family: inherit;
}

.btn-play {
  background: var(--text-primary);
  color: var(--bg-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-play:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}

.btn-more {
  background: rgba(109, 109, 110, 0.6);
  color: var(--text-primary);
  backdrop-filter: blur(4px);
}

.btn-more:hover {
  background: rgba(109, 109, 110, 0.45);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ========== Movie Rows ========== */
.content {
  padding: 0 0 3rem;
  margin-top: -140px;
  position: relative;
  z-index: 3;
}

.movie-row {
  margin-bottom: 3rem;
}

.movie-row.fade-in-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.5s ease;
}

.movie-row.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.row-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-left: 4%;
}

.row-title-accent {
  width: 4px;
  height: 1.25rem;
  background: var(--netflix-red);
  border-radius: 2px;
  flex-shrink: 0;
}

.row-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.row-wrapper {
  position: relative;
  padding: 0 2% 0 4%;
}

.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  opacity: 0;
  transition: opacity var(--transition-smooth), background var(--transition-fast);
}

.row-wrapper:hover .scroll-arrow {
  opacity: 1;
}

.scroll-arrow:hover {
  background: rgba(0, 0, 0, 0.85);
  color: var(--text-primary);
}

.scroll-left {
  left: 0;
}

.scroll-right {
  right: 2%;
  left: auto;
}

.row-container {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.row-container::-webkit-scrollbar {
  display: none;
}

.movie-slider {
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem 0;
}

/* ========== Movie Cards ========== */
.movie-card {
  flex-shrink: 0;
  width: var(--poster-width);
  cursor: pointer;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.movie-card:hover {
  transform: scale(1.1);
  z-index: 5;
}

.movie-card-poster {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-card);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: box-shadow var(--transition-smooth);
}

.movie-card:hover .movie-card-poster {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75), 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.movie-card-poster.placeholder {
  background: linear-gradient(135deg, var(--bg-card) 0%, #2a2a2a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.slider-loading {
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem 0;
}

.slider-loading .movie-card {
  pointer-events: none;
}

/* ========== Footer ========== */
.footer {
  background: var(--bg-footer);
  padding: 3rem 4% 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.social-link {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.social-link:hover {
  color: var(--netflix-red);
  transform: scale(1.1);
  box-shadow: 0 0 12px var(--netflix-red-glow);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  margin-bottom: 2rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.footer-credit {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .nav-links {
    gap: 1.25rem;
    margin-left: 1.5rem;
  }

  .nav-links a {
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  :root {
    --poster-width: 150px;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .navbar {
    padding: 0 3%;
  }

  .hero {
    height: 75vh;
    min-height: 380px;
    padding-bottom: 18%;
    padding-left: 3%;
  }

  .hero-description {
    -webkit-line-clamp: 2;
  }

  .content {
    margin-top: -100px;
  }

  .row-header,
  .row-wrapper {
    padding-left: 3%;
  }

  .scroll-arrow {
    width: 36px;
    height: 36px;
    opacity: 0.85;
  }

  .scroll-right {
    right: 1%;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .footer-col {
    align-items: center;
  }
}

@media (max-width: 480px) {
  :root {
    --poster-width: 130px;
    --navbar-height: 56px;
  }

  .logo {
    font-size: 1.5rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .scroll-arrow {
    display: none;
  }

  .row-title {
    font-size: 1.2rem;
  }
}

/* Focus for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--netflix-red);
  outline-offset: 2px;
}
