html {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    word-break: normal;
    -moz-tab-size: 4;
    tab-size: 4;
    font-size: 16px;
    text-rendering: optimizeLegibility;
}

[type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner, button:focus-visible {
    outline: 1px dotted ButtonText;
}

[type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner, button::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

::after, ::before {
    text-decoration: inherit;
    vertical-align: inherit;
}

[type="reset"], [type="submit"], button, html [type="button"] {
    -webkit-appearance: button;
}

[role="button"], [type="button"], [type="reset"], [type="submit"], button {
    cursor: pointer;
    color: inherit;
}

[disabled] {
    cursor: default;
}

button, input, select, textarea {
    background-color: transparent;
    border-style: none;
}

button, select {
    text-transform: none;
}

button {
    overflow: visible;
}

button, input, optgroup, select, textarea {
    font: inherit;
    font-size: inherit;
    line-height: inherit;
    font-family: inherit;
}

textarea {
    overflow: auto;
    resize: vertical;
}

*, ::after, ::before {
    background-repeat: no-repeat;
    -webkit-box-sizing: inherit;
    box-sizing: inherit;
}

body, html {
    height: 100%;
    width: 100%;
    overflow: hidden;
    touch-action: none;
    text-align: center;
    margin: 0 auto;
}

* {
    background-repeat: no-repeat;
    padding: 0;
    margin: 0;
}

::after, ::before {
    text-decoration: inherit;
    vertical-align: inherit;
}

*, ::after, ::before {
    background-repeat: no-repeat;
    -webkit-box-sizing: inherit;
    box-sizing: inherit;
}

html {
    background: #3b3b3b url("outer-back-4.jpg") center center;
    background-size: auto 100%;
}

body {
    /*width: 100% !important;*/
    max-width: 71vh;
    background: url("bg/load_screen_background_4.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    -webkit-box-shadow: 0 0 14px 4px rgba(0, 0, 0, 0.5);
    -moz-box-shadow: 0 0 14px 4px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 14px 4px rgba(0, 0, 0, 0.5);
}


@font-face {
    font-family: GothicDeutsch; /* 100% free */
    src: url('fonts/GothicDeutsch.ttf');
    font-weight:400;
    font-weight:normal;
}

/* AG Bengaly: Cyrillic stays in the file. Latin-1 slots used to be those same Cyrillic shapes (AOF-3445). */
@font-face {
    font-family: AGBengaly-Bold;
    src: url('fonts/AGBengaly-Bold.ttf');
}

@font-face {
    font-family: AGBengaly-Normal;
    src: url('fonts/AGBengaly-Normal.ttf');
}

@font-face {
    font-family: MYRIADPRO-BOLD;
    src: url('fonts/MYRIADPRO-BOLD.OTF');
}

@font-face {
    font-family: MYRIADPRO-REGULAR;
    src: url('fonts/MYRIADPRO-REGULAR.OTF');
}

@font-face {
    font-family: ArialMT;
    src: url('fonts/ArialMT.ttf');
}

/* AOF-3416: Noto Sans (OFL, fonts/noto-sans/OFL.txt) for Vietnamese, Polish and Turkish.
   The game fonts lack their letters. The browser downloads only the subsets the page uses. */
@font-face {
    font-family: 'AOF Noto Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/noto-sans/noto-sans-vietnamese-400-normal.woff2') format('woff2');
    unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
    font-family: 'AOF Noto Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/noto-sans/noto-sans-latin-ext-400-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
    font-family: 'AOF Noto Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/noto-sans/noto-sans-latin-400-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
    font-family: 'AOF Noto Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/noto-sans/noto-sans-vietnamese-700-normal.woff2') format('woff2');
    unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
    font-family: 'AOF Noto Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/noto-sans/noto-sans-latin-ext-700-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
    font-family: 'AOF Noto Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/noto-sans/noto-sans-latin-700-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Keep in sync with lang-codes.ts needsLatinExtFont / localeTag. */
html[lang="vi"] body *,
html[lang="pl"] body *,
html[lang="tr"] body * {
    font-family: 'AOF Noto Sans', Arial, sans-serif !important;
}

/* Without a font-family the browser takes the default font of <html lang>. For ja / zh / ko it is a CJK
   font whose Cyrillic and Latin letters are full-width ("Е н о т к а" in the chat). Keep the default of
   the other languages; CJK characters still come from the system fonts. */
html[lang="ja"] body,
html[lang="zh-Hant"] body,
html[lang="ko"] body {
    font-family: "Times New Roman", Times, serif;
}

/* Arabic sets <html dir="rtl"> for the DOM UI; the game itself is not mirrored. */
#game-container {
    direction: ltr;
}

.basic-div {
    margin: 0 auto;
    width: 100%;
    text-align: center;
    height: 100%;
    position: relative;
    border: none;
}

.reg-cont {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.col-white {
    color: white;
}

.m-10 {
    margin: 10px 0;
}

.x-butt {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 9vw;
    height: 9vw;
    max-width: 38px;
    max-height: 38px;
}

.back-butt {
    position: absolute;
    left: 8px;
    top: 8px;
    width: 9vw;
    height: 9vw;

    max-width: 42px;
    max-height: 42px;
}

.aof-button {
    background-image: url('./button.png');
    background-size: 100% 90%;
    background-position: center center;
    text-align: center;
    line-height: 78px;
    font-family: 'AGBengaly-Normal', 'AOF Noto Sans';
    text-transform: uppercase;
    color: #e4e5bd;
}

.aof-input {
    display: block;
    height: 38px;
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: 0;
    font-family: 'MYRIADPRO-REGULAR';
    padding: 8px 10px 0;
    font-size: 16px;
    line-height: 26px;
    width: 100%;
    background: #2c2d2b;;
    color: #f2f2f2;
    resize: none;
}

.aof-bg-battle {
    display: flex;
    flex-direction: column;
    justify-content: normal;
}

@media screen and ( min-width: 1000px )
{
    .aof-bg-battle {
        justify-content: center;
    }
}

.aof-bg-battle::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url('./bg/battle_background.jpg');
    background-size: cover;
    filter: brightness(40%);
    background-position-y: -400px;
}

@media screen and ( min-width: 550px ) {
    .aof-bg-battle::before {
        background-position-y: -300px;
    }
}

@media screen and ( min-width: 500px ) {
    .aof-bg-battle::before {
        background-position-y: -200px;
    }
}

@media screen and ( min-width: 400px ) {
    .aof-bg-battle::before {
        background-position-y: -100px;
    }
}

@media screen and ( min-width: 0px ) {
    .aof-bg-battle::before {
        background-position-y: 0px;
    }
}

.bg-window-horiz::before {
    content: "";
    position: absolute;
    background-image: url('./bg/shop-back.jpg');
    background-repeat: repeat;
    width: 100%; height: 100%;
    background-position: center -300px;
    z-index: -1;
}

@media screen and ( min-height: 1200px )
{
    .aof-bg-battle::before {
        background-position-y: 0;
    }
}

.aof-logo,
.aof-logo-en {
    height: 20vw;
    max-height: 130px;
    background-image: url('./login_logo.png');
    background-position: center;
    background-size: contain;
    max-width: 70%;
    margin: 0 auto 2vh auto;
}

.aof-logo-en {
    background-image: url('./login_logo_en.png');
}

.no-margin {
    margin: 0 !important;
}

.on-top {
    z-index: 101;
}

.stretch {
    position: absolute;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
}

.flex {
    display: flex;
}

.upper {
    text-transform: uppercase;
}

.center {
    text-align: center;
    justify-content: center;
}

.relative {
    position: relative;
}

.bg-gray {
    background-image: url('./chat/chatBg.png');
    background-size: 100% 100%;
}

.bg-purp {
    background-image: url('./purp_bg.jpg');
    background-size: cover;
}

.border-bottom {
    box-shadow: 0px 1px 0px 0px #9f7f3e, 0px 2px 0px #7b5024, 0px 3px 0px #472a12;
}

.border-vertical {
    box-shadow: 0px 1px 0px 0px #9f7f3e, 0px 2px 0px #7b5024, 0px 3px 0px #472a12, 0px -1px 0px 0px #9f7f3e, 0px -2px 0px #7b5024, 0px -3px 0px #472a12;
}

.divider-horizontal {
    width: 100%;
    height: 10px;
    background-image: url("./divider.png");
    background-size: contain;
}

.divider-vertical {
    width: 20px;
    height: 100%;
    background-image: url("./divider-vert.png");
    background-size: contain;
}

.reverse-order {
    display: flex;
    flex-direction: column-reverse;
}

.rename-page {
    font-family: 'AGBengaly-Bold', 'AOF Noto Sans';
    text-align: center;
    font-size: 22px;
}

.container {
    margin: 30px auto;
    width: 260px;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

.progress {
    padding: 3px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 3px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25), 0 1px rgba(255, 255, 255, 0.08);
}

.progress-bar3 {
    height: 16px;
    border-radius: 4px;
    background-image: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #7dc8e8, #5856d6, #ff2d55);
    transition: 0.4s linear;
    transition-property: width, background-color;
}

.progress-infinite .progress-bar3 {
    width: 100%;
    background-image: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #7dc8e8, #5856d6, #ff2d55);
    animation: colorAnimation 2s infinite;
}

@keyframes colorAnimation {
    0% {
        background-image: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #7dc8e8, #5856d6, #ff2d55);
    }
    20% {
        background-image: linear-gradient(to right, #5ac8fa, #007aff, #7dc8e8, #5856d6, #ff2d55, #4cd964);
    }
    40% {
        background-image: linear-gradient(to right, #007aff, #7dc8e8, #5856d6, #ff2d55, #4cd964, #5ac8fa);
    }
    60% {
        background-image: linear-gradient(to right, #7dc8e8, #5856d6, #ff2d55, #4cd964, #5ac8fa, #007aff);
    }
    100% {
        background-image: linear-gradient(to right, #5856d6, #ff2d55, #4cd964, #5ac8fa, #007aff, #7dc8e8);
    }
}

.spin {
    margin: 55px auto;
    width: 100%;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    color: white;
    font-style: italic;
    font-weight: bold;
    text-shadow: 2px 2px #000000;
}

.spin_ru:after {
    content:"";
    animation: spin_ru 25s linear infinite;
}

.spin_en:after {
    content:"";
    animation: spin_en 25s linear infinite;
}

@keyframes spin_ru {
    0% { content:"Загружаем игру...";}
    30% { content:"Варим волшебные зелья...";}
    40% { content:"Пишем заклинания...";}
    50% { content: "Кормим гриффона..."; }
    60% { content: "Разгоняем троггллодитов..."; }
    70% { content: "Натачиваем мечи..."; }
    80% { content: "Хороним некромантов..."; }
    90% { content: "Куём доспехи..."; }
    100% { content: "Подметаем арену..."; }
}

@keyframes spin_en {
    0% { content:"Loading game ...";}
    30% { content:"Brewing magic potions...";}
    40% { content:"Writing spells...";}
    50% { content: "Feeding griffon..."; }
    60% { content: "Expelling troglodytes..."; }
    70% { content: "Sharpening swords..."; }
    80% { content: "Burying necromancers..."; }
    90% { content: "Forging armors..."; }
    100% { content: "Cleaning arena..."; }
}

.aof-button {
    min-width: 160px;
    min-height: 48px;
    font-size: 20px;
    transform: scale(0.8);
}
.spin {
    font-size: 18pt;
}
@media screen and ( min-width: 400px )
{
    .aof-button {
        min-width: 180px;
        min-height: 56px;
        font-size: 22px;
    }
    .spin {
        font-size: 20pt;
    }
}
@media screen and ( min-width: 500px )
{
    .aof-button {
        min-width: 200px;
        min-height: 64px;
        font-size: 24px;
        transform: scale(1);
    }
    .spin {
        font-size: 24pt;
    }
}

@media (orientation: portrait) {
    body {
        max-width: 100vh;
    }
}

@media (orientation: landscape) {
    body {
        max-width: 600px;
    }
}

#bg {
    height: 100vh;
    width: 100%;
    padding: 0 0 50px 0;
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    animation: pulse 2.5s infinite ease-in-out alternate;
    width: 50%;
}

@keyframes pulse {
    from { transform: scale(1.2); }
    to { transform: scale(1.5); }
}

.chat-messages-wrapper {
    height: 94%;
    display: flex;
    flex-flow: column;
}