/* THEME VARIABLES */
/* Styles are grouped by page area: layout, controls, cards, and responsive rules. */
:root {
  --bg-dark: #0b1220;
  --bg-dark-alt: #0f1a2e;
  --bg-light: #f5f7fb;
  --text-dark: #0b1220;
  --text-light: #e6eef7;
  --accent-gold: #f1c40f;
  --accent-gold-light: #f7d968;
}

/* GLOBAL */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
}

/* DARK / LIGHT MODES */
body.dark-mode {
  background: var(--bg-dark);
  color: var(--text-light);
}

body.light-mode {
  background: var(--bg-light);
  color: var(--text-dark);
}

/* HERO BANNER */
.hero {
  background: linear-gradient(135deg, #0f1a2e, #1b2f4a);
  padding: 10px 20px;
  text-align: center;
  color: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hero-title {
  font-size: 42px;
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  animation: fadeInUp 1s ease-out;
}

.hero-title .highlight {
  color: var(--accent-gold);
  animation: glowText 2s ease-in-out infinite alternate;
}

.hero-subtitle {
  font-size: 18px;
  opacity: 0.85;
  animation: fadeInUp 1.4s ease-out;
}

/* HERO ANIMATIONS */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glowText {
  from {
    text-shadow: 0 0 5px rgba(241, 196, 15, 0.4);
  }
  to {
    text-shadow: 0 0 18px rgba(241, 196, 15, 0.9);
  }
}

/* TOP BAR */
.topbar {
  height: 70px;
  background: var(--bg-dark-alt);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 35px;
  border-bottom: 1px solid #1c2a44;
}

.toggle-sidebar {
  background: none;
  border: none;
  color: white;
  font-size: 26px;
  cursor: pointer;
  display: none;
}

.logo-img {
  height: 70px;
  border-radius: 12px;
  object-fit: contain;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* FIND US BUTTON */
.find-us {
  background: linear-gradient(135deg, var(--accent-gold), #d4ac0d);
  color: #0b1220;
  border: none;
  padding: 12px 32px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  transition: 0.3s ease;
}

.find-us:hover {
  transform: scale(1.08);
}

/* LAYOUT */
.layout {
  display: flex;
  min-height: calc(100vh - 70px);
}

/* SIDEBAR */
.sidebar {
  width: 250px;
  padding: 25px;
  background: linear-gradient(180deg, #0f1a2e, #15294a);
  border-right: 1px solid #1c2a44;
  transition: transform 0.3s ease;
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar h3 {
  margin-top: 0;
  color: #fff;
  font-size: 18px;
}

.genres li {
  list-style: none;
  margin: 12px 0;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 6px;
  transition: 0.2s;
  color: #b8c6e0;
}

/* SIDEBAR HOVER */
.genres li:hover {
  background: var(--accent-gold-light);
  color: #0b1220;
  transform: translateX(5px);
}

#viewWatchlistBtn {
  background: var(--accent-gold-light);
  color: #0b1220;
  border: none;
  padding: 12px 22px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  transition: 0.3s ease;
}

#preferencesBtn {
  background: #2d9b53;
  color: #ffffff;
  border: none;
  padding: 12px 22px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  transition: 0.3s ease;
}

#viewWatchlistBtn:hover {
  background: var(--accent-gold);
  transform: scale(1.08);
}

#preferencesBtn:hover {
  background: #248445;
  transform: scale(1.08);
}

/* MAIN */
.main {
  flex: 1;
  padding: 35px;
}

/* SEARCH + AI SUGGEST ROW */
.search-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

/* SEARCH BAR LEFT */
.search-control {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 260px;
}

/* AI BAR RIGHT */
.suggest-inline {
  display: flex;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
  min-width: 260px;
}

.suggest-inline input {
  flex: 1;
}

/* INPUTS + BUTTONS */
.search-control select,
.search-control input,
.suggest-inline input {
  padding: 12px;
  border: none;
  border-radius: 6px;
  background: #162238;
  color: white;
  outline: none;
}

.search-control button,
.suggest-inline button {
  padding: 12px 22px;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
}

.search-control button {
  background: #3a7bd5;
}

.suggest-inline button {
  background: #8e44ad;
}

/* SECTION TITLE */
.section-title {
  margin: 20px 0 10px;
  font-size: 20px;
}

.recommendation-heading {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}

.recommendation-source {
  margin: 0 0 12px;
  font-size: 14px;
  color: #c6d8ef;
}

/* MOVIES GRID */
.movies {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.preferences-panel {
  grid-column: 1 / -1;
  background: #162844;
  border: 1px solid #29466d;
  border-radius: 12px;
  padding: 20px;
}

.preferences-panel h2 {
  margin: 0 0 8px;
}

.preferences-panel p {
  margin: 0 0 14px;
  color: #c6d8ef;
}

.preferences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.preference-option {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1b3353;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
}

.preference-option input {
  width: 16px;
  height: 16px;
}

.preferences-save-btn {
  background: linear-gradient(#4c79a3, #2f5f8a);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
}

.preferences-save-btn:hover {
  background: linear-gradient(#5edc6b, #2fa043);
}

.preferences-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preferences-save-message {
  color: #7ef2a0;
  font-size: 13px;
  font-weight: 600;
}

/* MOVIE CARD */
.movie-card {
  background: #1c334d;
  border-radius: 12px;
  overflow: hidden;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
}

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

.movie-card h3 {
  font-size: 14px;
  padding: 8px 10px 4px;
  margin: 0;
  color: white;
}

.movie-card p {
  font-size: 12px;
  padding: 0 10px 8px;
  margin: 0;
  color: #aac4e0;
}

.movie-card h3 a {
  color: white;
  text-decoration: none;
}

.movie-card h3 a:hover {
  color: var(--accent-gold);
  text-decoration: underline;
}

.watchlist-btn {
  margin: 0 10px 10px;
  padding: 6px 12px;
  background: linear-gradient(#4c79a3, #2f5f8a);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.watchlist-btn:hover {
  background: linear-gradient(#5edc6b, #2fa043);
}

/* Remove Button */
.remove-btn {
  margin: 0 10px 10px;
  padding: 6px 12px;
  background: linear-gradient(#e63946, #c1121f);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.remove-btn:hover {
  background: linear-gradient(#ff4d5a, #e63946);
}

/* WATCH SECTION */
.watch {
  margin-top: 30px;
}

.platforms span {
  margin-right: 10px;
  padding: 6px 10px;
}

.netflix {
  color: red;
}
.hulu {
  color: limegreen;
}
.prime {
  color: lightblue;
}

/* FOOTER */
.footer {
  background: var(--accent-gold);
  padding: 15px 0;
  text-align: center;
  border-top: 4px solid #fff;
  box-shadow: 0 -4px 20px rgba(241, 196, 15, 0.7);
}

.footer-content p {
  margin: 8px 0;
  color: #0b1220;
  font-size: 18px;
  font-weight: 600;
}

/* SOCIAL ICONS */
.social-icons {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.3s ease;
}

.icon.fb {
  background: #1877f2;
}
.icon.ig {
  background: radial-gradient(
    circle at 30% 30%,
    #feda75,
    #fa7e1e,
    #d62976,
    #962fbf,
    #4f5bd5
  );
}
.icon.ln {
  background: #0077b5;
}

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

/* RESPONSIVE */
@media (max-width: 900px) {
  .toggle-sidebar {
    display: block;
  }

  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: relative;
    z-index: 10;
  }

  .search-row {
    flex-direction: column;
  }

  .search-control,
  .suggest-inline {
    width: 100%;
  }

  .search-control input {
    width: 100%;
  }
}
