@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;400;700;900&display=swap');

:root {
    /* Цвета */
    --color-lazurit: #16A6AF;
    --color-lazurit-dark: #19828a;          /* основной (кнопки, акценты) */
    --color-orange: #C76F00;                 /* оранжевый для заголовков билетов */
    --color-bg-beige: rgba(241, 235, 230, 0.95); /* фон подложек */
    --color-black: #000;
    --color-white: #fff;
    --color-gray-light: #666;                 /* для текста muted и границ */
    --color-gray-dark: #171D24;                /* тёмный фон для схемы зала */

    /* Тени  */
    --shadow-default: 0px 0px 3px 0px rgba(0,0,0,0.12), 0px 3px 3px 0px rgba(0,0,0,0.24);

    /* Шрифты */
    --font-family: 'Roboto', sans-serif;
    --font-weight-thin: 100;
    --font-weight-regular: 400;
    --font-weight-bold: 700;
    --font-weight-black: 900;

    /* Размеры логотипа */
    --logo-width: 212px;
    --logo-height: 39px;
    --logo-font-size: 34px;

    /* Контейнер */
    --container-max-width: 990px;

    /* Кнопки */
    --btn-height: 40px;
    --btn-border-radius: 3px;

    /* Календарь */
    --calendar-day-width: 125px;
    --calendar-day-height: 48px;

    /* Карточка фильма */
    --movie-card-height: 350px;
    --poster-width: 125px;
    --poster-height: 205px;

    /* Отступы */
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 30px;
}


/* Сброс и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.page-body {
    background: url('../img/background.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    font-family: var(--font-family);
    color: var(--color-black);
    display: flex;
    flex-direction: column;
}

.page-body-admin {
    background: url('../img/backgroundAdmin.jpg') no-repeat center center fixed;
}

.container {
    max-width: var(--container-max-width);
    width: 100%;
    margin: 0 auto;
    padding: 14px 0 0 0;
    box-sizing: border-box;
}


/* Шапка (общая) */
.page-header {
    background: transparent;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Кнопка "Войти" (на index.html) */
.btn-login {
    width: 71px;
    height: var(--btn-height);
    background: var(--color-lazurit);
    border-radius: var(--btn-border-radius);
    border: none;
    color: var(--color-white);
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-default);
    cursor: pointer;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.btn-login:hover {
    background: var(--color-lazurit-dark);
    color: var(--color-white);
}

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

/* Общий класс для бежево-прозрачных подложек */
.bg-beige-transparent {
    background: var(--color-bg-beige);
    border-radius: 2px;
}



/* Страница hall.html   */
.hall-container {
    width: 990px;
    margin: var(--spacing-lg) auto;
    padding: 0 0 5px 0;
    background: var(--color-bg-beige);
    border-radius: 2px;
    box-sizing: border-box;
}

.hall-info {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 14px 0 14px;
}

.hall-info__title {
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    margin: 0;
}

.hall-info__time {
    font-size: 14px;
    margin: 0;
}

.hall-info__hall {
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    margin: 0;
}

.hall-scheme {
    width: 100%;
    background-color: var(--color-gray-dark);
    padding: 15px 30px 5px 30px;
    box-sizing: border-box;
    margin-top: 0;
}

/* Кнопка бронирования (на hall.html) */
.btn-booking {
    width: 232px;
    height: var(--btn-height);
    background: var(--color-lazurit);
    border: none;
    border-radius: var(--btn-border-radius);
    color: var(--color-white);
    font-size: 16px;
    font-weight: var(--font-weight-regular);
    box-shadow: var(--shadow-default);
    cursor: pointer;
    transition: opacity 0.2s;
    margin: 30px auto;
    display: block;
}

.btn-booking:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-booking:hover {
    background: var(--color-lazurit-dark);
    color: var(--color-white);
}

/* ГЕНЕРАЦИЯ ЗАЛА */
.hall-scheme__row {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 5px;
}

.hall-scheme__place {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    cursor: pointer;
    box-sizing: border-box;
}


.hall-scheme__place--taken {
    border: 1px solid var(--color-gray-light);
}

.hall-scheme__place--standart {
    background-color: var(--color-white);
}
.hall-scheme__place--vip {
    background-color: var(--color-orange);
}
.hall-scheme__place--taken {
    background-color: var(--color-gray-dark);
}
.hall-scheme__place--disabled {
    background-color: var(--color-gray-dark);
}
.hall-scheme__place--selected {
    background-color: var(--color-lazurit);
    box-shadow: 0 0 2px 2px var(--color-lazurit);
}

.hall-screen {
    text-align: center;
    margin: 0 auto 20px auto;
    width: 284px;
}

.hall-screen img {
    max-width: 100%;
    height: auto;
}

.hall-legend {
    padding: 0 14px;
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
    color: var(--color-white);
}

.legend-item {
    display: flex;
    align-items: center;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 5px;
}

.legend-color--taken {
    border: 1px solid var(--color-gray-light);
    width: 24px;
    height: 24px;
}

.legend-color--standard {
    background-color: var(--color-white);
}

.legend-color--vip {
    background-color: var(--color-orange);
}

.legend-color--taken {
    background-color: var(--color-gray-dark);
}

.legend-color--selected {
    background-color: var(--color-lazurit);
    box-shadow: 0 0 2px 2px var(--color-lazurit);
}


/* Страница index.html  */
/* Календарь */
.calendar {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: var(--container-max-width);
    padding-bottom: 50px;
    box-sizing: border-box;
}

.calendar__days {
    display: flex;
    justify-content: center;
    gap: 2px;
    width: 100%;
}

.calendar__day {
    width: 120px;
    height: 48px;
    background: var(--color-bg-beige);
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-left: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    flex-shrink: 0;
    box-shadow: var(--shadow-default);
}

/* Ячейка-стрелка */
.calendar__day--arrow {
    align-items: center;
    padding-left: 0;
    font-size: 28px;
    font-weight: var(--font-weight-regular);
}

.calendar__day--selected {
    width: 241px;
    height: 52px;
    background: var(--color-white);
    font-weight: var(--font-weight-bold);
    z-index: 10;
    position: relative;
    top: -2px;
    box-shadow: 0 10px 15px -5px rgba(0, 0, 0, 0.3);
}

.calendar__day--selected .day-name,
.calendar__day--selected .day-number,
.calendar__day--selected .day-today,
.calendar__day--selected .day-date {
    font-weight: var(--font-weight-bold);
}

.calendar__day--weekend .day-name,
.calendar__day--weekend .day-number {
    color: red;
}

.day-name {
    font-weight: var(--font-weight-regular);
    line-height: 1.2;
    text-transform: capitalize;
}

.day-name::after {
    content: ',';
    margin-right: 2px;
}

.day-number {
    font-weight: var(--font-weight-regular);
    line-height: 1.2;
}

.day-today {
    font-weight: var(--font-weight-regular);
    font-size: 14px;
    line-height: 1.2;
}

/* Список фильмов */
.movie-card {
    display: flex;
    gap: 20px;
    background: var(--color-bg-beige);
    border-radius: 2px;
    padding: 15px;
    width: 100%;
    min-height: 350px;
    margin-bottom: 30px;
}

.movie-card__left {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.movie-card__poster {
    width: 125px;
    height: 175px;
    object-fit: cover;
    border-radius: 2px;
}

.movie-card__halls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.movie-card__hall {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hall-name {
    font-weight: var(--font-weight-bold);
    font-size: 14px;
}

.session-times {
    display: flex;
    gap: 5px;
}

.session-time {
    background: var(--color-white);
    color: var(--color-black);
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: var(--shadow-default);
    transition: background 0.2s;
}

.session-time:hover {
    background: var(--color-bg-beige);
}

.session-time--past {
    opacity: 0.5;
    cursor: not-allowed;
}

.movie-card__right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.movie-card__title {
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    margin: 0;
}

.movie-card__title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 14px;
    background-color: var(--color-gray-dark);
    flex-shrink: 0;
    margin-right: 10px;
}

.movie-card__description {
    font-size: 14px;
    margin: 0;
}

.movie-card__duration {
    font-size: 14px;
    margin: 0;
    color: var(--color-gray-light);
}


/* Страница payment.html */
.payment-card, .ticket-card {
    max-width: var(--container-max-width);
    margin: var(--spacing-lg) auto;
    padding: var(--spacing-lg);
    background: var(--color-bg-beige);
    border-left: none;
    border-right: none;
    position: relative;
}

/* Верхняя пунктирная линия */
.payment-card::before,
.ticket-card::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    width: 100%;
    height: 0;
    border-top: 6px dotted var(--color-orange);
    pointer-events: none;
    z-index: 1;
}

/* Нижняя пунктирная линия */
.payment-card::after,
.ticket-card::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 0;
    border-bottom: 6px dotted var(--color-orange);
    pointer-events: none;
    z-index: 1;
}

.payment-card__title, .ticket-card__title {
    font-weight: var(--font-weight-bold);
    font-size: 22px;
    line-height: 25px;
    text-transform: uppercase;
    color: var(--color-orange);
    margin-bottom: 20px;
}

.payment-card__divider, .ticket-card__divider {
    border-top: 6px dotted var(--color-orange);
    margin-left: calc(-1 * var(--spacing-lg));
    margin-right: calc(-1 * var(--spacing-lg));
    width: auto;
    opacity: 1;
}

.payment-card__details p, .ticket-card__details {
    font-size: 16px;
    margin-bottom: 5px;
    line-height: 1.5;
}

.detail-label {
    font-weight: var(--font-weight-regular);
    color: var(--color-black);
}

.detail-value {
    font-weight: var(--font-weight-bold);
    color: var(--color-black);
}

.btn-code {
    width: 337px;
    height: var(--btn-height);
    background: var(--color-lazurit);
    border: none;
    border-radius: var(--btn-border-radius);
    color: var(--color-white);
    font-size: 16px;
    font-weight: var(--font-weight-regular);
    text-transform: uppercase;
    box-shadow: var(--shadow-default);
    margin: 20px auto;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-code:hover {
    opacity: 0.9;
    background: var(--color-lazurit-dark);
    color: var(--color-white);
}

.payment-card__footnote,
.ticket-card__footnote,
.payment-card__wish,
.ticket-card__wish {
    font-size: 14px;
    color: var(--color-gray-light);
    margin-bottom: 5px;
}



/* Страница ticket.html */
.hall {
    background: var(--color-gray-dark);
    padding: var(--spacing-lg);
}

.ticket-card__qr {
    display: flex;
    justify-content: center;
    margin: var(--spacing-lg) 0;
}

.ticket-card__details p {
    margin-bottom: 5px;
    font-size: 16px;
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    background: var(--color-white);
    color: var(--color-black);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    padding: 10px;
    box-sizing: border-box;
}

.hall-info__hint {
    display: none;
}

/* Обёртка для информации и подсказки */
.hall-info-wrapper {
    width: 100%;
}


/* Адаптивность         */
/* Планшеты (до 768px)  */

@media (max-width: 768px) {
    :root {
        --container-max-width: 100%;
        --movie-card-height: auto;
        --poster-width: 80px;
        --poster-height: 120px;
        --calendar-day-width: calc((100vw - 20px) / 7);
        --calendar-day-height: 48px;
        --spacing-md: 10px;
        --spacing-lg: 20px;
    }

    body {
        overflow-x: hidden;
    }

    .container {
        padding: 0 10px;
        width: 100%;
        max-width: none;
    }

    /* Календарь */
    .calendar {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .calendar__days {
        gap: 2px;
        width: 100%;
    }

    .calendar__day {
        width: var(--calendar-day-width);
        min-width: 40px;
        font-size: 12px;
        padding-left: 4px;
    }

    .calendar__day--selected {
        width: auto;
        min-width: calc(var(--calendar-day-width) + 20px);
    }

    /* Карточки фильмов */
    .movie-card {
        flex-direction: column;
        height: auto;
        padding: 15px;
        width: 100%;
        margin-bottom: 20px;
        box-sizing: border-box;
    }

    .movie-card__left {
        flex-direction: row;
        align-items: flex-start;
        gap: 15px;
        width: 100%;
    }

    .movie-card__poster {
        width: var(--poster-width);
        height: var(--poster-height);
        flex-shrink: 0;
    }

    .movie-card__halls {
        flex: 1;
    }

    .movie-card__hall {
        margin-bottom: 8px;
    }

    .hall-name {
        font-size: 14px;
    }

    .session-time {
        font-size: 12px;
        padding: 4px 8px;
    }

    .movie-card__title {
        font-size: 20px;
        margin-top: 10px;
    }

    .movie-card__description {
        font-size: 13px;
    }

    .movie-card__duration {
        font-size: 13px;
    }

    /* Подсказка для главной */
    .movies-list::after {
        content: "Тапните для выбора мест";
        display: block;
        text-align: center;
        color: var(--color-gray-light);
        font-size: 14px;
        margin-top: 10px;
        margin-bottom: 20px;
    }

    /* Страница hall.html */
    .hall-container {
        width: 100%;
        margin-top: 15px;
    }

    .hall-info__title {
        font-size: 24px;
    }

    .hall-info__time,
    .hall-info__hall {
        font-size: 16px;
    }

    .hall-scheme {
        min-height: auto;
        padding: 10px 15px;
    }

    .hall-scheme__place {
        width: 18px;
        height: 18px;
    }

    .hall-legend {
        gap: 15px 20px;
        font-size: 13px;
    }

    .btn-booking {
        width: 200px;
        font-size: 14px;
    }

    /* Подсказка "Тапните дважды…" на планшетах */
    .hall-info-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
    }

    .hall-info {
        flex: 1 1 auto;
        min-width: 0;
    }

    .hall-info__hint {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
        margin-left: 15px;
    }

    .hint-text {
        display: flex;
        flex-direction: column;
        font-size: 12px;
        line-height: 1.3;
        color: var(--color-gray-light);
        text-align: right;
        white-space: nowrap;
    }

    .hint-icon {
        width: 28px;
        height: auto;
        flex-shrink: 0;
    }
}
    /* Страницы payment.html и ticket.html */
    .payment-card, .ticket-card {
        width: 100%;
        padding: 20px 15px;
    }

    .payment-card__title, .ticket-card__title {
        font-size: 20px;
    }

    .payment-card__details p, .ticket-card__details {
        font-size: 15px;
    }

    .btn-code {
        width: 280px;
    }


/* Мобильные (до 390px) */
@media (max-width: 390px) {
    :root {
        --poster-width: 70px;
        --poster-height: 105px;
        --calendar-day-height: 44px;
    }

    .calendar__day {
        font-size: 11px;
        height: var(--calendar-day-height);
    }

    .calendar__day--selected {
        min-width: auto;
    }

    .movie-card__left {
        flex-direction: column;
        align-items: center;
    }

    .movie-card__poster {
        width: 100px;
        height: 150px;
        margin-bottom: 10px;
    }

    .movie-card__title {
        font-size: 18px;
    }

    .movie-card__description {
        font-size: 12px;
    }

    .hall-info__title {
        font-size: 20px;
    }

    .hall-info__time,
    .hall-info__hall {
        font-size: 14px;
    }

    .hall-scheme__place {
        width: 20px;
        height: 20px;
    }

    .btn-booking,
    .btn-code {
        width: 100%;
        max-width: 280px;
    }

    .movies-list::after {
        font-size: 12px;
    }

    /* Подсказка на мобильных – остаётся справа */
    .hall-info {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        flex-wrap: nowrap;
    }

    .hall-info__main {
        flex: 1 1 auto;
        min-width: 0;
        word-break: break-word;
    }

    .hall-info__hint {
        display: flex;
        align-items: center;
        gap: 5px;
        flex-shrink: 0;
        margin-left: 8px;
    }

    .hint-text {
        font-size: 10px;
        white-space: normal;
    }

    .hint-icon {
        width: 22px;
    }

    .hall-info__hint {
        margin-left: 8px;
        gap: 5px;
    }
}
