* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #f5f5f5;
  color: #333;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

header {
  background-color: #f8f9fa;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid #e0e0e0;
}

header h1 {
  margin-bottom: 1.5rem;
  color: #1976d2;
  font-size: 2.5rem;
}

#add-movie-btn {
  background-color: #2196f3;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#add-movie-btn:hover {
  background-color: #1976d2;
  transform: translateY(-1px);
}

main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

#entry-text {
  text-align: center;
  color: #666;
  font-size: 1.2rem;
  margin-top: 2rem;
}

#movie-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  list-style: none;
  padding: 1rem;
}

.movie-element {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid #eee;
}

.movie-element:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.movie-element__image {
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: #f8f9fa;
}

.movie-element__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.movie-element:hover .movie-element__image img {
  transform: scale(1.05);
}

.movie-element__info {
  padding: 1.5rem;
}

.movie-element__info h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #2196f3;
}

.movie-element__info p {
  color: #666;
  font-size: 1rem;
}

#backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: none;
  z-index: 100;
  backdrop-filter: blur(3px);
}

#backdrop.visible {
  display: block;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  z-index: 200;
  display: none;
  width: 90%;
  max-width: 400px;
  border: 1px solid #eee;
}

.modal.visible {
  display: block;
}

.modal__content {
  margin-bottom: 1.5rem;
}

.modal__content label {
  display: block;
  margin-bottom: 0.5rem;
  color: #2196f3;
  font-weight: 500;
}

.modal__content input {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: white;
  color: #333;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.modal__content input:focus {
  outline: none;
  border-color: #2196f3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--success {
  background-color: #4caf50;
  color: white;
}

.btn--danger {
  background-color: #f44336;
  color: white;
}

.btn--passive {
  background-color: #e0e0e0;
  color: #666;
}

#delete-modal .modal__title {
  margin-bottom: 1rem;
  color: #f44336;
}

#delete-modal .modal__content {
  margin-bottom: 2rem;
  color: #666;
}

@media (max-width: 480px) {
  header h1 {
    font-size: 2rem;
  }

  .modal {
    width: 95%;
    padding: 1.5rem;
  }

  #movie-list {
    grid-template-columns: 1fr;
  }
}

.movie-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
}

.edit-btn {
  background-color: #2196f3 !important;
  padding: 0.4rem 0.8rem;
}

.delete-btn {
  background-color: #f44336 !important;
  padding: 0.4rem 0.8rem;
}

.movie-element__info h2 {
  margin-bottom: 0.8rem;
}

.movie-element__info p {
  margin-bottom: 0.5rem;
}
