:root {
  --bg-color: #0c0c0e;
  --text-color: #fff;
  --primary-color: #e50914;
  /* Netflix Red */
  --nav-bg: rgba(12, 12, 14, 0.95);
  --card-bg: #2f2f2f;
  --hover-scale: 1.05;
  --transition-speed: 0.3s;
}

body {
  margin: 0 !important;
  padding: 0 !important;
  cursor: default;
  user-select: none;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  background:
    radial-gradient(circle at 15% 15%, rgba(229, 9, 20, 0.12), transparent 35%),
    radial-gradient(circle at 85% 85%, rgba(255, 75, 43, 0.08), transparent 35%),
    #0c0c0e;
  background-attachment: fixed;
  color: var(--text-color);
  overflow-x: hidden;
  padding-top: 0;
}

input,
textarea {
  cursor: text;
  user-select: text;
}

button,
.movie-card,
.scroll-btn {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  font-weight: 500;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 4%;
  height: 68px;
  background-color: transparent;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-sizing: border-box;
  transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
}

.navbar.scrolled {
  background-color: var(--nav-bg);
  background: none;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.navbar.navbar-glass {
  background-color: var(--nav-bg) !important;
  background: none !important;
  backdrop-filter: blur(15px) !important;
  -webkit-backdrop-filter: blur(15px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.logo {
  color: white;
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 1px;
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

.ai-text {
  color: #fff;
  font-weight: 300;
  font-size: 1.2rem;
  margin-left: 2px;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;

  width: 350px;

  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.2);

  padding: 8px 14px;

  border-radius: 8px;

  margin-right: 15px;
}
.search-wrapper:focus-within {
  width: 250px;
  border-color: #fff;
  background: rgba(0, 0, 0, 0.8);
}

.search-icon {
  font-size: 0.9rem;
  color: #ccc;
  margin-right: 10px;
}

#searchInput{
    background: transparent;
    border: none;
    color: white;
    outline: none;

    width: 100%;

    padding-right: 45px;

    font-size: 0.9rem;
}

.nav-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 20px;
  /* Rounded pill shape like 'My List' */
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap !important;
}
.nav-action-btn:hover {

  background:
  rgba(255,255,255,0.16);

  border-color:
  rgba(255,255,255,0.22);

  transform:
  translateY(-1px);

  box-shadow:
  0 4px 14px rgba(0,0,0,0.35);
}


.nav-action-btn i {
  font-size: 0.8rem;
}

.hidden {
  display: none !important;
}

.watchlist-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 78px 6% 40px 6%;
  box-sizing: border-box;
}

.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 25px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.section-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 22px;
  font-weight: 600;
  margin: 40px 0 15px 20px;
  position: relative;
}

.section-title::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);

  width: 4px;
  height: 20px;
  background: #e50914;
  border-radius: 2px;
}

.btn {
  padding: 0.8rem 2rem;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
}

.btn-primary {
  background-color: white;
  color: black;
}

.btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.7);
}

.btn-secondary {
  background-color: rgba(109, 109, 110, 0.7);
  color: white;
}

.btn-secondary:hover {
  background-color: rgba(109, 109, 110, 0.4);
}

.hero-fade-bottom {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 150px;
  background-image: linear-gradient(to bottom, transparent, var(--bg-color));
}

.container {
  padding: 0 4%;
  margin-top: 80px;
  position: relative;
  z-index: 10;
}

.movie-section {
  margin: 40px 0;
  padding: 0 40px;
}

.section-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.badge {
  background-color: var(--primary-color);
  color: white;
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 10px;
  font-weight: bold;
}

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

.movie-card:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(229, 9, 20, 0.2);
  z-index: 5
}

.movie-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Ensures the poster fills the taller card without stretching */
  border-radius: 12px;
  display: block;
  transition: opacity 0.4s ease;
}

.movie-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 40%);
  pointer-events: none;
}

.movie-card img.loaded {
  opacity: 1;
}

.movie-card:hover img {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8);
}

.movie-info-overlay {
  pointer-events: none;
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 6px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.movie-card:hover .movie-info-overlay {
  opacity: 1;
}

.movie-rating {
  font-size: 0.8rem;
  color: #46d369;
  font-weight: bold;
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.no-results {
  color: #ccc;
  font-size: 1.2rem;
  margin-top: 10px;
  display: flex;
  justify-content: center;
  /* Centers horizontally */
  align-items: center;
  /* Centers vertically if the container has height */
  text-align: center;
  width: 100%;
  /* Ensures it takes the full width of the row */
  padding: 40px 0;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.modal-content {
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 850px;
  /* CHANGE: Height must be fixed for overflow-y to work */
  height: 80vh;
  background: rgba(18, 18, 22, 0.65);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: visible;
  position: relative;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.7);
  z-index: 10;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0);
}

/* Custom scrollbar styling for the details modal */
.modal-content::-webkit-scrollbar {
  width: 6px;
}
.modal-content::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 0 16px 16px 0;
}
.modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Cinematic Ambient Aura Backdrop */
.modal-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--modal-backdrop);
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  filter: blur(45px);
  z-index: -1;
  border-radius: 16px;
  pointer-events: none;
  transition: background-image 0.5s ease-in-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.close-modal, .remove-btn, .avatar-modal-close, .close-trailer {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  color: #ffffff !important;
  font-size: 17px !important;
  font-weight: bold !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  line-height: 1 !important;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
  z-index: 1001 !important;
  text-shadow: none !important;
}

.close-modal:hover, .remove-btn:hover, .avatar-modal-close:hover, .close-trailer:hover {
  background: linear-gradient(45deg, #e50914, #ff2a3d) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  transform: scale(1.1) !important;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.5) !important;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
}

.modal-body {
  display: flex;
  width: 100%;
  flex: 1;
  min-height: 0;
}

.modal-poster img.loaded {
  opacity: 1;
}

.modal-poster {
  flex: 0 0 45%;
  overflow: hidden;
  height: 100%;
  perspective: 1000px;
}

.modal-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
  transform-origin: center center;
}

.modal-poster:hover img {
  transform: scale(1.03) rotateY(-2deg);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.movie-info-overlay {
  pointer-events: none;
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 6px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.modal-info {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
  background: rgba(18, 18, 22, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-info h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.modal-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.rating-badge {
  background: rgba(70, 211, 105, 0.12);
  color: #46d369;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(70, 211, 105, 0.22);
}

.modal-meta-extra {
  font-size: 0.88rem;
  color: #999;
  margin-top: 4px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ccc;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-tag i {
  color: #e50914;
}

.skeleton-meta-loader {
  width: 60%;
  height: 16px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  animation: skeletonGlow 1.5s ease-in-out infinite;
}

/* Target the specific container for the overview */
.modal-overview::-webkit-scrollbar {
  width: 6px;
  /* Keep it thin and minimalist */
}

/* The track (background) of the scrollbar */
.modal-overview::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  /* Very subtle transparent track */
  border-radius: 10px;
}

/* The thumb (the draggable part) */
.modal-overview::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  /* Muted white to match text */
  border-radius: 10px;
  transition: background 0.3s ease;
}

/* Hover effect for the thumb */
.modal-overview::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
  /* Turns Netflix Red on hover */
}

/* Firefox Support */
.modal-overview {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

.modal-overview {
  flex: 1;
  overflow-y: auto;
  font-size: 1.1rem;
  line-height: 1.5;
  color: #ccc;
  margin-bottom: 20px;
  padding-right: 15px;
}

.message {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.message.bot {
  background-color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 5px;
}

.message.user {
  background-color: var(--primary-color);
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}

#chatInput {
  flex: 1;
  padding: 10px;
  border-radius: 20px;
  border: none;
  outline: none;
  background: #1e1e1e;
  color: white;
}

#sendChatBtn {
  margin-left: 8px;
  background: #ff3c00;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: white;
  cursor: pointer;
}

#sendChatBtn:hover {
  color: white;
}

.row-container {
  position: relative;
  width: 100%;
  overflow: visible;
}

.movie-row {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 12px;
  padding: 20px 40px;
  scroll-behavior: smooth;
  transition: transform 0.2s ease, opacity 0.2s ease;
  padding: 0 20px 30px;
}

.movie-row::before,
.movie-row::after {
  content: "";
  position: absolute;
  top: 0;
  width: 80px;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  display: none !important; /* Disabled dark overlay blocks for clean edge-to-edge layout */
}

.movie-row::before {
  left: 0;
  background: linear-gradient(to right, #0b0b0b, transparent);
}

.movie-row::after {
  right: 0;
  background: linear-gradient(to left, #0b0b0b, transparent);
}

.movie-card {
  width: 170px;
  min-width: 170px;
  height: 250px;
  border-radius: 12px;
  overflow: hidden;
  background: #1c1c1c;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
}

.movie-card:hover {
  transform: scale(1.06);
  z-index: 10;
}

.scroll-left {
  left: 10px;

}

.scroll-right {
  right: 10px;

}

.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;

  width: 40px;
  height: 80px;

  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  border: none;

  color: white;
  font-size: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  border-radius: 80%;

  opacity: 0;
  transition: opacity 0.3s ease;
}

.row-container:hover .scroll-btn {
  opacity: 1;
}

.scroll-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.row-container::before,
.row-container::after {
  pointer-events: none;
  z-index: 1;
  content: "";
  position: absolute;
  top: 0;
  width: 60px;
  height: 100%;
}

.row-container::before {
  left: 0;
  background: linear-gradient(to right, #141414, transparent);
}

.row-container::after {
  right: 0;
  background: linear-gradient(to left, #141414, transparent);
}



.watch-btn {
  position: relative;
  top: auto;
  right: auto;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0;
  line-height: 1;
  overflow: visible;
  margin-left: auto;
  margin-right: 4px;
  flex-shrink: 0;
}

.watch-btn .heart-icon {
  width: 13px;
  height: 13px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.watch-btn .heart-icon.heart-empty {
  fill: none;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2;
}

.watch-btn .heart-icon.heart-filled {
  fill: #ff2d55;
  stroke: #ff2d55;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 6px rgba(255, 45, 85, 0.5));
}

.watch-btn:hover {
  transform: scale(1.2);
}

.watch-btn:hover .heart-icon.heart-empty {
  stroke: #ff2d55;
  transform: scale(1.1);
}

.watch-btn:active {
  transform: scale(0.9);
}

/* Pulse burst animation on watchlist add */
.watch-btn.heart-pulse {
  animation: heartPulse 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes heartPulse {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.35); }
  50%  { transform: scale(0.95); }
  70%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Ripple ring on add */
.watch-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255, 45, 85, 0.6);
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.watch-btn.heart-pulse::after {
  animation: heartRipple 0.6s ease-out;
}

@keyframes heartRipple {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

.load-more-btn {
  background: #e50914;
  border: none;
  padding: 10px 25px;
  color: white;
  border-radius: 30px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
}

.load-more-btn:hover {

  background: #ff1f2f;

  transform:
  translateY(-1px);

  box-shadow:
  0 0 15px rgba(229,9,20,0.4);
}

.load-more-btn.hidden {
  display: none;
}


.logout-btn {

  background:
  linear-gradient(
    45deg,
    #e50914,
    #ff2a3d
  );

  border-color:
  rgba(255,255,255,0.08);
}
.logout-btn:hover {

  background:
  linear-gradient(
    45deg,
    #f72130,
    #ff4458
  );

  transform:
  translateY(-1px);

  box-shadow:
  0 0 15px rgba(229,9,20,0.4);
}


.watch-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: 0.3s;
  background: #1c1c1c;
}

.watch-card img {
  width: 100%;
  display: block;
  transition: 0.3s;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.watch-card img.loaded {
  opacity: 1;
}

.watch-card:hover {
  transform: scale(1.1);
  z-index: 10;
}

.watch-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  z-index: 2;
  padding: 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.watch-title {
  font-size: 14px;
  font-weight: 500;
}

.back-btn {
    background: linear-gradient(135deg, #e50914, #ff2a3d);
    border: none;

    padding: 10px 20px;

    border-radius: 20px;

    color: white;

    font-size: 0.9rem;
    font-weight: 600;

    cursor: pointer;

    transition: all 0.3s ease;

    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.back-btn:hover {
    transform: translateY(-2px);

    box-shadow: 0 6px 20px rgba(229,9,20,0.4);

    background: linear-gradient(135deg,#ff1f2f,#ff4458);
}

.remove-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0;
  z-index: 20;
}

.watch-card:hover .remove-btn {
  opacity: 1;
}

h1 {
  margin-bottom: 30px;

}

.watchlist-page {
  padding-top: 100px;
}


.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 25px;
}

.watchlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.watch-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  opacity: 0;
  transition: 0.3s;
}

.empty-msg {
  display: block;
  width: 100%;
  text-align: center;
  margin: 20px auto;
  color: #aaa;
  font-size: 1.1rem;
  padding: 20px 0;
}

.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 500px;
  padding: 20px;
  margin: auto;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-card {
  width: 100%;
  max-width: 560px;
  transform: translateY(-30px);
  padding: 35px 40px 40px;
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-align: center;
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.overlay {
  background: rgba(0, 0, 0, 0.7);
}

.login-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(229, 9, 20, 0.25), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255, 75, 43, 0.2), transparent 40%);
  z-index: -1;
  pointer-events: none;
}

.login-card:hover::before {
  opacity: 1;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  animation: titleFade 0.8s ease;
}

.brand-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.brand-svg {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 0 8px rgba(229, 9, 20, 0.4));
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #ffffff, #dcdcdc);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-transform: uppercase;
}

.brand-tagline {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #94a3b8, #64748b);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

@keyframes titleFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.subtitle {
  color: var(--text-muted);
  text-align: center;
  font-size: 14px;
  margin-top: -12px;
  margin-bottom: 8px;
}

.input-group {
  position: relative;
  margin-bottom: 20px;
}

.input-group input {
  width: 100%;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  border-radius: 16px;
  color: white;
  font-size: 15px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.input-group label {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  transition: all 0.3s ease;
}

.input-group input:focus,
.input-group input:not(:placeholder-shown) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-glow);
  box-shadow: 0 0 15px rgba(229, 9, 20, 0.35);
  padding-top: 25px;
  padding-bottom: 11px;
}

.input-group input:focus+label,
.input-group input:not(:placeholder-shown)+label {
  top: 15px;
  font-size: 11px;
  color: var(--primary-glow);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

.remember {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.remember input[type="checkbox"] {
  accent-color: var(--primary);
  cursor: pointer;
}

.forgot {
  color: var(--text-muted);
  text-decoration: none;
  transition: 0.2s;
}

.forgot:hover {
  color: var(--primary);
}

.btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 52px;
}

.login-btn {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  border: none;

  color: white;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  background: linear-gradient(135deg, #e50914, #ff2a3d);
  box-shadow: 0 10px 30px rgba(229, 9, 20, 0.6);
}

.login-btn:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 20px 50px rgba(229, 9, 20, 0.9);
}

.login-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.login-btn:active {
  transform: translateY(0);
}

.divider {
  text-align: center;
  position: relative;
  margin: 8px 0;
}

.divider::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.divider span {
  padding: 0 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  position: relative;
  z-index: 1;
}

.register-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  margin-top: 15px;
}

.register-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.error-message {
  background: rgba(229, 9, 20, 0.1);
  border-left: 3px solid var(--primary-color);
  color: #ffb4b8;
  padding: 12px 14px;
  font-size: 13px;
  border-radius: 6px;
  
}

.error-message.active {
  display: block;
  animation: slideIn 0.3s ease;
}

.loader {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}


.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  flex-wrap: nowrap;
  overflow: hidden;
  justify-content: flex-end;
}

.empty-icon {
  font-size: 60px;
  margin-bottom: 15px;
  opacity: 0.8;
}

.empty-state h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.empty-state p {
  color: #aaa;
  margin-bottom: 20px;
  font-size: 14px;
}

.browse-btn {
  background: linear-gradient(45deg, #e50914, #ff2a3d);
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

.browse-btn:hover {

  transform:
  translateY(-1px);

  box-shadow:
  0 0 15px rgba(229,9,20,0.4);
}
.empty-state {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
justify-content: center;

  min-height: 50vh;
  width: 100%;
  align-items: center;
  text-align: center;
  color: white;
}
.watchlist-container {
    min-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.empty-icon {
  font-size: 60px;
  margin-bottom: 15px;
  opacity: 0.8;
}

.empty-state h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.empty-state p {
  color: #aaa;
  margin-bottom: 20px;
  font-size: 14px;
}

.browse-btn {
  background: linear-gradient(45deg, #e50914, #ff2a3d);
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

.browse-btn:hover {

  transform:
  translateY(-1px);

  box-shadow:
  0 0 15px rgba(229,9,20,0.4);
}

.login-body {
  margin: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  background: #000;
  overflow: hidden;
}



@keyframes zoomBg {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.1);
  }
}

#bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.movie-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-overlay {
  pointer-events: none;
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.trailer-btn {
  padding: 12px 18px;

  background: linear-gradient(135deg, #ff030f, #ff2a3d);
  border: none;
  border-radius: 8px;

  color: white;
  font-weight: 600;
  font-size: 14px;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
}

.trailer-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 20px rgba(229, 9, 20, 0.6);
}

.trailer-btn:active {
  transform: scale(0.95);
}

.trailer-btn::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 100%;
  left: 0;
  top: 0;
  background: rgba(255, 255, 255, 0.2);
  transition: 0.4s;
}

.trailer-btn:hover::after {
  width: 100%;
}

.trailer-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.trailer-box {
  position: relative;
  width: 85%;
  max-width: 1100px;
  background: black;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.trailer-box iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  display: block;
}

.close-trailer {
  position: absolute;
  top: 12px;
  right: 12px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
}

.modal-buttons {
  margin-top: 24px;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-btn {
  flex: 1;
  height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  border: none !important;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #e50914, #ff2a3d);
  color: white;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.35);
  box-sizing: border-box;
}

.modal-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(229, 9, 20, 0.55);
}

.watchlist-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transition: all 0.3s ease !important;
}

.watchlist-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
}

.watchlist-btn.added {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.modal-btn:active {
  transform: scale(0.95);
}

.modal-btn::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 100%;
  left: 0;
  top: 0;
  background: rgba(255, 255, 255, 0.2);
  transition: 0.4s;
}

.modal-btn:hover::after {
  width: 100%;
}

.browse-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background: #e50914;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.empty-icon {
  font-size: 50px;
  margin-bottom: 10px;
}

.modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal.show .modal-content {
  transform: scale(1);
}

body.modal-open {
  overflow: hidden;
}

.skeleton {
  background: linear-gradient(90deg,
      #1a1a1a 25%,
      #2a2a2a 50%,
      #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 8px;
}

.skeleton-poster {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border-radius: 10px;
}

.watch-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

.skeleton {
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.watch-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1 !important;
}

.refresh-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  gap: 10px;
}

.refresh-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  padding: 0;
  box-sizing: border-box;
}

.refresh-btn:hover {
  background: rgba(229, 9, 20, 0.1);
  border-color: #e50914;
  color: #ff2a3d;
  box-shadow: 0 0 12px rgba(229, 9, 20, 0.2);
}

.refresh-btn:active {
  transform: scale(0.95);
}

.refresh-btn:hover .refresh-icon {
  transform: rotate(180deg);
}

.refresh-icon {
  font-size: 16px;
  display: inline-block;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  line-height: 1;
  color: inherit;
}

.refresh-container span {
  font-size: 13px;
  color: #888;
  font-weight: 500;
}

.watch-btn {
  pointer-events: auto;
}

.movie-card {
  position: relative;
  z-index: 5;
}

.movie-info-overlay {
  pointer-events: none;
}

.watch-btn {
  pointer-events: auto;
}

#hero {
  position: relative;
  height: 100vh;
  width: 100%;
  background-size: cover;
  background-position: center top;
  transition: background-image 1.2s ease-in-out;
  display: flex;
  align-items: flex-end;
  margin-top: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    /* Heavy bottom fade — merges into page background */
    linear-gradient(to top,  #0c0c0e 0%, rgba(12,12,14,0.98) 8%, rgba(12,12,14,0.6) 30%, transparent 55%),
    /* Heavy left vignette — behind hero text */
    linear-gradient(to right, #0c0c0e 0%, rgba(12,12,14,0.95) 12%, rgba(12,12,14,0.5) 35%, transparent 65%),
    /* Heavy right vignette — mirror of left */
    linear-gradient(to left,  #0c0c0e 0%, rgba(12,12,14,0.95) 12%, rgba(12,12,14,0.5) 35%, transparent 65%),
    /* Top vignette — blends under fixed navbar */
    linear-gradient(to bottom, #0c0c0e 0%, rgba(12,12,14,0.7) 5%, transparent 25%);
}

.hero-content {
  position: relative;
  z-index: 2;
  margin-left: 5%;
  margin-bottom: 120px;
  max-width: 560px;
}

#heroTitle {
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 800;
  color: white;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -1px;
  text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
}

#heroTitle span {
  color: #e50914;
}

.logo {
  color: white;
  /* Netflix Red */
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

.logo h1 {
  margin: 0 !important;
  line-height: 1 !important;
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}


.ai-text {
  color: #fff;
  font-weight: 300;
  font-size: 1.2rem;
  margin-left: 2px;
}

.floating-providers {
  position: relative;
  right: 0;
  top: 0;
  margin: 12px 0 6px 0;
  display: flex;
  justify-content: flex-start;
  width: 100%;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.floating-providers.show-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.floating-provider-icons {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

/* OTT ICON */

.provider-logo {
  width: 40px;
  height: 40px;
  cursor: pointer;
  pointer-events: auto;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(20,20,20,0.92);
  padding: 4px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  pointer-events: auto;
}

.provider-logo:hover {
  transform: scale(1.06);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 8px 24px rgba(255,255,255,0.08);
  background: rgba(35,35,35,0.96);
}

@media (max-width: 768px) {
  }
  .provider-logo {
    width: 40px !important;
    height: 40px !important;
  }
}
.site-footer {
  width: 100%;
  background: #080809;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  padding: 24px 20px;
  margin-top: auto;
  box-sizing: border-box;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.footer-content {
  max-width: 1300px;
  margin: 0 auto;
  text-align: center;
}

.site-footer p {
  color: #64748b !important;
  font-size: 0.75rem !important;
  line-height: 1.6 !important;
  margin: 4px 0 !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}
/* TERMS */
.terms-box{
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin:14px 0 18px;
    font-size:12px;
    color:#cfcfcf;
    line-height:1.5;
    text-align:left;
}

.terms-box input{
    margin-top:3px;
    accent-color:#ff003c;
    cursor:pointer;
}

.policy-link{
    color:#ff4d6d;
    cursor:pointer;
    transition:0.3s;
    font-weight:500;
}

.policy-link:hover{
    color:white;
    text-shadow:0 0 12px #ff003c;
}

/* POLICY MODAL */
.policy-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.85);
    backdrop-filter:blur(10px);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:99999;
}

.policy-content{
    position: relative;

    width: 90%;
    max-width: 550px;

    background: #111;
    border-radius: 24px;

    padding: 35px;

    margin: auto;

    color: white;

    box-sizing: border-box;
}

.policy-content h2{
    margin-bottom:18px;
    color:#ff4d6d;
    font-size:24px;
}

.policy-text{
    color:#ccc;
    line-height:1.8;
    font-size:14px;
}

.accept-policy-btn{
    width:100%;
    margin-top:25px;
    padding:14px;
    border:none;
    border-radius:14px;
    background:
      linear-gradient(
        135deg,
        #e50914,
        #ff2a3d
      );

    color:white;
    font-size:15px;
    font-weight:600;
    cursor:pointer;
    transition:0.3s;
}

.accept-policy-btn:hover{
    transform:translateY(-2px);

    box-shadow:
      0 0 25px rgba(229,9,20,0.5);
}

.close-policy{
    position:absolute;
    top:16px;
    right:16px;

    width:36px;
    height:36px;

    border:none;
    border-radius:50%;

    background:#1f1f1f;
    color:white;

    font-size:18px;
    cursor:pointer;
}

.close-policy:hover{
    background:#e50914;
}
.terms-box{
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #ddd;
}

.terms-box input{
    width: 16px;
    height: 16px;
    accent-color: #ff1744;
    cursor: pointer;
}

.policy-link{
    color: #ff4d6d;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 500;
}

.policy-link:hover{
    color: #fff;
    text-shadow: 0 0 10px #ff1744;
}

.terms-error{
    color: #ff4d6d;
    font-size: 13px;
    margin-top: 8px;
    margin-left: 28px;
    animation: shake 0.3s ease;
}

.hidden{
    display: none;
}

@keyframes shake{
    0%{transform:translateX(0);}
    25%{transform:translateX(-4px);}
    50%{transform:translateX(4px);}
    75%{transform:translateX(-4px);}
    100%{transform:translateX(0);}
}
.error-message{
    background: rgba(255,0,0,.12);
    border:1px solid rgba(255,0,0,.3);
    color:#ffb4b4;

    padding:14px;
    margin-bottom:15px;

    border-radius:12px;
    text-align:center;
}

.hidden{
    display:none;
}
.policy-subtitle{
    color:#999;
    font-size:14px;
    margin-top:-10px;
    margin-bottom:20px;
}

.policy-list{
    text-align:left;
    color:#d0d0d0;
    line-height:1.8;
    padding-left:20px;
}

.policy-list li{
    margin-bottom:10px;
}

.browse-btn{
    background: linear-gradient(
        135deg,
        #e50914,
        #ff4d6d
    );
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 20px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.browse-btn:hover{
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(229,9,20,0.35);
}
.loading-watchlist{
    color: #aaa;
    text-align: center;
    width: 100%;
}

.history-section{
    margin:35px 0 50px;
    padding:0 40px;
}

.history-row{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-top:15px;
}

.history-chip{
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);

    color:#fff;

    padding:10px 18px;

    border-radius:30px;

    font-size:14px;
    font-weight:500;

    cursor:pointer;

    backdrop-filter: blur(10px);

    transition:all .25s ease;
}

.history-chip:hover{

    background:
    linear-gradient(
      135deg,
      #e50914,
      #ff2a3d
    );

    border-color:
    transparent;

    transform:
    translateY(-2px);

    box-shadow:
    0 8px 20px rgba(229,9,20,.35);
}

.history-chip:active{
    transform:scale(.96);
}

.search-wrapper{
    position:relative;
}

.history-toggle{
    position:absolute;

    right:12px;
    top:50%;

    transform:translateY(-50%);

    background:none;
    border:none;

    color:#999;
    font-size:18px;

    cursor:pointer;

    z-index:50;
}

.history-toggle:hover{
    color:#fff;
}

.history-dropdown{
    position:absolute;
    top:52px;
    left:0;
    width:100%;

    background:#111;

    border:1px solid rgba(255,255,255,.08);

    border-radius:12px;

    overflow:hidden;

    z-index:9999;

    box-shadow:
    0 15px 35px rgba(0,0,0,.5);
}

.history-item{
    padding:12px 16px;
    color:#ddd;
    cursor:pointer;
    transition:.2s;
}

.history-item:hover{
    background:#e50914;
    color:white;
}
.movie-ai-reason{

    margin-top:4px;

    font-size:11px;

    color:#ff4d6d;

    font-weight:600;

    overflow:hidden;

    text-overflow:ellipsis;

    white-space:nowrap;
}

.recommendation-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.reason-tag {
  background: rgba(229, 9, 20, 0.2);
  border: 1px solid #e50914;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  color: #fff;
}

@media (max-width: 768px) {
  /* Navigation adjustments */
  .navbar {
    padding: max(10px, env(safe-area-inset-top)) max(15px, env(safe-area-inset-right)) 10px max(15px, env(safe-area-inset-left)) !important;
    height: auto !important;
  }
  .nav-right {
    gap: 8px !important;
  }
  .search-wrapper {
    max-width: 140px !important;
  }
  .search-wrapper input {
    padding: 6px 30px 6px 10px !important;
    font-size: 13px !important;
  }
  .nav-action-btn {
    font-size: 0 !important; /* Hide text label */
    padding: 8px 10px !important;
    border-radius: 50% !important; /* Circular icon buttons */
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .nav-action-btn i {
    font-size: 15px !important; /* Keep icon visible */
    margin: 0 !important;
  }
  .logo {
    font-size: 1.5rem !important;
  }

  /* Movie Details Modal Compact Centered Card */
  .modal-content {
    flex-direction: column !important;
    height: 600px !important;
    max-height: 85vh !important;
    width: 90% !important;
    max-width: 380px !important;
    overflow-y: hidden !important;
    border-radius: 20px !important;
    background: rgba(15, 15, 18, 0.96) !important;
    border: 1px solid rgba(255, 46, 67, 0.25) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8) !important;
    margin: auto !important;
    display: flex !important;
  }
  .modal-body {
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
  }
  .modal-poster {
    flex: 0 0 auto !important;
    width: 100% !important;
    height: 200px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: rgba(0, 0, 0, 0.4) !important;
    overflow: hidden !important;
    border-radius: 19px 19px 0 0 !important;
  }
  .modal-poster img {
    width: auto !important;
    height: 90% !important;
    max-height: 180px !important;
    max-width: 90% !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6) !important;
  }
  .modal-info {
    flex: 1 1 auto !important;
    padding: 14px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    height: calc(100% - 200px) !important;
  }
  #modalTitle {
    font-size: 1.25rem !important;
    margin-bottom: 6px !important;
    line-height: 1.25 !important;
  }
  .modal-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-bottom: 6px !important;
  }
  .modal-meta-extra {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-bottom: 6px !important;
    margin-top: 4px !important;
  }
  .modal-meta span, .modal-meta-extra span, .modal-meta-extra button {
    font-size: 0.7rem !important;
    padding: 2px 5px !important;
  }
  .modal-overview {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    margin-top: 6px !important;
    margin-bottom: 10px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    max-height: 120px !important;
    padding-right: 4px !important;
  }
  .modal-info p, .modal-info div {
    font-size: 0.75rem !important;
  }
  .modal-buttons {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
  }
  .modal-btn {
    flex: 1 !important;
    width: auto !important;
    justify-content: center !important;
    padding: 8px !important;
    font-size: 0.8rem !important;
    border-radius: 8px !important;
  }

  /* Movie Card scaling on mobile for better proportion */
  .movie-card {
    width: 130px !important;
    min-width: 130px !important;
    height: 195px !important;
  }
  .movie-card img {
    height: 100% !important;
  }

  /* Watchlist Grid 2-column forced scaling */
  .watchlist-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
  }

  /* Watchlist Container padding adjustment */
  .watchlist-container {
    padding: calc(68px + env(safe-area-inset-top)) max(15px, env(safe-area-inset-right)) max(30px, env(safe-area-inset-bottom)) max(15px, env(safe-area-inset-left)) !important;
  }

  /* Ensure movie section horizontal margins are reduced on mobile */
  .movie-section {
    padding: 0 15px !important;
    margin: 25px 0 !important;
  }

  .section-title {
    font-size: 1.25rem !important;
  }
}

/* Premium styling for empty search results state */
.empty-search {
  width: 100%;
  text-align: center;
  padding: 50px 20px !important;
  color: #aaa;
  font-size: 1.1rem;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-sizing: border-box;
}

.empty-search::before {
  content: "🔍";
  font-size: 2.2rem;
  display: block;
}

/* Premium onboarding card for empty watchlist recommendations */
.watchlist-onboarding-card {
  width: calc(100% - 30px);
  max-width: 650px;
  margin: 10px auto !important;
  padding: 20px 25px !important;
  background: rgba(20, 20, 20, 0.45);
  border: 1px dashed rgba(229, 9, 20, 0.25);
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  animation: fadeIn 0.5s ease-out;
}

.watchlist-onboarding-card .onboarding-icon {
  color: #e50914;
  font-size: 2.2rem;
  margin-bottom: 8px;
  text-shadow: 0 0 15px rgba(229, 9, 20, 0.4);
}

.watchlist-onboarding-card h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: 0.5px;
}

.watchlist-onboarding-card p {
  font-size: 0.92rem;
  color: #aaa;
  line-height: 1.55;
  margin: 0;
}

/* Glowing icon for watchlist empty state page */
.empty-icon-glow {
  color: #e50914;
  font-size: 3.2rem;
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
}

/* Movie Poster Image Load Failure Fallback Card */
.movie-placeholder-glow {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, #18181c 0%, #0a0a0c 100%) !important;
  border: 1px solid rgba(229, 9, 20, 0.2) !important;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  text-align: center;
  box-sizing: border-box;
  color: #888;
  gap: 12px;
  z-index: 1;
}

.movie-placeholder-glow i {
  font-size: 2.2rem;
  color: #e50914;
  text-shadow: 0 0 15px rgba(229, 9, 20, 0.5);
}

.movie-placeholder-glow span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #eee;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  padding: 0 5px;
}

/* Position relative on modal-poster for accurate placeholder alignment */
.modal-poster {
  position: relative !important;
}

/* Ensure overlays are visible on top of fallback placeholder */
.movie-info-overlay {
  z-index: 2 !important;
}

.watch-overlay {
  z-index: 2 !important;
}

/* Ensure action buttons are always on top of fallback placeholders */
.watchlist-btn, .watch-btn, .remove-btn {
  z-index: 3 !important;
}

/* AI WATCHLIST EXPERIENCE ENHANCEMENTS */

.watchlist-section {
  margin: 40px 0;
  padding: 0;
  position: relative;
  animation: fadeIn 0.6s ease-out;
}

.watchlist-hero-card {
  margin: 0 0 20px 0 !important;
  padding: 32px 38px;
  background: linear-gradient(145deg, rgba(227, 38, 54, 0.08) 0%, rgba(22, 22, 26, 0.6) 60%) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(227, 38, 54, 0.15) !important;
  border-radius: 24px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  animation: fadeIn 0.8s ease-out;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.watchlist-header-top {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  z-index: 1;
  width: 100%;
}

.watchlist-hero-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(227, 38, 54, 0.12) 0%, rgba(227, 38, 54, 0) 70%);
  z-index: 0;
  pointer-events: none;
}

.watchlist-hero-avatar-container {
  position: relative;
  width: 95px;
  height: 95px;
  flex-shrink: 0;
  z-index: 1;
}

.watchlist-hero-avatar-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid #ff2e43;
  opacity: 0.8;
  animation: ring-pulse 2.5s infinite ease-in-out;
  pointer-events: none;
  z-index: 1;
}

.watchlist-hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #e50914, #ff3b47);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  z-index: 2;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.watchlist-hero-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.watchlist-hero-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 1;
  text-align: left;
}

.watchlist-hero-username {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
  background: linear-gradient(90deg, #ffffff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  overflow-wrap: break-word;
  word-break: normal;
  font-family: 'Outfit', sans-serif !important;
}

.watchlist-hero-tagline {
  font-size: 1.25rem;
  color: #888;
  font-family: 'Outfit', sans-serif !important;
}

.watchlist-hero-tagline .glowing-red {
  font-weight: 600;
  color: #ff3e52;
  text-shadow: 0 0 10px rgba(255, 62, 82, 0.3);
}

.watchlist-hero-badge {
  text-align: right;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px 24px;
  border-radius: 18px;
  backdrop-filter: blur(10px);
  z-index: 1;
  flex-shrink: 0;
  font-family: 'Outfit', sans-serif !important;
}

.watchlist-hero-badge .lvl-label {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.watchlist-hero-badge .lvl-val {
  font-size: 1.85rem;
  font-weight: 800;
  color: white;
}

.watchlist-hero-stat-item .value {
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  display: block;
}

.watchlist-hero-stat-item .label {
  font-size: 0.7rem;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
  display: block;
}

.watchlist-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.insight-card {
  background: rgba(18, 18, 22, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 20px !important;
  padding: 22px !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.insight-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5) !important;
}

.insight-card h4 {
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.95rem !important;
  color: var(--text-secondary) !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600 !important;
}

.insight-card h4 i {
  background: var(--primary-gradient) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.insight-metrics {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.insight-metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.insight-metric-item .name {
  color: #888;
}

.insight-metric-item .val {
  color: white;
  font-weight: 600;
}

.insight-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.insight-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.insight-bar-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #888;
}

.insight-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.insight-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #e50914, #ff3b47);
  border-radius: 3px;
}

.movie-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
}

.movie-badge {
  background: rgba(10, 10, 12, 0.85);
  border: 1px solid rgba(229, 9, 20, 0.4);
  color: #ff3b47;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.movie-badge.match-pct {
  border-color: rgba(70, 211, 105, 0.5);
  color: #46d369;
}

.rec-reason-indicator {
  font-size: 0.72rem;
  color: #aaa;
  margin-top: 4px;
  font-style: italic;
  display: block;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* Responsive Overrides for Watchlist Hero Summary */
@media (max-width: 768px) {
  .watchlist-hero-card {
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    text-align: left;
    padding: 18px;
    margin: 0 0 15px 0 !important;
    gap: 14px;
  }
  .watchlist-hero-avatar-container {
    width: 72px !important;
    height: 72px !important;
    flex-shrink: 0;
  }
  .watchlist-hero-info {
    flex: 1;
    min-width: 0;
  }
  .watchlist-hero-username {
    font-size: 1.4rem !important;
  }
  .watchlist-hero-tagline {
    font-size: 0.85rem !important;
  }
  .watchlist-hero-badge {
    padding: 10px 16px !important;
    border-radius: 14px !important;
    text-align: center;
    margin-left: auto;
  }
  .watchlist-hero-badge .lvl-val {
    font-size: 1.5rem !important;
  }
  .watchlist-hero-badge .lvl-label {
    font-size: 0.65rem !important;
  }
  .watchlist-hero-xp-bar-container {
    max-width: 100%;
    width: 100%;
  }
  .watchlist-hero-stats {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  .watchlist-hero-stat-item {
    flex: 1 1 calc(50% - 10px);
    min-width: 120px;
  }
  .watchlist-insights-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

/* Premium Empty State Movie Universe */
.empty-universe-state {
  width: 100%;
  max-width: 800px;
  margin: 60px auto;
  text-align: center;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  box-sizing: border-box;
}

.empty-universe-state h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 0;
}

.empty-universe-state p {
  color: #aaa;
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0;
}

.empty-universe-actions {
  margin-top: 5px;
}

.empty-universe-previews {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 10px;
}

.preview-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 15px 25px;
  min-width: 160px;
  text-align: center;
  box-sizing: border-box;
}

.preview-chip .title {
  font-size: 0.72rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: block;
}

.preview-chip .desc {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ff3b47;
  display: block;
  margin-top: 4px;
}

.empty-universe-suggestions {
  width: 100%;
  text-align: left;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 30px;
  box-sizing: border-box;
}

.empty-universe-suggestions h3 {
  font-size: 1.25rem;
  color: #fff;
  margin: 0 0 15px 0;
}

.suggestions-row {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding-bottom: 10px;
}

/* ==========================================================================
   AVATAR SELECTION MODAL & CUSTOM PRESETS
   ========================================================================== */
.avatar-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 8, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  animation: fadeIn 0.25s ease-out;
}

.avatar-modal-card {
  background: linear-gradient(145deg, #16161a, #0c0c0e);
  border: 1px solid rgba(227, 38, 54, 0.2);
  border-radius: 24px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  box-sizing: border-box;
  animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.avatar-modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
}

.avatar-modal-header h3 {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #ffffff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 6px 0;
}

.avatar-modal-header p {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

.avatar-grid-container {
  overflow-y: auto;
  flex-grow: 1;
  padding-right: 8px;
  margin-top: 10px;
}

/* Custom Scrollbar for Grid */
.avatar-grid-container::-webkit-scrollbar {
  width: 6px;
}
.avatar-grid-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
}
.avatar-grid-container::-webkit-scrollbar-thumb {
  background: rgba(227, 38, 54, 0.25);
  border-radius: 3px;
}
.avatar-grid-container::-webkit-scrollbar-thumb:hover {
  background: rgba(227, 38, 54, 0.5);
}

.avatar-personas-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.avatar-persona-row {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 0.2s, background-color 0.2s;
}

.avatar-persona-row.active-persona-row {
  border-color: rgba(227, 38, 54, 0.4);
  background: rgba(227, 38, 54, 0.02);
}

.avatar-persona-info {
  flex-grow: 1;
}

.avatar-persona-name {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.avatar-persona-desc {
  font-size: 0.8rem;
  color: #64748b;
}

.avatar-persona-desc.unlocked {
  color: #10b981;
}

.avatar-pair {
  display: flex;
  gap: 12px;
}

.avatar-option-card {
  position: relative;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.avatar-option-card img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.2s;
}

.avatar-option-card:hover:not(.locked) {
  transform: scale(1.08);
}

.avatar-option-card.locked {
  cursor: not-allowed;
}

.avatar-option-card.locked img {
  filter: grayscale(1) brightness(0.4);
  border-color: rgba(255, 255, 255, 0.05);
}

.avatar-option-card.locked::after {
  content: '\f023';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.avatar-option-card.active-avatar img {
  border-color: #ff3e52;
  box-shadow: 0 0 12px rgba(255, 62, 82, 0.4);
}

.avatar-option-card.active-avatar::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #ff3e52;
  color: #fff;
  font-size: 0.65rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #16161a;
  z-index: 2;
}

/* Custom notification/toast for locked/other avatars */
.avatar-notification {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(227, 38, 54, 0.95);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 100000;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
  font-family: 'Outfit', sans-serif !important;
}

.avatar-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   PREMIUM SHIMMERING SKELETON LOADER SYSTEM
   ========================================================================== */
.skeleton-shimmer {
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.02) 25%, 
    rgba(255, 255, 255, 0.07) 50%, 
    rgba(255, 255, 255, 0.02) 75%
  );
  background-size: 200% 100%;
  animation: shimmer-effect 1.6s infinite linear;
  border-radius: 8px;
}

@keyframes shimmer-effect {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Hero Box Skeleton */
.hero-skeleton-wrapper {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.hero-skeleton-avatar {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hero-skeleton-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-skeleton-title {
  width: 200px;
  height: 28px;
  border-radius: 6px;
}

.hero-skeleton-subtitle {
  width: 150px;
  height: 18px;
  border-radius: 4px;
}

.hero-skeleton-badge {
  width: 120px;
  height: 70px;
  border-radius: 18px;
  flex-shrink: 0;
}

/* Movie Cards Row Skeleton */
.movie-row-skeleton {
  display: flex;
  gap: 20px;
  width: 100%;
  overflow: hidden;
  padding: 10px 0;
}

.movie-card-skeleton {
  flex: 0 0 170px !important;
  width: 170px !important;
  height: 250px !important;
  border-radius: 12px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  background: rgba(20, 20, 26, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.04) !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.movie-card-skeleton .skeleton-poster {
  width: 100% !important;
  height: 190px !important;
  border-radius: 12px 12px 0 0 !important;
}

.movie-card-skeleton .skeleton-title-line {
  height: 11px !important;
  width: 75% !important;
  border-radius: 4px !important;
  margin: 2px 10px 0 !important;
}

.movie-card-skeleton .skeleton-details-line {
  height: 7px !important;
  width: 45% !important;
  border-radius: 3px !important;
  margin: 0 10px 8px !important;
}

/* Grid collection skeleton */
.movie-grid-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 25px;
  width: 100%;
}

/* Insights Card Skeleton */
.insights-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  width: 100%;
}

@media (max-width: 768px) {
  .insights-skeleton-grid {
    grid-template-columns: 1fr;
  }
  .hero-skeleton-wrapper {
    flex-direction: column;
    text-align: center;
  }
  .hero-skeleton-badge {
    align-self: center;
  }
}

.insight-card-skeleton {
  height: 140px;
  border-radius: 20px;
}

/* ==========================================================================
   UNIVERSAL MOVIE CARD SIZE LOCKS (HOMEPAGE & WATCHLIST)
   ========================================================================== */
.movie-card,
.watch-card,
.movie-card-skeleton {
  width: 170px !important;
  min-width: 170px !important;
  max-width: 170px !important;
  height: 250px !important;
  min-height: 250px !important;
  max-height: 250px !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  position: relative !important;
}

.movie-card img,
.watch-card img,
.watch-img,
.movie-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Align Grid and Skeleton containers to center without stretching cards */
.watchlist-grid,
.movie-grid-skeleton {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, 170px) !important;
  justify-content: center !important;
  gap: 25px !important;
}

/* Ensure placeholder layout inside fallback cards fits perfectly */
.movie-placeholder-glow {
  width: 100% !important;
  height: 100% !important;
  display: flex;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  background: #1c1c1c !important;
  color: #555 !important;
  font-size: 1.5rem !important;
  text-align: center !important;
  box-sizing: border-box !important;
  padding: 10px !important;
}

.movie-placeholder-glow i {
  font-size: 2.2rem !important;
  margin-bottom: 8px !important;
  color: #ff3e52 !important;
}

.movie-placeholder-glow .placeholder-title {
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: #eee !important;
  margin-top: 4px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  padding: 0 5px !important;
}

.movie-placeholder-glow .placeholder-rating {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: #ff9f43 !important;
  margin-top: 4px !important;
}

.movie-placeholder-glow.hidden {
  display: none !important;
}

/* MOBILE VIEW CARD SCALE ALIGNMENT & ULTRA-SMOOTH SCROLLING OPTIMIZATIONS */
@media (max-width: 768px) {
  .movie-card,
  .watch-card,
  .movie-card-skeleton {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    height: 195px !important;
    min-height: 195px !important;
    max-height: 195px !important;
    border-radius: 12px !important;
    /* Force GPU layering to prevent redraw/repaint lag during scroll */
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform, opacity;
  }

  /* Disable scaling transformations on hover/touch to prevent scrolling stutter */
  .movie-card:hover,
  .watch-card:hover {
    transform: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
  }

  /* Enable momentum inertia scrolling on iOS and modern touch devices */
  .movie-row {
    -webkit-overflow-scrolling: touch !important;
    will-change: transform;
  }
  
  .watchlist-grid,
  .movie-grid-skeleton {
    grid-template-columns: repeat(2, 130px) !important;
    justify-content: center !important;
    gap: 15px !important;
  }
}

/* CLEAR WATCHLIST BUTTON MATCHED TO WEBSITE THEME */
.clear-watchlist-btn {
  background: linear-gradient(45deg, #e50914, #ff2a3d);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.2);
}

.clear-watchlist-btn i {
  font-size: 0.8rem;
}

.clear-watchlist-btn:hover {
  background: linear-gradient(45deg, #f72130, #ff4458);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.35);
  transform: translateY(-1.5px);
}

.clear-watchlist-btn:active {
  transform: translateY(0.5px);
}

/* WATCHLIST EMPTY MESSAGE PLACEHOLDER */
.watchlist-empty-message {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 10px 0;
  box-sizing: border-box;
}

.watchlist-empty-message i {
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Co-Viewing Room Styles */
.co-viewing-control-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 15px 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.co-viewing-desc {
  color: #aaa;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.co-viewing-input-group {
  display: flex;
  gap: 10px;
  max-width: 500px;
}

.co-viewing-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 20px;
  color: #fff !important;
  padding: 10px 18px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.co-viewing-input:focus {
  outline: none;
  border-color: #ff2a3d !important;
  box-shadow: 0 0 8px rgba(229, 9, 20, 0.25) !important;
}

.co-viewing-btn {
  background: linear-gradient(45deg, #e50914, #ff2a3d);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.25);
}

.co-viewing-btn:hover {
  background: linear-gradient(45deg, #f72130, #ff4458);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.35);
  transform: translateY(-1.5px);
}

.co-viewing-error {
  color: #ff3b30;
  font-size: 0.85rem;
  margin-top: 8px;
}

.group-recs-row-container {
  margin-top: 15px;
}

.group-recs-title {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 10px;
  font-weight: 500;
  padding-left: 2px;
}

/* Folder Filter Shelf Styles */
.folder-filters-shelf {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding: 5px 2px;
}

.folder-filter-chip {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.folder-filter-chip:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

.folder-filter-chip.active {
  background: linear-gradient(45deg, #e50914, #ff2a3d);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 10px rgba(229, 9, 20, 0.35);
}

/* ==========================================================================
   NYX AI OPERATING SYSTEM FLOATING ORB & CHAT
   ========================================================================== */
.nyx-orb-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 99999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Fade out and disable the floating launcher orb when the chat window is active */
.nyx-orb-container.chat-open .nyx-orb {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(0.7) !important;
  transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.nyx-orb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-image: url('nyx_core_icon.jpg');
  background-size: cover;
  background-position: center;
  mix-blend-mode: screen;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
  animation: breathe 4s ease-in-out infinite;
}

.nyx-orb.processing {
  animation: breathe 1.2s ease-in-out infinite !important;
}

.nyx-orb:hover {
  transform: scale(1.08);
}

@keyframes breathe {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.8));
  }
  50% {
    transform: scale(1.07);
    filter: drop-shadow(0 0 22px rgba(229, 9, 20, 0.95));
  }
}

.nyx-pulse {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid rgba(167, 139, 250, 0.4);
  animation: nyxGlow 2.2s infinite ease-out;
  pointer-events: none;
}

.nyx-chat-window {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 350px;
  height: 480px;
  background: rgba(12, 12, 16, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  display: flex !important; /* Override default hidden display:none behavior to allow transitions */
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-sizing: border-box;
  
  /* Smooth hardware-accelerated toggle transitions */
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.35s ease;
  will-change: transform;
}

/* Shown state selector when not flagged as hidden */
.nyx-chat-window:not(.hidden) {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) scale(1) !important;
}

.nyx-chat-header {
  background: rgba(20, 20, 26, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nyx-header-title {
  color: #e50914;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

#closeNyxChat {
  position: static !important;
  width: 24px !important;
  height: 24px !important;
  font-size: 13px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Nyx Chat Suggestion Chips */
.nyx-suggestion-chips {
  display: flex;
  gap: 6px;
  padding: 6px 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  background: rgba(10, 10, 12, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
}
.nyx-suggestion-chips::-webkit-scrollbar {
  display: none;
}
.nyx-chip {
  flex: 0 0 auto;
  padding: 4px 9px;
  background: rgba(229, 9, 20, 0.08);
  border: 1px solid rgba(229, 9, 20, 0.18);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.65rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.nyx-chip:hover {
  background: rgba(229, 9, 20, 0.2);
  border-color: rgba(229, 9, 20, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.nyx-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(229, 9, 20, 0.3) transparent;
}

.nyx-chat-body::-webkit-scrollbar {
  width: 4px;
}
.nyx-chat-body::-webkit-scrollbar-thumb {
  background: rgba(229, 9, 20, 0.3);
  border-radius: 2px;
}

.nyx-message {
  display: flex;
  max-width: 85%;
  flex-direction: column;
}

.nyx-message.system {
  align-self: flex-start;
}

.nyx-message.user {
  align-self: flex-end;
}

.nyx-text {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.45;
  word-wrap: break-word;
}

.nyx-message.system .nyx-text {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  border-top-left-radius: 2px;
}

.nyx-reasoning-container {
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid rgba(229, 9, 20, 0.5);
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nyx-reasoning-step {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nyx-reasoning-icon {
  font-size: 0.8rem;
  color: #e50914;
  animation: spin 2s linear infinite;
  display: inline-block;
}

.nyx-message.user .nyx-text {
  background: linear-gradient(135deg, #e50914, #9a050d);
  color: #fff;
  border-top-right-radius: 2px;
  box-shadow: 0 4px 10px rgba(229, 9, 20, 0.2);
}

.nyx-chat-input-area {
  padding: 12px;
  background: rgba(15, 15, 20, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 8px;
}

#nyxInput {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  color: #fff;
  padding: 8px 16px;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s;
}

#nyxInput:focus {
  border-color: rgba(229, 9, 20, 0.5);
}

#nyxSendBtn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e50914, #ff2a3d);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

#nyxSendBtn:hover {
  transform: scale(1.05);
}

.nyx-typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  align-items: center;
}

.nyx-dot {
  width: 6px;
  height: 6px;
  background: #ff2a3d;
  border-radius: 50%;
  animation: nyxDotBounce 1.4s infinite ease-in-out;
}

.nyx-dot:nth-child(2) { animation-delay: 0.2s; }
.nyx-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes nyxGlow {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

@keyframes slideUpNyx {
  0% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes nyxDotBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

@media (max-width: 480px) {
  .nyx-chat-window {
    width: calc(100vw - 30px) !important;
    right: 15px !important;
    left: 15px !important;
    bottom: 80px !important;
    height: 65vh !important;
  }
  .login-card {
    padding: 22px 20px 24px !important;
    border-radius: 20px !important;
    width: 88% !important;
    max-width: 350px !important;
    margin: auto !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
  .login-wrapper {
    height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px !important;
    box-sizing: border-box !important;
  }
  .brand-header {
    margin-bottom: 16px !important;
  }
  .brand-logo-row {
    gap: 8px !important;
  }
  .brand-svg {
    width: 38px !important;
    height: 38px !important;
  }
  .brand-name {
    font-size: 28px !important;
  }
  .brand-tagline {
    font-size: 11px !important;
    margin-top: 4px !important;
    letter-spacing: 0.5px !important;
  }
  .login-card .subtitle {
    font-size: 11px !important;
    margin-bottom: 16px !important;
  }
  .login-card .input-group {
    margin-bottom: 12px !important;
  }
  .login-card .input-group input {
    padding: 13px 16px !important;
    font-size: 14px !important;
    border-radius: 12px !important;
  }
  .login-card .input-group label {
    left: 16px !important;
    font-size: 13px !important;
  }
  .login-card .input-group input:focus,
  .login-card .input-group input:not(:placeholder-shown) {
    padding-top: 20px !important;
    padding-bottom: 6px !important;
  }
  .login-card .input-group input:focus+label,
  .login-card .input-group input:not(:placeholder-shown)+label {
    top: 10px !important;
    font-size: 9px !important;
  }
  .login-card .terms-box {
    margin: 10px 0 14px !important;
    font-size: 11px !important;
  }
  .login-card .btn {
    padding: 10px 14px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
  }
  .login-card .divider {
    margin: 10px 0 !important;
  }
  .login-card .form-pane {
    padding: 0 !important;
  }
}

@media (max-width: 576px) {
  .nav-right {
    width: 100% !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .search-wrapper {
    flex: 1 !important;
    max-width: none !important;
    margin-right: 0 !important;
  }
}

/* ==========================================================================
   MOBILE-FIRST UX HARDENING & VIEWPORT CONTAINMENT OVERRIDES
   ========================================================================== */
@media (max-width: 768px) {
  /* Prevent horizontal layout shifts and overflows */
  html, body {
    overflow-x: hidden !important;
    position: relative;
    width: 100%;
  }

  /* Navigation resiliency to prevent button overlap */
  .navbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 16px !important;
    height: 60px !important;
    background-color: var(--nav-bg) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .nav-right {
    gap: 8px !important;
  }

  .logo {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 1.35rem !important;
  }

  .logo svg {
    width: 32px !important;
    height: 32px !important;
  }

  /* Scale navbar actions to Touch-First standards (minimum 36x36px target area for compact fit) */
  .nav-action-btn {
    font-size: 0 !important; /* Hide text, keep icons */
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .nav-action-btn i {
    font-size: 14px !important;
    margin: 0 !important;
  }

  /* Chatbot trigger scaling using clamp() for screen-agnostic sizing */
  .nyx-orb-container {
    bottom: 15px !important;
    right: 15px !important;
    z-index: 100000 !important;
  }

  .nyx-orb {
    width: clamp(45px, 12vw, 55px) !important;
    height: clamp(45px, 12vw, 55px) !important;
  }

  /* Chatbot Window boundary constraints & viewport containment */
  .nyx-chat-window {
    position: fixed !important;
    bottom: 80px !important;
    right: 15px !important;
    left: auto !important;
    width: 350px !important;
    max-width: 90vw !important;
    height: clamp(350px, 60vh, 480px) !important;
    z-index: 100000 !important;
    transform-origin: bottom right !important;
    
    /* Hardware-Accelerated translate slide transitions */
    display: flex !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(100%) scale(0.95) !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease !important;
    will-change: transform !important;
    animation: none !important;
  }

  /* Toggle transition states */
  .nyx-chat-window:not(.hidden) {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
  }

  .hero-content {
    margin-left: 15px !important;
    margin-bottom: 80px !important;
    max-width: calc(100% - 30px) !important;
  }
}

/* ==========================================================================
   PREMIUM BUTTON LOADER & PAGE TRANSITION ANIMATIONS
   ========================================================================== */
.login-body {
  transition: opacity 0.6s ease, transform 0.6s ease !important;
  opacity: 1;
}

.login-body.fade-out {
  opacity: 0 !important;
  transform: scale(0.98) !important;
  pointer-events: none !important;
}

/* Global fade-in transition for the dashboard and homepage body */
body {
  animation: bodyFadeIn 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes bodyFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Button Loading animation containers styles */
.uib-loader-container {
  --uib-size: 38px;
  --uib-color: #ffffff;
  --uib-speed: 1.3s;
  --uib-dot-size: calc(var(--uib-size) * 0.22);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  height: var(--uib-dot-size);
  width: var(--uib-size);
  vertical-align: middle;
}

.uib-loader-dot,
.uib-loader-container::before,
.uib-loader-container::after {
  content: '';
  display: block;
  height: var(--uib-dot-size);
  width: var(--uib-dot-size);
  border-radius: 50%;
  background-color: var(--uib-color);
  transform: scale(0);
  transition: background-color 0.3s ease;
}

.uib-loader-container::before {
  animation: pulse var(--uib-speed) ease-in-out calc(var(--uib-speed) * -0.375) infinite;
}

.uib-loader-dot {
  animation: pulse var(--uib-speed) ease-in-out calc(var(--uib-speed) * -0.25) infinite both;
}

.uib-loader-container::after {
  animation: pulse var(--uib-speed) ease-in-out calc(var(--uib-speed) * -0.125) infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0);
  }
  50% {
    transform: scale(1);
  }
}

/* ==========================================================================
   Zero-Trust Micro-Interactions, Glassmorphism Glows & Dual Form Panels
   ========================================================================== */
.login-card {
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.95),
    0 0 90px rgba(229, 9, 20, 0.18), /* Soft fire glow backing the card */
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* Dual Panel form slider viewport */
.form-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.form-slider {
  display: flex;
  width: 200%;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.form-pane {
  width: 50%;
  flex-shrink: 0;
  padding: 8px 4px;
  box-sizing: border-box;
}

.form-slider.show-signup {
  transform: translateX(-50%);
}

/* Real-time Validation Input CSS */
.input-group {
  position: relative;
}

.input-group .validation-status {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) scale(0.8);
  font-size: 15px;
  color: #2ec4b6;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
}

.input-group input.valid ~ .validation-status {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.input-group input.valid {
  border-color: #2ec4b6 !important;
  box-shadow: 0 0 12px rgba(46, 196, 182, 0.2) !important;
}

.input-group input.invalid {
  border-color: #ff2e43 !important;
  box-shadow: 0 0 12px rgba(255, 46, 67, 0.2) !important;
}

/* Inline localized validation errors styling */
.field-error {
  display: block;
  text-align: left;
  font-size: 11px;
  color: #ff2e43;
  margin-top: -15px;
  margin-bottom: 15px;
  margin-left: 10px;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

/* Premium Gender Selector styles */
.gender-selection {
  margin-bottom: 22px;
  text-align: left;
}

.gender-label {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-left: 5px;
}

.gender-pills {
  display: flex;
  gap: 12px;
}

.gender-pill {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  height: 48px;
}

.gender-pill i {
  font-size: 14px;
  opacity: 0.75;
}

.gender-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.gender-pill.active {
  background: rgba(229, 9, 20, 0.12) !important;
  border-color: #ff2e43 !important;
  color: #ff2e43 !important;
  box-shadow: 0 0 15px rgba(229, 9, 20, 0.2);
  font-weight: 600;
}

.btn.register-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  height: 48px;
  border-radius: 16px;
  font-weight: 600;
}

.btn.register-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn.login-btn {
  height: 52px;
}

.form-toggle-link {
  color: var(--primary-glow);
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.form-toggle-link:hover {
  color: #ff5b6b;
}

.input-group input:focus {
  outline: none !important;
}

/* ==========================================================================
   PREMIUM BUTTON LOADER & PAGE TRANSITION ANIMATIONS
   ========================================================================== */
.login-body {
  transition: opacity 0.6s ease, transform 0.6s ease !important;
  opacity: 1;
}

.login-body.fade-out {
  opacity: 0 !important;
  transform: scale(0.98) !important;
  pointer-events: none !important;
}



/* Button Loading animation containers styles */
.uib-loader-container {
  --uib-size: 38px;
  --uib-color: #ffffff;
  --uib-speed: 1.3s;
  --uib-dot-size: calc(var(--uib-size) * 0.22);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  height: var(--uib-dot-size);
  width: var(--uib-size);
  vertical-align: middle;
}

.uib-loader-dot,
.uib-loader-container::before,
.uib-loader-container::after {
  content: '';
  display: block;
  height: var(--uib-dot-size);
  width: var(--uib-dot-size);
  border-radius: 50%;
  background-color: var(--uib-color);
  transform: scale(0);
  transition: background-color 0.3s ease;
}

.uib-loader-container::before {
  animation: pulse var(--uib-speed) ease-in-out calc(var(--uib-speed) * -0.375) infinite;
}

.uib-loader-dot {
  animation: pulse var(--uib-speed) ease-in-out calc(var(--uib-speed) * -0.25) infinite both;
}

.uib-loader-container::after {
  animation: pulse var(--uib-speed) ease-in-out calc(var(--uib-speed) * -0.125) infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0);
  }
  50% {
    transform: scale(1);
  }
}

/* Movie Details Carousel Arrows */
.modal-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 80px;
  border-radius: 80%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1010;
  transition: transform 0.22s cubic-bezier(0.25, 1, 0.5, 1), background 0.22s, box-shadow 0.22s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  user-select: none;
}
.modal-nav-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
  transform: translateY(-50%) scale(1.05);
}
.modal-nav-arrow:active {
  transform: translateY(-50%) scale(0.96);
}
.modal-nav-arrow.prev-arrow {
  left: -65px;
}
.modal-nav-arrow.next-arrow {
  right: -65px;
}

/* Movie Details Indicator Dots */
.modal-indicator-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 12px 0 16px 0;
  z-index: 100;
  pointer-events: auto;
}
.indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.25, 1, 0.5, 1);
}
.indicator-dot:hover {
  background: rgba(255, 255, 255, 0.55);
  transform: scale(1.15);
}
.indicator-dot.active {
  background: #ff2e43;
  width: 16px;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(255, 46, 67, 0.6);
}

/* Slide Transition Keyframes */
@keyframes slideInRight {
  from { transform: translateX(35px) scale(0.98); opacity: 0; filter: blur(2px); }
  to { transform: translateX(0) scale(1); opacity: 1; filter: blur(0); }
}
@keyframes slideOutLeft {
  from { transform: translateX(0) scale(1); opacity: 1; filter: blur(0); }
  to { transform: translateX(-35px) scale(0.98); opacity: 0; filter: blur(2px); }
}
@keyframes slideInLeft {
  from { transform: translateX(-35px) scale(0.98); opacity: 0; filter: blur(2px); }
  to { transform: translateX(0) scale(1); opacity: 1; filter: blur(0); }
}
@keyframes slideOutRight {
  from { transform: translateX(0) scale(1); opacity: 1; filter: blur(0); }
  to { transform: translateX(35px) scale(0.98); opacity: 0; filter: blur(2px); }
}

.slide-in-right { animation: slideInRight 0.38s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
.slide-out-left { animation: slideOutLeft 0.38s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
.slide-in-left { animation: slideInLeft 0.38s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
.slide-out-right { animation: slideOutRight 0.38s cubic-bezier(0.25, 1, 0.5, 1) forwards; }

@media (max-width: 768px) {
  @media (hover: none) and (pointer: coarse) {
    .modal-nav-arrow {
      display: none !important;
    }
  }
  @media (hover: hover), (pointer: fine) {
    .modal-nav-arrow.prev-arrow {
      left: -50px !important;
    }
    .modal-nav-arrow.next-arrow {
      right: -50px !important;
    }
    .modal-nav-arrow {
      width: 36px !important;
      height: 72px !important;
      font-size: 18px !important;
      background: rgba(0, 0, 0, 0.65) !important;
      border-radius: 8px !important;
    }
  }
}

/* --- CINEMATIC SHUTTER INTRO ANIMATION OVERLAY --- */
/* Master Overlay Container */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000000;
    z-index: 9999; /* Forces it over everything else */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.6s;
}

/* Centralizing Content */
.intro-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Movie Shutter Icon Animation */
.shutter-icon {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: rotateShutter 2s cubic-bezier(0.76, 0, 0.24, 1) infinite;
}

.shutter-icon .blade {
    position: absolute;
    background: #ff2e43; /* Your Brand Premium Red */
    width: 100%;
    height: 4px;
    top: 50%;
    left: 0;
    transform-origin: center;
}
.shutter-icon .blade.b1 { transform: translateY(-50%) rotate(45deg) scaleX(0.7); }
.shutter-icon .blade.b2 { transform: translateY(-50%) rotate(-45deg) scaleX(0.7); }

/* Text Title Glow (The "Ignition") */
.intro-title {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.3em;
    color: #ffffff;
    margin: 10px 0;
    text-shadow: 0 0 20px rgba(255, 46, 67, 0.6);
    animation: textPulse 1.5s ease-in-out infinite alternate;
}

.intro-title span {
    color: #ff2e43;
}

.intro-subtitle {
    color: #888888;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 25px;
}

/* Cyber Loading Progress Bar */
.boot-bar-container {
    width: 180px;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.boot-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #ff2e43, transparent);
    transform: translateX(-100%);
    animation: loadBar 1.8s cubic-bezier(0.85, 0, 0.15, 1) infinite;
}

/* --- KEYFRAMES --- */
@keyframes rotateShutter {
    0% { transform: rotate(0deg) scale(0.9); }
    50% { transform: rotate(180deg) scale(1.1); filter: drop-shadow(0 0 15px #ff2e43); }
    100% { transform: rotate(360deg) scale(0.9); }
}

@keyframes textPulse {
    from { opacity: 0.7; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes loadBar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Class to trigger smoothly via JS */
#intro-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Chatbot Suggestion Chips Scroll Controls */
.nyx-suggestion-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: rgba(10, 10, 12, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.nyx-suggestion-wrapper .nyx-suggestion-chips {
  border-top: none !important;
  flex: 1;
}

.chip-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: rgba(15, 15, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  display: none; /* dynamically toggled in JS */
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s ease;
  pointer-events: auto;
}

.chip-scroll-btn:hover {
  background: #e50914;
  color: white;
  border-color: #e50914;
}

.chip-scroll-btn.scroll-left-btn {
  left: 4px;
}

.chip-scroll-btn.scroll-right-btn {
  right: 4px;
}