.ranking-controls {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 30px;
  gap: 15px;
}

.control-input {
  font-size: 1rem;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-white);
  color: var(--text-dark);
  font-family: inherit;
  width: 280px;

  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.control-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(101, 101, 240, 0.2);
  outline: none;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
}

.movie-card {
  position: relative;
  background-color: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.movie-poster {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--accent-color);
  color: white;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.movie-info {
  padding: 15px;
}

.movie-title {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-top: 0;
  margin-bottom: 5px;

  line-height: 1.3;

  overflow: hidden;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.movie-rating {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.favorite-btn {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: transparent;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 0.9rem;
}

.favorite-btn:hover {
  background-color: #f0f0f0;
}

.favorite-btn.favorited {
  color: #cc3333;
  border-color: #cc3333;
  background-color: #fff0f0;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: var(--bg-white);
  border-radius: 10px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}

.modal-poster {
  width: 150px;
  height: auto;
  border-radius: 8px;
  flex-shrink: 0;
}

.close-button {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 30px;
  color: var(--text-secondary);
  font-weight: bold;
  cursor: pointer;
}

.load-more-container {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  margin-bottom: 20px;
}

.action-button {
  font-size: 1.1rem;
  padding: 12px 30px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;

  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.action-button:hover {
  background-color: #4a4adf;
}
