/* 全局*/
:root {
    --body-header-height: 40px;
    --box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

@keyframes flash {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}

/* 页面*/
html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    font-family: inherit !important;
}

a {
    text-decoration: none;
}

/* 字体文件 */
@font-face {
    font-family: KaiXinSongA;
    src: url(/lib/KaiXinSong/KaiXinSongA.woff2) format("woff2"), url(/lib/KaiXinSong/KaiXinSongA.woff) format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: KaiXinSongB;
    src: url(/lib/KaiXinSong/KaiXinSongB.woff) format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap
}

/* 页头 */
.banner-wrapper img:hover {
    animation: flash 0.5s ease-in-out;
}

body > header {
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(252, 252, 252, 1);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar-brand img:hover {
    animation: flash 0.5s ease-in-out;
}

#navbar-home-main .nav-item {
    padding: 0 0.5rem;
}

    #navbar-home-main .nav-item:hover {
        background: rgba(0, 0, 0, 0.05);
    }

    #navbar-home-main .nav-item a {
        white-space: nowrap;
    }

#input-home-search::placeholder {
    color: var(--bs-gray-300);
    transition: color 0.3s;
}

#input-home-search:hover::placeholder {
    color: var(--bs-gray-500);
}

#button-home-search svg {
    fill: var(--bs-gray-300);
    transition: fill 0.3s;
}

#button-home-search:hover svg {
    fill: var(--bs-primary);
}

.navbar-home-user .user-avatar:hover {
    animation: flash 0.5s ease-in-out;
}

/** 面包屑*/
.breadcrumb-wrapper {
    background: white;
    font-size: small;
    font-weight: 100;
    box-shadow: var(--box-shadow);
    margin-bottom: 0;
}

.breadcrumb-chevron {
    --bs-breadcrumb-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d'%3E%3Cpath fill-rule='evenodd' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    gap: .5rem;
}

    .breadcrumb-chevron .breadcrumb-item {
        display: flex;
        gap: inherit;
        align-items: center;
        padding-left: 0;
        line-height: 1;
    }

        .breadcrumb-chevron .breadcrumb-item::before {
            gap: inherit;
            float: none;
            width: 1rem;
            height: 1rem;
        }

.breadcrumb-custom .breadcrumb-item {
    position: relative;
    flex-grow: 1;
    padding: .75rem 3rem;
}

    .breadcrumb-custom .breadcrumb-item::before {
        display: none;
    }

    .breadcrumb-custom .breadcrumb-item::after {
        position: absolute;
        top: 50%;
        right: -25px;
        z-index: 1;
        display: inline-block;
        width: 50px;
        height: 50px;
        margin-top: -25px;
        content: "";
        background-color: var(--bs-tertiary-bg);
        border-top-right-radius: .5rem;
        box-shadow: 1px -1px var(--bs-border-color);
        transform: scale(.707) rotate(45deg);
    }

    .breadcrumb-custom .breadcrumb-item:first-child {
        padding-left: 1.5rem;
    }

    .breadcrumb-custom .breadcrumb-item:last-child {
        padding-right: 1.5rem;
    }

        .breadcrumb-custom .breadcrumb-item:last-child::after {
            display: none;
        }

/* 页体 */
.body-wrapper {
    flex: 1 1 auto;
    position: relative;
    background: rgba(0, 0, 0, 0.1);
}

    .body-wrapper main {
        box-sizing: border-box;
        max-width: var(--view-width-max);
        margin: 3em auto;
        padding: 2em;
        color: #202124;
        background: #fff;
        box-shadow: var(--box-shadow);
        position: relative;
        z-index: 1;
    }

/* 回到顶部 */
#back-to-top {
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    box-shadow: 0 0 12px rgba(0,0,0,.3);
    z-index: 1000;
}

    #back-to-top:hover {
        box-shadow: 0 0 12px rgba(0,123,255,.8);
    }

/* 页脚 */
body > footer {
    background: rgba(252, 252, 252, 1);
    box-shadow: var(--box-shadow);
    position: sticky !important;
    bottom: 0;
    z-index: 999;
}

    body > footer ul {
        font-size: small;
        font-weight: 100;
        display: flex;
        flex-wrap: wrap;
        gap: 1em;
    }

        body > footer ul li {
            line-height: 2em;
        }
