/* Reset Default Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

/* Background (Static, No Animation) */
body {
  background: url("assets/LoginPageBG.png") no-repeat center center fixed;
  background-size: cover;
  color: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* ===== Login Page Styling ===== */
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 2;
}

.card {
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(18px);
  color: #fff;
  padding: 35px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  text-align: center;
  width: 360px;
  animation: fadeInUp 1s ease forwards;
  transform: translateY(50px);
  opacity: 0;
}

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

.card h2 {
  margin-bottom: 20px;
  color: #f8f8f8;
  font-size: 28px;
  font-weight: bold;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.card input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 16px;
  color: #fff;
  outline: none;
  transition: all 0.3s ease;
}

.card input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.card input:focus {
  border-color: #00d4ff;
  box-shadow: 0 0 12px #00d4ff;
}

.card button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(90deg, #0077ff, #00d4ff);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.card button:hover {
  background: linear-gradient(90deg, #00d4ff, #0077ff);
  transform: scale(1.05);
}

#errorMsg {
  margin-top: 10px;
  font-size: 14px;
  color: #ff4d4d;
}

/* ====================== Movie Page Styling ==================*/
#moviePage {
  display: none;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: "Times New Roman", serif;
  color: #f8f8f8cf;
}

/* Header */
.movie-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  margin-bottom: 20px;
}

.movie-header h1 {
  font-size: 2.5rem;
  font-weight: bold;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.9);
}

/* Logout Button */
.logout-btn {
  padding: 10px 20px;
  background: #ff4d4d;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: #cc0000;
  transform: scale(1.05);
}

/* Search Section */
.search-bar {
  text-align: center;
  margin-bottom: 20px;
}

#searchInput {
  padding: 14px;
  width: 350px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 16px;
  background-color: whitesmoke;
  color: black;
  outline: none;
  transition: all 0.3s ease;
}

#searchInput::placeholder {
  color: black;
}

#searchInput:focus {
  border-color: #00d4ff;
  box-shadow: 0 0 12px #00d4ff;
}

/* Language Dropdown */
#langSelect {
  background: #1e2a38;
  color: #fff;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 10px 14px;
  margin-left: 10px;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.3s ease;
}

#langSelect:hover {
  border-color: #00d4ff;
  background: #2c3e50;
}

/* Movie message styling */
.ms1 {
  color: blueviolet;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  font-style: italic;
  margin: 20px 0;
}

.ms2 {
  color: red;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  margin: 20px 0;
}

.loading-text {
  color: green;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  margin: 20px 0;
}

/* Search Button */
#moviePage button {
  padding: 14px 20px;
  margin-left: 10px;
  background: linear-gradient(90deg, #0077ff, #00d4ff);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#moviePage button:hover {
  background: linear-gradient(90deg, #00d4ff, #0077ff);
  transform: scale(1.05);
}

/* ===== Movie List (Dark Theme) ===== */
#movieList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 30px;
  list-style: none;
  width: 100%;
  max-height: 70vh;
  overflow-y: auto;
  scroll-behavior: smooth;
}

#movieList::-webkit-scrollbar {
  width: 8px;
}

#movieList::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

/* Movie Card */
.movie-card {
  flex: 0 0 auto;
  width: 250px;
  background: #1b1b1b;
  color: #fff;
  border-radius: 12px;
  padding: 15px;
  border: 1px solid rgba(0, 212, 255, 0.4);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
  cursor: pointer;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: #00d4ff;
  box-shadow: 0 0 20px #00d4ff;
}

.movie-card .poster-container {
  width: 100%;
  height: 280px;
  border-radius: 10px;
  overflow: hidden;
  background: #1e2a38
    url("https://dummyimage.com/200x300/1e2a38/ffffff&text=No+Poster")
    center/cover no-repeat;
}

.movie-card .poster-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-card h3 {
  margin: 10px 0;
  font-size: 18px;
}

.movie-card p {
  font-size: 14px;
  color: #ccc;
}

/* ===== Movie Detail Card ===== */
.movie-detail-card {
  background: #101010;
  color: #fff;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
  display: flex;
  flex-direction: row;
  gap: 20px;
  border: 1px solid rgba(0, 212, 255, 0.5);

  /* 🔹 Full width & height */
  width: 95%;
  max-width: 1400px;
  min-height: calc(100vh - 100px);

  margin: 20px auto;
  justify-content: flex-start;
  text-align: left;
  overflow: hidden;
}

.movie-detail-card .poster-container {
  width: 280px;
  height: 420px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

.movie-detail-card .poster-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-detail-card .details {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: none; /* 🔹 Remove height restriction */
  padding-right: 12px;
}

.movie-detail-card .details h2 {
  margin-bottom: 10px;
  font-size: 28px;
  color: #fff;
  word-wrap: break-word;
}

.movie-detail-card .details p {
  margin: 6px 0;
  line-height: 1.5;
  color: #ccc;
}

.movie-detail-card .rating {
  font-weight: bold;
  color: #f5c518;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Back Button */
.back-btn {
  padding: 12px 20px;
  background: #ff4d4d;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: #cc0000;
  transform: scale(1.05);
}

/* Scrollbar Styling */
.movie-detail-card .details::-webkit-scrollbar {
  width: 8px;
}

.movie-detail-card .details::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.movie-detail-card .details::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 500px) {
  .card {
    width: 90%;
  }

  #searchInput {
    width: 150px;
  }

  .movie-header {
    flex-direction: column;
    gap: 10px;
  }

  #movieList {
    padding: 15px;
    gap: 10px;
  }

  .movie-detail-card {
    flex-direction: column;
    align-items: center;
    width: 95%;
    min-height: auto;
  }

  .movie-detail-card .poster-container {
    width: 100%;
    height: auto;
  }
}

/* ===== Trailer Section ===== */
.trailer-container {
  width: 100%;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.trailer-container h3,
.trailer-container label,
.trailer-container select {
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

.trailer-container label {
  font-weight: bold;
}

.trailer-container select {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #888;
  background: #222;
  color: #fff;
  font-size: 14px;
}

.trailer-container iframe {
  width: 100%;
  height: 80vh; /* 80% of viewport height */
  border-radius: 12px;
  margin-top: 10px;
  display: block;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.7);
}

.trailerSection {
  display: none;
  margin-top: 15px;
  text-align: center;
  transition: all 0.3s ease-in-out;
  width: 100%;
  height: 80vh; /* 80% of viewport height */
  border-radius: 12px;
  margin-top: 10px;
  display: block;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.7);
}

/* Video Section (Trailer & Songs) */
.video-section {
  display: none;
  margin-top: 15px;
  text-align: center;
  transition: all 0.3s ease-in-out;
}

.video-section iframe {
  width: 100%;
  max-width: 800px;
  height: 450px;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
}

/* Open Trailer Button */
.openTrailer {
  /* padding: 10px 18px;
  margin-top: 10px; */
  margin: 5px 0;
  padding: 8px 12px;
  background: linear-gradient(90deg, #0077ff, #00d4ff);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.openTrailer:hover {
  background: linear-gradient(90deg, #00d4ff, #0077ff);
  transform: scale(1.05);
}

/* Close button */
.close-btn {
  background: #ff4444;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  margin-top: 8px;
  cursor: pointer;
  transition: background 0.3s ease-in-out;
}

.close-btn:hover {
  background: #cc0000;
}

/* Songs List */
.songs-container ul {
  list-style: none;
  padding: 0;
  margin-top: 10px;
}

.song-item {
  background: #333;
  margin: 5px 0;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  transition: background 0.3s;
}

.song-item:hover {
  background: #555;
}
