html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #141414;
  color: #fff;
  /* overflow-y: hidden; */
}

/* =========================
   Left Menu (fixed)
   ========================= */
#leftMenu {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background-color: #141414;
  border-right: 1px solid #333;
  box-sizing: border-box;
  padding: 1rem;
  overflow-y: auto;
  z-index: 10;
}

#logoContainer {
  text-align: center;
  margin-bottom: 1rem;
}

#mainLogo {
  cursor: pointer;
  width: 8.5vw;
  transform: translateX(-1rem);
  display: block;
  margin: 0 auto;
}

#leftMenu h3 {
  margin: 1rem 0 0.5rem 0;
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 1.1rem;
}

#sessionList {
  list-style-type: none;
  padding: 0;
  margin: 0;
  word-wrap: break-word;
  /* max-height: calc(100vh - 250px); */
  overflow-y: auto;
}

#sessionList li {
  padding: 0.5rem;
  margin: 0.25rem 0;
  background-color: #333;
  border-radius: 4px;
  cursor: pointer;
  /* display: inline-block; */
  transition: background-color 0.2s ease;
  overflow-x: hidden;
  /* NEW: Add flex for icon alignment */
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#sessionList li:hover {
  background-color: #444;
}

.session-author {
  font-style: italic;
  font-size: 0.9em;
  opacity: 0.6;
}

#browseLink {
  display: block;
  margin: 1rem 0;
  padding: 0.75rem;
  background-color: #333;
  text-decoration: none;
  color: #fff;
  text-align: center;
  border-radius: 4px;
}
#browseLink:hover {
  background-color: #444;
}

/* Logout button (desktop) */
#logoutBtn {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  padding: 0.75rem;
  background-color: #e50914;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
#logoutBtn:hover {
  background-color: #f40612;
}

/* Feedback container (desktop) */
#feedbackContainer {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 4.5rem;
  border: 1px solid #333;
  padding: 0.5rem;
  border-radius: 4px;
  background-color: #222;
}
#feedbackList {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem 0;
  max-height: 20vh;
  overflow-y: auto;
  word-wrap: break-word;
}
#feedbackList li {
  padding: 0.25rem;
  margin: 0.25rem 0;
  background-color: #333;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}
#feedbackList li:hover {
  background-color: #444;
}
#feedbackInput {
  width: 90%;
  resize: none;
  border: 1px solid #444;
  background-color: #141414;
  color: #fff;
  border-radius: 4px;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
}
#feedbackSubmitBtn {
  display: block;
  width: 100%;
  padding: 0.5rem;
  background-color: #e50914;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
#feedbackSubmitBtn:hover {
  background-color: #f40612;
}

/* =========================
   Main Container (scrollable area)
   ========================= */
#mainContainer {
  position: relative;
  margin-left: 220px;
  height: 100vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding-top: 1rem;
  padding-left: 1rem;
}

/* Browse header */
#browseHeader, #watchedHeader {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  background-color: #141414;
  padding: 1rem;
  border-bottom: 1px solid #333;
  position: sticky;
  top: -1rem;
  z-index: 5;
}

#browseLogoContainer, #watchedHeader {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-right: 1rem;
}
#browseLogoContainer h1, #watchedHeader h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}
#browseControls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

#browseControls select {
  background-color: #141414;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
#browseControls select:hover {
  background-color: #e50914;
}
#searchBar {
  background-color: #141414;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.5rem;
  flex: 1;
  outline: none;
  flex: 1 1 0;
  min-width: 150px;
}

/* =========================
   Media Player
   ========================= */
#playerContainer {
  display: flex;
  gap: 2rem;
  width: 100%;
  margin-top: 1rem;
  align-items: stretch;
}
#videoContainer {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

#videoPlayer {
  max-width: 100%;
  box-sizing: border-box;
}

/* Viewer count styles */
#viewerCount {
  position: absolute;
  right: 0;
  margin: 0; /* remove the top margin so it doesn't push content down */
  background-color: rgba(0, 0, 0, 0.7);
  padding: 5px 10px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  z-index: 5;
  width: fit-content;
}


#viewerCount svg {
  width: 16px;
  height: 16px;
}

#viewersList {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: rgba(0, 0, 0, 0.9);
  border: 1px solid #444;
  border-radius: 4px;
  padding: 10px;
  min-width: 150px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 5;
  margin-bottom: 5px;
  cursor: default;
}

#viewersList.show {
  display: block;
}

.viewer-item {
  padding: 5px;
  border-bottom: 1px solid #333;
  color: #fff;
  cursor: default;
}

.viewer-item:last-child {
  border-bottom: none;
}

/* =========================
   Modal for selecting torrent
   ========================= */
.modal {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 220px;
  width: calc(100% - 220px);
  height: 100%;
  background-color: rgba(0,0,0,0.75);
  display: none;
  justify-content: center;
  align-items: center;
}
.modal-content {
  background: #222;
  padding: 1.5rem;
  border-radius: 8px;
  width: 600px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.close-button {
  position: absolute;
  top: 8px;
  right: 16px;
  font-size: 2rem;
  cursor: pointer;
  color: #fff;
  opacity: 0.8;
}
.close-button:hover {
  opacity: 1;
}

/* =========================
   The movie grid
   ========================= */
#movieGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  padding: 1rem;
  position: relative;
}
  
.movie-card {
  background-color: #222;
  border-radius: 4px;
  text-align: center;
  transition: transform 0.3s ease;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.movie-card:hover:not(.expanded) {
  transform: scale(1.03);
}
.movie-card.expanded {
  z-index: 100;
}
.expanded-content {
  visibility: hidden;
  position: absolute;
  top: 100%;
  left: 0;
  width: 300px;
  background-color: #222;
  opacity: 0;
  transform-origin: top;
  transform: scaleY(0);
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  border-radius: 0 0 4px 4px;
}
.movie-card.expanded .expanded-content {
  visibility: visible;
  opacity: 1;
  transform: scaleY(1);
  padding: 1rem;
}
.movie-card.expanded-left .expanded-content {
  left: auto;
  right: 0;
}
.expanded-content p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: #fff;
}
.expanded-content .label {
  color: #999;
  font-weight: bold;
  margin-right: 0.5rem;
}
  
.movie-poster {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}
  
.movie-info {
  padding: 0.5rem;
  font-size: 0.9rem;
  text-align: left;
  height: 110px; /* Define a fixed height for the info area */
  display: flex; /* Use flexbox */
  flex-direction: column; /* Stack children vertically */
  justify-content: center; /* Center the content vertically */
}

.movie-info-text {
  flex-grow: 1; /* Allow this container to grow */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center text within this inner container */
  overflow: hidden; /* Hide any overflow if content is still too large */
}
  
.movie-title {
  font-weight: bold;
  margin-bottom: 0.25rem;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
  
.movie-meta {
  font-size: 0.8rem;
  color: #bbb;
}
#torrentListContainer {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 1rem;
  border: 1px solid #444;
  padding: 0.5rem;
}
#torrentList {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
#torrentList li {
  padding: 0.5rem;
  margin: 0.25rem 0;
  background-color: #333;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
#torrentList li:hover {
  background-color: #444;
}
#startStreamBtn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 3px;
  background-color: #e50914;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
  /* NEW: Add margin-top */
  margin-top: 1rem;
}
#startStreamBtn:hover {
  background-color: #f40612;
}

/* =========================
   Controls (player)
   ========================= */
#controls {
  margin-top: 1rem;
}
#controls button {
  margin-right: 1rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 3px;
  background-color: #333;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
#controls button:hover {
  background-color: #444;
}
.hidden {
  display: none !important;
}

/* =========================
   Live Chat
   ========================= */
#liveChat {
  width: 300px;
  background-color: #1f1f1f;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 0.5rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  margin-right: 1rem;
  min-height: 400px;
}
#liveChat h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  text-align: center;
}
#chatMessages {
  flex: 1;
  overflow-y: auto;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.5rem;
  background-color: #222;
  word-wrap: break-word;
}
.chat-message {
  margin-bottom: 0.5rem;
  padding: 0.25rem;
  margin: 0.25rem 0;
  background-color: #333;
  border-radius: 4px;
  font-size: 0.9rem;
  position: relative;
  word-wrap: break-word;
}
.chat-user {
  font-weight: bold;
  margin-right: 0.5rem;
}
.chat-time {
  position: absolute;
  right: 17px;
  top: 4px;
  font-size: 0.8rem;
  color: #999;
  width: 50px;
  text-align: right;
  white-space: nowrap;
  word-wrap: break-word;
}

#chatInputContainer {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
#chatInput {
  flex: 1;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.5rem;
  background-color: #141414;
  color: #fff;
  resize: vertical;
  overflow-wrap: break-word;
}
#chatSendBtn {
  padding: 0.5rem 0.75rem;
  background-color: #e50914;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: #fff;
}
#chatSendBtn:hover {
  background-color: #f40612;
}

/* =========================
   Subtitle Search Section
   ========================= */
#subtitleSearchContainer {
  margin-bottom: 1rem;
}
#subtitleSearchInput {
  width: 70%;
  padding: 0.5rem;
  border: 1px solid #444;
  border-radius: 4px;
  background-color: #141414;
  color: #fff;
}
#subtitleSearchBtn {
  padding: 0.5rem 0.75rem;
  background-color: #e50914;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: #fff;
}
#subtitleSearchBtn:hover {
  background-color: #f40612;
}
#subtitleResults {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background-color: #222;
  border: 1px solid #444;
  border-radius: 4px;
  max-height: 150px;
  overflow-y: auto;
}

/* =========================
   Session Header (for active session title)
   ========================= */
#sessionHeader {
  display: flex;
  align-items: center;
  background-color: #141414;
  padding: 1rem;
  border-bottom: 1px solid #333;
  position: sticky;
  top: -1.3vh;
  z-index: 5;
}
#sessionHeader h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
}

/* =========================
   Mobile Adjustments (max-width: 1200px)
   ========================= */
@media only screen and (max-width: 1200px) {
  #browseControls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    align-items: center;
  }
  #searchBar {
    grid-column: 1 / -1;
  }
  #mainLogo {
    cursor: pointer;
    width: 9vh;
    display: block;
    margin: 0 auto;
  }
  #main-content {
    margin-right: 0;
    display: flex;
    flex-direction: column;
    padding: 1rem;
  }
  #main-content.hidden {
    display: none !important;
  }
  
  #playerContainer {
    flex-direction: column;
  }
  #videoContainer {
    width: 100%;
    margin-top: 1rem;
    margin-left: 1rem;
  }
  #liveChat {
    width: 100%;
    height: 30vh;
    margin-top: 1rem;
    margin-left: 1rem;
    position: relative;
  }
  #leftMenu {
    width: 180px;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }
  #mainContainer {
    margin-left: 180px;
    padding-left: 1rem;
  }
  #feedbackContainer {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 22rem;
  }
  #logoutBtn {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 18rem;
    display: block;
  }
  #onlineUsers { 
    margin-left: -4vw;
  }
}

/* =========================
   Online Users Container (new)
   ========================= */
#onlineUsers {
  position: fixed;
  bottom: 0;
  left: 220px;
  right: 0;
  background-color: #141414;
  border-top: 1px solid #333;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
  z-index: 10;
}

/* =========================
   Anime Rating Tag styling
   ========================= */
.anime-rating-tag {
   background-color: #444;
   color: #fff;
   padding: 2px 4px;
   border-radius: 4px;
   font-size: 0.8rem;
   margin-top: 4px;
   display: inline-block;
}

/* Make the modal content use flex layout */
#announcementModalContent {
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  overflow: hidden;
}

/* Make the announcement text container scrollable */
#announcementList {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 10px;
}

/* Subtitle Search Modal Styles */
#subtitleLanguages {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.subtitle-lang-btn {
  padding: 10px 20px;
  background-color: #333;
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.subtitle-lang-btn:hover {
  background-color: #e50914;
}

#subtitleSearchResults {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 10px;
}

.subtitle-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #333;
  border-radius: 4px;
  margin-bottom: 10px;
}

.subtitle-info {
  flex: 1;
}

.subtitle-name {
  font-weight: bold;
  margin-bottom: 5px;
}

.subtitle-downloads {
  font-size: 0.9em;
  color: #999;
}

.use-subtitle-btn {
  padding: 5px 15px;
  background-color: #e50914;
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  margin-left: 10px;
  transition: background-color 0.2s ease;
}

.use-subtitle-btn:hover {
  background-color: #f40612;
}

/* Loading indicator for subtitle search */
.loading {
  text-align: center;
  padding: 20px;
  color: #999;
}

.error-message {
  color: #e50914;
  text-align: center;
  padding: 20px;
}

/* Ensure each subtitle result is a flex container */
.subtitle-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 10px;
  background-color: #333;
  border-radius: 4px;
  margin-bottom: 10px;
}

/* Group the left-side elements (subtitle info and match labels) */
.subtitle-result .left-side {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Ensure the subtitle info does not overflow */
.subtitle-info {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Style the match label container */
.match-label {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  white-space: nowrap;
}

/* Style the match percentage */
.match-percentage {
  padding: 2px 4px;
  border: 1px solid white;
  border-radius: 4px;
  color: white;
}

/* Style the best match label */
.best-match {
  padding: 2px 4px;
  border: 1px solid yellow;
  border-radius: 4px;
  color: yellow;
}

/* Force the use-subtitle button to always be on the right */
.use-subtitle-btn {
  margin-left: auto;
  padding: 15px 25px;
}

/* =========================
   NEW: Previously Watched Styles
   ========================= */
#watchedGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.watched-card {
  background-color: #222;
  border-radius: 4px;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.watched-card:hover {
  transform: scale(1.03);
}

.watched-card .movie-poster {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.watched-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
  padding: 1rem 0.5rem 0.5rem 0.5rem;
  color: white;
  text-align: left;
}

.watched-card-title {
  font-weight: bold;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}

.rating-container {
  margin-top: 5px;
}

.avg-rating {
  font-size: 0.8rem;
  color: #ccc;
}

/* --- MODIFIED: Star Rating Styles for Half-Stars --- */
.stars {
  cursor: pointer;
  display: inline-block;
}

.star {
  font-size: 1.5rem;
  color: #555; /* Empty star color */
  transition: color 0.2s;
  display: inline-block;
  position: relative;
  /* Use the ★ character directly in the HTML now */
}

.star.filled {
  color: #f5c518;
}

.star.half::before {
  content: '★';
  color: #f5c518;
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  overflow: hidden;
}


/* Find the rating classes and replace them with these */
.user-rating-on-card,
.pairflix-rating-on-card {
  font-size: 0.75rem; /* Make the rating font slightly smaller by default */
  margin-top: 3px; /* Reduce margin slightly */
  line-height: 1.2; /* Control line height for consistency */
  white-space: nowrap; /* Prevent rating text from wrapping to a new line */
  overflow: hidden; /* Hide overflow with ellipsis */
  text-overflow: ellipsis;
}

.user-rating-on-card {
  color: #f5c518;
  font-weight: bold;
}

.pairflix-rating-on-card {
  color: #ccc;
}

/* Add these styles to the end of public/style.css */

.expanded-content p {
  margin: 0.4rem 0; /* Adjust spacing */
  font-size: 0.9rem;
  color: #fff;
  line-height: 1.4;
}

.expanded-content .label {
  color: #999;
  font-weight: bold;
  margin-right: 0.5rem;
}

.expanded-content .overview-text {
  /* Allow overview to wrap */
  white-space: normal;
  max-height: 100px; /* Limit height */
  overflow-y: auto; /* Allow scrolling if too long */
}

.loading-details {
  color: #ccc;
  text-align: center;
  padding: 2rem;
}

.loading-details.error {
  color: #e50914;
}

/* Add this to the end of public/style.css */

/* --- Custom Scrollbar Styling --- */

/* Works on Chrome, Edge, and Safari */
::-webkit-scrollbar {
  width: 8px;  /* Width of the entire scrollbar */
  height: 8px; /* Height of the horizontal scrollbar */
}

::-webkit-scrollbar-track {
  background: transparent; /* Make the track invisible */
}

::-webkit-scrollbar-thumb {
  background-color: #222;    /* The color of the scrollbar handle (a dark gray) */
  border-radius: 10px;       /* Fully rounded edges */
  border: 2px solid #141414; /* Creates padding and matches the app background color */
}

::-webkit-scrollbar-thumb:hover {
  background-color: #333; /* Slightly lighter gray on hover */
}

/* Works on Firefox */
* {
  scrollbar-width: thin;          /* "thin" or "auto" */
  scrollbar-color: #222 #141414;  /* thumb and track color */
}

/* Add these styles to the end of public/style.css */

/* --- Trailer Button on Expanded Card --- */
.watch-trailer-btn {
  background-color: #fff;
  color: #141414;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  margin-top: 10px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s ease;
  font-size: 0.9rem;
}

.watch-trailer-btn:hover {
  background-color: #ccc;
}

/* Find and REPLACE the existing trailer styles at the end of public/style.css */

/* --- Trailer Modal Styling --- */
.trailer-modal {
  background-color: rgba(0, 0, 0, 0.85);
}

.trailer-modal .trailer-modal-content {
  background: #222;
  /* INCREASED PADDING: This creates the frame/space around the video */
  padding: 24px; 
  border-radius: 8px;
  width: 90%;
  max-width: 960px;
  position: relative;
  display: block; 
  overflow: visible;
}

.trailer-modal .close-button {
  position: absolute;
  /* ADJUSTED POSITION: Position relative to the new, larger padding */
  top: 12px;      
  right: 12px;   
  font-size: 2.5rem;
  color: #fff;
  background-color: transparent;
  border-radius: 0;
  width: auto;
  height: auto;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  z-index: 10;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.trailer-modal .close-button:hover {
  opacity: 1;
}

/* 16:9 Aspect Ratio Container for YouTube Embed (This rule remains the same) */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 4px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 98%;
  height: 98%;
  border: 0;
}

/* Add this to the end of public/style.css */

/* --- Pinned Feedback Styling --- */
.pinned-feedback {
  background-color: #4a4115 !important; /* A distinct gold/yellowish background */
  border: 1px solid #f5c518;
  position: relative;
  padding-left: 20px !important; /* Add space for the pin icon */
}

.pinned-feedback::before {
  content: '📌'; /* Pin emoji */
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
}

/* --- Magnet Link Modal --- */
#magnetLinkFileListContainer {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 1rem;
  border: 1px solid #444;
  padding: 0.5rem;
  max-height: 150px; /* Limit height */
}

#magnetLinkFileList {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

#magnetLinkFileList li {
  padding: 0.75rem 0.5rem;
  margin: 0.25rem 0;
  background-color: #333;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-left: 4px solid transparent;
}

#magnetLinkFileList li:hover {
  background-color: #444;
}

#magnetLinkFileList li.selected {
  background-color: #555;
  border-left: 4px solid #e50914;
}

#magnetLinkFileList li span {
  font-size: 0.8rem;
  color: #bbb;
}

/* --- NEW STYLES for Magnet Modal Movie Search --- */
#magnetLinkModal label {
  display: block;
  margin: 0.75rem 0 0.25rem 0;
  font-size: 0.9rem;
  color: #ccc;
}

#magnetLinkMovieSearch {
  width: 95%;
  padding: 0.5rem;
  border: 1px solid #444;
  border-radius: 4px;
  background-color: #141414;
  color: #fff;
}

#magnetLinkMovieResults {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #444;
  border-radius: 4px;
  margin-top: 0.5rem;
}

#magnetLinkMovieResults li {
  list-style: none;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

#magnetLinkMovieResults li:hover, #magnetLinkMovieResults li.selected {
  background-color: #444;
}

#magnetLinkMovieResults img {
  width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: 2px;
}

#magnetLinkSelectedMovie {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background-color: #333;
  border-radius: 4px;
  font-weight: bold;
  color: #f5c518; /* Gold color for emphasis */
}

/* --- Button Styling for Magnet Modal --- */
#startMagnetStreamBtn {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 3px;
  background-color: #e50914;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

#startMagnetStreamBtn:hover:not(:disabled) {
  background-color: #f40612;
}

#startMagnetStreamBtn:disabled {
  background-color: #555;
  cursor: not-allowed;
  opacity: 0.7;
}

/* --- NEW: Admin Panel --- */
#adminPanelTrigger {
  display: block; /* Will be overridden by JS */
  width: 100%; /* Fill the width like other buttons */
  margin: 1rem 0;
  padding: 0.75rem;
  background-color: #333;
  text-decoration: none;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  border: none; /* Buttons have borders by default */
  font-size: 1rem; /* Match other buttons */
}
#adminPanelTrigger:hover {
  background-color: #444;
}

.admin-modal-content {
  width: 80%;
  max-width: 1000px;
  height: 80vh;
}

.admin-tabs {
  display: flex;
  border-bottom: 1px solid #444;
  margin-bottom: 1rem;
}

.admin-tab-link {
  background: none;
  border: none;
  color: #999;
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-size: 1rem;
  border-bottom: 3px solid transparent;
}

.admin-tab-link.active {
  color: #fff;
  border-bottom-color: #e50914;
}

.admin-tab-content {
  display: none;
  flex: 1; /* Allow content to fill space */
  overflow-y: auto;
}

.admin-tab-content.active {
  display: flex; /* Use flex to manage chart size */
  flex-direction: column;
}

#memoryChart {
  max-height: 100%;
}

/* NEW: Styles for Announcement Tab */
#announcementsTab {
  flex-direction: column;
  gap: 1rem;
}

#adminAnnouncementTextarea {
  width: 98%;
  height: 200px;
  resize: vertical;
  background-color: #141414;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.5rem;
  font-family: Arial, sans-serif;
  font-size: 1rem;
}

#adminSubmitAnnouncementBtn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  background-color: #e50914;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
  align-self: flex-start; /* Don't stretch the button */
}

#adminSubmitAnnouncementBtn:hover {
  background-color: #f40612;
}

/* MODIFIED: Privacy Controls Styling */
#privacyControls {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #444;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

#sessionPasswordInput {
  background-color: #141414;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.5rem;
}

/* --- NEW: Custom Radio Button Styling --- */
#privacyControls .radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none; /* Prevent text selection on click */
}

/* Hide the default radio button */
#privacyControls .radio-label input[type="radio"] {
  display: none;
}

/* The custom radio button container */
.custom-radio {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #aaa;
  border-radius: 50%; /* Make it a circle */
  margin-right: 8px;
  position: relative;
  transition: border-color 0.2s;
}

#privacyControls .radio-label:hover .custom-radio {
  border-color: #fff;
}

/* The inner dot that appears when checked */
.custom-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0); /* Start scaled down */
  width: 10px;
  height: 10px;
  background-color: #e50914; /* Red color */
  border-radius: 50%;
  transition: transform 0.2s ease-in-out;
}

/* Show the inner dot when the radio is checked */
#privacyControls .radio-label input[type="radio"]:checked + .custom-radio::after {
  transform: translate(-50%, -50%) scale(1);
}

#privacyControls .radio-label input[type="radio"]:checked + .custom-radio {
  border-color: #e50914; /* Change border color when checked */
}

/* --- NEW: Custom Modal Styles --- */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000; /* Highest z-index */
}

.custom-modal-content {
  background-color: #222;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  border: 1px solid #444;
  width: 90%;
  max-width: 450px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

#customModalTitle {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: #fff;
}

#customModalMessage {
  margin-bottom: 1.5rem;
  color: #ccc;
  line-height: 1.5;
}

#customModalInputContainer {
  margin-bottom: 1.5rem;
}

#customModalInput {
  width: 90%;
  padding: 0.75rem;
  background-color: #141414;
  border: 1px solid #555;
  border-radius: 4px;
  color: #fff;
  font-size: 1rem;
}

#customModalInput:focus {
  outline: none;
  border-color: #e50914;
}

#customModalButtonContainer {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.custom-modal-button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  font-size: 1rem;
}

.custom-modal-button.primary {
  background-color: #e50914;
  color: #fff;
}
.custom-modal-button.primary:hover {
  background-color: #f40612;
}

.custom-modal-button.secondary {
  background-color: #555;
  color: #fff;
}
.custom-modal-button.secondary:hover {
  background-color: #666;
}