@import url('https://fonts.googleapis.com/css2?family=Chiron+GoRound+TC:wght@200..900&display=swap');
html,body,header,footer,nav,main,h1,h2,h3,h4,a,img,p,div,span,aside,article,menu,ul,ol,li,i{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    color: inherit;
    text-decoration: none;
    list-style: none;
    font-family: "Chiron GoRound TC", sans-serif;
}
img{
    vertical-align: bottom;
}
html,body{
    width: 100%;
    height: 100vh;
    background-image: url(../images/background.png);
    background-size: cover;
    background-position: center top;
    overflow: hidden;
    position: relative;
}

:root{
    --textColor--: #2B2B2B;
    --textAction--: #FFBB22;
    --textWhite--: #FFFFFF;
    --textGray--: #D9D9D9;
    --AlphaBlack--: #00000088;
    --transision--: all 800ms ease;
    --shadow--: 3px 3px 3px gray;
}

header{
    width: 100%;
    height: 30vh;
    line-height: 60vh;
    text-align: center;
}

/*首頁設計*/
main#home{
    width: 100%;
    height: calc(70vh - 50px);
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
}
main#home img{
    width: 100%;
}
main#home .box{
    width: 50%;
    max-width: 200px;
    min-width: 180px;
    overflow: hidden;
    position: relative;
}
main#home .box #prev,main#home .box #next{
    position: absolute;
    top: 40%;
    font-size: 60px;
    color: #6666;
    cursor: pointer;
    transition: var(--transision--);
    z-index: 10;
}
main#home .box #prev:hover,main#home .box #next:hover{
    color: var(--textWhite--);
}
main#home .box #prev{
    left: -20px;
}
main#home .box #next{
    right: -20px;
}
main#home .box .full{
    width: 300%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    transition: var(--transision--);
}
main#home .box .full .item{
    display: block;
    width: calc((100% / 3));
    position: relative;
    transition: transform 400ms ease, box-shadow 400ms ease;
    border-radius: 8px;
    overflow: hidden;
}
main#home .box .full .item:hover{
    transform: scale(1.06);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
main#home .box .full .item img{
    width: 100%;
    transition: filter 400ms ease;
}
main#home .box .full .item:hover img{
    filter: brightness(1.15);
}
main#home .box .full .item h3{
    width: 100%;
    height: 3em;
    line-height: 3em;
    text-align: center;
    color: var(--textWhite--);
    background-color: var(--AlphaBlack--);
    position: absolute;
    bottom: 0;
    left: 0;
}

/*分頁設計*/
header ul{
    width: 100%;
    line-height: 55vh;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    color: var(--textColor--);
    font-weight: 700;
}
header ul li{
    margin: 0 0.3em;
}
header ul li a{
    padding: 0.5em 0.8em;
    line-height: 2em;
    border: 2px solid #c4c4c4;
    background-color: var(--textGray--);
    box-shadow: var(--shadow--);
    transition: var(--transision--);
    position: relative;
    overflow: hidden;
}
header ul li a::after{
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--textAction--);
    transition: all 300ms ease;
    transform: translateX(-50%);
}
header ul li a:hover{
    filter: brightness(1.1);
    background: linear-gradient(180deg, var(--textGray--), #FFF);
}
header ul li a:hover::after{
    width: 100%;
}
header ul li a:active{
    box-shadow: var(--shadow--) inset;
}
header ul li a.action{
    background-color: var(--textAction--);
    border: 2px solid #FBAF00;
}

main#draw{
    width: 100%;
    height: calc(70vh - 50px);
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
}
main#draw .box{
    width: 50%;
    max-width: 350px;
    min-width: 250px;
    font-size: 22px;
    text-align: center;
    line-height: 2.5em;
    color: var(--textColor--);
}
main#draw .box ol li{
    font-weight: 700;
    cursor: pointer;
    transition: var(--transision--);
}

main#draw .box ol li:hover{
    background-color: var(--textAction--);
    color: var(--textWhite--);
    transform: scale(1.2);
}

main#draw #btn{
    width: 100%;
    height: 3em;
    font-size: 20px;
    background-color: var(--textColor--);
    color: var(--textWhite--);
    border-radius: 10px;
    box-shadow: var(--shadow--);
    transition: var(--transision--);
    margin: 0.5em 0;
}

main#draw .box #result{
    line-height: 1.6em;
    letter-spacing: 2px;
}

main#draw .box #result.none{
    display: none;
}

.result-level{
    font-size: 3em;
    font-weight: 900;
    text-align: center;
    margin: 0.2em 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}
.level-ji{
    color: #DAA520;
}
.level-normal{
    color: #6B8EA0;
}
.level-xiong{
    color: #8B0000;
}
.result-poem{
    text-align: center;
    font-size: 1.05em;
    line-height: 2.2em;
    margin: 0.5em 0;
    padding: 0.5em;
    border-top: 1px solid rgba(0,0,0,0.15);
    border-bottom: 1px solid rgba(0,0,0,0.15);
}
.result-explain{
    text-align: justify;
    line-height: 1.8em;
    margin: 0.5em 0;
    padding: 0.3em 0;
}
.copy-btn{
    display: inline-block;
    padding: 0.4em 1.2em;
    font-size: 16px;
    background-color: var(--AlphaBlack--);
    color: var(--textWhite--);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 300ms ease;
    margin-top: 0.3em;
}
.copy-btn:hover{
    background-color: var(--textAction--);
    color: var(--textColor--);
}

main#draw .box ol .item.active{
    transform: scale(1.2);
    background-color: #550055;
    color: #FFF;
}

footer{
    width: 100%;
    height: 50px;
    line-height: 50px;
    text-align: center;
    color: var(--textWhite--);
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: var(--AlphaBlack--);
}

#load{
    width: 100%;
    height: 100vh;
    background-image: url(../images/background.png);
    background-size: cover;
    background-position: center top;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 15;
    display: flex;
    justify-content: center;
    align-items: center;
}
#load img{
    width: 250px;
    transform-origin: 75% 90%;
    animation: shake 800ms ease-in-out infinite;
}
#load.none{
    display: none;
}

@keyframes shake{
    0%, 100%{ transform: rotate(0) translateY(0); }
    10%{ transform: rotate(-15deg) translateY(-8px); }
    20%{ transform: rotate(12deg) translateY(-3px); }
    30%{ transform: rotate(-10deg) translateY(-10px); }
    40%{ transform: rotate(8deg) translateY(-2px); }
    50%{ transform: rotate(-8deg) translateY(-6px); }
    60%{ transform: rotate(6deg) translateY(-1px); }
    70%{ transform: rotate(-4deg) translateY(-4px); }
    80%{ transform: rotate(3deg) translateY(0); }
    90%{ transform: rotate(-1deg) translateY(-1px); }
}
@media only screen and (min-width: 834px){
    main#home .box{
        width: 100%;
        max-width: none;
        min-width: none;
    }
    main#home .box .full{
        width: 100%;
        justify-content: center;
        transition: none;
        padding: 40px;
        transform: translateX(0)!important;
    }
    main#home .box .full .item{
        margin: 10px;
        max-width: 350px;
    }
    main#home .box #prev,main#home .box #next{
        display: none;
    }
}
@media only screen and (max-width: 833px){
    header ul{
        flex-wrap: wrap;
        line-height: 2em;
        padding: 8px 5px;
        gap: 5px;
    }
    header ul li{
        margin: 2px;
    }
    header ul li a{
        font-size: 14px;
        padding: 0.3em 0.6em;
    }
    main#draw .box{
        width: 90%;
        max-width: none;
        min-width: auto;
        font-size: 18px;
    }
    main#draw .box #result{
        font-size: 16px;
        padding: 0 5px;
    }
    .result-level{
        font-size: 2.5em;
    }
    .result-poem{
        font-size: 0.95em;
        line-height: 2em;
    }
    .result-explain{
        font-size: 0.95em;
    }
}
@media only screen and (min-width: 1200px){}
@media only screen and (min-width: 1440px){}