* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; max-width: 100%; overflow-x: hidden}
body { display: flex; flex-direction: column; background: #141414; color: #fff; font-family: Arial, sans-serif; }
.content { flex: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.navbar { background: #000; padding: 1rem 0; border-bottom: 2px solid #e50914; }
.navbar .container {display: flex; align-items: center; justify-content: flex-start; }

.navbar { background: #000; padding: 1rem 0; border-bottom: 2px solid #e50914; position: relative; }
.navbar .container { display: flex; align-items: center; justify-content: space-between; }

.logo { display: inline-flex; align-items: center; margin-right: 60px; }
.logo-img { height: 50px; display: block; }


.nav-menu { list-style: none; display: flex; gap: 2rem; margin: 0; padding: 0; }
.nav-menu a { color: #fff; text-decoration: none; transition: color 0.3s; }
.nav-menu a:hover { color: #e50914; }

.logout-form { list-style: none; display: flex; gap: 2rem; }
.logout-link { color: #fff; text-decoration: none; transition: color 0.3s; }
.logout-link:hover { color: #e50914; }

.hero { background: linear-gradient(135deg,#e50914,#831010); text-align: center; padding: 4rem 0;}
.hero h1 { font-size: 3rem; margin-bottom: 1rem;}
.hero p { font-size: 1.2rem; opacity: 0.9;}
.about-content h2 { margin-top: 10px; margin-bottom: 5px; }

.movies-section { padding: 3rem 0; }
.movies-section h2 { font-size: 2rem; margin-bottom: 2rem;}
.movies-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 2rem; }
.movie-card { background: #1a1a1a; border-radius: 10px; overflow: hidden; transition: transform 0.3s, box-shadow 0.3s;}
.movie-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(229,9,20,0.3); }
.movie-card img, .no-poster { width: 100%; height: 350px; object-fit: cover; }
.no-poster { display: flex; justify-content: center; align-items: center; background: #2a2a2a; font-size: 3rem; color: #555; }
.movie-info { padding: 1.5rem; }
.movie-info h3 { font-size: 1.2rem; margin-bottom: 0.5rem;}
.btn { display: inline-block; background: #e50914; color: #fff; padding: 0.7rem 1.5rem; text-decoration: none; border-radius: 5px; transition: background 0.3s;}
.btn:hover { background: #b20710; }

.page-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.page-header { background: #1a1a1a; padding: 2rem 0; border-bottom: 2px solid #e50914; }
.page-header h1 { font-size: 2.5rem; }
.movie-detail { padding: 3rem 0; }
.detail-grid { display: grid; grid-template-columns: 300px 1fr; gap: 3rem;}
.detail-poster, .no-poster-large { width: 100%; }
.no-poster-large { height: 450px; background: #2a2a2a; display: flex; align-items: center; justify-content: center; font-size: 6rem; color: #555; border-radius: 10px;}
.footer { background: #000; padding: 2rem 0; text-align: center; border-top: 2px solid #e50914; }
.footer p { color: #999; margin: 0.5rem 0; }

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .navbar .container, .footer .container, .hero .container, .movies-section .container { padding: 0 10px; }
  .nav-menu { gap: 1rem; font-size: 0.9rem; }
  .hero h1 { font-size: 1.6rem; }
  .movies-grid { grid-template-columns: 1fr; gap: 1rem;}
}

/* Полупрозрачный фон поверх сайта */
.cookie-overlay {
    position: fixed;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Белый блок по центру */
.cookie-overlay .cookie-banner { background: #ffffff;
    color: #333333;
    max-width: 600px;
    width: 90%;
    padding: 1.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    font-size: 0.95rem;
}

/* Заголовок */
.cookie-overlay .cookie-banner h3 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}

/* Текст */
.cookie-overlay .cookie-banner p {
    margin: 0 0 1rem;
}

/* Кнопки */
.cookie-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.cookie-btn {
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.2rem;
    cursor: pointer;
    font: inherit;
}

.cookie-btn-primary {
    background: #1a73e8;
    color: #fff;
}

.cookie-btn-primary:hover {
    background: #155fc0;
}

.cookie-btn-secondary {
    background: #f1f3f4;
    color: #333;
}

.cookie-btn-secondary:hover {
    background: #e2e5e7;
}

/* ===== Модальное окно "фильм недоступен" ===== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;              /* скрыто по умолчанию */
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-window {
    background: #1a1a1a;
    color: #fff;
    padding: 2rem 3rem;
    border-radius: 10px;
    max-width: 420px;
    text-align: center;
    border: 2px solid #e50914;
}

.modal-window h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.modal-window p {
    margin-bottom: 1.5rem;
}

.modal-btn {
    background: #e50914;
    border: none;
    color: #fff;
    padding: 0.6rem 1.4rem;
    border-radius: 5px;
    cursor: pointer;
    font: inherit;
}

.modal-btn:hover {
    background: #b20710;
}

/* Бургер-меню */

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
}

.burger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
}

/* Мобильная версия */

@media (max-width: 786px) {
    .hero .menu-open .hero-subtitle {
        display: none;
    }

    .nav-menu {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #000;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 1rem 0;
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .burger {
        display: flex;
        z-index: 1100;
    }

    .logo {
        margin-right: 0;
    }
}

/* ===== Страницы авторизации / регистрации ===== */

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1rem;
}

.auth-card {
    background: #1a1a1a;
    border: 1px solid #e50914;
    border-radius: 10px;
    padding: 2rem 2.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.auth-card h1 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: bold;
}

.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="email"] {
    padding: 0.5rem 0.75rem;
    border-radius: 5px;
    border: 1px solid #444;
    background: #111;
    color: #fff;
}

.auth-card input:focus {
    outline: none;
    border-color: #e50914;
    box-shadow: 0 0 0 1px #e50914;
}

.auth-btn {
    width: 100%;
    text-align: center;
}

.auth-extra {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

.auth-extra a {
    color: #e50914;
    text-decoration: none;
}

.auth-extra a:hover {
    text-decoration: underline;
}

@media (max-width: 785px) {
    .auth-card {
        padding: 1.5rem 1.25rem;
    }
}

.form-help {
    font-size: 0.8rem;
    color: #bbb;
    line-height: 1.3;
}

.form-error {
    font-size: 0.8rem;
    color: #ff4d4f;
    margin-top: 0.2rem;
}

/* ===== Профиль пользователя ===== */

.profile-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1rem;
}

.profile-card {
    background: #1a1a1a;
    border: 1px solid #e50914;
    border-radius: 10px;
    padding: 2rem 2.5rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
    margin-top: 48px;
}

.profile-card h1 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.profile-welcome {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.profile-info p {
    margin: 0.4rem 0;
}

.profile-info span {
    font-weight: bold;
    margin-right: 0.5rem;
}

.profile-actions {
    margin-top: 1.5rem;
    text-align: right;
}

.profile-actions .btn {
    min-width: 120px;
}

@media (max-width: 785px) {
    .profile-card {
        padding: 1.5rem 1.25rem;
    }
}

.profile-divider {
    border: none;
    border-top: 1px solid #333;
    margin: 1.5rem 0 1rem;
}

.profile-subtitle {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.profile-consent-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
}

.profile-consent-info {
    font-size: 0.8rem;
    color: #bbb;
}

.legal-page {
    background: #1a1a1a;
    border: 1px solid #e50914;
    border-radius: 10px;
    padding: 2rem 2.5rem;
    margin: 3rem auto;
    max-width: 900px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
}

.legal-page h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.legal-page h2 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
}

.legal-page p,
.legal-page li {
    font-size: 0.95rem;
}

.legal-intro {
    margin-bottom: 1rem;
}

/* ссылки в блоке согласий профиля */
.checkbox-row .legal-link {
    color: #e50914;
    text-decoration: none;
}

.checkbox-row .legal-link:hover {
    text-decoration: underline;
}

/* ссылки в блоке согласий профиля */
.checkbox-row span {
    white-space: normal;       /* разрешаем перенос текста */
}

.checkbox-row .legal-link {
    color: #e50914;
    text-decoration: none;
}

/* мобильная версия — чуть уменьшить шрифт */
@media (max-width: 785px) {
    .checkbox-row {
        font-size: 0.85rem;
        align-items: flex-start;
    }
}

/* ===== Правовые страницы (политика, соглашение) ===== */

.legal-page {
    background: #1a1a1a;
    border: 1px solid #e50914;
    border-radius: 10px;
    padding: 2rem 2.5rem;
    margin: 3rem auto;
    max-width: 900px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
}

.legal-page h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    hyphens: auto;
}

/* Адаптация заголовка под мобильный экран */
@media (max-width: 785px) {
    .legal-page {
        margin: 1.5rem 0.5rem;
        padding: 1.5rem 1.25rem;
    }

    .legal-page h1 {
        font-size: 1.4rem;
        line-height: 1.2;
    }
}

.player-message{
  display: none;          /* JS будет включать block/flex */
  min-height: 50vh;       /* чтобы было что центрировать */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  font-size: 28px;
  line-height: 1.35;
  padding: 24px;
  color: #fff;
}

.player-body{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;      /* вместо padding-top */
  background: #0f0f0f;
  border-radius: 8px;
  overflow: hidden;
}

#player-iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: none;             /* по умолчанию скрыт */
}

.player-message{
  position: absolute;
  inset: 0;
  display: flex;             /* чтобы центрировать */
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  font-size: 28px;
  line-height: 1.35;
  color: #fff;
}

.detail-actions { display:flex; gap:14px; flex-wrap:wrap; margin-top:14px; margin-bottom:14px; }
.meta-row { display:flex; gap:10px; flex-wrap:wrap; margin: 6px 0 14px; }
.badge { background:#2a2a2a; padding:4px 10px; border-radius:999px; font-size:14px; }
.meta-line { margin: 6px 0; opacity: 0.95; }

.detail-description{
  margin-top: 10px;
  margin-bottom: 18px; /* отступ до кнопок */
}

.detail-description p{
  margin: 0;           /* чтобы не было лишних стандартных отступов */
  line-height: 1.4;
}

.detail-actions{
  display: flex;
  gap: 14px;           /* расстояние между кнопками */
  flex-wrap: wrap;
  margin-top: 8px;     /* на всякий случай, если сверху не хватит */
}

/* ===== Верхний hero-слайдер ===== */
.hero-slider { position: relative; height: 420px; overflow: hidden; border-bottom: 2px solid #e50914; }
.hero-track { height: 100%; display: flex; overflow: hidden; scroll-behavior: smooth; }
.hero-slide { min-width: 100%; height: 100%; background-size: cover; background-position: center; position: relative; display: block; }
.hero-overlay { position:absolute; inset:0; background: linear-gradient(90deg, rgba(0,0,0,.85), rgba(0,0,0,.25)); }
.hero-content { position: relative; max-width: 1200px; margin: 0 auto; padding: 70px 20px; }
.hero-title { font-size: 48px; margin-top: 14px; }

.hero-nav { position:absolute; top:50%; transform:translateY(-50%); width:46px; height:46px; border-radius:50%;
  border:1px solid rgba(255,255,255,.25); background:rgba(0,0,0,.35); color:#fff; font-size:26px; cursor:pointer; }
.hero-nav.prev { left: 14px; } .hero-nav.next { right: 14px; }

/* ===== Ленты (как Кинопоиск) ===== */
.rail { padding: 22px 0; }
.rail-head { display:flex; align-items:center; justify-content:space-between; gap: 12px; margin-bottom: 10px; }
.rail-viewport { display:flex; gap: 14px; overflow-x: auto; scroll-behavior: smooth; padding-bottom: 6px; }
.rail-viewport::-webkit-scrollbar { height: 8px; }
.rail-viewport::-webkit-scrollbar-thumb { background: #333; border-radius: 999px; }

.rail-card { position: relative; flex: 0 0 auto; width: 320px; height: 180px; border-radius: 10px; overflow: hidden; background:#1a1a1a; }
.rail-card img { width:100%; height:100%; object-fit: cover; display:block; }
.card-rating { position:absolute; top:10px; left:10px; background: rgba(0,0,0,.65); padding:6px 10px; border-radius: 8px; font-weight: 700; }

.rail-btn { width: 36px; height: 36px; border-radius: 999px; border: 1px solid #333; background: #000; color: #fff; cursor:pointer; }

@media (max-width: 600px){
  .hero-slider { height: 320px; }
  .hero-title { font-size: 28px; }
  .rail-card { width: 260px; height: 150px; }
}

/* ===== ДОПОЛНЕНИЯ ДЛЯ HERO ===== */
.hero-badges{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.hero-actions{
  margin-top: 18px;
}

/* чтобы span.btn внутри ссылки выглядел как кнопка */
.hero-slide .btn{
  pointer-events: none;
}

/* ===== КНОПКИ-СТРЕЛКИ НАД ЛЕНТАМИ (чуть виднее) ===== */
.rail-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.hero-slide { color: #fff; text-decoration: none; }
.hero-slide:visited { color: #fff; }
.hero-title { color: #fff; text-decoration: none; }

.hero-track,
.rail-viewport{
  scroll-snap-type: x mandatory;
}

.hero-slide,
.rail-card{
  scroll-snap-align: start;
}

/* верхняя плашка (как на скрине) */
.rail-meta{
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.rail-pill{
  background: rgba(0,0,0,.65);
  border: 1px solid rgba(255,255,255,.12);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  color: #fff;
}

/* название снизу на карточке */
.rail-title{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 12px 10px;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  z-index: 2;
  background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0));
}

/* чтобы старый рейтинг не мешал, если он у тебя ещё выводится */
.card-rating{ display: none; }
