/*
  КиноПульс - Темная тема в стиле Netflix + Apple TV
  Современный, минималистичный дизайн
*/

/* ==================== ПЕРЕМЕННЫЕ ==================== */
:root {
  /* Цвета фона */
  --bg-primary: #0d0d0d;
  --bg-secondary: #1a1a1a;
  --bg-card: #1f1f1f;
  --bg-hover: #2a2a2a;
  --bg-input: #262626;

  /* Текст */
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #808080;
  --text-dark: #4a4a4a;

  /* Акценты */
  --accent-primary: #e50914;      /* Netflix красный */
  --accent-hover: #f40612;
  --accent-purple: #667eea;       /* Apple TV фиолетовый */
  --accent-gold: #ffd700;         /* Рейтинг */

  /* Градиенты */
  --hero-gradient: linear-gradient(
    to bottom,
    rgba(13, 13, 13, 0) 0%,
    rgba(13, 13, 13, 0.5) 50%,
    rgba(13, 13, 13, 0.9) 80%,
    rgba(13, 13, 13, 1) 100%
  );

  --apple-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --card-gradient: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 50%);

  /* Тени */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.8);

  /* Радиусы */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Анимация */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== БАЗОВЫЕ СТИЛИ ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition: var(--transition);
}

/* ==================== HEADER / НАВИГАЦИЯ ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(to bottom, rgba(13, 13, 13, 0.9), transparent);
  padding: 1.5rem 0;
  transition: var(--transition);
}

.header.scrolled {
  background-color: var(--bg-primary);
  box-shadow: var(--shadow-md);
}

.header__container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: -0.5px;
}

.logo__pulse {
  width: 40px;
  height: 40px;
  background-image: url('/assets/images/logo-icon.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.05); }
}

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

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

.nav__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav__link:hover {
  color: var(--text-primary);
}

.nav__link.active {
  color: var(--text-primary);
}

.nav__link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-primary);
}

/* ==================== HERO БАННЕР ==================== */
.hero {
  position: relative;
  height: 80vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: 80px;
}

.hero__background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.hero__background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--hero-gradient);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.hero__title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  max-width: 800px;
  line-height: 1.1;
}

.hero__meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  color: var(--text-secondary);
}

.hero__rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.hero__description {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 700px;
  margin-bottom: 2rem;
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  cursor: pointer;
}

.btn--primary {
  background-color: var(--accent-primary);
  color: var(--text-primary);
}

.btn--primary:hover {
  background-color: var(--accent-hover);
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.btn--secondary {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.btn--secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* ==================== СЕКЦИИ ==================== */
.section {
  padding: 3rem 0;
  max-width: 1400px;
  margin: 0 auto;
}

.section__header {
  padding: 0 2rem;
  margin-bottom: 2rem;
}

.section__title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section__subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ==================== КАРУСЕЛЬ ФИЛЬМОВ ==================== */
.carousel {
  position: relative;
  padding: 0 2rem;
}

.carousel__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 1rem;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

/* ==================== КАРТОЧКИ ФИЛЬМОВ ==================== */
.movie-card {
  flex: 0 0 auto;
  width: 280px;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

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

.movie-card__poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
}

.movie-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.movie-card:hover .movie-card__poster img {
  transform: scale(1.1);
}

.movie-card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-gradient);
  padding: 1rem;
  transform: translateY(100%);
  transition: var(--transition);
}

.movie-card:hover .movie-card__overlay {
  transform: translateY(0);
}

.movie-card__rating {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background-color: rgba(0, 0, 0, 0.8);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-gold);
  backdrop-filter: blur(10px);
}

.movie-card__info {
  padding: 1rem;
}

.movie-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card__meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.movie-card__year,
.movie-card__genres {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card__kinopoisk {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
  padding: 0.4rem 0.75rem;
  background: rgba(255, 159, 10, 0.1);
  border: 1px solid rgba(255, 159, 10, 0.3);
  border-radius: 4px;
  color: #ff9f0a;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.movie-card__kinopoisk:hover {
  background: rgba(255, 159, 10, 0.2);
  border-color: #ff9f0a;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(255, 159, 10, 0.2);
}

/* ==================== FOOTER ==================== */
.footer {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, #000 100%);
  padding: 4rem 0 2rem;
  margin-top: 6rem;
  border-top: 1px solid rgba(229, 9, 20, 0.3);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

.footer__container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer__content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__section {
  display: flex;
  flex-direction: column;
}

.footer__section--brand {
  gap: 1.5rem;
}

.footer__section--brand .logo {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.footer__description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer__social {
  display: flex;
  gap: 1rem;
}

.footer__social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__social-link:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  transform: translateY(-3px);
}

.footer__section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 0.5rem;
}

.footer__section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent-primary);
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer__link {
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__link:hover {
  color: var(--accent-primary);
  padding-left: 0.5rem;
}

.footer__link::before {
  content: '›';
  font-size: 1.2rem;
  opacity: 0;
  transition: var(--transition);
}

.footer__link:hover::before {
  opacity: 1;
}

.footer__bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__copyright {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer__legal {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer__legal-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: var(--transition);
}

.footer__legal-link:hover {
  color: var(--accent-primary);
}

.footer__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

@media (max-width: 1024px) {
  .footer__content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer__section--brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .footer__content {
    grid-template-columns: 1fr;
  }

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

/* ==================== АДАПТИВНОСТЬ ==================== */
@media (max-width: 1024px) {
  .hero__title {
    font-size: 2.5rem;
  }

  .movie-card {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .header__container {
    padding: 0 1rem;
  }

  .nav {
    gap: 1rem;
  }

  .hero {
    height: 60vh;
    min-height: 500px;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__description {
    font-size: 1rem;
  }

  .section {
    padding: 2rem 0;
  }

  .carousel {
    padding: 0 1rem;
  }

  .movie-card {
    width: 180px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.5rem;
  }

  .nav {
    gap: 0.75rem;
  }

  .nav__link {
    font-size: 0.875rem;
  }

  .hero__title {
    font-size: 1.75rem;
  }

  .hero__meta {
    font-size: 0.875rem;
  }

  .movie-card {
    width: 150px;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
}
