/* ============================================
   СОВРЕМЕННЫЙ ДИЗАЙН В СТИЛЕ СТРИМИНГОВОГО СЕРВИСА
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-card: #1f1f1f;
  --bg-hover: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #808080;
  --accent-primary: #e50914;
  --accent-secondary: #f5c518;
  --accent-hover: #f40612;
  --border-color: #333333;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

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

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.top-header {
  background: linear-gradient(180deg, rgba(15, 15, 15, 0.98) 0%, rgba(15, 15, 15, 0.85) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.top-header img {
  max-height: 40px;
  width: auto;
}

.top-header .btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 8px;
  transition: var(--transition);
  font-weight: 500;
}

.top-header .btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.top-header .btn-warning {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.top-header .btn-warning:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.navbar.bg-blue {
  background: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  position: sticky;
  top: 70px;
  z-index: 999;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.main-menu {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.main-menu::-webkit-scrollbar {
  display: none;
}

.main-menu .nav-link {
  color: var(--text-secondary) !important;
  padding: 8px 16px;
  border-radius: 6px;
  transition: var(--transition);
  white-space: nowrap;
  font-weight: 500;
  font-size: 14px;
}

.main-menu .nav-link:hover {
  color: var(--text-primary) !important;
  background: var(--bg-card);
}

/* ============================================
   SEARCH
   ============================================ */

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

.search-wrapper {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 12px 50px 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-hover);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: var(--accent-primary);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: white;
}

.search-button:hover {
  background: var(--accent-hover);
  transform: translateY(-50%) scale(1.05);
}

/* ============================================
   HERO SECTION (Главный баннер)
   ============================================ */

.hero-section {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  max-height: 800px;
  overflow: hidden;
  margin-bottom: 40px;
}

.hero-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

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

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(15, 15, 15, 0.95) 0%, rgba(15, 15, 15, 0.7) 50%, transparent 100%);
  padding: 60px 40px 40px;
  z-index: 2;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.1;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.hero-genres {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-genre-tag {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.hero-match {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-secondary);
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-hero {
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.btn-hero-primary:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  backdrop-filter: blur(10px);
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hero-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
  color: white;
  font-size: 20px;
}

.hero-controls:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: var(--accent-primary);
}

.hero-controls.prev {
  left: 20px;
}

.hero-controls.next {
  right: 20px;
}

.hero-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.hero-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: var(--transition);
}

.hero-indicator.active {
  background: var(--accent-primary);
  width: 24px;
  border-radius: 4px;
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */

.content {
  padding: 0;
  background: var(--bg-primary);
}

.content-section {
  margin-bottom: 48px;
  padding: 0 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 4px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.section-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}

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

/* ============================================
   EVENT CARDS (Карточки событий)
   ============================================ */

.card-desc {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--bg-secondary);
  scroll-behavior: smooth;
}

.card-desc::-webkit-scrollbar {
  height: 8px;
}

.card-desc::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

.card-desc::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 4px;
}

.card-desc::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

.today .card {
  flex: 0 0 auto;
  width: 280px;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  cursor: pointer;
  position: relative;
}

.today .card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
  z-index: 5;
}

.today .card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.today .card-img-top {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: var(--transition);
  aspect-ratio: 2/3;
  /* Сохраняем пропорции афиши */
}

.today .card:hover .card-img-top {
  transform: scale(1.05);
}

.today .card-body {
  padding: 16px;
  background: var(--bg-card);
}

.today .card-title,
.today .card .h6 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 44px;
}

.today .card-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.today .card-text p {
  margin: 4px 0;
  font-size: 13px;
}

.today .card .mb-0 {
  padding: 0 16px 16px;
}

.today .card .btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  transition: var(--transition);
  text-align: center;
}

.today .card .btn-warning {
  background: var(--accent-primary);
  color: white;
}

.today .card .btn-warning:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
}

.today .card .btn-default {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.today .card .btn-danger {
  background: #dc3545;
  color: white;
}

.today .card .datetime {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(229, 9, 20, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
  z-index: 2;
  box-shadow: var(--shadow-md);
  min-width: 60px;
}

.today .card .datetime p {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.today .card .card-text i {
  margin-right: 6px;
  color: var(--accent-primary);
  font-size: 14px;
}

.today .card .card-text a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.today .card .card-text a:hover {
  color: var(--accent-primary);
}

.today .card .card-sale {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: var(--accent-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--bg-primary);
  z-index: 2;
  box-shadow: var(--shadow-md);
}

/* ============================================
   CAROUSEL (Карусель баннеров)
   ============================================ */

.carousel-fade .carousel-item {
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.carousel-fade .carousel-item.active {
  opacity: 1;
}

.carousel-item img {
  width: 100%;
  height: 70vh;
  min-height: 500px;
  max-height: 800px;
  object-fit: cover;
  object-position: center;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: var(--bg-secondary) !important;
  border-top: 1px solid var(--border-color);
  margin-top: 80px;
  padding: 60px 20px 40px !important;
}

.footer h4,
.footer h5 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 20px;
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
  margin-bottom: 8px;
}

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

/* ============================================
   MODAL
   ============================================ */

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
}

.modal-body {
  background: var(--bg-card);
}

.btn-close {
  filter: invert(1);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-overlay {
    padding: 40px 20px 30px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-hero {
    width: 100%;
    justify-content: center;
  }

  .today .card {
    width: 200px;
  }

  .today .card-img-top {
    height: 300px;
  }

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

  .content-section {
    margin-bottom: 32px;
  }

  .top-header {
    padding: 8px 12px;
  }

  .top-header img {
    max-height: 32px;
  }
}

@media (max-width: 576px) {
  .hero-section {
    height: 50vh;
    min-height: 400px;
  }

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

  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .today .card {
    width: 160px;
  }

  .today .card-img-top {
    height: 240px;
  }

  .today .card-body {
    padding: 12px;
  }

  .today .card-title,
  .today .card .h6 {
    font-size: 14px;
    min-height: 40px;
  }

  .today .card-text {
    font-size: 12px;
  }

  .today .card .datetime {
    top: 12px;
    left: 12px;
    padding: 8px 10px;
    min-width: 50px;
  }

  .today .card .datetime p {
    font-size: 14px;
  }

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

  .card-desc {
    gap: 12px;
    padding: 8px 4px 16px;
  }

  .hero-controls {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .hero-controls.prev {
    left: 10px;
  }

  .hero-controls.next {
    right: 10px;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-primary {
  color: var(--text-primary) !important;
}

.text-secondary {
  color: var(--text-secondary) !important;
}

.bg-dark {
  background-color: var(--bg-secondary) !important;
}

.rounded-10 {
  border-radius: 10px;
}

/* Сохранение пропорций изображений */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Плавные переходы для всех интерактивных элементов */
a, button {
  transition: var(--transition);
}

/* Улучшение скролла */
.card-desc {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.today .card {
  scroll-snap-align: start;
}

/* Анимация появления карточек */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.today .card {
  animation: fadeInUp 0.5s ease-out;
}

/* Улучшение для мобильных устройств */
@media (max-width: 768px) {
  .hero-section {
    margin-bottom: 24px;
  }
  
  .content-section {
    padding: 0 12px;
  }

  .top-header .row {
    margin: 0;
  }

  .top-header .col-md-3,
  .top-header .col-md-5,
  .top-header .col-md-2 {
    padding: 0 8px;
  }
}

/* Улучшение touch-событий для мобильных */
@media (hover: none) and (pointer: coarse) {
  .today .card:hover {
    transform: none;
  }

  .today .card:active {
    transform: scale(0.98);
  }

  .btn-hero:active {
    transform: scale(0.95);
  }
}

/* Плавная прокрутка */
html {
  scroll-behavior: smooth;
}

