* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --red: #e50914;
  --dark: #0a0a0a;
  --card: #111;
  --card2: #1a1a1a;
  --text: #f1f1f1;
  --muted: #888;
  --font-display: "Bebas Neue", sans-serif;
  --font-body: "DM Sans", sans-serif;
}
body {
  background: var(--dark);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  display: block;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #111;
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 4vw;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.98),
    transparent
  );
}
.logo {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 2px;
  color: var(--red);
  cursor: pointer;
}
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
}
.nav-links span:hover,
.nav-links span.active {
  color: var(--text);
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
}
.search-wrap input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  width: 180px;
}
.search-wrap input::placeholder {
  color: var(--muted);
}
.search-icon {
  color: var(--muted);
  font-size: 0.9rem;
}

/* SEARCH SUGGESTIONS */
.search-wrap { position: relative; }
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.suggestion-item:hover {
  background: rgba(255, 255, 255, 0.1);
}
.suggestion-item img {
  width: 34px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}
.suggestion-info {
  flex: 1;
  overflow: hidden;
}
.suggestion-title {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggestion-meta {
  font-size: 0.72rem;
  color: var(--muted);
}

/* HERO */
#hero {
  position: relative;
  height: 88vh;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  transition: background-image 1.2s ease-in-out;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10, 10, 10, 0.9) 40%, transparent 100%),
    linear-gradient(to top, rgba(10, 10, 10, 1) 0%, transparent 60%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 4vw 5rem;
  max-width: 620px;
}
.hero-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  margin-bottom: 1rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}
.hero-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.hero-rating {
  color: #f5c518;
  font-weight: 600;
}
.hero-overview {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 1.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn-play {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 0.7rem 1.75rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-play:hover {
  background: #c40812;
}
.btn-play:active {
  transform: scale(0.97);
}
.btn-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-info:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ROWS */
.rows-section {
  padding: 0 4vw 3rem;
}
.row {
  margin-bottom: 2.5rem;
}
.row-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.btn-see-all {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}
.btn-see-all:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.row-title span {
  color: var(--red);
}
.row-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}
.card {
  flex: 0 0 160px;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  background: var(--card2);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.card:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}
.card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}
.card-info {
  padding: 0.5rem 0.6rem 0.6rem;
}
.card-title {
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-rating {
  font-size: 0.7rem;
  color: #f5c518;
  margin-top: 2px;
}
.card-type {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
}

/* SEARCH PAGE */
#search-page {
  padding: 100px 4vw 3rem;
  display: none;
}
.search-title {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

/* DETAIL PAGE */
#detail-page {
  display: none;
  padding-top: 64px;
}
.detail-backdrop {
  position: relative;
  height: 55vh;
  min-height: 360px;
  overflow: hidden;
}
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--dark) 20%, rgba(10, 10, 10, 0.4) 100%);
}
.detail-body {
  padding: 0 4vw 4rem;
  position: relative;
  z-index: 1;
  margin-top: -80px;
}
.detail-flex {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.detail-poster {
  width: 160px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8);
}
.detail-poster img {
  width: 100%;
  display: block;
}
.detail-info {
  flex: 1;
  padding-top: 0.5rem;
}
.detail-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}
.detail-tagline {
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.detail-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.detail-meta strong {
  color: var(--text);
}
.detail-genres {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.genre-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
}
.detail-overview {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #ccc;
  max-width: 720px;
  margin-bottom: 1.5rem;
}
.detail-extra-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.extra-info-item {
  display: flex;
  gap: 8px;
}
.extra-info-item strong {
  color: var(--muted);
  white-space: nowrap;
}
.extra-info-item span {
  color: var(--text);
}
.detail-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* Cast Section */
.cast-section {
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
}
.cast-section h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}
.cast-list {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  scroll-behavior: smooth;
  flex: 1;
}
.cast-list::-webkit-scrollbar {
  height: 6px;
}
.cast-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}
.cast-list::-webkit-scrollbar-thumb {
  background: var(--red);
  border-radius: 10px;
}
.cast-item {
  flex-shrink: 0;
  width: 90px;
  text-align: center;
}
.cast-item img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 0.5rem;
  border: 2px solid rgba(255,255,255,0.05);
}
.cast-name {
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cast-character {
  font-size: 0.65rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Recommendations Section */
.recommendations-section {
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
}
.recommendations-section h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}
.recommendations-list {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  scroll-behavior: smooth;
  flex: 1;
}
.recommendations-list::-webkit-scrollbar {
  height: 6px;
}
.recommendations-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}
.recommendations-list::-webkit-scrollbar-thumb {
  background: var(--red);
  border-radius: 10px;
}

@media (max-width: 768px) {
  .recommendations-list, .cast-list {
    padding-left: 4vw;
    padding-right: 4vw;
    margin-left: -4vw;
    margin-right: -4vw;
    width: calc(100% + 8vw);
  }
}

.recommendations-list .movie-card {
  flex-shrink: 0;
  width: 140px;
}
.recommendations-list .movie-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 6px;
}

/* TV seasons */
.season-select {
  margin-bottom: 1rem;
}
.season-select select {
  background: var(--card2);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}
.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
}
.ep-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card2);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid transparent;
}
.ep-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}
.ep-num {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--red);
  min-width: 36px;
}
.ep-details {
  flex: 1;
}
.ep-name {
  font-size: 0.85rem;
  font-weight: 500;
}
.ep-air {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}
.ep-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 0.75rem;
  transition: background 0.2s;
}
.ep-play-btn:hover {
  background: #c40812;
}

/* PLAYER MODAL */
#player-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.98);
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Changed from center to allow top alignment */
}
#player-modal.open {
  display: flex;
}
.player-header {
  width: 100%;
  max-width: 100%; /* Full width header */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  flex-shrink: 0;
  background: rgba(10, 10, 10, 0.8);
}
.player-title-txt {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: #fff;
}
.player-close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.player-close:hover {
  background: rgba(255, 255, 255, 0.25);
}
.player-wrap {
  width: 100%;
  max-width: 100%; /* Make video take full width */
  height: 85vh; /* Large height for immersive viewing */
  background: #000;
  border-radius: 0; /* Remove rounding for full edge look */
  overflow: hidden;
}
.player-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* HIDE WATERMARK */
.player-wrap {
  position: relative;
  overflow: hidden;
}
.player-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 150px; /* Adjust size based on the watermark area */
  height: 50px;
  background: black;
  z-index: 10;
  pointer-events: none;
}

/* PLAYER LAYOUT ENHANCEMENTS */
.player-container {
  display: flex;
  flex-direction: column; /* Stacked layout for more space */
  width: 100%;
  max-width: 100%;
  gap: 0;
  padding: 0;
  flex: 1;
  overflow-y: auto;
}
.player-main {
  width: 100%;
  display: flex;
  flex-direction: column;
}
.player-details-area {
  padding: 2rem 4vw;
  background: var(--dark);
}
.player-sidebar {
  width: 100%;
  background: #0a0a0a;
  padding: 2rem 4vw;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.sidebar-recommendations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}
.sidebar-title {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 1rem;
}
.p-detail-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  color: #fff;
}
.p-detail-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}
.p-rating {
  color: #f5c518;
  font-weight: bold;
}
.p-cast {
  margin-bottom: 1rem;
  color: #ddd;
  font-size: 1rem;
}
.p-overview {
  color: #bbb;
  line-height: 1.6;
  max-width: 900px;
  font-size: 1.2rem;
}
.player-tv-controls {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}
.player-tv-nav {
  display: flex;
  gap: 1rem;
}
.player-tv-nav select {
  background: #222;
  color: white;
  border: 1px solid #444;
  padding: 10px 20px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
}
.sidebar-recommendations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}
.side-card {
  cursor: pointer;
  transition: transform 0.3s;
}
.side-card:hover {
  transform: translateY(-5px);
}
.side-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}
.side-title {
  font-weight: 500;
  font-size: 1rem;
  color: #fff;
}
.side-meta {
  font-size: 0.85rem;
  color: var(--muted);
}
.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.side-card {
  display: flex;
  gap: 10px;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  transition: background 0.2s;
}
.side-card:hover {
  background: rgba(255, 255, 255, 0.08);
}
.side-card img {
  width: 100px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}
.side-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.side-title {
  font-size: 0.85rem;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.side-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

/* PLAYER DETAILS AREA */
.player-details-area {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 8px;
}
.p-detail-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.p-detail-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
  align-items: center;
}
.p-rating {
  color: #f5c518;
  font-weight: 600;
}
.p-cast {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}
.p-cast strong {
  color: var(--muted);
}
.p-overview {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 1.5rem;
}

/* TV CONTROLS IN PLAYER */
.player-tv-controls {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  margin-top: 1rem;
}
.player-tv-nav {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}
.player-tv-nav select {
  background: var(--card2);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.5rem;
  border-radius: 4px;
  font-family: var(--font-body);
}

@media (max-width: 1000px) {
  .player-container {
    flex-direction: column;
  }
  .player-sidebar {
    min-width: 100%;
  }
}

/* LOADING */
.skeleton {
  background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
.sk-card {
  flex: 0 0 160px;
  height: 270px;
}
.sk-hero {
  height: 88vh;
  background: #111;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 0 4vw 5rem;
}
.sk-text {
  height: 20px;
  border-radius: 4px;
  background: #222;
  margin-bottom: 0.75rem;
}

/* TOAST */
#toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  min-width: 250px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
#toast.show {
  opacity: 1;
  visibility: visible;
  bottom: 3rem;
}
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--red);
  width: 100%;
}
@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}
#toast.show .toast-progress {
  animation: toastProgress 6s linear forwards;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .nav-links {
    display: none;
  }
  .detail-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .detail-info {
    width: 100%;
  }
  .detail-meta, .detail-genres, .detail-actions {
    justify-content: center;
  }
  .detail-extra-info {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .detail-poster {
    width: 120px;
    margin-bottom: 1rem;
  }
  .search-wrap input { width: 120px; }
}

/* AUTH & PROFILE */
.nav-auth { margin-left: 1.5rem; }
.btn-login { background: var(--red); color: white; border: none; padding: 0.5rem 1.25rem; border-radius: 4px; cursor: pointer; font-weight: 500; font-family: var(--font-body); }
.user-profile-nav { position: relative; cursor: pointer; font-family: var(--font-display); letter-spacing: 1px; padding: 5px; }

/* Responsive Adjustments for Mobile */
@media (max-width: 600px) {
  .nav-links {
    display: none;
  }
  .nav-auth {
    margin-left: auto;
  }
  .logo {
    font-size: 1.5rem;
  }
  nav {
    padding: 0 15px;
  }
  
  /* Prevent text overflow on mobile */
  .auth-container {
    padding: 2rem 1.5rem;
    max-width: 90%;
  }
  .auth-container h2 {
    font-size: 1.75rem;
  }
  .profile-card {
    padding: 1rem;
  }
  .profile-card > div:first-child {
    flex-direction: column;
    text-align: center;
    gap: 1rem !important;
  }
  .profile-info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .profile-info-row span:first-child {
    width: 100%;
  }
  .hero-content {
    padding: 0 4vw 2rem;
  }
  .hero-title {
    font-size: 2rem;
  }
  .detail-body {
    margin-top: -40px;
  }
  .detail-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .detail-meta {
    justify-content: center;
  }
  .detail-genres {
    justify-content: center;
  }
}

.profile-dropdown { position: absolute; top: 110%; right: 0; background: #1a1a1a; border: 1px solid #333; border-radius: 8px; padding: 0.5rem 0; width: 180px; display: none; z-index: 1000; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.profile-dropdown div { padding: 0.8rem 1.2rem; font-size: 0.9rem; color: var(--muted); font-family: var(--font-body); transition: all 0.2s; border-bottom: 1px solid #222; }
.profile-dropdown div:last-child { border-bottom: none; }
.profile-dropdown div:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
.auth-modal.open { display: flex; }

.auth-container {
  background: #141414;
  padding: 3rem;
  border-radius: 12px;
  width: 100%;
  max-width: 450px;
  position: relative;
  border: 1px solid #333;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.auth-container h2 {
  font-family: var(--font-display);
  margin-bottom: 2rem;
  font-size: 2.25rem;
  text-align: center;
  color: var(--text);
}
.auth-container input, .auth-container select {
  width: 100%;
  background: #333;
  border: 1px solid transparent;
  color: white;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s, background 0.2s;
}
.auth-container input:focus {
  outline: none;
  background: #444;
  border-color: var(--red);
}
.password-wrap {
  position: relative;
  width: 100%;
}
.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-80%);
  cursor: pointer;
  color: var(--muted);
  font-size: 1.2rem;
  user-select: none;
  z-index: 5;
}
.auth-container button {
  width: 100%;
  background: var(--red);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  transition: background 0.2s, transform 0.1s;
}
.auth-container button:hover {
  background: #e50914;
}
.auth-container button:active {
  transform: scale(0.98);
}
.auth-container p {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}
.auth-container p span {
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-left: 0.5rem;
}
.auth-container p span:hover {
  text-decoration: underline;
}
.auth-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
}
.auth-close:hover {
  background: var(--red);
  transform: rotate(90deg);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* PAGES & STATS */
.app-page { padding: 100px 4vw 3rem; min-height: 100vh; }
.profile-card { background: #1a1a1a; padding: 2rem; border-radius: 8px; border: 1px solid #333; margin-top: 1.5rem; }
.profile-info-row { margin-bottom: 1rem; border-bottom: 1px solid #222; padding-bottom: 0.5rem; }
.profile-info-row span:first-child { color: var(--muted); width: 120px; display: inline-block; font-size: 0.9rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.stat-card { background: #1a1a1a; padding: 1.5rem; border-radius: 8px; border-left: 4px solid var(--red); }
.stat-card h3 { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; margin-bottom: 0.5rem; }
.stat-card p { font-size: 2rem; font-family: var(--font-display); color: var(--red); }

.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 3rem; }
.genre-stat { background: #222; padding: 1rem; border-radius: 6px; text-align: center; }
.genre-stat h4 { font-size: 0.75rem; margin-bottom: 0.25rem; }
.genre-stat p { font-size: 1.2rem; color: var(--red); }

.history-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.history-item { display: flex; align-items: center; gap: 1rem; background: #1a1a1a; padding: 1rem; border-radius: 6px; border: 1px solid #333; }
.history-item img { width: 50px; height: 75px; object-fit: cover; border-radius: 4px; }
.history-item-info { flex: 1; }
.history-item-title { font-weight: 600; font-size: 0.95rem; }
.history-item-meta { font-size: 0.8rem; color: var(--muted); }

/* Watchlist Page Styles */
.watchlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.watchlist-grid .movie-card {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.watchlist-grid .movie-card:hover {
    transform: translateY(-5px);
}

.watchlist-grid .movie-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.remove-watchlist-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    z-index: 10;
}

.remove-watchlist-btn:hover {
    background: var(--red);
}

/* Footer Styles */
.main-footer {
    background-color: #111;
    color: #999;
    padding: 40px 20px;
    margin-top: 50px;
    border-top: 1px solid #333;
    font-size: 0.9rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    color: var(--red);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid #222;
    text-align: center;
    color: #666;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Resume Button in History */
.history-item { 
    cursor: pointer; 
    transition: transform 0.2s, border-color 0.2s; 
}
.history-item:hover { 
    transform: translateX(5px); 
    border-color: var(--red); 
}
.history-resume-btn {
    display: inline-block;
    margin-top: 5px;
    font-size: 0.75rem;
    color: var(--red);
    font-weight: 600;
    text-transform: uppercase;
}
