/* @font-face{
    font-family:"Noto Sans TC Light";
    font-style:normal;
    font-weight:300;
    src:url(//fonts.gstatic.com/ea/notosanstc/v1/NotoSansTC-Light.woff2) format("woff2"),
    url(//fonts.gstatic.com/ea/notosanstc/v1/NotoSansTC-Light.woff) format("woff"),
    url(//fonts.gstatic.com/ea/notosanstc/v1/NotoSansTC-Light.otf) format("opentype")
}
@font-face{
    font-family:"Noto Sans TC Medium";
    font-style:normal;
    font-weight:400;
    src:url(//fonts.gstatic.com/ea/notosanstc/v1/NotoSansTC-Medium.woff2) format("woff2"),
    url(//fonts.gstatic.com/ea/notosanstc/v1/NotoSansTC-Medium.woff) format("woff"),
    url(//fonts.gstatic.com/ea/notosanstc/v1/NotoSansTC-Medium.otf) format("opentype")
} */
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css");

body {
    font: 300 15px/1.8em "Noto Sans TC Light", "PingFangTC-Light", Noto Sans, Arial, Helvetica, "儷黑 Pro", "LiHei Pro", "微軟正黑體", "Microsoft JhengHei", sans-serif;
}

.screen {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.screen.fixed {
    overflow: hidden;
}

.screen.fixed .categories {
    display: none;
    /* opacity: 0; */
}

.screen.fixed .demos {
    height: 30vh;
}

img {
    width: 100%;
    display: block;
}

a,
button,
a:focus,
button:focus {
    outline: none;
    box-shadow: none;
}

a,
button {
    color: white;
    transition: all .5s ease;
}

a:hover,
button:hover {
    color: #af1515;
    text-decoration: none;
}

.bi::before {
    vertical-align: middle;
}

h1 {
    margin: .5em 0;
    font-size: 1.8em;
}

/* ---- button ---- */

.button {
    display: inline-block;
    margin: 2px 0;
    padding: 0 1.0em 0 .5em;
    background: #EEE;
    border: none;
    color: #323232;
    cursor: pointer;
    text-transform: lowercase;
}

.button:hover {
    background-color: transparent;
}

.button:active,
.button.is-checked {
    background-color: transparent;
    border-color: #af1515;
    color: #af1515;
}

.loading {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 10000;
    width: 100%;
    height: 100%;
    background: #fff;
    text-align: center
}

.loading .container {
    height: 100%
}

.loading .container>div {
    height: 100%
}

.loading .loading_progress {
    color: black;
    font-size: .8em;
    transform: scale(1.3, 1);
}

.loading #face {
    color: black;
    position: relative;
    display: block;
    transform: scale(1.2, 1);
}

.loading .loading_txt {
    width: 100%;
}

.loading .loading_frame {
    width: 100px;
    position: relative;
    border: 1px solid black;
    margin: 6px auto 0 auto;
}

.loading #lyric {
    font-weight: 700;
    font-size: .9em;
    color: black;
}

.loading i {
    font-weight: 700;
    color: black;
}

.loading .loading_bar {
    height: 100%;
    width: 100%;
    transform: scaleX(0);
    transform-origin: 0 0;
    background: black;
    height: 10px
}

.loading p {
    font-size: 1.1rem;
    line-height: 1.4rem;
    margin: 0;
    color: black;
}


.demos {
    background: #021729;
    height: 100vh;
    overflow: auto;
    transition: all .5s ease;
}

.grid {
    margin: 0;
}

.grid>div {
    padding: 0;
}

.grid:after {
    content: '';
    display: block;
    clear: both;
}

.element-item {
    position: relative;
    height: 30vh;
    overflow: hidden;
    cursor: pointer;
    background: white;
}

header {
    position: fixed;
    left: 20px;
    top: 20px;
    z-index: 1000;
    color: white;
}

.element-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: rgba(0, 0, 0, .5);
    z-index: 10;
    transition: all .5s ease;
}

.element-item img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: auto;
    height: 100%;
    transform: translate(-50%, -50%) scale(1.1);
    transition: all .5s ease;
}

.element-item h3 {
    z-index: 100;
    width: 100%;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    font-size: 1.2em;
    color: white;
    opacity: 0;
    transition: all .5s ease;
}

.element-item p {
    position: absolute;
    left: 0;
    top: 0;
    padding: 10px;
    width: 100%;
    color: #f1f1f1;
    opacity: 0;
}

.element-item:hover img {
    transform: translate(-50%, -50%) scale(1.2);
}

.element-item:hover h3 {
    opacity: 1;
}

.element-item:hover::before {
    opacity: 0;
}

/* categories */
.categories {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 1000;
    background: white;
    width: 100%;
    height: 0;
    color: #232323;
    transition: all .5s ease-in-out;
}

.categories .container {
    padding: 10px;
    margin: 40px auto 10px auto;
    height: calc(100% - 50px);
    overflow: auto;
    position: relative;
    z-index: 1000;
    background: white;
}

.categories p {
    margin-top: 0;
    margin-bottom: 1em;
    font-size: .9em;
    line-height: 1.7em;
}

.categories .bi-egg {
    font-size: .9em;
    vertical-align: top;
}

.categories a {
    color: #232323;
}
.categories a:hover {
    color: #af1515;
}

.categories.active {
    height: 45vh;
}

.bi-emoji-wink {
    display: none;
}

.categories.active .bi-emoji-smile {
    display: none;
}

.categories.active .bi-emoji-wink {
    display: block;
}

.categories small {
    /* float: right; */
    display: block;
    font-size: .8em;
    text-align: center;
}


.btn_close {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 200;
    color: black;
    line-height: 40px;
    width: 60px;
    text-align: center;
    font-size: 2.4em;
}

.btn_toggle {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -50px;
    background: white;
    z-index: 200;
    /* box-shadow: 0 -4px 6px 0px rgba(0,0,0,.2); */
    color: #232323;
    line-height: 50px;
    width: 100px;
    text-align: center;
    border-radius: 100%;
    height: 100px;
    font-size: 2em;
}

.btn_toggle:hover {
    /* background:rgba(0, 0, 0, .3); */
    /* color: white; */
}

.btn_prev {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    font-size: 2em;
}

.btn_next {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    font-size: 2em;
}


/* demo */
.demo {
    height: 0;
    position: relative;
    z-index: 2000;
    overflow: hidden;
    transition: height .5s ease;
}

.demo.active {
    height: 70vh;
}

.demo .container {
    height: 100%;
    color: #232323;
    position: relative;
    z-index: 100;
}

.demo .container>.row {
    height: 100%;
}

.demo::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: rgba(255, 255, 255, .9);
    z-index: 10;
}

.demo .demo_bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
}

.demo h2 {
    font-size: 1.8em;
    margin: .5em 0 0 0;
    text-transform: uppercase;
}

.demo .desc {
    height: 100%;
    overflow: auto;
    max-height: 30vh;
    padding: 0 10px 0 0;
    margin-bottom: 1em;
}

.demo .tags span {
    display: inline-block;
    font-size: .9em;
    color: #232323;
    padding: 0 .5em;
    border-radius: 2px;
}

.demo .plugins a {
    display: inline-block;
    font-size: .9em;
    color: #af1515;
    padding: 0 1em 0 .5em;
    border-radius: 2px;
    border: 1px solid #af1515;
    margin: 0 2px 0 0;
}

.demo .plugins a:hover {
    color: white;
    background: #af1515;
}

.demo small {
    padding: 0 .5em;
    border-radius: 2px;
    font-size: .8em;
    background: #232323;
    color: white;
}

.demo .col-4 {
    padding-top: 5%;
    padding-bottom: 5%;
}

.demo .demo_frame {
    position: relative;
    overflow: hidden;
    padding-top: 80%;
    border: 2px solid #232323;
    margin: 10px 0;
    background: white;
}

.demo .demo_frame img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: auto;
    height: 100%;
    transform: translate(-50%, -50%) scale(1);
    transition: all .5s ease;
}

.demo .buttons a {
    font-size: 2em;
    display: inline-block;
    vertical-align: middle;
    color: black;
    float: right;
    width: 80px;
    height: 50px;
    border-radius: 100%;
    margin-left: 10px;
    white-space: nowrap;
    text-align: center;
    line-height: 40px;
}

.demo .buttons a i {
    display: inline-block;
}

.demo .buttons a em {
    display: block;
    width: 100%;
    font-size: .9rem;
    padding: 0;
    line-height: 20px;
    color: #af1515;
    font-style: normal;
    background: transparent;
    opacity: 0;
    transition: all .3s ease;
}

.demo .buttons a i:nth-of-type(2) {
    display: none;
}

.demo .buttons a:hover {
    color: #af1515;
}

.demo .buttons a:hover em {
    opacity: 1;
}

.demo .buttons a:hover i:nth-of-type(2) {
    display: inline-block;
}

.demo .buttons a:hover i:nth-of-type(1) {
    display: none;
}

@media(max-width: 767px) {

    /* .demo.active {
        height: 90vh;
    } */
    .demo .container>.row {
        overflow: auto;
        padding: 15px 0 30px 0;
    }

    .demo .demo_frame {
        padding-top: 60%;
        margin: 30px 0 0 0;
    }

    .demo h2 {
        font-size: 1.4em;
        margin: 0;
    }

    .demo .desc {
        font-size: .9em;
        line-height: 1.7em;
    }

    .element-item {
        height: 24vw;
    }
}