@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap");

/* =========================
   GLOBAL RESET + THEME
========================= */

:root {
  --bg-main: #1b1b2f;
  --bg-card: #24243a;
  --bg-card-soft: #2c2c45;

  --accent: #9c27b0;
  --accent-soft: #ffd166;

  --text-main: #e6e6eb;
  --text-muted: #b2b2c2;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.3);
  --shadow-strong: 0 18px 40px rgba(0, 0, 0, 0.45);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: radial-gradient(circle at top, #22223a, var(--bg-main));
  color: var(--text-main);
  min-height: 100vh;
}

/* =========================
   LAYOUT
========================= */

.wrapper {
  padding: 32px 16px;
}

.container {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* =========================
   LOGO / TITLE
========================= */

.logo p,
.app-title {
  text-align: center;
  font-size: 3.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  animation: pulseGlow 3s infinite ease-in-out;
}

.logo span,
.app-title span {
  color: var(--accent-soft);
}

/* =========================
   SEARCH
========================= */

.search-container {
  display: flex;
  justify-content: center;
  margin: 32px 0;
}

.search-element {
  width: 100%;
  max-width: 620px;
  position: relative;
}

.search-element h3 {
  margin-bottom: 10px;
  font-weight: 400;
  color: var(--text-muted);
}

.search-element input {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  background: var(--bg-card-soft);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all 0.25s ease;
}

.search-element input::placeholder {
  color: #9a9ab3;
}

.search-element input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.25);
}

/* =========================
   SEARCH DROPDOWN
========================= */

.search-list {
  position: absolute;
  width: 100%;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  z-index: 10;
}

.search-list-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition:
    background 0.25s ease,
    transform 0.25s ease;
  animation: fade-in 0.4s ease;
}

.search-list-item:hover {
  background: linear-gradient(
    135deg,
    rgba(156, 39, 176, 0.15),
    rgba(255, 209, 102, 0.08)
  );
  transform: translateX(4px);
}

.search-item-thumbnail img {
  width: 50px;
  border-radius: var(--radius-sm);
}

.search-item-info h3 {
  font-size: 1rem;
}

.search-item-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* =========================
   RECENTLY WATCHED
========================= */

#recently-watched {
  max-width: 1100px;
  margin: 40px auto 0;
}

#recently-watched h2 {
  font-size: 1.4rem;
  margin-bottom: 14px;
  color: var(--accent-soft);
}

#recently-watched-list {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
}

#recently-watched-list img {
  width: 110px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: var(--shadow-soft);
}

#recently-watched-list img:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-strong);
}

/* =========================
   RESULT CARD
========================= */

.result-container {
  width: 100%;
  max-width: 1100px;
  background: linear-gradient(135deg, #2a2a45, #1f1f33);
  padding: 44px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
  transition: transform 0.3s ease;
}
.result-container {
  scroll-margin-top: 40px;
}

.result-container:hover {
  transform: translateY(-6px);
}

.result-grid {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fade-in 0.6s ease;
}

/* =========================
   MOVIE DETAILS
========================= */

.movie-poster img {
  width: 260px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.movie-info {
  flex: 1;
}

.movie-title {
  font-size: 2.5rem;
  color: var(--accent-soft);
  margin-bottom: 12px;
}

.movie-misc-info {
  list-style: none;
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  color: var(--text-muted);
}

.movie-info p {
  margin-bottom: 12px;
  line-height: 1.65;
  color: #d0d0dd;
}

.movie-info b {
  color: #fff;
}

/* =========================
   SHIMMER
========================= */

.shimmer {
  animation: shimmer 1.5s infinite linear;
  background: linear-gradient(90deg, #2e2e3a 25%, #3a3a4d 50%, #2e2e3a 75%);
  background-size: 200% 100%;
}

.shimmer-item {
  display: flex;
  gap: 14px;
  padding: 14px;
}

.shimmer-thumbnail {
  width: 50px;
  height: 70px;
  border-radius: var(--radius-sm);
}

.shimmer-line {
  height: 12px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
}

.shimmer-line.short {
  width: 40%;
}

/* =========================
   UTILITIES
========================= */

.hide-search-list {
  display: none !important;
}

/* =========================
   ANIMATIONS
========================= */

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

@keyframes shimmer {
  from {
    background-position: -200% 0;
  }
  to {
    background-position: 200% 0;
  }
}

@keyframes pulseGlow {
  0% {
    text-shadow: 0 0 0px var(--accent);
  }
  50% {
    text-shadow: 0 0 14px rgba(156, 39, 176, 0.7);
  }
  100% {
    text-shadow: 0 0 0px var(--accent);
  }
}
.result-container {
  outline: 2px solid rgb(31, 30, 30);
}
