/* Homepage chrome: always-fixed bar + dark/light theme. Homepage only. */

html[class*="homepage-mode"] .Bar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    max-width: none !important;
    z-index: 700 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-sizing: border-box;
    padding-top: 8px;
    padding-bottom: 8px;
    pointer-events: auto !important;
}

html[class*="homepage-mode"] .Bar a {
    pointer-events: auto !important;
    cursor: pointer !important;
}

html[class*="homepage-mode"],
html[class*="homepage-mode"] body {
    overflow-x: hidden;
    max-width: 100%;
}

html[class*="homepage-mode"] body {
    padding-top: 52px;
    background-image: none !important;
}

html[class*="homepage-mode"] .Main {
    width: 100% !important;
    max-width: 100%;
    height: 340px;
    max-height: none;
    min-height: 0;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: hidden;
    box-sizing: border-box;
    background-color: #102016;
    background-image: url("images/abtal-tatar-fp.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

html[class*="homepage-mode"] .gold-particles {
    left: 0;
    right: 0;
    width: auto;
}

html[class*="homepage-mode"] .Body {
    box-sizing: border-box;
    max-width: 100% !important;
}

html[class*="homepage-mode"] .Body {
    top: 0 !important;
    position: relative;
}

html[class*="homepage-mode"] .HDF {
    margin-top: 0;
    position: relative;
    z-index: 2;
}

html.homepage-theme-dark .Bar {
    background-image: linear-gradient(to top, #1c1a16, #12110e, #1c1a16) !important;
    border-bottom: 1px solid rgba(198, 146, 0, 0.35);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

html.homepage-theme-dark .Bar a {
    color: #f3efe6 !important;
}

html.homepage-theme-dark .Bar a:first-child,
html.homepage-theme-dark .Bar a:last-child {
    color: #e8a0a8 !important;
}

html.homepage-theme-light .Bar {
    background-image: linear-gradient(to top, #fdfdfd, #e5e5e5, #fdfdfd) !important;
    border-bottom: 1px solid #c2c2c2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

html.homepage-theme-light .Bar a:first-child,
html.homepage-theme-light .Bar a:last-child {
    color: #a20327 !important;
}

.hp-theme-toggle {
    display: inline-block;
    margin: 0 8px;
    padding: 2px 8px;
    border: 1px solid rgba(198, 146, 0, 0.45);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.2);
    color: inherit;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.4;
    vertical-align: middle;
}

html.homepage-theme-light .hp-theme-toggle {
    background: rgba(255, 255, 255, 0.7);
}

html.homepage-theme-dark body {
    background-color: #12100c !important;
    color: #e8dcc8;
}

html.homepage-theme-dark .Body {
    color: #e8dcc8 !important;
    background: rgba(16, 14, 10, 0.92);
    border-left-color: #ecebe6 !important;
    border-right-color: #ecebe6 !important;
    border-top-color: #ecebe6 !important;
    border-bottom-color: #ecebe6 !important;
    box-shadow: 1.25pc 0 20px -1.375pc #000, -20px 0 0.208333333in -16.5pt #000;
}

html.homepage-theme-dark .Body > p,
html.homepage-theme-dark .hp-scene p {
    color: #b8aa8e !important;
}

html.homepage-theme-dark .hp-mark p {
    color: #d4c5a0 !important;
}

html.homepage-theme-light body {
    background-color: #ffffff !important;
}

html.homepage-theme-light .Body {
    color: #000000 !important;
}

html.homepage-theme-light .hp-marks-lead {
    color: #5c5346 !important;
}

html.homepage-theme-light .hp-brand-tag,
html.homepage-theme-light .hp-brand-col a {
    color: #d4c5a0 !important;
}

html.homepage-theme-light .hp-brand-col a:hover {
    color: #ffd700 !important;
}

html.homepage-theme-light .hp-brand-col a.Sign {
    color: #fff !important;
}

.hp-contact-item {
    margin: 10px 0 0;
}

.hp-contact-label {
    display: block;
    margin: 0 0 2px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.hp-brand-contact a {
    margin: 0;
}

.hp-brand-contact a[href^="mailto:"] {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

html.homepage-theme-light .hp-brand-bar,
html.homepage-theme-light .hp-brand-bar > span,
html.homepage-theme-light .hp-brand-cr,
html.homepage-theme-light .hp-brand-cr-txt,
html.homepage-theme-light .hp-brand-cr-txt bdi {
    color: #000000 !important;
}

html.homepage-theme-light .hp-brand-bar > span:not(.hp-brand-cr),
html.homepage-theme-light .hp-brand-bar > span:not(.hp-brand-cr) bdi {
    color: #000000 !important;
    -webkit-text-fill-color: #000000;
    font-weight: 700;
}

html.homepage-theme-dark .hp-brand-cr,
html.homepage-theme-dark .hp-brand-cr-txt,
html.homepage-theme-dark .hp-brand-cr-txt bdi {
    color: #ffffff !important;
}

html.homepage-theme-dark .hp-rules-page h3.hp-rules-title,
html.homepage-theme-light .hp-rules-page h3.hp-rules-title {
    color: #ffd700 !important;
}

@media (min-width: 901px) {
    html[class*="homepage-mode"] .Bar {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 4px;
    }

    html[class*="homepage-mode"] .hp-theme-toggle {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
    }

    html[class*="homepage-mode"] .Bar a {
        height: auto !important;
        top: 0 !important;
        left: auto !important;
        position: static !important;
        display: inline-flex;
        align-items: center;
        line-height: 1.25 !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
        box-sizing: border-box;
    }

    html[class*="homepage-mode"] .Bar .Sign {
        padding: 4px 14px !important;
    }

    html[class*="homepage-mode"] .Body {
        display: block !important;
        overflow: hidden;
    }

    html[class*="homepage-mode"] .hp-scene-welcome {
        box-sizing: border-box;
        max-width: 100%;
        padding: 4px 2px 10px;
    }

    html[class*="homepage-mode"] .HDF {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0;
        margin-right: 0;
    }

    html[class*="homepage-mode"] #signup_layer.overlay,
    html[class*="homepage-mode"] #login_layer.overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        transform: none !important;
    }

    html[class*="homepage-mode"] #signup_layer .overlay_content,
    html[class*="homepage-mode"] #login_layer .overlay_content {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        margin: 0 !important;
        transform: translate(-50%, -50%) !important;
        cursor: default !important;
        pointer-events: auto;
        z-index: 650;
    }

    html[class*="homepage-mode"] #signup_layer h2,
    html[class*="homepage-mode"] #login_layer h2 {
        cursor: default !important;
        user-select: none;
    }

    html[class*="homepage-mode"] #signup_layer a.closer,
    html[class*="homepage-mode"] #login_layer a.closer {
        position: absolute !important;
        top: 10px !important;
        left: 10px !important;
        right: auto !important;
        bottom: auto !important;
        width: 28px !important;
        height: 28px !important;
        margin: 0 !important;
        z-index: 660;
        cursor: pointer !important;
        pointer-events: auto !important;
    }

    html[class*="homepage-mode"] #signup_layer a.closer img,
    html[class*="homepage-mode"] #login_layer a.closer img {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 25px !important;
        height: 25px !important;
        cursor: pointer !important;
        pointer-events: auto !important;
    }
}

@media (max-width: 900px) {
    html[class*="homepage-mode"] body {
        background-image: url("images/abtal-tatar-fp.png") !important;
        background-size: cover !important;
        background-position: center top !important;
        background-repeat: no-repeat !important;
        background-color: #1a140c !important;
    }

    html[class*="homepage-mode"] .Main {
        width: 100vw !important;
        max-width: 100vw;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        background-image: url("images/abtal-tatar-fp.png") !important;
        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        background-color: transparent;
        height: 340px;
        min-height: 0;
        max-height: none;
    }

    html[class*="homepage-mode"] .Bar {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 2px;
    }

    html[class*="homepage-mode"] .hp-theme-toggle {
        position: absolute;
        left: 8px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
    }

    html[class*="homepage-mode"] .Bar a {
        height: auto !important;
        top: 0 !important;
        left: auto !important;
        position: static !important;
        display: inline-flex;
        align-items: center;
        line-height: 1.25 !important;
        padding-top: 3px !important;
        padding-bottom: 3px !important;
        box-sizing: border-box;
    }

    html[class*="homepage-mode"] .Bar .Sign {
        padding: 3px 10px !important;
    }

    html[class*="homepage-mode"] .Body {
        display: block !important;
        overflow: hidden;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 12px !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    }

    html[class*="homepage-mode"] .hp-scene-welcome {
        box-sizing: border-box;
        max-width: 100%;
        padding: 2px 0 8px;
    }

    html[class*="homepage-mode"] .HDF {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0;
        margin-right: 0;
    }
}
