@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Noto+Sans+TC:wght@100..900&family=Pixelify+Sans:wght@400..700&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
@import url('common.css');

* {
    /* Settings */

    /* Widget size */
    --nav-width: 100%;
    --nav-height: 3.2em;
    --nav-folded-width: 0;
    --nav-font-size: clamp(12px, 2vw, 20px);
    --nav-font-size-mobile: 20px;
    --nav-font-size-at-left-side: 18px;
    --nav-text-wrapped-size: 14px;
    --nav-text-min-size: 12px;
    --nav-left-width: 30vh;
    --nav-left-height: 100vh;

    --brand-font-size-mobile: 20px;
    --a_name_a_avatar-size-mobile: 20px;

    /* Scrollbar */
    --scrollbar-w: 12px;
    --scrollbar-w-small: 8px;

    --footer-height: 5em;

    /* Default margin */
    --nav-border-margin: 15px;

    /*Fonts*/
    --general-font: Roboto, Noto Sans TC, Arial, system-ui, sans-serif;
    --pixel-font: "Pixelify Sans", sans-serif;

    padding: 0;
    margin: 0;

    font-family: Roboto, Noto Sans TC, system-ui, sans-serif;
}

:root {
    /* Colors */

    /* common */
    --body-color: rgb(99, 208, 255);
    --main-bg-color: rgba(0, 0, 0, 0);

    /*--body-color: #72b2ff;*/
    --text-color: #ffffff;
    --default-font-color: rgb(18, 18, 18);

    /* navigator bar */
    --nav-alpha: 0.8;
    --nav-color: 16, 16, 16;
    --nav-item-a-color: rgb(255, 255, 255);
    --nav-item-a-color-actived: rgb(248, 207, 68);
    --nav-item-border-color: rgb(255, 255, 255);
    --nav-bar-item-left-mode-color: rgba(131, 131, 131, 0.3);

    /* footer */
    --footer-background-color: rgb(251, 223, 80);
    --footer-text-color: #0b1220;

    /* dropbox */
    --dropbox-item-hover-color: rgb(41, 41, 41);
    --dropbox-item-active-color: rgb(255, 255, 255);
    --dropdown-bg-color: rgba(19, 19, 19, 0.65);

    /* scrollbar color */
    --scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    --scrollbar-thumb-color: rgba(255, 255, 255, 0.3);
    --scrollbar-track-color: transparent;

    /* Account */
    --account-name-color: rgb(255, 255, 255);

    /* specials */
    --web-title-color: #ffcc4a;

    /* hyperlink */
    --hyp-text-color: rgb(65, 204, 255);
    --hyp-text-color-actived: rgb(0, 198, 253);

    /* Background */
    /* --main-background-liner: linear-gradient(
            270deg,
            #caf0f8,
            #a6ffce,
            #ffeda6,
            #caf0f8
    ); */
    /*--main-background-liner: linear-gradient(*/
    /*        270deg,*/
    /*        rgb(99, 208, 255),*/
    /*        #a6ffce,*/
    /*        #ffeda6,*/
    /*        rgb(99, 208, 255)*/
    /*);*/
    /*--main-background-liner: linear-gradient(*/
    /*        270deg,*/
    /*        rgb(142, 220, 255),*/
    /*        rgb(163, 227, 255),*/
    /*        rgb(165, 225, 255),*/
    /*        rgb(155, 222, 251)*/
    /*);*/
    /*--main-background-liner: linear-gradient(*/
    /*        270deg,*/
    /*        rgb(197, 197, 197),*/
    /*        rgb(255, 255, 255),*/
    /*        rgb(255, 255, 255),*/
    /*        rgb(253, 253, 253)*/
    /*);*/
    /*--main-background-liner: linear-gradient(*/
    /*        #fdf9ec,*/
    /*        #fdf9ec,*/
    /*        #fdf9ec,*/
    /*        #fdf9ec*/
    /*);*/
    --main-background-liner: linear-gradient(
            #dbf8ff,
            #dbf8ff,
            #dbf8ff,
            #dbf8ff
    );
    /*--main-background-liner: linear-gradient(*/
    /*        270deg,*/
    /*        rgb(45, 57, 92),*/
    /*        #001078,*/
    /*        #001588,*/
    /*        rgb(45, 57, 92)*/
    /*);*/
    /*--main-background-liner: linear-gradient(*/
    /*        270deg,*/
    /*        rgb(255, 255, 255),*/
    /*        #c4faff,*/
    /*        #fffbcc,*/
    /*        rgb(255, 255, 255)*/
    /*);*/
    /*--main-background-liner: linear-gradient(*/
    /*        270deg,*/
    /*        #1a1a1e,*/
    /*        #1a1a1e,*/
    /*        #1a1a1e,*/
    /*        #1a1a1e*/
    /*);*/

    /*Input Bar*/
    --input-text-color: rgb(7, 7, 7);
    --input-bar-bg: #f8f8f8;
    --input-border-color: #cfcfcf;
    --input-active-bg: white;
}

@media only screen and (max-width: 767px)  {
    :root {
        /*--footer-background-color: transparent;*/
    }
}


/* Fonts Rules */
.brand_box h1,
.n_main_ul li a,
.h_d_item a,
footer h1,
footer .links li a,
footer .contact_item,
footer h3,
.links_list li,
.links_list li a,
.brand_placeholder h1,
.a_a_alt, p, a, h1, h2, h3, h4, h5, h6
{
    font-family: var(--general-font), serif;
}

html, body {
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    background-color: var(--body-color);
    scrollbar-color: var(--scrollbar-color);
    scrollbar-width: thin;
}

/* ============ Themes ============ */

body.dark>footer .footer_brand_floor img.with_color {
    filter: saturate(1)
}

body.dark {
    /*--footer-text-color: #ffda4f;*/
    --default-font-color: rgb(255, 255, 255);
    --main-background-liner: linear-gradient(
            270deg,
            #1a1a1e,
            #1a1a1e,
            #1a1a1e,
            #1a1a1e
    );
    --input-text-color: rgb(234, 234, 234);
    --input-bar-bg: #272727;
    --input-border-color: #3a3a3a;
    --input-active-bg: #494949;
}

/* ============ Theme END ============ */

::-webkit-scrollbar {
    width: var(--scrollbar-w);
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #373737;
}

::-webkit-scrollbar-thumb {
    background-color: #616161;
    border: 2px solid transparent;
    border-radius: 9px;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #919191;
}

/* HyperLink */

a:active {
    color: var(--hyp-text-color-actived);
    text-decoration: underline;
}

a {
    color: var(--hyp-text-color);
}

/* Header */

.site_header {
    position: sticky;
    top: 0;
    z-index: 1000;
    --nav-block-size: var(--nav-height);
    --nav-inline-size: 0px;
    transition: transform .5s ease, opacity .5s ease;
}

.site_header.left_side {
    --nav-block-size: 0px;
    --nav-inline-size: var(--nav-left-width);
}

.site_header.folded {
    --nav-inline-size: var(--nav-folded-width);
}

.nav_shell {
    display: flex;
    flex-direction: row;
    width: var(--nav-width);
    background-color: rgba(var(--nav-color), var(--nav-alpha));
    align-items: center;
    min-height: var(--nav-height);
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
    transition: opacity .3s ease,  background-color .5s ease;
    backdrop-filter: blur(1px);
}

/* Website mark */

.brand_box {
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    display: flex;
    padding-left: 15px;
    padding-right: 15px;
}

.brand_box .brand_img {
    aspect-ratio: 1 / 1;
    height: 95%;
    max-height: calc(var(--nav-height) - 0.5em);
    border-radius: 30px;
}

.brand_box .brand_img:hover {
    animation: doFlip 1.2s infinite;
}

@media (max-width: 767px)  {
    .brand_box .brand_img {
        max-height: calc(var(--nav-height) - 1em);
    }
}

.brand_placeholder {
    display: none;
}

/* For left_side navigator bar */
.brand_box h1 {
    display: none;
}

.site_header.left_side .brand_box h1 {
    display: block;
    color: var(--web-title-color);
    white-space: nowrap;
    font-size: 20px;
}

.header_brand {
    position: absolute;
    bottom: 20px;
    text-align: center;
    display: none;
}

.header_brand h3 {
    color: var(--text-color);
    font-family: Roboto, Noto Sans TC, Arial, system-ui, sans-serif;
}

/* Navigation bar */

.nav_main {
    width: 100%;
    max-height: 100%;
}

.n_main_ul li {
    display: flex;
    position: relative;
    list-style-type: none;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    float: left;
    font-size: var(--nav-font-size);
    padding: 0.85em clamp(10px, 2vw, 30px);
}

.n_main_ul li::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--nav-item-a-color-actived);
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.n_main_ul li:hover::after {
    opacity: 1;
}

.n_main_ul li a {
    text-decoration: none;
    color: var(--nav-item-a-color);
}

.n_main_ul li:hover a {
    color: var(--nav-item-a-color-actived);
}

.nav_toggle {
    color: white;
    display: grid;
    place-items: center;
    position: fixed;
    top: calc(var(--nav-height) / 5);
    left: 15px;
    z-index: 1001;
    height: 35px;
    width: 35px;
    border-radius: 50%;
    background-color: rgb(var(--nav-color), 0.6);
    border: none;
    padding: 0;
    font-size: 15px;
    cursor: pointer;
    outline: none;
    opacity: 0;
    pointer-events: none;
    transition:
            transform 0.35s cubic-bezier(.4,0,.2,1),
            opacity 1.8s ease-in-out 0.1s;
}

.nav_toggle img {
    height: 25px;
    width: 25px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
}

.nav_toggle *.disabled {
    display: none;
}

/* Dummy Nav */
.nav_lightweight {
    width: var(--nav-width);
    height: var(--nav-height);
    background-color: rgb(var(--nav-color), var(--nav-alpha));
    position: relative;
    top: 0;
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    transition: background-color .5s ease;
}

.n_l_short_links {
    display: flex;
    flex-direction: row;
    margin-left: auto;
    padding: 15px;
    list-style-type: none;
    gap: 10px;
}

.n_l_short_links li {
    text-decoration: none;
}

.n_l_short_links li i {
    font-size: 25px;
    color: white;
}

/* Header dropdown */

.nav_account {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.h_dropdown {
    position: relative;
    display: inline;
}

.a_name_a_avatar {
    margin: 0 15px 0 15px;
}

.a_avatar {
    aspect-ratio: 1 / 1;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    align-items: center;
    justify-content: center;
    display: flex;
    max-height: 2.5em;
}

.a_a_alt {
    display: none;
    color: var(--account-name-color);
    font-weight: 300;
    max-width: 100px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-right: 15px;
    text-align: right;
}

.h_d_content {
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 180px;
    z-index: 1000;
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
    background-color: rgb(20, 20, 20);
}

.h_d_content.opened {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: rgba(0, 0, 0, 0.35) 0 5px 15px;
}

/* Fix can't disable by click again dropdown on iPad. */
@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
    .h_dropdown:hover .h_d_content,
    .h_d_content:hover {
        opacity: 1; visibility: visible; pointer-events: auto;
    }

    .h_dropdown:focus-within .h_d_content {
        opacity: 1; visibility: visible; pointer-events: auto;
    }
}

.h_d_item {
    box-sizing: border-box;
    padding: 14px 12px;
    min-height: 40px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    transition: background-color 0.3s ease;
    background-color: rgb(20, 20, 20);
}

.h_d_item:hover {
    background-color: rgb(41, 41, 41);
}

.h_d_item:active {
    background-color: rgb(255, 255, 255);
}

.h_d_item a {
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding-left: 50px;
    white-space: normal;
}

.h_d_item img,
.h_d_item .theme_icon,
.h_d_item .svg_icon{
    aspect-ratio: 1 / 1;
    height: 100%;
    max-height: 2.5em;
    position: absolute;
    left: 20px;
    user-select: none;
}

.h_d_item svg {
    height: 100%;
    max-height: 1.5em;
}

.h_d_item.disabled {
    filter: brightness(50%);
    pointer-events: none;
}

.h_d_item a {
    text-decoration: none;
    outline: none;
}

/* Footer */
body>footer {
    box-shadow: 0 1px 16px 0 rgba(0,0,0,0.2);
    position: relative;
    display: flex;
    bottom: 0;
    background-color: var(--footer-background-color);
    width: 100%;
    min-height: var(--footer-height);
    flex-direction: column;
}

footer .copyright_floor {
    position: absolute;
    bottom: 10px;
    right: 20px;
}

.copyright_floor h3 {
    float: right;
    color: var(--footer-text-color);
    font-size: 12px;
}

footer .footer_brand_floor {
    align-items: center;
    display: flex;
    padding: 20px;
}

footer .footer_brand_floor h1 {
    color: var(--footer-text-color);
    font-size: 1.8em;
}

footer .footer_brand_floor .footer_brand_logo {
    width: 40px;
    aspect-ratio: 1 / 1;
    right: 20px;
    margin-left: auto;
    fill: var(--footer-text-color);
}

footer .contact_box_floor {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 10px;
}

footer .contact_item {
    position: relative;
    color: var(--footer-text-color);
    font-size: 12px;
    font-weight: 500;
    padding: 0.2em clamp(10px, 1.5vw, 30px);
}

footer .links_container {
    padding: 0.2em clamp(10px, 1.5vw, 30px);
    /*background: #ffdb49;*/
}

.links_list {
    display: flex;
    flex-direction: row;
}

.links_list li {
    list-style-type: none;
    text-decoration: none;
    color: var(--footer-text-color);
    font-size: 14px;
    font-weight: 600;
    position: relative;
    padding: 0.2em clamp(10px, 1.5vw, 30px);
    border-left: 1px solid var(--footer-text-color);
}

.links_list li:last-child {
    border-right: 1px solid var(--footer-text-color);
}

.links_list li a {
    text-decoration: none;
    color: var(--footer-text-color);
}

@media only screen and (max-width: 767px)  {
    footer .copyright_floor {
        justify-content: center;
        text-align: center;
        display: flex;
        position: relative;
        bottom: auto;
        right: auto;
        padding: 10px;
    }

    .links_list li {
        flex: 1;
    }
}

/* Left Side Mode */

.site_header.left_side {
    position: fixed;
}

.site_header.left_side .nav_shell {
    flex-direction: column;
    width: var(--nav-left-width);
    height: var(--nav-left-height);
}

.site_header.left_side .nav_lightweight {
    display: flex;
}

.site_header.left_side .nav_toggle {
    transform: translate(var(--nav-left-width),calc(50vh - 15px)) translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.site_header.left_side .brand_box {
    padding: 15px 0 0 0;
}

.site_header.left_side .brand_box h1 {
    display: block;
    padding: 0 0 0 20px;
}

.site_header.left_side .n_main_ul li {
    float: none;
    height: 1.5em;
    border-radius: 5px;
    text-align: left;
    margin: 20px;
    /*animation: doFlip 1.2s forwards;*/
    transition: background-color 0.25s linear;
    font-size: var(--nav-font-size-at-left-side);
}

.site_header.left_side .n_main_ul li:hover {
    border-bottom: none;
    box-shadow: 0 0 25px var(--nav-bar-item-left-mode-color);
    background-color: var(--nav-bar-item-left-mode-color);
}

.site_header.left_side .n_main_ul li::after {
    display: none;
}

@media only screen and (max-width: 767px) {
    .site_header.left_side .n_main_ul li {
        margin: 10px;
    }
}

.site_header.left_side .nav_account {
    margin: 0;
}

.site_header.left_side .a_name_a_avatar {
    display: flex;
    text-align: center;
    align-items: center;
}

.site_header.left_side .a_a_alt {
    display: block;
    border-bottom: none;
    font-weight: 400;
    width: 80%;
    text-align: left;
    margin-left: 20px;
}

@media only screen and (max-width: 767px) {
    .site_header.left_side .a_a_alt {
        font-size: 0.8em;
    }

    .site_header.left_side .h_d_content {
        min-width: 0;
    }
}

.site_header.left_side .h_dropdown {
    padding-top: 20px;
    width: calc(var(--nav-left-width) - 30px);
    background-color: var(--dropdown-bg-color);
    border-radius: 10px;
}

.site_header.left_side .h_d_content {
    position: relative;
    top: 0;
    z-index: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
    overflow-y: scroll;
    scrollbar-color: var(--scrollbar-color);
    scrollbar-width: thin;
    background-color: transparent;
}

.site_header.left_side .h_d_content::-webkit-scrollbar {
    width: 8px;
}

.site_header.left_side .h_d_content::-webkit-scrollbar-track {
    background: var(--scrollbar-track-color);
}

.site_header.left_side .h_d_content::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb-color);
    border-radius: 4px;
}

.site_header.left_side .h_d_item {
    position: relative;
    top: 20px;
    background-color: transparent;
}

.site_header.left_side .h_d_item:hover {
    background-color: var(--dropbox-item-hover-color);
}

.site_header.left_side .h_d_item:active {
    background-color: var(--dropbox-item-active-color);
}

.t_bar {
    position: fixed;
    top: 0;
    height: var(--nav-height);
    width: 100%;
    background-color: var(--nav-color);
    align-items: center;
    display: none;
}

.t_bar * {
    margin: 20px;
}


@media only screen and (max-width: 767px)  {
    .site_header.left_side .brand_box h1 {
        padding: 5px;
        font-size: var(--brand-font-size-mobile);
    }

    .site_header.left_side .n_main_ul li {
        font-size: var(--nav-font-size-mobile);
    }

    .site_header.left_side .a_name_a_avatar {
        font-size: var(--a_name_a_avatar-size-mobile);
    }
}

/* Folded Mode (Left Side Only) */

.site_header.folded {
    position: sticky;
}

.site_header.folded .nav_shell {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.site_header.folded .nav_lightweight {
    display: flex;
}

.site_header.folded .nav_toggle {
    background: none;
    font: inherit;
    outline: none;
    transform: translate(0, 0);
    position: fixed;
    opacity: 1;
}

.site_header.folded .nav_toggle i {
    font-size: 28px;
}

main {
    flex: 1;
    background-color: var(--main-bg-color);
    margin: 0 auto;
    overflow: hidden;
    min-height: 150vh;
}

.mode_left {
    animation: fadeInLeft .5s;
}

.mode_out_left {
    animation: fadeOutLeft .5s;
}

.mode_top {
    animation: fadeInBottom .5s;
}

.background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: -1;
    width: 100%;
    height: 100vh;
    background-size: 400% 400%;
    background-image: var(--main-background-liner);
    animation: gradient 25s ease infinite;
    transition: background-image 0.5s ease-in-out;
}

.background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Themes */
/* body.dark_mode {

} */

/*Input Bar*/
.basic_input {
    padding: 12px 14px;

    font-size: 14px;
    color: var(--input-text-color);

    /*background-color: #fff;*/
    border-radius: 10px;
    border: 2px solid var(--input-border-color);

    box-sizing: border-box;

    transition:
            border-color 0.2s ease,
            box-shadow 0.2s ease,
            background-color 0.2s ease;
    background-color: var(--input-bar-bg);
}

.basic_input::placeholder {
    color: #aaa;
}

.basic_input:focus {
    outline: none;
    border-color: #9b9b9b;
    background-color: var(--input-active-bg);

    box-shadow: 0 0 0 3px rgba(150, 150, 150, 0.2);
}
