@charset "UTF-8";

/* === Base / Desktop (landscape, ≥ 1200px) === */
html {
    height: 100%;
}

body {
    height: 100%;
    color: #aaaaaa;
    font-size: 100%;
    -ms-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    overflow: hidden;
    font-family: Verdana, serif;
    margin: 0 auto;
    background-color: #00285f;
    /* Учёт безопасных зон мобильных устройств (iOS/Android) */
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
}

a {
    height: 100%;
    color: #aaaaaa;
    text-decoration: underline;
}

#main {
    height: 100%;
    overflow: auto;
    background-color: #00285f;
    background-image: url("../img/main/d_bg_gradient.png");
}

#main-bg {
    background-image: url("../img/main/ui_background_art_2_512.png");
    background-size: inherit;
    background-repeat: repeat;
    background-position: center center;
    height: 100%;
    overflow: auto;
}

.loader-logotype-block {
    padding-top: 20%;
    width: 552px; /* из исходного файла */
    height: 263px;
    margin: 0 auto;
}

.loader-logotype-block > img {
    max-width: 100%;
    width: auto;
    height: auto;
}

#loader-data-block {
    margin-top: 45px;
    height: 150px;
}

#loader-description-block {
    height: 150px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 25px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    justify-content: center;
}

.carousel {
    transition: opacity 0.3s ease;
}

#main-block-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
}

/** Unity Container */
.unity-container {
    width: 100%;
    height: 100%;
    z-index: 0;
    display: none;
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
}

/** Unity Progress container */
.unity-progress {
    display: block;
    width: 50%;
    height: 100%;
    z-index: 10;
    left: 0;
    top: 0;
    overflow: hidden;
    margin: 0 auto;
}

/** Init error */
.init-failed {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 500px;
    margin: auto;
    padding: 30px 20px;
    text-align: center;
    color: #fff;
    font-family: Verdana, sans-serif;
}

.init-failed-message {
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0 0 20px;
}

.init-failed-button {
    padding: 10px 40px;
    background: #004a99;
    color: #fff;
    border: 1px solid #0066cc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.init-failed-button:hover {
    background: #0066cc;
}

/** Modal window */
.modal-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 99%;
    height: 99%;

    display: flex;
    flex-direction: column;
    z-index: 500;
    overflow: hidden;
    border: #bbbbbb 1px solid;
    background-color: #00285f;
    background-image: url("../img/main/ui_background_art_2_512.png");
}

.modal-title-block {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.modal-header {
    flex: 1 1 auto;
    padding: 10px 8px;
    background: #00285f;
    cursor: move;
    user-select: none;
}

.modal-close-block {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #00285f;
}

.modal-close-button {
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #00285f;
    margin: 5px auto 0;
    border: #bbbbbb 1px solid;
    width: 100px;
    text-align: center;
}

.modal-message-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #fff;
    padding: 20px;
    font-family: Verdana, sans-serif;
}

.modal-message-text {
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.4;
    word-break: break-word;
}

.modal-message-button-block {
    margin-top: 10px;
}

.modal-message-button-ok {
    padding: 10px 40px;
    background-color: #004a99;
    color: #fff;
    border: 1px solid #0066cc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.modal-message-button-ok:hover {
    background-color: #0066cc;
}

.modal-frame-block {
    width: 100%;
    height: 85%;
    flex: 0 0 85%;
    min-height: 0;
    display: flex;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}

.iframe-create-avatar {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}

/* === Phone (portrait, <= 767px) === */
@media screen and (max-width: 767px) and (orientation: portrait) {
    body {
        font-size: 90%;
        overflow: auto;
        margin: 0;
    }

    #main {
        overflow: auto;
    }

    /*#main-bg {*/
    /*    background-size: cover;*/
    /*}*/

    .loader-logotype-block {
        padding-top: 35%;
        width: 60%;
        height: auto;
    }

    #loader-description-block {
        font-size: 18px;
        text-align: center;
        padding: 0 10px;
    }

    .unity-progress {
        width: 90%;
    }

    .modal-window {
        width: 99%;
        height: 99%;
    }

    .modal-frame-block {
        height: 90%;
        flex: 0 0 90%;
    }

    .iframe-create-avatar {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }

    /*.modal-window {*/
    /*    top: 50%;*/
    /*    left: 50%;*/
    /*    transform: translate(-50%, -50%);*/
    /*    width: 95%;*/
    /*    aspect-ratio: 4 / 3;*/
    /*    height: auto;*/
    /*}*/
}

/* === Pad / Tablet (landscape, 768–1199px) === */
@media screen and (min-width: 768px) and (max-width: 1199px) and (orientation: landscape) {
    body {
        font-size: 95%;
        overflow: auto;
    }

    /*#main-bg {*/
    /*    background-size: cover;*/
    /*}*/

    .loader-logotype-block {
        padding-top: 15%;
        width: 60%;
        height: auto;
    }

    #loader-description-block {
        font-size: 22px;
        text-align: center;
    }

    .unity-progress {
        width: 70%;
    }


    /*.modal-window {*/
    /*    top: 50%;*/
    /*    left: 50%;*/
    /*    transform: translate(-50%, -50%);*/
    /*    width: 80%;*/
    /*    aspect-ratio: 4 / 3;*/
    /*    height: auto;*/
    /*}*/
}

/* === Desktop (landscape, ≥ 1200px) – уточнение брейкпоинта === */
@media screen and (min-width: 1200px) and (orientation: landscape) {
    .loader-logotype-block {
        padding-top: 20%;
        width: 552px;
        height: 263px;
    }

    .unity-progress {
        width: 50%;
    }

    .modal-window {
        /*top: 50%;*/
        /*left: 50%;*/
        /*transform: translate(-50%, -50%);*/
        /*width: 80%;*/
        /*aspect-ratio: 4 / 3;*/
        /*height: auto;*/
    }
}

/** При включённой debug-console Unity-область ужимается до 30% высоты,
 *  оставшееся место снизу занимает консоль. */
body.with-debug-console #main-block-content {
    height: 30%;
}

/** Debug console — оверлей поверх Unity при совпадении URL-триггера и logs:true */
.debug-console {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 70%;
    background: rgba(0, 0, 0, 0.85);
    color: #dff0ff;
    border-top: 1px solid #446;
    z-index: 2147483647;
    isolation: isolate;
    pointer-events: auto;
    font-family: Consolas, Menlo, monospace;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.5);
    user-select: text;
}

.debug-console.debug-console-minimized {
    height: auto;
}

.debug-console.debug-console-minimized .debug-console-body {
    display: none;
}

.debug-console-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #1a1d2b;
    border-bottom: 1px solid #446;
    flex: 0 0 auto;
}

.debug-console-title {
    flex: 1;
    font-weight: bold;
    color: #fff;
    letter-spacing: 0.5px;
}

.debug-console-btn {
    background: #2a3048;
    color: #dff0ff;
    border: 1px solid #446;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
}

.debug-console-btn:hover {
    background: #3a4260;
}

.debug-console-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 8px;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.35;
}

.debug-console-row {
    padding: 1px 0;
    border-bottom: 1px dotted rgba(68, 68, 102, 0.3);
}

.debug-console-row.debug-console-warn {
    color: #ffd479;
}

.debug-console-row.debug-console-error {
    color: #ff7979;
    font-weight: bold;
}