:root {
    /* Core Palette */
    --background-gradient: linear-gradient(to bottom, #121212, #1b1b1b);
    --font-color: #ffffff;
    --subtle-text-color: #b0b0b0;
    --accent-color: #ff4081;
    --glow-color: #33ffd1;
    --genre-icon-color: #f9f871;
    --border-radius: 18px;
    --max-container-width: 400px;
  }
  
  /* 1) Background gradient + radial vignette */
  body {
    margin: 0;
    padding: 0;
    background: var(--background-gradient);
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    color: var(--font-color);
    position: relative;
    overflow-x: hidden;
  }
  body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.5) 100%);
    z-index: 0;
  }
  
  /* 3) Header styling */
  .header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0e0e0e;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    margin-bottom: 6px;
  }
  .header-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--font-color);
    text-transform: uppercase;
    letter-spacing: 1.2px;
  }
  #login-link,
  #watched-link,
  #back-link,
  #statsBtn {
    background: var(--accent-color);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
  }
  #login-link:hover,
  #watched-link:hover,
  #back-link:hover,
  #statsBtn:hover {
    background: #ff5a93;
    transform: scale(1.05);
  }
  
  /* 4) Genre Filter */
  .genre-filter {
    margin-top: 12px;
    margin-bottom: 12px; /* add this line */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px 0;
  }
  

  .genre-button {
    background: var(--accent-color);
    color: var(--genre-icon-color);
    border: none;
    padding: 8px 10px;
    border-radius: var(--border-radius);
    font-weight: 700;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 0 8px rgba(255,64,129,0.4);
    transition: transform 0.2s ease;
  }
  .genre-button i {
    display: block;
    margin: 0 auto;
  }
  .genre-button:hover {
    transform: scale(1.1);
  }
  .genre-button.active {
    background: var(--accent-color);
    color: #fff;
    text-decoration: underline;
  }
  
  /* 5) Movie Card Container */
  #movie-card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-top: 12px;
    padding: 0 16px;
    min-height: calc(100vh - 200px); /* ensures some height for spacing */
  }
  
  
  
    .movie-card {
      position: relative;
      width: 100%;
      max-width: 400px;
      aspect-ratio: 2 / 3;
      max-height: 75vh;
      margin-top: 12px;
      margin-bottom: 24px;
      border-radius: var(--border-radius);
      overflow: hidden;
      box-shadow: 0 12px 24px rgba(255, 64, 129, 0.3);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
   
  
  .movie-card:hover {
    transform: scale(1.015);
  }
  

  
  /* 7) Poster */
  .poster-full {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
  }
  
  /* 8) Front swipe region */
  .swipe-region-front {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 40%;
    background: transparent;
    user-select: none;
    touch-action: none;
  }
  
  /* 9) Card Back */
  .card-back {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    color: var(--font-color);
    display: none;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 10px;
  }
  
  .trailer iframe {
    width: 95%;
    max-width: 320px;
    height: 200px;
    margin: 8px auto;
    display: block;
    border: none;
    border-radius: var(--border-radius);
  }
  .watch-info {
    margin-top: 10px;
    text-align: center;
  }
  .streaming-icons a {
    display: inline-block;
    margin: 0 6px;
    text-decoration: none;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
  }
  .streaming-icons a:hover {
    transform: scale(1.05);
  }
  
  /* 10) Optional card context text */
  .card-context {
    color: #888;
    font-size: 0.8rem;
    text-align: center;
    margin-top: 0.5em;
  }
  
  /* 11) Back details */
  .back-details {
    margin-top: 16px;
    padding: 0 8px;
    text-align: left;
  }
  .back-details h2 {
    margin: 0 0 4px 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8em;
    letter-spacing: 0.5px;
    color: var(--font-color);
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  }
  .back-details p {
    margin: 4px 0;
    font-size: 1rem;
    color: var(--subtle-text-color);
  }
  
  /* 12) Back swipe region */
  .swipe-region-back {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 40%;
    background: transparent;
    user-select: none;
    touch-action: none;
  }
  
  /* 13) Loader */
  .loader {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--font-color);
    font-size: 1.2rem;
    display: none;
  }
  
  /* 14) Onboarding Tooltip (now centered) */
  .onboarding-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: var(--font-color);
    padding: 12px 16px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    display: none;
    max-width: 240px;
    z-index: 1000;
  }
  
  /* 15) Footer Attribution */
  .footer-attribution {
    margin: 6px auto 12px;
    color: #888;
    font-size: 0.75rem;
    text-align: center;
  }
  
  /* 16) Stats Display for Watched Page */
  /* 16) Stats Display for Watched Page */
.stats-display {
  background: rgba(0, 0, 0, 0.6);
  color: var(--font-color);
  padding: 16px 20px;
  border-radius: var(--border-radius);
  margin: 20px auto;
  max-width: 500px;
  font-size: 0.95rem;
  line-height: 1.6;
  font-family: 'Outfit', sans-serif;
  box-shadow: 0 4px 12px rgba(255, 0, 128, 0.1);
}

.stats-display p {
  margin: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 600px) {
  .stats-display {
    padding: 12px 16px;
    font-size: 0.85rem;
  }
}
  
  /* 17) Watched Page Styles */
  .watched-header {
    margin: 20px 0;
    font-size: 2rem;
    color: var(--font-color);
  }

  .progress-tracker {
    text-align: center;
    color: white;
    font-size: 0.9rem;
    margin: 10px auto 20px;
    font-weight: 500;
    opacity: 0.8;
  }  

  .sort-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
  }
  .sort-buttons button {
    padding: 10px 12px;
    border: none;
    border-radius: var(--border-radius);
    background: var(--accent-color);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(255,64,129,0.5);
    transition: background 0.2s ease, transform 0.2s ease;
  }
  .sort-buttons button:hover {
    background: #ff5a93;
    transform: scale(1.05);
  }
  
  .watched-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: var(--max-container-width);
    margin: 0 auto 40px;
    padding: 0 4vw;
  }
  
  .watched-item-condensed {
    list-style: none;
    background: rgba(255, 255, 255, 0.05);
    padding: 14px 18px;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 16px rgba(255, 64, 129, 0.15);
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 1rem;
    color: var(--font-color);
  }
  
  
  .watched-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
  }
  
  .watched-year,
  .watched-director {
    font-size: 0.85rem;
    color: var(--subtle-text-color);
    margin-bottom: 6px;
  }
  
  .watched-item-condensed {
    position: relative;
    padding: 16px;
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.6); /* fallback if no poster */
    background-image: var(--poster-url);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    color: white;
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.3);
  }
  
  /* ✨ Foreground content above blur */
  .watched-item-condensed > * {
    position: relative;
    z-index: 2;
  }
  

  .star-rating-widget {
    max-width: 100%;
    font-size: 1.3rem;
    position: relative;
    user-select: none;
  }
  
  .star-rating-bg,
  .star-rating-fg {
    font-size: 1.3rem;
    white-space: nowrap;
  }
  
  .star-rating-bg {
    color: var(--subtle-text-color);
  }
  
  .star-rating-fg {
    color: gold;
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
  }
  
  
  .swipe-label {
    position: absolute;
    bottom: 60px; /* Adjust height below card stack */
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.25);
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 0; /* Behind the cards, but still visible */
    pointer-events: none;
    animation: fadeIn 1.2s ease-out forwards;
  }
  
  .swipe-label-left {
    left: 12px;
    transform: rotate(-90deg);
  }
  
  .swipe-label-right {
    right: 12px;
    transform: rotate(90deg);
  }
  
  
  /* Fade-in Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(0.95);
  }
  to {
    opacity: 0.5;
    transform: translateY(-50%) scale(1);
  }
}

/* Watched List: Condensed Card View */
.watched-item-condensed {
  list-style: none;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 16px rgba(255, 64, 129, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  color: var(--font-color);
  transition: background 0.3s ease;
}

.watched-item-condensed:hover {
  background: rgba(255, 255, 255, 0.08);
}

.watched-title {
  font-weight: 600;
  font-size: 1rem;
}

.watched-year,
.watched-director {
  color: var(--subtle-text-color);
  font-size: 0.9rem;
  margin-left: 6px;
}

.watched-stars {
  font-size: 1rem;
  color: gold;
  white-space: nowrap;
  margin-left: auto;
  padding-left: 10px;
}
/* WATCHED LIST: Condensed Mobile-Friendly Cards */
.watched-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 92vw;
  max-width: var(--max-container-width);
  margin: 0 auto 40px;
  padding: 0 4vw;
}

.watched-item-condensed {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--border-radius);
  padding: 10px 12px;
  color: var(--font-color);
  box-shadow: 0 0 18px rgba(255, 64, 129, 0.2);
}

/* Text Styling */
.watched-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.watched-year,
.watched-director {
  font-size: 0.85rem;
  color: var(--subtle-text-color);
  margin-bottom: 6px;
}

/* STAR RATING */
.star-rating-widget {
  position: relative;
  font-size: 1.6rem;
  line-height: 1;
  user-select: none;
  width: 100%;
  max-width: 200px;
}

.star-rating-bg,
.star-rating-fg {
  white-space: nowrap;
  font-size: 1.6rem;
}

.star-rating-bg {
  color: var(--subtle-text-color);
}

.star-rating-fg {
  color: gold;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  pointer-events: none;
}

/* SORT BUTTONS */
.sort-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 0 6vw;
}

.sort-buttons button {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 12px;
  flex: 1 1 42%;
  min-width: 140px;
  text-align: center;
  border: none;
  border-radius: var(--border-radius);
  background: var(--accent-color);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255,64,129,0.5);
  transition: background 0.2s ease, transform 0.2s ease;
}

.sort-buttons button:hover {
  background: #ff5a93;
  transform: scale(1.05);
}

/* HEADER */
.watched-header {
  text-align: center;
  font-size: 1.5rem;
  margin: 18px 0 12px;
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #1b1b1b;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.6);
  z-index: 1000;
  border-top: 1px solid #333;
}

.nav-item {
  font-size: 1.4rem;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.nav-item:hover {
  transform: scale(1.2);
}

.nav-main {
  font-size: 1.7rem;
}

body {
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: var(--background-color);
  display: flex;
  justify-content: space-around;
  padding: 10px 0 env(safe-area-inset-bottom);
  z-index: 100;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bottom-nav .nav-item {
  font-size: 1.6rem;
  text-decoration: none;
  color: #fff;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease, background 0.3s ease;
  background: transparent;
}

.bottom-nav .nav-item:hover {
  transform: scale(1.2);
  background: rgba(255, 0, 127, 0.1);
}

.bottom-nav .nav-main {
  font-size: 2rem;
}

.bottom-nav .nav-item.active {
  background: rgba(255, 0, 127, 0.2);
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.5);
}

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: #111;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -1px 8px rgba(255, 0, 127, 0.2);
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  color: #999;
  font-size: 24px;
  transition: color 0.3s ease;
}

.nav-item i {
  pointer-events: none;
}

.nav-item.nav-main {
  font-size: 28px;
}

.nav-item.active,
.nav-item:hover {
  color: #ff007f;
  text-shadow: 0 0 6px #ff007f;
}

.view-toggle {
  text-align: center;
  margin: 20px auto;
}

.watched-container.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  justify-items: center;
  padding: 20px 16px;
}

.grid-view .watched-item-condensed {
  width: 100%;
  max-width: 160px;
  padding: 10px;
  text-align: center;
  font-size: 0.9rem;
}

.grid-view .watched-title {
  font-size: 1rem;
  margin-bottom: 4px;
}

.grid-view .star-rating-widget {
  margin-top: 4px;
}

.watched-item-condensed {
  position: relative;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: white;
  overflow: hidden;
  backdrop-filter: blur(2px);
}

.watched-item-condensed::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.12;
  filter: blur(6px);
  z-index: 0;
  transition: opacity 0.3s ease;
}

.watched-item-condensed > * {
  position: relative;
  z-index: 1;
}


.watched-container.grid-view .watched-title,
.watched-container.grid-view .watched-meta {
  display: none;
}

.watched-container.grid-view .star-rating-widget {
  margin-top: 10px;
  justify-content: center;
}

/* Grid View - Two Column Layout */
.watched-container.grid-view {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 10px;
}

.watched-container.grid-view .watched-item-condensed {
  background-color: #1a1a1a;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 0 8px rgba(255, 0, 127, 0.2);
}

/* Tighten stars + hide meta info in grid */
.watched-container.grid-view .watched-meta {
  display: none;
}

.watched-container.grid-view .star-rating-widget {
  font-size: 12px;
  margin-top: 5px;
}

.filter-toggle {
  display: flex;
  justify-content: center;
  margin: 12px 0;
  font-size: 0.9rem;
  color: var(--subtle-text-color);
}

.filter-toggle input[type="checkbox"] {
  margin-right: 6px;
  transform: scale(1.2);
  accent-color: var(--accent-color);
}

.filter-toggle {
  color: var(--font-color);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}



.watched-group {
  margin-bottom: 2rem;
}

.watched-group-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  color: white;
  margin: 1.5rem 0 1rem 0;
  text-shadow: 0 0 6px rgba(255, 0, 127, 0.5);
}

.options-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 10px auto;
  flex-wrap: wrap;
  align-items: center;
}
.filter-toggle input[type="checkbox"] {
  transform: scale(0.9);
}
.rating-progress {
  margin: 12px auto 16px;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.85;
}
.watched-time-header {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  color: #ff007f;
  margin: 32px auto 8px;
  text-align: center;
  letter-spacing: 1px;
  text-transform: uppercase;
  filter: drop-shadow(1px 1px 0 #111);
}
.rating-progress {
  background: rgba(255, 64, 129, 0.12);
  border: 1px solid rgba(255, 64, 129, 0.3);
  padding: 12px 16px;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  margin: 10px auto 20px;
  max-width: 400px;
  color: var(--font-color);
  text-align: center;
  box-shadow: 0 0 8px rgba(255, 64, 129, 0.1);
}

.rating-progress strong {
  color: var(--accent-color);
  font-weight: 700;
}

.progress-glow {
  background: linear-gradient(90deg, #ff007f, #ff4fa0);
  color: white;
  padding: 0.6em 1.2em;
  border-radius: 20px;
  font-weight: bold;
  display: inline-block;
  margin: 10px auto;
  text-align: center;
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.6);
  font-size: 1rem;
}
.progress-glow strong {
  color: white;
}

/* Utility Controls Row */
.options-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 10px auto 20px;
  align-items: center;
  flex-wrap: wrap;
}

/* Checkbox Label */
.filter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--font-color);
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
}

/* Grid View Button - Minimal */
.view-toggle button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--font-color);
  font-size: 0.95rem;
  font-family: 'Outfit', sans-serif;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.view-toggle button:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.watched-item-condensed {
  position: relative;
  padding: 16px;
  border-radius: 12px;
  background-color: rgba(0, 0, 0, 0.6); /* fallback if no poster */
  background-image: var(--poster-url);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  color: white;
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.3);
}
  /* ✨ Poster blur overlay for readability */
  .watched-item-condensed::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    backdrop-filter: blur(8px); /* try stronger */
    background-color: rgba(0, 0, 0, 0.45); /* darken for contrast */
    z-index: 1;
    pointer-events: none; /* just in case */
  }

/* ✨ Foreground content above blur */
.watched-item-condensed > * {
  position: relative;
  z-index: 2;
}

.watched-item-condensed::before {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1;
  pointer-events: none;
}

.watched-item-condensed {
  position: relative;
  padding: 16px;
  border-radius: 12px;
  background-color: rgba(0, 0, 0, 0.6);
  overflow: hidden;
  color: white;
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.3);
}

/* 🖼️ Background poster */
.watched-item-condensed::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--poster-url);
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* 🌫️ Blur overlay */
.watched-item-condensed::after {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* 🔤 Foreground content stays above */
.watched-item-condensed > * {
  position: relative;
  z-index: 2;
}
.sort-buttons button {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  background-color: transparent;
  border: none;
  color: #FFFFFF; /* Adjust to match your design */
  display: flex;
  align-items: center;
}

.sort-buttons i {
  margin-right: 8px;
}
.comment-box {
  margin-top: 6px;
  padding: 6px;
  width: 100%;
  border-radius: 6px;
  border: 1px solid #444;
  background: #111;
  color: #fff;
  font-size: 14px;
}

.comment-save-btn {
  margin-top: 4px;
  padding: 6px 12px;
  background: var(--accent-color);
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.watched-reaction {
  margin-top: 8px;
  font-size: 0.85rem;
  font-style: italic;
  color: #f2f2f2;
  opacity: 0.85;
  text-align: center;
}

.reactionInput {
  margin-top: 6px;
  padding: 6px;
  width: 70%;
  font-family: 'Outfit', sans-serif;
  border: none;
  border-radius: 6px;
  background-color: #222;
  color: white;
}

.saveReactionBtn {
  margin-left: 8px;
  padding: 6px 12px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.reaction-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}


.saveReactionBtn:hover {
  opacity: 0.9;
}


.reaction-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.reactionInput {
  padding: 6px;
  width: 70%;
  border: none;
  border-radius: 6px;
  background-color: #222;
  color: white;
}

.saveReactionBtn {
  padding: 6px 12px;
  background: var(--accent-color);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: white;
  font-weight: 600;
}

#googleBtn {
  padding: 10px 16px;
  font-size: 16px;
  font-family: 'Outfit', sans-serif;
  border: none;
  border-radius: 6px;
  background: white;
  color: black;
  cursor: pointer;
  font-weight: 600;
}

#googleBtn:hover {
  background: #eee;
}

.genre-buttons.emoji-only {
  display: flex;
  overflow-x: auto;
  padding: 12px 12px 0;
  gap: 10px;
  justify-content: center;
}

.genre-buttons.emoji-only .genre-button {
  font-size: 1.3rem;
  padding: 10px;
  background: #1a1a1a;
  border: 2px solid #ff007f;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff007f;
  transition: all 0.2s ease;
}

.genre-buttons.emoji-only .genre-button.active {
  background: #ff007f;
  color: #fff;
}

.genre-buttons.emoji-only .genre-button span {
  pointer-events: none;
}

.genre-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 12px;
}

.genre-button {
  background: #ff007f;
  color: #fff;
  font-size: 1.2rem;
  padding: 12px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 12px #ff007f;
  transition: transform 0.2s ease;
}

.genre-button i {
  pointer-events: none;
}

.genre-button:hover {
  transform: scale(1.1);
  background: #ff33a6;
}

.genre-button.active {
  background: #000;
  color: #ff007f;
  border: 2px solid #ff007f;
}

.genre-button {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  border: none;
  background: #ff007f;
  color: #fff500;
  padding: 12px;
  margin: 6px;
  border-radius: 50%;
  font-size: 20px;
  box-shadow: 0 0 8px #ff007f;
  cursor: pointer;
  transition: transform 0.2s ease;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.genre-button.active {
  background: #fff;
  color: #ff007f;
  transform: scale(1.1);
}

/* 🎯 Tooltip Placement Fix */
.tooltip {
  position: absolute;
  top: calc(70vh); /* Puts it around card level */
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.4);
  z-index: 10;
  text-align: center;
  max-width: 90%;
  font-size: 0.95rem;
}
@media (max-height: 700px) {
  .movie-card {
    max-height: 65vh;
  }
}

@media (max-width: 600px) {
  .movie-card {
    max-height: 60vh; /* tighter on mobile */
    margin-top: 12px;
  }
}
@media (max-width: 600px) {
  .genre-filter {
    margin-bottom: 8px;
  }
}

@media (max-width: 500px) {
  .genre-buttons.emoji-only .genre-button {
    font-size: 1rem;
    width: 36px;
    height: 36px;
    padding: 8px;
    margin: 4px;
  }
}

.genre-buttons.emoji-only {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 10px 0;
}

.genre-buttons.emoji-only .genre-button {
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .genre-button {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    padding: 8px;
    box-shadow: 0 0 6px #ff007f;
  }

  #movie-card-container {
    margin-top: 8px;
  }

  .movie-card {
    max-height: 70vh;
    transform: translateY(-6px);
  }

  .genre-buttons.emoji-only {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .genre-buttons.emoji-only::-webkit-scrollbar {
    display: none;
  }
}

/* 🔧 Mobile Responsiveness Adjustments */
@media (max-width: 768px) {
  .movie-card {
    max-height: 65vh; /* prevent it going off screen */
    width: 90vw;       /* contain the width nicely */
    aspect-ratio: 9 / 16;
    margin: 16px auto 20px;
  }

  .genre-filter {
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 12px 10px 0;
    gap: 10px;
  }

  .genre-filter::-webkit-scrollbar {
    display: none;
  }

  .genre-button {
    flex: 0 0 auto;
  }
}

@media (max-width: 600px) {
  .genre-buttons {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding: 12px;
    justify-content: flex-start;
    scroll-snap-type: x mandatory;
  }

  .genre-button {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
}

.genre-buttons::-webkit-scrollbar {
  display: none;
}

/* Desktop — NORMAL row */
.genre-scroll {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 12px 16px;
  gap: 12px;
}

/* Mobile only — SCROLLABLE bar */
@media (max-width: 600px) {
  .genre-scroll {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    padding: 12px 16px;
    gap: 5px;
  }

  .genre-scroll::-webkit-scrollbar {
    display: none;
  }

  .genre-button {
    flex: 0 0 auto;
  }
}

/* 🎯 Genre Scroll Wrapper */
#genreScrollWrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 16px;
  margin-bottom: 16px;
}

#genreButtons {
  display: flex;
  gap: 12px;
  padding: 0 16px;
  justify-content: flex-start;
  width: max-content;
}


/* Genre Scroll Wrapper */
.genre-scroll-wrapper {
  overflow-x: auto;
  white-space: nowrap;
  padding: 8px 12px;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.genre-scroll-inner {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* Match mobile and desktop */
.genre-button {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* DESKTOP ONLY */
@media (min-width: 768px) {
  .genre-scroll-wrapper {
    overflow-x: visible;
    justify-content: center;
    padding-top: 16px;
  }

  .genre-scroll-inner {
    flex-wrap: nowrap;
    justify-content: center;
    overflow-x: visible;
  }
}
#genre-scroll-container {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 12px 16px;
  padding-left: 24px; /* 👈 Adds space on the left */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.genre-scroll-container {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding: 12px 0 0 16px; /* Adds left breathing room */
  -webkit-overflow-scrolling: touch;
}

.genre-buttons-wrapper {
  display: flex;
  gap: 12px;
  padding-right: 16px;
}

.genre-button {
  flex: 0 0 auto;
}

.genre-container {
  overflow-x: auto;
  white-space: nowrap;
  padding: 0 12px;
  display: none; /* hidden by default */
  margin-top: 8px;
  margin-bottom: 8px;
}

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

.genre-button {
  display: inline-block;
  margin-right: 10px;
}

/* Mobile only */
@media (max-width: 768px) {
  .genre-container {
    display: block;
  }

  #genreButtonsDesktop {
    display: none;
  }
}

/* Desktop only */
@media (min-width: 769px) {
  #genreButtonsDesktop {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
  }
}

.watched-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
}

.watched-card {
  max-width: 340px;
  width: 100%;
  margin-bottom: 20px;
}

/* ✅ Desktop styles */
@media (min-width: 768px) {
  .watched-group {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* ✅ Mobile styles */
@media (max-width: 767px) {
  .watched-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 12px; /* Optional: adds breathing room on sides */
  }
}

.top100-title-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top100-rank {
  font-family: 'Bebas Neue', cursive;
  font-size: 20px;
  color: #ff007f;
  min-width: 28px;
  text-align: right;
}

.watched-item-condensed {
  padding: 12px;
  margin-bottom: 10px;
}

.top100-rank {
  font-weight: bold;
  margin-right: 0.5rem;
  font-size: 1.2rem;
  display: inline-block;
}

.top-rank-1 {
  color: #e91e63;
  animation: pulse1 2.5s infinite;
}

.top-rank-2 {
  color: #ff9800;
  animation: pulse2 3s infinite;
}

.top-rank-3 {
  color: #03a9f4;
  animation: pulse3 3.5s infinite;
}

@keyframes pulse1 {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}
@keyframes pulse2 {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}
@keyframes pulse3 {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.9; }
}
/* Friend Activity Feed Styles */
.friend-activity-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.1);
  transition: background 0.3s ease;
}

.friend-activity-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.friend-activity-item strong {
  font-size: 1rem;
  color: #ffffff;
}

.friend-activity-item div {
  font-size: 0.85rem;
  color: #bbbbbb;
  margin-top: 4px;
}

@media (max-width: 600px) {
  .friend-activity-item {
    padding: 8px 12px;
    margin-bottom: 12px;
  }
}
.friend-activity-item strong {
  color: #ff007f;
  text-shadow: 0 0 4px rgba(255, 0, 127, 0.5);
}

body {
  background: linear-gradient(135deg, #121212 0%, #1b1b1b 50%, #121212 100%);
  background-size: 400% 400%;
  animation: gradientMove 15s ease infinite;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.friend-activity-item {
  padding: 14px 18px;
}
.friend-activity-item {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.6s ease forwards;
}

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

/* === PROFILE PAGE ENHANCEMENTS === */

.profile-main {
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.profile-pic {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ff007f;
}

.profile-info {
  flex-grow: 1;
}

.profile-info h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  color: var(--accent-color);
}

#bioInput {
  width: 100%;
  background: #111;
  color: white;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 8px;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 50px;
}

#saveBioBtn {
  margin-top: 6px;
  padding: 6px 12px;
  background: var(--accent-color);
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.follow-section {
  margin: 20px 0;
  text-align: center;
}

.follow-section button {
  margin: 0 8px;
  padding: 8px 12px;
  background: #222;
  color: white;
  border: 1px solid #ff007f;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

#followList {
  margin-top: 12px;
  padding-left: 0;
  list-style: none;
  color: white;
}

.grid-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-color);
  margin: 20px 0 10px;
  text-align: center;
}

.watched-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.grid-item {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(255, 0, 127, 0.25);
  transition: transform 0.2s ease;
}

.grid-item:hover {
  transform: scale(1.04);
  cursor: pointer;
}

.profile-pic {
  position: relative;
  cursor: pointer;
}

.profile-pic::after {
  content: "Click to change";
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--subtle-text-color);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.profile-pic:hover::after {
  opacity: 1;
}
