:root {
  --primary-color: #3b0066; /* Deep purple */
  --secondary-color: #8a2be2; /* Bright violet */
  --accent-color: #ffea04; /* Gold */
  --light-color: #f0e6ff; /* Pale lavender */
  --font-color: var(--light-color);
}

body {
  font-family: "Trebuchet MS", sans-serif;
  font-size: 1.2rem;
  background: linear-gradient(
      135deg,
      rgba(27, 2, 49, 0.9),
      rgba(59, 0, 102, 0.9)
    );
  background-size: cover;
  color: var(--font-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}


body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
    circle,
    transparent 1px,
    var(--light-color) 1px
  );
  background-size: 15px 15px;
  opacity: 0.2;
  pointer-events: none;
  z-index: -1;
}

nav {
  display: flex;
  justify-content:space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--secondary-color);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav h1 {
  font-size: 2.5rem;
  color: var(--accent-color);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  letter-spacing: 2px;
  animation: glow 5s ease-in-out infinite alternate;

}

@keyframes glow {
  from {
    text-shadow: 0 0 5px var(--accent-color), 0 0 5px black;
  }
  to {
    text-shadow: 0 0 10px var(--accent-color), 0 0 15px var(--accent-color);
  }
}

nav a {
  text-decoration: none;
}

nav h2 {
  font-size: 1.2rem;
  margin-right: 1rem;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.filter {
    display: flex;
}

#year {
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--light-color);
  border: 1px solid var(--secondary-color);
  transition: all 0.3s ease;
  cursor: pointer;
  appearance: none;
}

#year:focus {
  outline: none;
  box-shadow: 0 0 10px var(--secondary-color);
}

#year option {
    color: var(--light-color);
    background-color: #8a2be2;
}

.content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}

.movie {
  position: relative;
  width: 250px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid var(--secondary-color);
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  text-align: center;
  padding: 1rem;
}

.movie:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 10px 30px rgba(138, 43, 226, 0.5),
    inset 0 0 15px rgba(255, 215, 0, 0.5);
  cursor: pointer;
}

.movie h2 {
  font-size: 1.5rem;
  color: var(--accent-color);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  margin-top: 0;
  height: 2.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  transition: border-color 0.3s ease;
}

.movie:hover img {
  border-color: var(--accent-color);
}

/* modal */
.modal {
  display: none; /* hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);
}

.modal-content {
  background-color: var(--primary-color);
  margin: 5% auto;
  padding: 20px;
  width: 80%;
  max-width: 700px;
  border-radius: 8px;
}

h1 {
  font-family: "Goudy Bookletter 1911", sans-serif;
  font-size: 2.5rem;
  color: var(--light-color);
  letter-spacing: 2px;
  
}



.rate {
  color: var(--accent-color);
}

#close {
  float: right;
  font-size: 28px;
  cursor: pointer;
}
