html {
    background-color: #f0fafa;
    font-family: 'Noto Sans TC', "SF Pro TC", "SF Pro Text", "SF Pro Icons", "PingFang TC", "Helvetica Neue", "Helvetica", "Arial", "微軟正黑體", sans-serif;
    width: 100%;
    margin: 0;
    padding: 0;
}

::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-button {
    background: transparent;
    border-radius: 4px;
    display: none;
}

::-webkit-scrollbar-track-piece {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: #435c5c;
}

::-webkit-scrollbar-track {
    box-shadow: transparent;
}

.container {
    width: 100%;
    height: 100%;
    display: inline-flex;
}

nav {
    position: relative;
    width: 15%;
    height: calc(100% - 50px);
    margin: 25px 0px;
    border-radius: 18px 0px 0px 18px;
    overflow: hidden;
    border: 2px solid #ceebeb;
    border-right: none;
}

ul {
    padding-left: 0;
    max-height: calc(100% - 100px);
    overflow: auto;
    margin: 0;
    /* margin: 20px auto; */
}


li {
    list-style: none;
    padding: 20px 15px;
    border-bottom: 3px solid #a0baba;
    background: #ceebeb;
    /* border-radius: 18px 0px 0px 0px; */
    color: #435c5c;
    cursor: pointer;
    font-weight: 300;
    /* margin-top: 5px; */
}

/* li:first-child {
    border-radius: 18px 0px 0px 0px;

} */

li:hover {
    filter: brightness(1.1);
}

li.active {
    cursor: auto;
    filter: brightness(0.8);
    font-weight: 500;
}

.button {
    position: absolute;
    text-align: center;
    bottom: 30px;
    width: 100%;
}

button {
    border: none;
    background: #a0baba;
    padding: 10px 15px;
    color: #435c5c;
    cursor: pointer;
    border-radius: 8px;
}

button:hover {
    filter: brightness(1.1);
}

.notebook {
    position: relative;
    width: 85%;
    margin: 10px auto 10px;
    padding: 0;
}

.notebook::after {
    content: "";
    border: #435c5c;
}

textarea {
    position: relative;
    display: block;
    resize: none;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 18px;
    padding: 15px 15px 15px;
    font-size: 1em;
    background-image: linear-gradient(rgba(67, 92, 92, 0.2) 1px, transparent 1px);
    line-height: 2em;
    background-position: 0 15px;
    background-size: 100% 2em;
    background-attachment: local;
    color: #435c5c;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 300;
}

textarea::selection {
    background: #435c5c;
    color: #fff;
}

textarea::-moz-selection {
    background: #435c5c;
    color: #fff;
}

textarea:focus {
    outline: 0;
}

.popup {
    position: fixed;
    width: calc(95% - 40px);
    max-width: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 101;
}

.popup .content {
    background: rgba(206, 235, 235, 0.2);
    padding: 15px 20px;
    border-radius: 18px;
    -webkit-backdrop-filter: blur(10px) brightness(190%);
    backdrop-filter: blur(10px) brightness(190%);
}

.popup::after {
    content: "";
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    width: 300vw;
    height: 300vh;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -2;
}

.popup h2 {
    color: #435c5c;
    text-align: center;
    margin: 10px 0;
    font-weight: 500;
}

.popup p {
    margin: 0px 0px 10px;
    font-size: 14px;
    font-weight: 300;
}

p#notice {
    font-size: 12px;
    color: #fff;
    background: red;
    padding: 2px 0 3px;
    border-radius: 5px;
    text-align: center;
    width: 100%;
    margin: 5px 0px;
}

.popup input {
    display: block;
    padding: 10px 15px;
    margin: 5px 0;
    border: none;
    font-size: 16px;
    color: #435c5c;
    text-align: center;
    border-radius: 8px;
    width: 100%;
}

.popup input:focus {
    outline: 0;
}

.popup button {
    margin: 15px;
}

.alert-popup p,
.delete-popup p {
    font-size: 16px;
    margin-top: 20px;
}

.alert-popup button,
.delete-popup button {
    margin-bottom: 10px;
}

.loading {
    position: fixed;
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* text-align: center; */
    z-index: 99;
    /* background: #ceebeb; */
    padding: 15px 20px;
    border-radius: 15px;
}

.loading::before {
    content: "";
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    width: 500vw;
    height: 500vh;
    top: -250%;
    left: -500%;
    z-index: -2;
}

.loader {
    /* position: absolute; */
    display: block;
    top: 50%;
    left: 50%;
    font-size: 10px;
    width: 1em;
    height: 1em;
    border-radius: 50%;
    position: relative;
    text-indent: -9999em;
    animation: mulShdSpin 1.1s infinite ease;
    transform: translateZ(0) translate(-50%, -50%);
}

@keyframes mulShdSpin {

    0%,
    100% {
        box-shadow: 0em -2.6em 0em 0em #ffffff, 1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2), 2.5em 0em 0 0em rgba(255, 255, 255, 0.2), 1.75em 1.75em 0 0em rgba(255, 255, 255, 0.2), 0em 2.5em 0 0em rgba(255, 255, 255, 0.2), -1.8em 1.8em 0 0em rgba(255, 255, 255, 0.2), -2.6em 0em 0 0em rgba(255, 255, 255, 0.5), -1.8em -1.8em 0 0em rgba(255, 255, 255, 0.7);
    }

    12.5% {
        box-shadow: 0em -2.6em 0em 0em rgba(255, 255, 255, 0.7), 1.8em -1.8em 0 0em #ffffff, 2.5em 0em 0 0em rgba(255, 255, 255, 0.2), 1.75em 1.75em 0 0em rgba(255, 255, 255, 0.2), 0em 2.5em 0 0em rgba(255, 255, 255, 0.2), -1.8em 1.8em 0 0em rgba(255, 255, 255, 0.2), -2.6em 0em 0 0em rgba(255, 255, 255, 0.2), -1.8em -1.8em 0 0em rgba(255, 255, 255, 0.5);
    }

    25% {
        box-shadow: 0em -2.6em 0em 0em rgba(255, 255, 255, 0.5), 1.8em -1.8em 0 0em rgba(255, 255, 255, 0.7), 2.5em 0em 0 0em #ffffff, 1.75em 1.75em 0 0em rgba(255, 255, 255, 0.2), 0em 2.5em 0 0em rgba(255, 255, 255, 0.2), -1.8em 1.8em 0 0em rgba(255, 255, 255, 0.2), -2.6em 0em 0 0em rgba(255, 255, 255, 0.2), -1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2);
    }

    37.5% {
        box-shadow: 0em -2.6em 0em 0em rgba(255, 255, 255, 0.2), 1.8em -1.8em 0 0em rgba(255, 255, 255, 0.5), 2.5em 0em 0 0em rgba(255, 255, 255, 0.7), 1.75em 1.75em 0 0em #ffffff, 0em 2.5em 0 0em rgba(255, 255, 255, 0.2), -1.8em 1.8em 0 0em rgba(255, 255, 255, 0.2), -2.6em 0em 0 0em rgba(255, 255, 255, 0.2), -1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow: 0em -2.6em 0em 0em rgba(255, 255, 255, 0.2), 1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2), 2.5em 0em 0 0em rgba(255, 255, 255, 0.5), 1.75em 1.75em 0 0em rgba(255, 255, 255, 0.7), 0em 2.5em 0 0em #ffffff, -1.8em 1.8em 0 0em rgba(255, 255, 255, 0.2), -2.6em 0em 0 0em rgba(255, 255, 255, 0.2), -1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2);
    }

    62.5% {
        box-shadow: 0em -2.6em 0em 0em rgba(255, 255, 255, 0.2), 1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2), 2.5em 0em 0 0em rgba(255, 255, 255, 0.2), 1.75em 1.75em 0 0em rgba(255, 255, 255, 0.5), 0em 2.5em 0 0em rgba(255, 255, 255, 0.7), -1.8em 1.8em 0 0em #ffffff, -2.6em 0em 0 0em rgba(255, 255, 255, 0.2), -1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2);
    }

    75% {
        box-shadow: 0em -2.6em 0em 0em rgba(255, 255, 255, 0.2), 1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2), 2.5em 0em 0 0em rgba(255, 255, 255, 0.2), 1.75em 1.75em 0 0em rgba(255, 255, 255, 0.2), 0em 2.5em 0 0em rgba(255, 255, 255, 0.5), -1.8em 1.8em 0 0em rgba(255, 255, 255, 0.7), -2.6em 0em 0 0em #ffffff, -1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2);
    }

    87.5% {
        box-shadow: 0em -2.6em 0em 0em rgba(255, 255, 255, 0.2), 1.8em -1.8em 0 0em rgba(255, 255, 255, 0.2), 2.5em 0em 0 0em rgba(255, 255, 255, 0.2), 1.75em 1.75em 0 0em rgba(255, 255, 255, 0.2), 0em 2.5em 0 0em rgba(255, 255, 255, 0.2), -1.8em 1.8em 0 0em rgba(255, 255, 255, 0.5), -2.6em 0em 0 0em rgba(255, 255, 255, 0.7), -1.8em -1.8em 0 0em #ffffff;
    }
}

.install {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    animation: instalud 2s infinite linear;
}

@keyframes instalud {

    0%,
    50%,
    100% {
        bottom: 60px;
    }

    25% {
        bottom: 70px;
    }

    75% {
        bottom: 50px;
    }

}

#install {
    padding: 20px 10px;
    background: #F5F5F4;
    width: 280px;
    border-radius: 20px;
    line-height: 25px;
    font-size: 16px;
    text-align: center;
    font-weight: 300;
    /* z-index: 101; */
}

.share {
    position: relative;
    bottom: 2px;
    vertical-align: bottom;
    height: 20px;
}

#arrowInner {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid #F5F5F4;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

#close {
    position: absolute;
    top: 0;
    right: 0;
    width: 16px;
    height: 16px;
    padding: 5px;
    cursor: pointer;
}

.promot {
    display: block;
    width: 300px;
    height: 50px;
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translate(-50%, 0%);
    /* overflow: hidden; */
}

.promot-close{
    position: relative;
    top: -20px;
    right: -284px;
    background: transparent;
    border: solid 1px #555;
    width: 16px;
    height: 16px;
    border-radius: 100px;
    padding: 0;
    text-align: center;
}

.promot-close img{
    width: 10px;
    height: 10px;
}

.promot .adsbygoogle {
    margin: 0 auto;
}

.theme-change {
    position: fixed;
    bottom: 40px;
    right: 30px;
    padding: 10px;
    border-radius: 100%;
    z-index: 100;
}

.speech-btn {
    position: fixed;
    bottom: 90px;
    right: 30px;
    padding: 10px;
    border-radius: 100%;
    z-index: 100;

}

.speach-loading{
    position: fixed;
    width: 100px;
    height: 100px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 101;
    background: #f0fafa;
    border-radius: 18px;
}

.speach-loader {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 8px;
    height: 40px;
    border-radius: 4px;
    display: block;
    /* margin: 20px auto; */
    position: relative;
    background: currentColor;
    color: #435c5c;
    box-sizing: border-box;
    animation: animloader 0.3s 0.3s linear infinite alternate;
}

.speach-loader::after,
.speach-loader::before {
    content: '';
    width: 8px;
    height: 40px;
    border-radius: 4px;
    background: currentColor;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 20px;
    box-sizing: border-box;
    animation: animloader 0.3s 0.45s linear infinite alternate;
}

.speach-loader::before {
    left: -20px;
    animation-delay: 0s;
}

@keyframes animloader {
    0% {
        height: 48px
    }

    100% {
        height: 4px
    }
}

.hidden {
    display: none;
}

/* Phone Mode */
@media screen and (max-width: 800px) {
    html {
        overflow: hidden;
    }

    ::-webkit-scrollbar {
        display: none;
    }

    .container {
        flex-wrap: wrap;
        align-content: flex-start;
        /* margin-top: 10px; */

    }

    nav {
        margin-top: 10px;
        width: 100%;
        height: auto;
        border-radius: 0;
        border: none;
        margin-bottom: 0;
    }

    html.dark nav {
        border: none !important;
    }

    ul {
        max-height: none;
        margin: 0;
        white-space: nowrap;
    }

    li {
        display: inline-block;
        min-width: 80px;
        text-align: center;
        padding: 10px 15px;
        line-height: 1.2em;
        border-radius: 10px 10px 0px 0px;
        margin: 0;
    }

    li:first-child {
        margin-right: -4px;
    }

    .button {
        position: fixed;
        bottom: 25px;
        right: 0px;
        z-index: 1;
    }

    .notebook {
        height: calc(100% - 120px);
        width: 100%;
        margin: 0px auto 60px;
    }

    textarea {
        border-radius: 0px 0px 18px 18px;
        background-size: 32px 32px;
        line-height: 32px;
        font-size: 16px;
    }

    .theme-change {
        position: fixed;
        bottom: 21px;
        left: 20px;
        right: auto;
    }

    .speech-btn {
        position: fixed;
        bottom: 21px;
        right: 20px;
    }
}

/* Dark Mode */

html.dark {
    background-color: #121212;
    color: rgba(255, 255, 255, 0.87);
}

html.dark ::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.25);
    /* border: 1px solid slategrey; */
}

html.dark textarea {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.75);
    background-image: linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
}

html.dark textarea::selection,
html.dark textarea::-moz-selection {
    background: rgba(255, 255, 255, 0.87);
    color: #121212;
}

html.dark nav {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-right: none;
}

html.dark li {
    border-bottom: 3px solid #000000;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.87);
}

html.dark li:hover,
html.dark button:hover {
    background: rgba(255, 255, 255, 0.25);
}

html.dark li.active {
    background: rgba(255, 255, 255, 0.2);
}

html.dark button {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.87);
}

html.dark .popup .content {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px) brightness(90%);
    backdrop-filter: blur(10px) brightness(90%);
}

html.dark .popup h2 {
    color: rgba(255, 255, 255, 0.87);
}

html.dark .popup input {
    background: #121212;
    color: rgba(255, 255, 255, 0.87);
}

html.dark #install {
    /* background: #111111; */
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px) brightness(70%);
    backdrop-filter: blur(10px) brightness(70%);
}

html.dark #arrowInner {
    /* border-top: 20px solid #111111; */
    border-top: 20px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px) brightness(70%);
    backdrop-filter: blur(10px) brightness(70%);
}

html.dark #close,
html.dark .share {
    -webkit-filter: contrast(0) brightness(2);
    filter: contrast(0) brightness(2);
}

html.dark #dark-btn,
html.dark .speech-btn {
    background: #444;

}

html.dark .speech-btn svg {
    fill: #dddddd;
}

html.dark .speach-loading{
    background: #121212;
}

html.dark .speach-loader {
    color: rgba(255, 255, 255, 0.87);
}