/* ================ main.css ================ */
/* Базовые сбросы и глобальные стили */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacOSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #0d1117;
  color: #e0e0ff;
  line-height: 1.5;
}

a {
  color: #8ab4f8;
  text-decoration: none;
}

a:hover {
  color: #c9d1d9;
  text-decoration: underline;
}

/* ================ Navbar ================ */
.navbar {
  background: #0d1117 !important;
  border-bottom: 1px solid #21262d;
  box-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.6rem;
  color: #58a6ff !important;
}

/* ================ Hero (главная страница) ================ */
.hero {
  position: relative;
  height: 80vh;
  min-height: 520px;
  background: linear-gradient(rgba(13,17,23,0.75), rgba(13,17,23,0.9)), url('../imags/bg.webp') center/cover no-repeat;
  color: white;
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 20%, #0d1117 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero h1 {
  font-size: 4.8rem;
  font-weight: 900;
  margin-bottom: 0.4rem;
  text-shadow: 0 4px 12px rgba(0,0,0,0.8);
}

.hero h2 {
  font-size: 2.1rem;
  font-weight: 400;
  opacity: 0.92;
}

/* ================ Карточки (movie-card) ================ */
.movie-card {
  background: #161b22;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.22s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  position: relative;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.55);
}

.movie-img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
}

.movie-info {
  padding: 0.9rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.movie-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-vote {
  background: rgba(88,166,255,0.18);
  color: #58a6ff;
  font-weight: bold;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* ================ Детальная страница (backdrop + poster) ================ */
.movie-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60vh;
  background-size: cover;
  background-position: center 20%;
  filter: brightness(0.35);
  z-index: -1;
  opacity: 0.85;
}

.movie-poster {
  border: 4px solid rgba(255,255,255,0.08);
  box-shadow: 0 12px 40px rgba(0,0,0,0.7);
  margin-top: -180px;
  position: relative;
  z-index: 2;
  border-radius: 12px;
}

/* ================ Каст (актёры) ================ */
.cast-card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #30363d;
  margin-bottom: 0.7rem;
}

.cast-card p {
  margin: 0;
  font-size: 0.95rem;
}

/* ================ Пагинация ================ */
.pagination .page-link {
  background: #21262d;
  border-color: #30363d;
  color: #c9d1d9;
}

.pagination .page-link:hover,
.pagination .page-link:focus {
  background: #30363d;
  color: #ffffff;
  border-color: #58a6ff;
}

/* ================ Разное ================ */
.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 2rem;
}

.text-muted {
  color: #8b949e !important;
}

.badge-primary {
  background-color: #388bfd;
}

.badge-warning {
  background-color: #f0b429;
  color: #0d1117;
}

/* Адаптивность */
@media (max-width: 768px) {
  .hero h1 { font-size: 3.6rem; }
  .hero h2 { font-size: 1.6rem; }
  
  .movie-backdrop { height: 45vh; }
  .movie-poster { margin-top: -120px; }
}