/* Стили для модального окна */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    position: absolute;
    right: 15px;
    top: 15px;
}

.close:hover {
    color: white;
}

.login-form,
.register-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: white;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    box-sizing: border-box;
}

/* Email в регистрации: белый текст при вводе (включая autofill) */
#registerModal #reg_email {
    color: #ffffff !important;
    caret-color: #ffffff;
}

#registerModal #reg_email::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#registerModal #reg_email:-webkit-autofill,
#registerModal #reg_email:-webkit-autofill:hover,
#registerModal #reg_email:-webkit-autofill:focus,
#registerModal #reg_email:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
    box-shadow: 0 0 0 1000px #2a2a2a inset;
    transition: background-color 5000s ease-in-out 0s;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #cfcfcf;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.password-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.password-toggle .eye-closed {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
    display: block;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
}

.login-btn,
.register-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover,
.register-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: white;
    font-size: 20px;
}

/* Кнопка выхода из аккаунта */
.logout-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.logout-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logout-button:active {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.logout-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.logout-button:hover .logout-icon {
    transform: translateX(2px);
}

.logout-text {
    white-space: nowrap;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .logout-button {
        padding: 8px 12px;
        font-size: 13px;
        margin-left: 8px;
    }

    .logout-text {
        display: none;
    }

    .logout-icon {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .logout-button {
        padding: 8px;
        margin-left: 6px;
    }
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #c82333;
}

.modal-title {
    color: white;
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
}

.form-switch {
    text-align: center;
    margin-top: 20px;
    color: #aaa;
}

.form-switch a {
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}

.form-switch a:hover {
    text-decoration: underline;
}

/* Стили для уведомлений об ошибках */
.error-message {
    background: #dc3545;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #c82333;
    font-size: 14px;
}

.error-message div {
    margin: 5px 0;
}

.error-message div:first-child {
    margin-top: 0;
}

.error-message div:last-child {
    margin-bottom: 0;
}

/* ===== Эффект загрузки (обновлённый) ===== */
/* Основные стили для контейнера */
/* Стили для состояний лоадера */
/* Стили для состояний лоадера */

/* Скрытие body до загрузки (переопределение inline стилей) */
body:not(.loader-ready) {
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    height: 100vh;
}

body:not(.loader-ready)>*:not(.loader-wrapper) {
    opacity: 0;
    visibility: hidden;
}

body.loader-ready {
    opacity: 1;
    visibility: visible;
    overflow: auto;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.loader-ready>*:not(.loader-wrapper) {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 12, 41, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    will-change: opacity, visibility;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-wrapper.loaded {
    background: rgba(15, 12, 41, 0.95);
    pointer-events: none;
}

.loader-wrapper.loaded .loader {
    opacity: 0.8;
    transform: scale(0.9);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
        transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader {
    text-align: center;
    z-index: 10000;
    will-change: opacity, transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
        transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.jcsb {
    display: flex;
    justify-content: end;
    width: 80% !important;
    align-items: center;
}

.loader .letters {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    letter-spacing: 0.3em;
    transition: all 1s ease;
}

.loader .letters span {
    display: inline-block;
    transition: all 0.5s ease;
}

@keyframes appear {
    0% {
        opacity: 0;
        transform: translateY(10px) translateZ(0);
    }

    100% {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

.loader-wrapper:not(.loaded) .loader .letters span {
    animation: appear 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    will-change: opacity, transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.loader-wrapper.loaded .loader .letters span {
    animation: none;
    opacity: 1;
    will-change: auto;
}

.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-bg video {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    will-change: opacity, filter, transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
        filter 1s cubic-bezier(0.4, 0, 0.2, 1),
        transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    /* Предотвращение полноэкранного режима на iOS */
    -webkit-playsinline: true;
    playsinline: true;
    pointer-events: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    filter: none;
}

.content-list li {
    color: white;
    font-size: 20px;
}

.content-list {
    margin: 1em 0;
    padding-left: 1.5em;
    counter-reset: item;
}

.numbered-list {
    list-style-type: decimal;
}

.list-item {
    margin-bottom: 0.5em;
    line-height: 1.5;
}

.numbered-item {
    padding-left: 0.5em;
}

.text-content-container p {
    margin-bottom: 1em;
    line-height: 1.6;
}

.new_btn {
    display: none;
    width: 257px;
    height: 49px;
    padding: 12.742px 35.677px;
    justify-content: center !important;
    align-items: center;
    color: #FFF;
    text-align: center;
    font-family: var(--font-family-Font-2, "SF Pro Display");
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    line-height: normal;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    gap: 6.371px;
    border-radius: 57.339px;
    border: 2px solid #0086B3;
    box-shadow: 0 0 23.063px 0 #0086B3;
    background: linear-gradient(91deg, rgba(51, 204, 255, 0.32) 19.74%, rgba(51, 204, 255, 0.59) 96.72%);
    backdrop-filter: blur(1.5290323495864868px);
}

.new_btn::before {
    content: '';

}






.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.loader {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.circle {
    width: 100px;
    height: 100px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    will-change: transform, border-top-color;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

@keyframes spin {
    0% {
        transform: rotate(0deg) translateZ(0);
        border-top-color: #ffffff;
    }

    50% {
        border-top-color: #00bfff;
    }

    100% {
        transform: rotate(360deg) translateZ(0);
        border-top-color: #ffffff;
    }
}



.letters {
    display: flex;
    gap: 15px;
}

.letters span {
    display: inline-block;
    font-size: 48px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.7),
        0 0 20px rgba(0, 191, 255, 0.5);
    opacity: 0;
    transform: translateY(30px);
    animation: letterFloat 0.5s forwards;
    font-family: 'Arial Black', sans-serif;
    letter-spacing: 2px;
}

@keyframes letterFloat {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.8) translateZ(0);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1) translateZ(0);
    }
}

@keyframes letterPulse {

    0%,
    100% {
        text-shadow:
            0 0 10px rgba(255, 255, 255, 0.7),
            0 0 20px rgba(0, 191, 255, 0.5);
        transform: scale(1) translateZ(0);
    }

    50% {
        text-shadow:
            0 0 15px rgba(255, 255, 255, 0.9),
            0 0 30px rgba(0, 191, 255, 0.8),
            0 0 40px rgba(0, 191, 255, 0.4);
        transform: scale(1.05) translateZ(0);
    }
}

/* Анимации скрытия */
.loader.hide {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader.hide .circle {
    animation: none;
    border-color: rgba(255, 255, 255, 0.1);
    transition: border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-wrapper.hide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
        visibility 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.loader-wrapper.hide .video-bg video {
    opacity: 0;
    filter: brightness(0.3);
    transform: scale(1.2);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
        filter 1s cubic-bezier(0.4, 0, 0.2, 1),
        transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.letters span:hover {
    color: #00bfff;
    animation: letterPulse 0.5s ease infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes showLetter {
    from {
        opacity: 0;
        transform: scale(0.8) translateZ(0);
        filter: blur(6px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateZ(0);
        filter: blur(0);
    }
}

.profile-toggle-slider:before {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Иконка замка показывается только для disabled чекбоксов */
.profile-toggle-switch input:disabled+.profile-toggle-slider:before {
    background-image: url('../image/map/lock.svg');
}

/* Красный замочек только для свайпера "Быть HELPERом" */
.profile-toggle-switch--helper input:disabled+.profile-toggle-slider:before {
    background-image: none;
}

/* Добавляем красный замок через ::after для свайпера "Быть HELPERом" */
.profile-toggle-switch--helper input:disabled+.profile-toggle-slider::after {
    content: "";
    position: absolute;
    width: 13px;
    height: 13px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: rgb(255, 0, 0);
    mask-image: url('../image/map/lock.svg');
    mask-size: 13px 13px;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url('../image/map/lock.svg');
    -webkit-mask-size: 13px 13px;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    pointer-events: none;
    z-index: 1;
}

/* Кастомный чекбокс для политики конфиденциальности */
.privacy-policy-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    display: none !important;
}

.custom-checkbox-label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0;
}

.custom-checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.custom-checkbox-mark {
    position: relative;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    border: 2px solid #ffffff;
    background: #fff !important;
    border-radius: 4px;
    background-color: transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.custom-checkbox-mark::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
    top: 2px;
}

.custom-checkbox-input:checked + .custom-checkbox-mark {
    background-color: #ffffff;
    border-color: #ffffff;
}

.custom-checkbox-input:checked + .custom-checkbox-mark::after {
    transform: rotate(45deg) scale(1);
    border-color: #1a1a1a;
}

.custom-checkbox-input:focus + .custom-checkbox-mark {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.custom-checkbox-label:hover .custom-checkbox-mark {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Стили для select reg_сity - черный цвет текста для option */
#reg_сity option {
    color: #000000;
    background-color: #ffffff;
}