/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Netflix-inspired styling */
:root {
  --netflix-red: #e50914;
  --netflix-black: #141414;
  --netflix-dark-gray: #181818;
  --netflix-gray: #2f2f2f;
  --netflix-light-gray: #808080;
  --netflix-white: #ffffff;
}

body {
  background-color: var(--netflix-black);
  color: var(--netflix-white);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 10%, transparent);
  transition: background-color 0.3s ease;
  padding: 0 4rem;
}

.site-header.scrolled {
  background-color: var(--netflix-black);
}

.header-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 0;
}

.nav-link {
  color: var(--netflix-white);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--netflix-light-gray);
}

.logo-link {
  display: block;
  line-height: 0;
  background-color: #060403;
  padding: 0 1.5rem 1rem 1.5rem;
  border-radius: 0 0 20px 20px;
  transition: all 0.3s ease;
}

.logo-link:hover {
  transform: translateY(5px);
}

.site-logo {
  height: 120px;
  width: auto;
  display: block;
}

.site-logo:hover {
  filter: brightness(1.1);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--netflix-white);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--netflix-light-gray);
}

/* Hero Banner */
.hero-banner {
  position: relative;
  height: 80vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 0 4rem 8rem;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to top,
    var(--netflix-black) 0%,
    transparent 50%,
    transparent 100%
  );
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to right,
    var(--netflix-black) 0%,
    transparent 50%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 40%;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-description {
  font-size: 1.4rem;
  line-height: 1.5;
  margin: 0 0 2rem 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

.btn-play,
.btn-info {
  padding: 0.8rem 2rem;
  font-size: 1.2rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-play {
  background-color: var(--netflix-white);
  color: var(--netflix-black);
}

.btn-play:hover {
  background-color: rgba(255, 255, 255, 0.75);
}

.btn-info {
  background-color: rgba(109, 109, 110, 0.7);
  color: var(--netflix-white);
}

.btn-info:hover {
  background-color: rgba(109, 109, 110, 0.4);
}

/* Movie Rows */
.movie-rows {
  padding: 0 4rem 4rem;
  margin-top: -8rem;
  position: relative;
  z-index: 3;
}

.movie-row {
  margin-bottom: 3rem;
}

.row-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: #e5e5e5;
}

.row-container {
  position: relative;
  overflow: hidden;
}

.row-content {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.5rem 0;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.row-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Movie Card */
.movie-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.movie-card {
  position: relative;
  min-width: 250px;
  width: 250px;
  height: 140px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: var(--netflix-gray);
}

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

.movie-card:hover {
  transform: scale(1.05);
  z-index: 10;
}

.movie-card:hover img {
  filter: brightness(0.7);
}

.movie-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.movie-card:hover .movie-card-overlay {
  opacity: 1;
}

.movie-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: var(--netflix-white);
}

.movie-card-info {
  font-size: 0.85rem;
  color: var(--netflix-light-gray);
  margin: 0;
}

.movie-card-no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--netflix-gray) 0%, var(--netflix-dark-gray) 100%);
  color: var(--netflix-light-gray);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--netflix-light-gray);
}

.empty-state h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Video Player Modal */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.video-modal.hidden {
  display: none;
}

.video-modal-content {
  position: relative;
  width: 100%;
  max-width: 1200px;
  background-color: var(--netflix-black);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
}

.video-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--netflix-white);
}

.video-modal-close:hover {
  background-color: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Search Page Styles */
.search-page {
  min-height: 100vh;
  padding-top: 140px;
}

.search-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 4rem;
}

.search-title {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 2rem 0;
  color: var(--netflix-white);
}

.search-form {
  margin-bottom: 3rem;
}

.search-input-group {
  display: flex;
  gap: 0.5rem;
  max-width: 800px;
}

.search-input {
  flex: 1;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--netflix-white);
  border: 2px solid var(--netflix-gray);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.search-input::placeholder {
  color: var(--netflix-light-gray);
}

.search-input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.15);
  border-color: var(--netflix-white);
}

.search-button {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  background-color: var(--netflix-red);
  color: var(--netflix-white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-button:hover {
  background-color: #f40612;
  transform: scale(1.02);
}

.search-results {
  margin-top: 2rem;
}

.results-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: #e5e5e5;
}

.results-section {
  margin-bottom: 4rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #e5e5e5;
  border-bottom: 2px solid var(--netflix-gray);
  padding-bottom: 0.75rem;
}

.movie-results {
  display: grid;
  gap: 1.5rem;
}

.search-movie-card {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--netflix-dark-gray);
  border-radius: 8px;
  border: 1px solid var(--netflix-gray);
  transition: all 0.3s ease;
  cursor: pointer;
}

.search-movie-card:hover {
  background: var(--netflix-gray);
  transform: scale(1.01);
  border-color: var(--netflix-light-gray);
}

.search-movie-cover {
  width: 200px;
  height: 112px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.search-movie-cover-placeholder {
  width: 200px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--netflix-gray) 0%, var(--netflix-dark-gray) 100%);
  color: var(--netflix-light-gray);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.search-movie-info {
  flex: 1;
  min-width: 0;
}

.search-movie-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--netflix-white);
}

.search-movie-year {
  color: var(--netflix-light-gray);
  margin: 0.25rem 0;
  font-size: 1rem;
}

.search-movie-meta {
  margin: 0.5rem 0;
  color: #b3b3b3;
  font-size: 0.95rem;
  line-height: 1.5;
}

.meta-label {
  color: var(--netflix-light-gray);
  font-weight: 600;
}

.search-movie-description {
  margin: 0.75rem 0;
  color: #d0d0d0;
  line-height: 1.6;
  font-size: 0.95rem;
}

.play-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--netflix-white);
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
}

.people-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.search-person-card {
  padding: 1.5rem;
  background: var(--netflix-dark-gray);
  border-radius: 8px;
  border: 1px solid var(--netflix-gray);
  transition: all 0.3s ease;
}

.search-person-card:hover {
  background: var(--netflix-gray);
  border-color: var(--netflix-light-gray);
}

.search-person-name {
  margin: 0 0 0.75rem 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--netflix-white);
}

.search-person-movies {
  margin: 0.5rem 0;
  color: #b3b3b3;
  font-size: 0.95rem;
  line-height: 1.6;
}

.person-movie-link {
  color: var(--netflix-white);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
}

.person-movie-link:hover {
  color: var(--netflix-red);
  text-decoration-color: var(--netflix-red);
}

.person-movie-no-link {
  color: #b3b3b3;
}

.no-results,
.search-prompt {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--netflix-light-gray);
  background: var(--netflix-dark-gray);
  border-radius: 8px;
  border: 1px solid var(--netflix-gray);
  font-size: 1.1rem;
}

.load-more-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--netflix-gray);
}

.load-more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background-color: var(--netflix-red);
  color: var(--netflix-white);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.3);
}

.load-more-button:hover {
  background-color: #f40612;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.5);
}

.load-more-button:active {
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .hero-banner {
    padding: 0 3rem 6rem;
  }
  
  .movie-rows {
    padding: 0 3rem 3rem;
  }
  
  .hero-content {
    max-width: 50%;
  }
  
  .hero-title {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 0 2rem;
  }

  .search-container {
    padding: 2rem 2rem;
  }

  .search-title {
    font-size: 2rem;
  }

  .search-input-group {
    flex-direction: column;
  }

  .search-button {
    width: 100%;
  }

  .search-movie-card {
    flex-direction: column;
  }

  .search-movie-cover,
  .search-movie-cover-placeholder {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }

  .hero-banner {
    height: 60vh;
    padding: 0 2rem 4rem;
  }
  
  .movie-rows {
    padding: 0 2rem 2rem;
    margin-top: -4rem;
  }
  
  .hero-content {
    max-width: 70%;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .btn-play,
  .btn-info {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
  }
  
  .movie-card {
    min-width: 180px;
    width: 180px;
    height: 100px;
  }
  
  .row-title {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 0 1rem;
  }

  .logo-link {
    padding: 0.75rem 1rem 0.75rem 1rem;
  }

  .site-logo {
    height: 80px;
  }

  .search-container {
    padding: 2rem 1rem;
  }

  .search-title {
    font-size: 1.75rem;
  }

  .search-input {
    font-size: 1rem;
    padding: 0.875rem 1rem;
  }

  .search-button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .search-movie-title {
    font-size: 1.25rem;
  }

  .people-results {
    grid-template-columns: 1fr;
  }

  .hero-banner {
    padding: 0 1rem 3rem;
  }
  
  .movie-rows {
    padding: 0 1rem 1rem;
  }
  
  .hero-content {
    max-width: 90%;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .hero-description {
    font-size: 0.9rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .movie-card {
    min-width: 150px;
    width: 150px;
    height: 85px;
  }
}

/* Authentication Pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  padding-top: 180px;
  background: var(--netflix-black);
}

.auth-container {
  width: 100%;
  max-width: 450px;
}

.auth-box {
  background: rgba(0, 0, 0, 0.75);
  padding: 3rem;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.auth-title {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--netflix-white);
}

.auth-subtitle {
  font-size: 0.95rem;
  color: var(--netflix-light-gray);
  margin: 0 0 2rem 0;
  line-height: 1.5;
}

.form-hint {
  font-size: 0.85rem;
  color: var(--netflix-light-gray);
  font-style: italic;
  margin-left: 0.5rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--netflix-white);
}

.form-input {
  padding: 1rem;
  font-size: 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--netflix-white);
  border: 1px solid var(--netflix-gray);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.form-input::placeholder {
  color: var(--netflix-light-gray);
}

.form-input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.15);
  border-color: var(--netflix-white);
}

.form-group-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: -0.5rem;
}

.form-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.form-checkbox-label {
  font-size: 0.95rem;
  color: var(--netflix-light-gray);
  cursor: pointer;
}

.form-actions {
  margin-top: 1rem;
}

.btn-submit {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  background-color: var(--netflix-red);
  color: var(--netflix-white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-submit:hover {
  background-color: #f40612;
  transform: scale(1.01);
}

.auth-links {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--netflix-gray);
}

.auth-links a {
  color: var(--netflix-white);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  display: block;
  margin-bottom: 0.75rem;
}

.auth-links a:hover {
  color: var(--netflix-light-gray);
  text-decoration: underline;
}

.error-messages {
  background-color: rgba(229, 9, 20, 0.1);
  border: 1px solid var(--netflix-red);
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.error-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--netflix-red);
  margin: 0 0 0.75rem 0;
}

.error-list {
  margin: 0;
  padding-left: 1.5rem;
  color: #ff6b6b;
  font-size: 0.9rem;
}

.error-list li {
  margin-bottom: 0.5rem;
}

@media (max-width: 480px) {
  .auth-box {
    padding: 2rem 1.5rem;
  }

  .auth-title {
    font-size: 1.75rem;
  }
}

/* Admin Interface Enhancements */
.main-content__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.main-content__header > div {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--netflix-red);
  color: var(--netflix-white);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.button:hover {
  background-color: #f40612;
  transform: scale(1.02);
}
