/* Make element sizing include padding/border so width:100% doesn't overflow */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background-color: #0f0901;
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 90vh;
  flex-direction: column;
}

.title {
  color: white;
  font-size: 100px;
  font-weight: 700;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* make the title and version sit nicely together */
.title {
  color: white;
  font-size: 100px;
  font-weight: 700;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.title .version {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 165, 0, 0.12); /* light orange tint */
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 165, 0, 0.12);
  text-transform: lowercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.formulaire {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
  width: 100%;
  max-width: 400px;
  padding: 40px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Variant when .formulaire is used as a topbar-form placed above trends */
.formulaire.topbar-form {
  /* undo the card-like styles and make it inline */
  display: block;
  width: auto;
  max-width: none;
  padding: 12px 32px; /* comfortable horizontal spacing */
  /* ensure the form is placed below the fixed header */
  margin: 96px 0 0 32px; /* push below header */
  background: transparent;
  box-shadow: none;
  border: none;
}

.formulaire.topbar-form form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}

.formulaire.topbar-form input[type="text"] {
  flex: 1 1 420px;
  min-width: 200px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: white;
  font-size: 14px;
}

.formulaire.topbar-form select {
  flex: 0 0 120px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: white;
}

.formulaire.topbar-form button {
  flex: 0 0 120px;
  padding: 10px 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.formulaire.topbar-form button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .formulaire.topbar-form {
    margin-left: 16px;
    padding: 10px 16px;
  }
  .formulaire.topbar-form form {
    flex-wrap: wrap;
  }
  .formulaire.topbar-form input[type="text"] {
    min-width: 140px;
    flex-basis: 60%;
  }
  .formulaire.topbar-form select,
  .formulaire.topbar-form button {
    flex-basis: 35%;
  }
}

/* Topbar: title left, search on the right */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  z-index: 50;
  background: linear-gradient(180deg, rgba(15, 9, 1, 0.9), rgba(15, 9, 1, 0.6));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

@media (max-width: 768px) {
  input[type="text"],
  input[type="number"],
  input {
    font-size: 16px;
  }
  .logout-button {
    display: none;
  }
  .topbar {
    height: 60px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }

  .top-right,
  .user-bar,
  .header-right {
    display: none;
  }

  .top-left {
    width: 100%;
    text-align: center;
  }

  .title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 22px;
  }

  .version {
    margin-left: 8px;
    font-size: 12px;
  }

  .formulaire.topbar-form {
    margin-top: 70px;
    margin-bottom: 5px;
  }

  .trending-section {
    padding-top: 5px;
  }
}

.top-left .title {
  margin: 0;
  font-size: 28px;
  display: inline-flex;
  align-items: center;
}

.top-right .topbar-form {
  width: auto;
  /* allow more room on wide screens so the input can expand */
  max-width: 900px;
  padding: 8px 12px;
  background: transparent;
  box-shadow: none;
  border: none;
}

.header-right {
  display: flex;
  flex-direction: row;
}

/* uBlock Origin icon/button (top-right) */
.ublock {
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
}
.ublock a {
  display: inline-flex;
  align-items: center;
}
.ublock-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.ublock-icon:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}
@media (max-width: 600px) {
  .ublock-icon {
    width: 28px;
    height: 28px;
    padding: 4px;
  }
}

.topbar-form form {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Make the search text input expand to fill available space */
.topbar-form input[type="text"] {
  flex: 1 1 420px; /* grow, but start around 420px on wide screens */
  min-width: 220px;
  max-width: 100%;
}

/* Keep select and button compact */
.topbar-form select {
  flex: 0 0 130px;
}
.topbar-form button {
  flex: 0 0 130px;
}

.topbar-form input,
.topbar-form select {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: white;
}

.topbar-form button {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f0580c, #ffb547);
  border: none;
  cursor: pointer;
}

/* Main: center the player area */
.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#player-container {
  width: 80%;
  max-width: 1000px;
  height: 60vh;
  display: none;
}

#player {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Force the topbar form to be horizontal (override global form column layout) */
.topbar-form form {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
}

.topbar-form input,
.topbar-form select,
.topbar-form button {
  width: auto;
}

.formulaire input {
  padding: 15px 20px;
  border-radius: 8px;
  border: none;
  font-size: 16px;
  font-family: "Poppins", sans-serif;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.formulaire input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.formulaire input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.formulaire button {
  padding: 12px 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 15px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.formulaire button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.formulaire button:active {
  transform: translateY(0);
}

@media (max-width: 500px) {
  .title {
    font-size: 18px;
    text-align: left;
    margin: 0 8px;
  }

  .title {
    display: block;
  }

  .title .version {
    font-size: 12px;
    display: inline-block;
    margin-top: 8px;
    background: rgba(255, 165, 0, 0.12);
    padding: 3px 6px;
  }

  .formulaire {
    padding: 30px 20px;
    width: 90%;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
  }
  .topbar-form form {
    width: 100%;
  }
  .topbar-form input,
  .topbar-form select {
    width: 55%;
  }
  .topbar-form button {
    width: 40%;
  }
}

.search-container {
  margin-bottom: 20px;
}

input {
  width: 70%;
}
input,
select,
button {
  padding: 10px;
  margin: 5px;
  font-size: 16px;
}
#player-container {
  width: 100%;
  height: 600px;
  margin-top: 20px;
  display: none; /* Masqué par défaut */
}
#player {
  width: 100%;
  height: 100%;
  border: none;
}
.error {
  color: red;
  margin: 10px 0;
}
.result-info {
  margin: 10px 0;
  font-weight: bold;
}

/* Results gallery (poster grid) */
.results-list {
  display: grid;
  /* Garde une taille fixe pour les posters, même avec peu de résultats */
  grid-template-columns: repeat(auto-fill, minmax(180px, 180px));
  gap: 20px;
  align-items: start;
  justify-content: start; /* left-align grid when there are few items */
  margin-top: 20px;
  padding: 0 16px;
}

/* Ensure the results container uses the full page width (with comfortable side padding) */
#resultat {
  width: 100%;
  box-sizing: border-box;
  padding: 0 32px; /* keep posters away from edges */
}

/* Sections de résultats (Films, Séries, Acteurs) */
.search-results-section {
  margin-bottom: 40px;
}

.search-section-title {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin: 20px 0 10px 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 165, 0, 0.3);
}

.poster-card {
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.poster-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  transition: transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1),
    box-shadow 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
  will-change: transform;
}
.poster-card .meta {
  padding: 6px 4px 0 4px;
  text-align: left;
  overflow: hidden; /* ensure truncation works */
}
.poster-card .meta .title {
  display: block;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.1;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}
.poster-card .meta .year {
  font-size: 11px;
  color: #ffffff;
  opacity: 0.7;
  line-height: 1;
}

/* Hover zoom effect (only on devices that support hover) */
@media (hover: hover) and (pointer: fine) {
  .poster-card:hover {
    z-index: 6; /* lift above neighbors */
  }
  .poster-card:hover img {
    transform: scale(1.06);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .poster-card img {
    transition: none;
  }
}

/* Overlay to dim background when player active */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  z-index: 80;
}

.overlay.active {
  display: block;
}

/* Bring player to front when active */
#player-container {
  z-index: 90;
  position: relative;
}

#player-container.active {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 70vh;
  max-width: 1200px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);
  border-radius: 12px;
}

@media (max-width: 600px) {
  .poster-card img {
    height: 160px;
  }
  #player-container.active {
    width: 95%;
    height: 50vh;
  }
}

/* Player page specific styles */
.player-page {
  min-height: 100vh;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 20px;
}
.player-page .player-container {
  position: relative;
  /* Keep a cinematic 16:9 ratio and maximize screen usage */
  width: 100%;
  max-width: 100vw;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 0 auto;
}
.player-page iframe#player {
  width: 100%;
  height: 100%;
  border: none;
}
.player-page .back-button {
  position: fixed;
  left: 18px;
  top: 18px;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

/* Player selector tabs */
.player-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 0 20px;
}

.player-tab {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 12px 30px;
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.player-tab:hover {
  background: rgba(255, 165, 0, 0.2);
  border-color: rgba(255, 165, 0, 0.5);
  transform: translateY(-2px);
}

.player-tab.active {
  background: linear-gradient(135deg, #ff8c00, #ffa500);
  border-color: #ffa500;
  box-shadow: 0 4px 15px rgba(255, 165, 0, 0.4);
}

/* Cast button */
.cast-button {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 2000;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cast-button:hover {
  background: rgba(255, 165, 0, 0.2);
  border-color: rgba(255, 165, 0, 0.5);
  transform: translateY(-2px);
}

.cast-button.casting {
  background: linear-gradient(135deg, #ff8c00, #ffa500);
  border-color: #ffa500;
  box-shadow: 0 4px 15px rgba(255, 165, 0, 0.4);
}

.cast-icon {
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .player-selector {
    gap: 8px;
    margin-bottom: 15px;
  }

  .player-tab {
    padding: 10px 20px;
    font-size: 14px;
  }

  .cast-button {
    right: 10px;
    top: 10px;
    padding: 8px 12px;
    font-size: 12px;
  }

  .cast-icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 600px) {
  .player-page .back-button {
    left: 10px;
    top: 10px;
    padding: 6px 10px;
  }
}
/* Mobile: full width player */
@media (max-width: 420px) {
  .player-page {
    padding: 50px 0 0;
  }
  .player-page .player-container {
    width: 100vw;
    aspect-ratio: 16 / 9;
    padding: 0;
  }
}

/* Trending section styles */
.trending-section {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 32px 24px;
  color: white;
  margin-top: 10px;
}
.trending-section h2 {
  margin: 0 0 12px 0;
  font-size: 20px;
  color: #fff;
}
.trending-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.tab-button {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.tab-button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.tab-button.active {
  background: rgba(255, 255, 255, 0.95);
  color: #0f0901;
  border-color: rgba(255, 255, 255, 0.95);
}
.trending-grid {
  display: none;
  gap: 18px;
}
.trending-grid.active {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.trending-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  text-align: center;
}
.trending-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}
.trending-title {
  margin-top: 8px;
  font-weight: 600;
  font-size: 14px;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trending-rating {
  position: absolute;
  left: 8px;
  top: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
}

.watched-badge {
  position: absolute;
  right: 8px;
  top: 8px;
  background: linear-gradient(135deg, #ff6b00, #ffa500);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 165, 0, 0.4);
}

@media (max-width: 600px) {
  .trending-section {
    padding: 10px 12px 12px;
    margin-top: 0;
  }
  .trending-card img {
    height: 180px;
  }
  .trending-grid.active {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
  }
  .trending-title {
    font-size: 12px;
    padding: 8px 4px 4px;
  }
  .trending-rating {
    font-size: 11px;
    padding: 3px 6px;
  }
  .formulaire.topbar-form {
    margin: 50px 8px 0 8px;
    padding: 8px;
  }
  .formulaire.topbar-form form {
    flex-direction: column;
    gap: 8px;
  }
  .formulaire.topbar-form input[type="text"],
  .formulaire.topbar-form select,
  .formulaire.topbar-form button {
    width: 100%;
    flex: none;
  }
}

/* Supprimé car dupliqué et cause des conflits */

.trending-section h2 {
  color: #fff;
  margin-bottom: 15px;
  font-family: "Poppins", sans-serif;
}

.trending-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  display: none; /* Masqué par défaut */
}

.trending-grid.active {
  display: grid;
}

.trending-card {
  position: relative;
  cursor: pointer;
  transition: transform 0.3s;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 2/3;
}

.trending-card:hover {
  transform: scale(1.05);
}

.trending-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trending-card .trending-rating {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffa500;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.trending-card .trending-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  color: white;
  padding: 10px 5px 5px;
  font-size: 14px;
  font-family: "Poppins", sans-serif;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Styles spécifiques à la page player */

.player-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.back-button {
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
  font-size: 18px;
  margin-bottom: 20px;
  transition: color 0.3s;
}

.back-button:hover {
  color: #ffa500;
}

.back-button::before {
  content: "←";
  margin-right: 8px;
  font-size: 20px;
}

.player-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

#player {
  width: 100%;
  height: 450px;
  border: none;
}

.movie-info {
  margin-top: 20px;
  text-align: center;
}

.movie-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
}

.movie-meta {
  color: #aaa;
  font-size: 14px;
}

@media (max-width: 768px) {
  #player {
    height: 250px;
  }

  .results-list {
    grid-template-columns: repeat(auto-fill, minmax(120px, 120px));
    gap: 12px;
    padding: 0 8px;
    justify-content: center; /* Centre sur mobile si peu de résultats */
  }

  .poster-card {
    display: flex;
    flex-direction: column;
  }

  .poster-card img {
    aspect-ratio: 2/3;
  }

  .poster-card .meta {
    padding: 6px 3px 0 3px;
    text-align: left;
  }

  .poster-card .meta .title {
    font-size: 12px;
  }

  .poster-card .meta .year {
    font-size: 10px;
  }

  .player-page {
    padding: 10px;
  }

  .movie-title {
    font-size: 20px;
  }

  .movie-meta {
    font-size: 12px;
  }
}

/* ===== STYLES POUR LA BARRE UTILISATEUR ET DÉCONNEXION ===== */
/* Conteneur utilisateur (à côté de la barre de recherche) */
.user-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 16px;
  position: relative;
}

/* Style pour l'email utilisateur */
/* Avatar utilisateur avec initiale */
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  position: relative;
}

.user-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Dropdown menu glassmorphism */
.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background: rgba(15, 9, 1, 0.85);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3000;
  overflow: hidden;
}

.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.dropdown-item:active {
  background: rgba(255, 255, 255, 0.2);
}

.dropdown-icon {
  font-size: 16px;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 4px 0;
}

.logout-item {
  color: #ff6b6b;
}

.logout-item:hover {
  background: rgba(220, 53, 69, 0.2);
}

.user-bar {
  position: relative;
}

/* Ancien style email - gardé pour compatibilité */
.user-email {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

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

/* Bouton de déconnexion - style glassmorphism */
.logout-button {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Poppins", sans-serif;
  letter-spacing: 0.3px;
}

/* Effet hover rouge pour le bouton */
.logout-button:hover {
  background: rgba(220, 53, 69, 0.3);
  border-color: rgba(220, 53, 69, 0.5);
  color: #ff6b6b;
  transform: translateY(-1px);
}

/* Effet clic */
.logout-button:active {
  transform: translateY(0);
}

/* ===== ADAPTATION RESPONSIVE ===== */
/* Pour les écrans moyens (tablettes) */
@media (max-width: 900px) {
  .user-bar {
    margin-left: 10px;
  }

  .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .user-email {
    max-width: 120px;
    font-size: 13px;
    padding: 4px 8px;
  }

  .logout-button {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* Pour mobile - passe en mode compact */
@media (max-width: 600px) {
  .topbar {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
  }

  .top-left {
    order: 1;
    width: auto;
    text-align: left;
    flex-shrink: 1;
  }

  .top-right {
    display: flex !important;
    order: 2;
    flex-direction: row;
    justify-content: flex-end;
    width: auto;
    margin: 0;
    flex-shrink: 0;
  }

  .header-right {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    gap: 0;
  }

  .user-bar {
    margin: 0;
  }

  .ublock {
    display: none; /* Cache le bouton uBlock sur mobile */
  }

  .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .user-dropdown {
    min-width: 180px;
    right: 0;
    top: calc(100% + 8px);
  }

  .dropdown-item {
    padding: 10px 14px;
    font-size: 13px;
  }

  .user-email {
    display: none; /* Cache l'email sur mobile */
  }

  .logout-button {
    display: none; /* Cache l'ancien bouton de déconnexion sur mobile */
  }

  .title {
    font-size: 22px;
  }

  .version {
    font-size: 10px;
    padding: 2px 4px;
  }
}

/* Pour très petits écrans */
@media (max-width: 500px) {
  .topbar {
    padding: 8px 12px;
  }

  .top-left {
    width: 100%;
    text-align: center;
  }

  .top-right {
    display: none;
  }

  .header-right {
    display: none;
  }

  .user-avatar {
    display: none;
  }

  .user-dropdown {
    min-width: 160px;
    right: -5px;
  }

  .dropdown-item {
    padding: 9px 12px;
    font-size: 12px;
    gap: 10px;
  }

  .title {
    font-size: 18px;
  }

  .version {
    font-size: 9px;
    padding: 1px 3px;
  }

  .user-email {
    display: none; /* Masquer l'email si vraiment trop petit */
  }

  .logout-button {
    display: none;
  }
}

/* ===== TABBAR MOBILE ===== */
.mobile-tabbar {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(15, 9, 1, 0.85);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    padding: 12px 8px;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
                0 0 0 1px rgba(255, 255, 255, 0.05);
}

.tabbar-nav {
    display: flex;
    width: 100%;
    justify-content: space-around;
    align-items: center;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    min-width: 70px;
    position: relative;
}

.tab-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.tab-item.active {
    background: rgba(255, 165, 0, 0.2);
}

.tab-icon {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
    filter: brightness(0) invert(1);
}

.tab-item.active .tab-icon {
    filter: brightness(0) saturate(100%) invert(58%) sepia(85%) saturate(1500%) hue-rotate(360deg) brightness(103%) contrast(101%);
    transform: scale(1.1);
}

.tab-label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    text-align: center;
}

.tab-item.active .tab-label {
    color: #ffa500;
    font-weight: 600;
}

/* Ajuste le padding bottom pour mobile avec tabbar */
@media (max-width: 768px) {
    .mobile-tabbar {
        display: flex;
    }
    
    body {
        padding-bottom: 100px;
    }
    
    .trending-section:last-child {
        margin-bottom: 30px;
    }
}

/* ===== ANIMATIONS SUPPLÉMENTAIRES ===== */
/* Animation douce pour l'apparition */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-bar {
  animation: fadeIn 0.3s ease-out forwards;
}

.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 2;
}

.progress {
  height: 100%;
  background: #ffa500;
  transition: width 0.3s ease;
}

.continue-watching-section {
  width: 100%;
  padding: 20px 32px;
  margin-bottom: 30px;
  margin-top: 20px;
}

.continue-watching-section h2 {
  color: #fff;
  font-size: 20px;
  margin-bottom: 15px;
  font-family: "Poppins", sans-serif;
}

.continue-watching-grid {
  display: none;
  gap: 15px;
}

.continue-watching-grid.active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.continue-watching-grid .trending-card {
  position: relative;
  cursor: pointer;
  transition: transform 0.3s;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 2/3;
}

.continue-watching-grid .trending-card:hover {
  transform: scale(1.05);
}

.continue-watching-grid .trending-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.continue-watching-grid .trending-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.8) 50%,
    transparent 100%
  );
  color: white;
  padding: 30px 8px 8px;
  font-size: 14px;
  font-family: "Poppins", sans-serif;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.continue-watching-grid .progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(51, 51, 51, 0.8);
  overflow: hidden;
  z-index: 5;
  transition: height 0.2s ease;
}

.continue-watching-grid .trending-card:hover .progress-bar {
  height: 6px;
}

.continue-watching-grid .progress {
  height: 100%;
  background: #ffa500;
  transition: width 0.3s ease;
}

.empty-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  font-family: "Poppins", sans-serif;
}

.continue-watching-grid .progress-text {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 11px;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  z-index: 6;
}

.continue-watching-grid .remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
  padding: 0;
  line-height: 1;
}

.continue-watching-grid .trending-card:hover .remove-btn {
  opacity: 1;
}

.continue-watching-grid .remove-btn:hover {
  background: rgba(220, 53, 69, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

.continue-watching-grid .remove-btn:active {
  transform: scale(0.95);
}

@media (max-width: 600px) {
  .continue-watching-section {
    padding: 10px 12px 12px;
    margin-bottom: 20px;
    margin-top: 0;
  }

  .continue-watching-section h2 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .continue-watching-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }

  .continue-watching-grid .trending-card {
    aspect-ratio: 2/3;
  }

  .continue-watching-grid .trending-card img {
    height: 100%;
    object-fit: cover;
  }

  .continue-watching-grid .trending-title {
    font-size: 12px;
    padding: 25px 6px 6px;
  }

  .continue-watching-grid .progress-text {
    font-size: 10px;
    bottom: 5px;
    right: 6px;
  }

  .continue-watching-grid .remove-btn {
    opacity: 1;
    width: 24px;
    height: 24px;
    font-size: 18px;
    top: 6px;
    right: 6px;
  }
}

/* ===== MODAL POUR LES DÉTAILS DU MÉDIA ===== */
.media-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
}

.media-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0901 100%);
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: modalSlideIn 0.3s ease-out;
  overflow: hidden;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(20px);
  opacity: 0.8;
  z-index: 0;
}

.modal-backdrop::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 26, 26, 0.85) 0%,
    rgba(15, 9, 1, 0.85) 100%
  );
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
}

.modal-save-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b00, #ffa500);
  color: white;
  border: none;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
}

.modal-save-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 165, 0, 0.5);
}

.modal-close:hover {
  background: rgba(220, 53, 69, 0.8);
  transform: scale(1.1);
}

.modal-body {
  display: flex;
  gap: 30px;
  padding: 30px;
  position: relative;
  z-index: 1;
  overflow-y: auto;
  max-height: 90vh;
}

.modal-poster {
  flex-shrink: 0;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
}

.modal-poster > div:first-child {
  position: relative;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
}

.modal-poster img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
}

/* Container pour le poster avec effet hover */
.modal-poster > div:first-child::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

/* Icône play au centre */
.modal-poster > div:first-child::after {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  font-size: 60px;
  color: white;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.modal-poster > div:first-child:hover::before {
  opacity: 1;
}

.modal-poster > div:first-child:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.modal-poster > div:first-child:hover img {
  transform: scale(1.02);
  box-shadow: 0 15px 40px rgba(255, 165, 0, 0.3);
}

.modal-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: white;
}

.modal-info h2 {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.modal-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.modal-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Section de notation utilisateur */
.user-rating-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rating-label {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.star-rating {
  display: flex;
  gap: 8px;
  cursor: pointer;
}

.star {
  position: relative;
  width: 28px;
  height: 28px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.star:hover {
  transform: scale(1.15);
}

.star img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.2s ease;
  filter: brightness(0) saturate(100%) invert(58%) sepia(85%) saturate(1500%)
    hue-rotate(360deg) brightness(103%) contrast(101%);
}

.star .star-empty {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(58%) sepia(85%) saturate(1500%)
    hue-rotate(360deg) brightness(103%) contrast(101%) opacity(0.4);
}

.star .star-filled {
  opacity: 0;
}

.star.active .star-empty {
  opacity: 0;
}

.star.active .star-filled {
  opacity: 1;
}

.star.hover .star-empty {
  opacity: 0;
}

.star.hover .star-filled {
  opacity: 1;
}

.modal-credits {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.credit-item {
  line-height: 1.5;
}

.credit-item strong {
  color: #ffa500;
  font-weight: 600;
}

.clickable-name {
  cursor: pointer;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.clickable-name:hover {
  color: #ffa500;
  text-decoration-style: solid;
}

.modal-info p {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.cast-section {
  margin-top: 20px;
}

.cast-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: #ffa500;
  margin: 0 0 15px 0;
}

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

.actor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease;
}

.actor-card:hover {
  transform: translateY(-5px);
}

.actor-card img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 165, 0, 0.3);
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.actor-card:hover img {
  border-color: #ffa500;
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 165, 0, 0.4);
}

.actor-name {
  font-size: 13px;
  font-weight: 600;
  color: white;
  margin-bottom: 3px;
}

.actor-character {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

/* Barre de progression dans le bouton play de la modale */
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: #0f0901;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Poppins", sans-serif;
  width: 100%;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.play-button::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, #ff6b00, #ffa500);
  transition: width 0.3s ease;
  border-radius: 0 0 0 6px;
}

.play-button:hover {
  background: white;
  transform: scale(1.02);
}

.play-button:active {
  transform: scale(0.98);
}

.play-icon {
  font-size: 14px;
}

/* Bouton watchlist */
.watchlist-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Poppins", sans-serif;
  width: 100%;
  margin-top: 8px;
}

.watchlist-button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffa500;
  transform: scale(1.02);
}

.watchlist-button:active {
  transform: scale(0.98);
}

.watchlist-button.in-list {
  background: rgba(255, 165, 0, 0.2);
  border-color: #ffa500;
  color: #ffa500;
}

.watchlist-button.in-list:hover {
  background: rgba(255, 165, 0, 0.3);
}

.watchlist-icon {
  font-size: 18px;
  font-weight: 700;
}

/* Bouton "Marquer comme vu" */
.watched-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Poppins", sans-serif;
  width: 100%;
  margin-top: 8px;
}

.watched-button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffa500;
  transform: scale(1.02);
}

.watched-button:active {
  transform: scale(0.98);
}

.watched-button.is-watched {
  background: linear-gradient(135deg, #ff6b00, #ffa500);
  border-color: #ffa500;
  color: white;
  font-weight: 600;
}

.watched-button.is-watched:hover {
  background: linear-gradient(135deg, #ffa500, #ff6b00);
  box-shadow: 0 4px 15px rgba(255, 165, 0, 0.4);
}

.watched-icon {
  font-size: 18px;
  font-weight: 700;
}

/* Info de fin de visionnage */
.end-time-info {
  text-align: right;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
  font-weight: 400;
}

/* Modal de profil */
.profile-modal-content {
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.profile-modal-body {
  position: relative;
  z-index: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.profile-title {
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin-bottom: 30px;
  text-align: center;
}

.profile-section {
  margin-bottom: 30px;
}

.profile-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: #ffa500;
  margin-bottom: 15px;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

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

.form-group input:focus {
  outline: none;
  border-color: #ffa500;
  background: rgba(255, 255, 255, 0.08);
}

.form-group input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Sélecteur de couleur d'avatar */
.avatar-color-selector {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 300px;
}

.color-option {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s ease;
}

.color-option:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
}

.color-option.active {
  border-color: #ffa500;
  box-shadow: 0 0 20px rgba(255, 165, 0, 0.5);
}

/* Statistiques du profil */
.profile-stats {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.stat-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  color: #ffa500;
}

/* Anciens boutons d'action du profil - non utilisés */
/*
.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
}

.btn-save, .btn-cancel {
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
}

.btn-save {
    background: linear-gradient(135deg, #ff6b00, #ffa500);
    color: white;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 165, 0, 0.4);
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}
*/

/* Menu contextuel */
.context-menu {
  position: fixed;
  background: rgba(20, 20, 20, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  z-index: 10000;
  min-width: 220px;
  padding: 8px;
  animation: contextMenuFadeIn 0.15s ease-out;
}

@keyframes contextMenuFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-family: "Poppins", sans-serif;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.context-menu-item:hover {
  background: rgba(255, 165, 0, 0.2);
  color: #ffa500;
}

.context-menu-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.context-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

/* Responsive pour la modale */
@media (max-width: 768px) {
  .media-modal {
    padding: 10px;
    align-items: flex-start;
  }

  .modal-content {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 12px;
    margin-top: 10px;
  }

  .modal-body {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
  }

  .modal-poster {
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
  }

  .modal-poster .play-button {
    padding: 12px 24px;
    font-size: 16px;
  }

  .modal-info h2 {
    font-size: 24px;
  }

  .modal-info p {
    font-size: 14px;
  }

  .user-rating-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 12px 0;
    padding: 10px 0;
  }

  .star {
    width: 24px;
    height: 24px;
  }

  .star-rating {
    gap: 6px;
  }

  .cast-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .cast-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .actor-card img {
    width: 80px;
    height: 80px;
  }

  .actor-name {
    font-size: 12px;
  }

  .actor-character {
    font-size: 10px;
  }

  .modal-close {
    width: 32px;
    height: 32px;
    font-size: 20px;
    top: 12px;
    left: 12px;
  }

  .modal-save-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
    top: 12px;
    right: 12px;
  }

  /* Profil responsive */
  .profile-modal-content {
    max-width: 100%;
  }

  .profile-modal-body {
    padding: 20px;
  }

  .profile-title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .profile-section {
    margin-bottom: 20px;
  }

  .profile-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .avatar-preview {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }

  .color-options {
    max-width: 100%;
    grid-template-columns: repeat(4, 50px);
    justify-content: center;
  }

  .color-option {
    width: 50px;
    height: 50px;
  }

  .stat-item {
    padding: 12px 15px;
  }

  .stat-label {
    font-size: 14px;
  }

  .stat-number {
    font-size: 24px;
  }

  .profile-actions {
    margin-top: 20px;
  }
}
