/* CSS for Movie Data Application */
:root {
  --navy: #0a192f;
  --light-navy: #172a45;
  --slate: #8892b0;
  --light-slate: #ccd6f6;
  --aqua: #00f7ff;
  --pink: #ff6ec4;
  --radius: 12px;
  --transition: 0.3s;
  --gold:  #00f7ff;
  --orange: #ff6ec4;
}

body {
  background-color: var(--navy);
  color: var(--light-slate);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navbar Styles */
.navbar {
  animation: fadeInDown 1s ease-in-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-link {
  color: white !important;
  position: relative;
  padding: 12px 20px;
  font-weight: bold;
  transition: 0.4s ease;
  font-size: 1.1rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: 0;
  left: 50%;
  background: linear-gradient(to right, var(--pink), #7873f5);
  transition: 0.4s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 50%;
}

.nav-link:hover {
  color: var(--pink) !important;
  transform: scale(1.05);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-brand img {
  height: 45px;
  filter: brightness(1.5);
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
} 

/* Slider Section */
@media screen and (max-width: 991px) {
  .sidebar {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
  }

  .sidebar .nav-link::after {
    display: none;
  }
  
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='white' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgb(0, 102, 255);
  border-radius: 50%;
  border-top-color: var(--aqua);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-message {
  color: #ff6b6b;
  text-align: center;
  padding: 40px;
  font-size: 1.2rem;
}

/* Movies Header */
.movies-header {
  padding: 100px 0 60px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-link {
  padding: 10px 8px;
  font-size: 0.9rem;
}

.page-subtitle {
  font-size: 1.2rem;
  color: rgb(228, 228, 228);
  max-width: 700px;
  margin: 0 auto 40px;
}

/* Filter Bar */
.filter-bar {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 40px;
}

.search-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 12px 20px;
  border-radius: 50px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--light-slate);
  padding-right: 50px;
}

.search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px var(--gold);
}

.search-btn {
  position: absolute;
  right: 5px;
  top: 5px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  border: none;
  border-radius: 50px;
  padding: 7px 20px;
  color: var(--navy);
  font-weight: 600;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--light-slate);
  transition: all var(--transition);
  font-size: 0.9rem;
}

.filter-btn:hover, .filter-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: var(--navy);
  border-color: transparent;
}

/* Movies Container */
.movies-container {
  padding: 60px 0;
  min-height: 60vh;
}

.movie-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  height: 100%;
  border: 1px solid rgba(0, 128, 255, 0.1);
}

.movie-card:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  border-color: var(--gold);
}

.movie-poster {
  width: 100%;
  height: 300px;
  object-fit: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.movie-body {
  padding: 20px;
}

.movie-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--light-slate);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-director {
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-plot {
  font-size: 0.9rem;
  color: var(--slate);
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.movie-genre {
  background: rgba(255, 215, 0, 0.1);
  color: var(--gold);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
}

.movie-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.movie-actors {
  font-size: 14px;
}

.movie-runtime {
  font-size: 0.8rem;
  color: var(--slate);
}

.movie-year {
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 600;
}

.btn-details {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: var(--navy);
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.btn-details:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 247, 255, 0.3);
  color: var(--navy);
}

/* Footer styling....*/
.footer-section {
    background: linear-gradient(135deg, #0a192f 0%, #172a45 100%);
    color: #ccd6f6;
    padding: 60px 0 20px;
    position: relative;
    overflow: hidden;
}

.form-control::placeholder {
    color: #8892b0;
}

.footer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSg0NSkiPjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjAzKSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3QgZmlsbD0idXJsKCNwYXR0ZXJuKSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjwvc3ZnPg==');
    opacity: 0.3;
}

.footer-heading {
    color: #e6f1ff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(to right, #00f7ff, #7873f5);
    border-radius: 3px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #8892b0;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.footer-links a::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(to right, #00f7ff, #7873f5);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #00f7ff;
}

.footer-links a:hover::before {
    width: 100%;
}

.newsletter-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #e6f1ff;
    border-radius: 50px 0 0 50px;
    padding: 12px 20px;
}

.newsletter-form .form-control:focus {
    box-shadow: none;
    background: rgba(255, 255, 255, 0.15);
}

.btn-subscribe {
    background: linear-gradient(135deg, #00f7ff, #7873f5);
    border: none;
    border-radius: 0 50px 50px 0;
    padding: 12px 20px;
    font-weight: 600;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 40px;
}

.copyright {
    color: #8892b0;
    font-size: 0.9rem;
    margin: 0;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: #8892b0;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    text-decoration: none;
}

.social-icon:hover {
    background: linear-gradient(135deg, #00f7ff, #7873f5);
    color: #0a192f;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .footer-section {
        text-align: center;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-links {
        justify-content: center;
    }

    .api-endpoint {
        font-size: 0.6rem;
    }

    .footer-bottom .col-md-6 {
        text-align: center !important;
    }
}

/* Pagination */
.pagination {
  justify-content: center;
  margin-top: 40px;
}

.page-item .page-link {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light-slate);
  margin: 0 5px;
  border-radius: var(--radius) !important;
}

.page-item.active .page-link {
  background: linear-gradient(135deg, var(--gold), var(--orange));
  border-color: transparent;
  color: var(--navy);
}

.api-endpoint {
  background: rgba(0, 0, 0, 0.1);
  padding: 15px;
  border-radius: 10px;
  margin-top: 30px;
  font-size: 0.8rem;
  font-family: monospace;
  word-break: break-all;
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-title {
    font-size: 2.5rem;
  }
  
  .movie-poster {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .nav-link {
    padding: 10px;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .page-subtitle {
    font-size: 1rem;
  }
  
  .movie-card {
    margin-bottom: 30px;
  }

  .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }

  .page-item {
    margin: 3px;
    width: auto;
  }

  .page-link {
    display: block;
    padding: 8px 10px;
    font-size: 0.6rem;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .movies-header {
    padding: 80px 0 40px;
  }

  .nav-link::after {
    display: none;
  }
  
  .filter-buttons {
    gap: 8px;
  }
  
  .filter-btn {
    padding: 6px 15px;
    font-size: 0.8rem;
  }
  
  .movie-poster {
    height: 250px;
  }
}
