/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(145deg, #1e3c72 0%, #2a5298 100%);
  color: #ffffff;
  line-height: 1.6;
  min-height: 100vh;
  padding: 30px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  letter-spacing: 1px;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Search Bar */
.search-bar {
  display: flex;
  gap: 15px;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px;
  border-radius: 60px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  max-width: 700px;
  margin: 0 auto 30px;
  backdrop-filter: blur(10px);
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 15px 25px;
  font-size: 1.1rem;
  border-radius: 30px;
  background: transparent;
  color: #1a1a1a;
}

.search-bar button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  background: #007aff;
  border-radius: 30px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.search-bar button:hover {
  background: #005bb5;
  transform: scale(1.05);
}

.search-bar button svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-top: 5px solid #007aff;
  border-radius: 50%;
  animation: spin 1s ease-in-out infinite, pulse 1.5s infinite;
  margin: 20px auto;
  position: relative;
  z-index: 10;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Movie List */
.movie-list {
  display: grid;
  gap: 28px;
  max-width: 800px;
  margin: 0 auto;
}

.result-group {
  display: grid;
  gap: 20px;
}

.result-group-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.movie-option {
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  font-size: 1.1rem;
  color: #1a1a1a;
}

.movie-option-title {
  font-weight: 700;
}

.movie-option-cast,
.movie-option-summary {
  margin-top: 8px;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #4a4a4a;
}

.movie-option-cast {
  font-weight: 600;
}

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

/* Results */
.results {
  max-width: 900px;
  margin: 0 auto;
}

.back-button {
  display: inline-flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 18px;
  border: none;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  color: #1a1a1a;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.back-button:hover {
  background: #fff;
}

.movie-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  padding: 25px;
  display: flex;
  gap: 25px;
  margin-bottom: 30px;
  backdrop-filter: blur(10px);
}

.movie-card img {
  width: 180px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.movie-card h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #1a1a1a;
}

.movie-card p {
  font-size: 1rem;
  color: #4a4a4a;
}

.provider-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin: 20px 0 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.provider-list {
  list-style: none;
}

.provider-list li {
  background: rgba(255, 255, 255, 0.9);
  padding: 15px 20px;
  margin: 8px 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: background 0.2s ease;
  color: #1a1a1a;
}

.provider-list li img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
}

.provider-list li a {
  color: #007aff;
  text-decoration: none;
  font-weight: 600;
}

.provider-list li:hover {
  background: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }

  .search-bar {
    flex-direction: column;
    border-radius: 30px;
    padding: 20px;
  }

  .search-bar input {
    width: 100%;
    margin-bottom: 15px;
  }

  .search-bar button {
    width: 100%;
    padding: 15px;
  }

  .movie-list,
  .result-group {
    grid-template-columns: 1fr;
  }

  .movie-card {
    flex-direction: column;
    text-align: center;
  }

  .movie-card img {
    width: 140px;
    margin: 0 auto 20px;
  }

  .provider-list li img {
    width: 30px;
    height: 30px;
  }
}

@media (min-width: 769px) {
  .result-group {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .result-group-title {
    grid-column: 1 / -1;
  }
}