/* Основная структура */
.element {
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--white);
}

.div {
    background-color: var(--white);
    width: 100%;
    max-width: 1440px;
    height: auto;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: clamp(1rem, 2vw, 1.25rem) clamp(2.4rem, 5vw, 3rem);
}

/* Шапка */
.header {
    display: flex;
    width: 1280px;
    max-width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    margin: 35px auto 0;
}

.theatre-by {
    font-family: "Montserrat-Bold", Helvetica;
    font-weight: 700;
    color: var(--black);
    font-size: 19px;
    letter-spacing: 0;
    line-height: normal;
}

.menu {
    display: flex;
    align-items: center;
    gap: 38px;
}

.menu-link {
    font-family: var(--mont-poit-font-family);
    font-weight: var(--mont-poit-font-weight);
    color: var(--gray);
    font-size: var(--mont-poit-font-size);
    letter-spacing: var(--mont-poit-letter-spacing);
    line-height: var(--mont-poit-line-height);
    font-style: var(--mont-poit-font-style);
}

.menu-link.active {
    font-family: "Montserrat-Regular", Helvetica;
    font-weight: 400;
    color: var(--black);
    font-size: 18px;
    letter-spacing: 0;
    line-height: normal;
}

/* Login/Registration Form */
.overlap-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 400px;
    max-width: 100%;
    margin: 90px 0 0 20px;
    padding: 0 20px;
}

.main-title-text {
    margin-bottom: 10px;
    font-family: var(--mont-h1-font-family);
    font-weight: var(--mont-h1-font-weight);
    color: var(--black);
    font-size: var(--mont-h1-font-size);
    line-height: var(--mont-h1-line-height);
    letter-spacing: var(--mont-h1-letter-spacing);
    font-style: var(--mont-h1-font-style);
    text-align: left;
}

.form-group {
    margin: 20px 0;
    position: relative;
}

.form-input {
    width: 100%;
    height: 50px;
    padding: 10px 40px 10px 10px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-family: "Montserrat-Regular", Helvetica;
    font-size: 16px;
}

.password-group {
    position: relative;
}

.consent-group {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 15px 0;
}

.consent-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    cursor: pointer;
}

.consent-group label {
    font-family: "Montserrat-Regular", Helvetica;
    font-size: 14px;
    color: var(--black);
    line-height: 1.4;
}

.consent-group a {
    color: var(--darkblue);
    text-decoration: underline;
}

.consent-group a:hover {
    color: #0056b3;
}

.forgot-password {
    text-align: center;
    margin-top: 10px;
}

.forgot-password-link {
    color: var(--darkblue);
    font-size: 14px;
}

.forgot-password-link:hover {
    color: #0056b3;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray);
    font-size: 20px;
}

.password-toggle:hover {
    color: var(--black);
}

.password-error {
    display: none;
    width: 100%;
    padding: 5px 10px;
    margin-bottom: 5px;
    background-color: #ffebee;
    color: #d32f2f;
    font-family: "Montserrat-Regular", Helvetica;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid #ef9a9a;
    text-align: left;
}

.password-error.active {
    display: block;
}

.alert-successn {
    display: none;
    width: 100%;
    padding: 5px 10px;
    margin-top: 10px;
    margin-bottom: 5px;
    background-color: #e6f3ff;
    color: #08355e;
    font-family: "Montserrat-Regular", Helvetica;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid #2673b8;
    text-align: left;
}

.alert-successn.active {
    display: block;
}

.main-button {
    all: unset;
    box-sizing: border-box;
    display: flex;
    width: 297px;
    height: 54px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: var(--darkblue);
    border-radius: 28px;
    box-shadow: 0px 6px 31.9px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    margin-top: 20px;
}

.main-button-text {
    font-family: var(--mont-button-font-family);
    font-weight: var(--mont-button-font-weight);
    color: var(--white);
    font-size: var(--mont-button-font-size);
    line-height: var(--mont-button-line-height);
    white-space: nowrap;
    letter-spacing: var(--mont-button-letter-spacing);
    font-style: var(--mont-button-font-style);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: auto;
    display: flex; /* Добавляем flex для центрирования */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--white);
    margin: 0; /* Убираем margin: 10% auto */
    padding: 20px;
    border-radius: 10px;
    width: 100%;
    max-width: 400px; /* Уменьшаем максимальную ширину */
    max-height: 60vh; /* Уменьшаем максимальную высоту */
    position: relative;
    font-family: "Montserrat-Regular", Helvetica;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 30px;
    cursor: pointer;
    color: var(--gray);
}

.modal-close:hover {
    color: var(--black);
}

.modal-content h2 {
    font-family: "Montserrat-Bold", Helvetica;
    font-size: 18px; /* Уменьшаем заголовок */
    color: var(--black);
    margin-bottom: 15px;
}

.modal-body {
    max-height: 45vh; /* Уменьшаем высоту контента */
    overflow-y: auto;
    font-size: 13px; /* Уменьшаем шрифт */
    color: var(--black);
    line-height: 1.5;
}

.modal-body h3 {
    font-family: "Montserrat-Bold", Helvetica;
    font-size: 15px;
    margin: 12px 0 8px;
}

.modal-body p {
    margin-bottom: 8px;
}

.modal-body ul {
    margin: 8px 0 8px 18px;
    list-style-type: disc;
}

.modal-body ul li {
    margin-bottom: 6px;
}

.modal-body a {
    color: var(--darkblue);
    text-decoration: underline;
}

.modal-body a:hover {
    color: #0056b3;
}

/* Футер */
.footer {
    width: 100%;
    margin-top: 80px; /* Matches example page */
    background-color: transparent;
    border-top: 2px solid var(--light-gray);
    padding: 0;
    display: flex;
    align-items: flex-end;
}

.footer-content-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: clamp(1rem, 2vw, 1.25rem);
    width: 100%;
    flex-wrap: wrap;
    padding: clamp(1rem, 2vw, 1.25rem) clamp(0.2rem, 1.5vw, 0.5rem); /* Matches example page's reduced side padding */
}

.footer-left-column {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 28.9375rem;
    align-items: flex-start;
    gap: clamp(0.75rem, 1.5vw, 1.25rem);
    flex-grow: 1;
}

.footer-logo {
    align-self: stretch;
    font-family: "Montserrat-Bold", Helvetica;
    font-weight: 700;
    color: var(--black);
    font-size: var(--num-font-size, 19px); /* Fallback to 19px if variable undefined */
    letter-spacing: 0;
    line-height: normal;
    word-break: break-word;
}

.footer-nav {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2vw, 2.9375rem);
    width: 100%;
    flex-wrap: wrap;
}

.footer-nav .menu-link {
    font-family: "Montserrat-Regular", Helvetica; /* Matches .text-wrapper-10 */
    font-weight: 400;
    color: var(--gray);
    font-size: clamp(0.875rem, 1.125vw, 1.125rem); /* Matches .text-wrapper-10 */
    letter-spacing: 0;
    line-height: normal;
    white-space: nowrap;
    text-decoration: none; /* Ensure no underline */
}

.footer-right-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

.social-icons-group {
    width: auto;
    height: 1.625rem;
    display: flex;
    gap: clamp(0.75rem, 1.5vw, 1.5rem);
    align-items: center;
    justify-content: flex-start;
}

.VK, .telegram, .you-tube {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.you-tube {
    width: 1.625rem;
    height: 1.625rem;
}

.footer-info {
    font-family: "Montserrat-Regular", Helvetica; /* Matches example page */
    font-size: 14px;
    line-height: 1.4;
    color: var(--gray);
    margin-top: 1rem;
}

.footer-info p {
    margin-bottom: 1rem; /* Matches example page */
}

.footer-info a {
    color: var(--darkblue);
    text-decoration: underline;
    word-break: break-all;
}

.copyright-text {
    font-family: "Montserrat-Regular", Helvetica; /* Matches example page */
    font-weight: 400;
    color: var(--gray);
    font-size: clamp(0.875rem, 1.125vw, 1.125rem); /* Matches .text-wrapper-10 */
    letter-spacing: 0;
    line-height: normal;
    white-space: nowrap;
}

.copyright-text a {
    color: var(--darkblue);
    text-decoration: underline;
}

/* Медиа-запросы */
@media (max-width: 1024px) {
    .header, .overlap-group {
        padding: 0 0;
    }

    .footer {
        padding: 0;
    }

    .footer-content-wrapper {
        padding: clamp(1rem, 2vw, 1.25rem) clamp(0.2rem, 1.5vw, 0.5rem); /* Matches example page */
    }

    .overlap-group {
        width: 350px;
        margin: 150px 0 0 0;
    }

    .form-input {
        height: 45px;
        padding: 10px 35px 10px 10px;
    }

    .password-toggle {
        right: 8px;
        font-size: 18px;
    }

    .main-button {
        width: 250px;
    }

    .password-error {
        font-size: 13px;
        padding: 4px 8px;
    }

    .modal-content {
        max-width: 350px;
        max-height: 55vh;
        margin: auto;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
        padding: 0 0;
    }

    .menu {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .overlap-group {
        width: 300px;
        margin: 100px 0 0 0;
        padding: 0 0;
    }

    .main-title-text {
        font-size: 24px;
    }

    .form-input {
        height: 40px;
        font-size: 14px;
        padding: 10px 30px 10px 10px;
    }

    .password-toggle {
        right: 8px;
        font-size: 16px;
    }

    .main-button {
        width: 200px;
        height: 50px;
    }

    .password-error {
        font-size: 12px;
        padding: 3px 6px;
    }

    .alert-successn {
        font-size: 12px;
        padding: 3px 6px;
    }

    .footer {
        padding: 0;
    }

    .footer-content-wrapper {
        padding: clamp(1rem, 2vw, 1.25rem) clamp(0.2rem, 1.5vw, 0.5rem); /* Matches example page */
    }
    
    .modal-content {
        max-width: 350px; /* Уменьшаем ширину для планшетов */
        max-height: 55vh;
        padding: 15px;
        margin: auto;
    }

    .modal-content h2 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .modal-body {
        max-height: 40vh;
        font-size: 12px;
    }

    .modal-body h3 {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .div {
        padding: 1rem 1rem !important;
    }

    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 1rem;
        margin: 20px auto 0;
    }

    .theatre-by {
        font-size: 16px;
    }

    .menu {
        gap: 10px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .menu::-webkit-scrollbar {
        display: none;
    }

    .menu-link, .menu-link.active {
        font-size: 12px;
        white-space: nowrap;
    }

    .overlap-group {
        width: 100%;
        max-width: 300px;
        margin: 40px auto 0;
        padding: 0 10px;
        align-items: center;
    }

    .main-title-text {
        font-size: 18px;
        text-align: center;
    }

    .form-group {
        margin: 12px 0;
    }

    .form-input {
        height: 36px;
        font-size: 13px;
        padding: 8px 30px 8px 10px;
        border-radius: 8px;
    }

    .password-toggle {
        right: 10px;
        font-size: 14px;
    }

    .consent-group {
        gap: 6px;
        margin: 12px 0;
    }

    .consent-group input[type="checkbox"] {
        width: 14px;
        height: 14px;
        margin-top: 3px;
    }

    .consent-group label {
        font-size: 12px;
        line-height: 1.3;
    }

    .consent-group a {
        font-size: 12px;
    }

    .main-button {
        width: 100%;
        max-width: 220px;
        height: 40px;
        border-radius: 20px;
        margin: 15px auto 0;
        padding: 8px 16px;
    }

    .main-button-text {
        font-size: 14px;
    }

    .forgot-password {
        margin-top: 8px;
    }

    .forgot-password-link {
        font-size: 12px;
    }

    .password-error, .alert-successn {
        font-size: 11px;
        padding: 4px 8px;
        margin: 6px 0;
        border-radius: 6px;
    }

    .modal-content {
        max-width: 300px; /* Еще меньше для мобильных */
        max-height: 50vh;
        padding: 12px;
        margin: auto;
    }

    .modal-close {
        font-size: 24px;
        top: 10px;
        right: 10px;
    }

    .modal-content h2 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .modal-body {
        max-height: 40vh;
        font-size: 11px;
        line-height: 1.4;
    }

    .modal-body h3 {
        font-size: 13px;
        margin: 8px 0 6px;
    }

    .modal-body p {
        margin-bottom: 6px;
    }

    .modal-body ul {
        margin: 6px 0 6px 15px;
    }

    .modal-body ul li {
        margin-bottom: 4px;
    }

    .footer {
        margin-top: 60px;
        padding: 0;
    }

    .footer-content-wrapper {
        padding: 1rem 1rem !important; /* Matches your page */
        flex-direction: column;
        gap: 1.5rem;
    }

    .footer-left-column, .footer-right-column {
        max-width: 100%;
        align-items: center; /* Center align for mobile */
    }

    .footer-logo {
        font-size: 14px;
        text-align: center;
    }

    .footer-nav {
        gap: 1rem;
        justify-content: center;
    }

    .footer-nav .menu-link {
        font-size: 12px;
    }

    .social-icons-group {
        justify-content: center;
        gap: 0.5rem;
    }

    .VK, .telegram, .you-tube {
        width: 24px; /* Matches example page */
        height: 24px;
    }

    .you-tube {
        width: 24px;
        height: 24px;
    }

    .copyright-text {
        font-size: 12px;
        line-height: 1.3;
        margin-top: 1rem;
        white-space: normal;
    }
}