@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=Convergence&family=Noto+Sans+TC:wght@100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
@import url('common.css');


* {
    /* Settings */
    --pin-header-to-top: true;

    /* Widget size */
    --nav-height: 4.2em;
    --nav-wrapped-height: 2.4em;
    --nav-folded-width: 0;
    --nav-min-height: 3.2em;
    --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;

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

    --footer-height: 5em;

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

    padding: 0;
    margin: 0;
}

:root {
    /* Colors */

    /* common */
    --body-color: #4a94ff;
    --main-bg-color: rgba(0, 0, 0, 0);


    /*--body-color: #72b2ff;*/
    --text-color: #ffffff;

    /* navigator bar */
    --nav-color: rgba(16, 16, 16, 0.8);
    --nav-item-a-color: rgb(255, 255, 255);
    --nav-item-a-color-actived: rgb(255, 229, 142);
    --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(255, 211, 46);
    --footer-text-color: rgb(35, 35, 35);

    /* dropbox */
    --dropbox-item-hover-color: rgb(41, 41, 41);
    --dropbox-item-active-color: rgb(255, 255, 255);

    /* 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;
}


/* Fonts Rules */
.brand_box h1,
.t_n_bar li a,
.h_d_item a,
footer h1,
footer .links li a,
footer .contact_item,
footer h3,
.links_list li,
.links_list li a {
    font-family: var(--general-font), serif;
}

html, body {
    margin: 0;
    overflow-x: hidden;
    min-height: 200vh;
    display: flex;
    flex-direction: column;
}

body {
    background-color: var(--body-color);
}

/* Header */

.t_header {
    position: fixed;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    z-index: 1000;
    min-height: var(--nav-height);
    background: var(--nav-color);
    overflow: visible;
}

/* Website mark */

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

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

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

/* For minimize navigator bar */
.brand_box h1 {
    color: var(--web-title-color);
    white-space: nowrap;
    font-size: 20px;
    display: none;
}

.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 */

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

.t_n_bar {
    backdrop-filter: blur(1px);
}

.t_n_bar 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: 1em clamp(10px, 2vw, 30px);
}

.t_n_bar 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;
}

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

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

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

.t_header_btn {
    z-index: 1001;
    position: fixed;
    height: 35px;
    width: 35px;
    display: none;
    background-color: var(--nav-color);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

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

/* Header dropdown */

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

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

.a_a_alt {
    font-family: 'Bricolage Grotesque', serif;
    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;
}

.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;
    }
}

@starting-style {
    .h_d_content.show {
        opacity: 0;
        display: none;
    }
}

.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 {
    aspect-ratio: 1 / 1;
    height: 100%;
    max-height: 2.5em;
    position: absolute;
    left: 20px;
    user-select: none;
}

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

/* Footer */
body>footer {
    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 img {
    width: 40px;
    aspect-ratio: 1 / 1;
    right: 20px;
    margin-left: auto;
}

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 #303030;
}

.links_list li:last-child {
    border-right: 1px solid #323232;
}

.links_list li a {
    text-decoration: none;
    color: #000000;
}

@media only screen and (max-width: 767px)  {
    footer .copyright_floor {
        justify-content: center;
        text-align: center;
        display: flex;
    }

    footer .copyright_floor {
        position: relative;
        bottom: auto;
        right: auto;
        padding: 10px;
    }

    .links_list li {
        flex: 1;
    }
}

/* Minimize Mode (obsolete. Use "folded" class instead) */

/*.t_header {*/
/*    &.minimized {*/
/*        height: var(--nav-min-height);*/

/*        .brand_box img {*/
/*            display: none;*/
/*        }*/

/*        .brand_box h1 {*/
/*            display: block;*/
/*        }*/

/*        .t_n_bar li {*/
/*            font-size: var(--nav-text-min-size);*/
/*        }*/
/*    }*/
/*}*/

/* Left Side Mode */

.t_header {
    &.left_side {
        opacity: 1;
        flex-direction: column;
        height: 100%;
        width: var(--nav-left-width);

        .brand_box {
            padding-top: 10px;
            width: var(--nav-left-width);
            height:60px;
        }

        .brand_box h1 {
            padding-left: 20px;
            display: block;
        }

        .header_brand {
            display: block;
        }

        .t_nav {
            min-height: 200px;
        }

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

        .t_n_bar 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);
        }

        /*.t_n_bar li::before {*/
        /*    content: "";*/
        /*    position: absolute;*/
        /*    top: 0;*/
        /*    left: 0;*/
        /*    width: 100%;*/
        /*    height: 0;*/
        /*    background-color: var(--nav-bar-item-left-mode-color);*/
        /*    transition: height 0.2s ease-in-out;*/
        /*    border-radius: 5px;*/
        /*}*/

        /*.t_n_bar li:hover::before {*/
        /*    height: 100%;*/
        /*}*/

        .t_n_bar li:hover::after {
            opacity: 0;
        }

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

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

        .h_dropdown {
            padding-top: 20px;
            width: calc(var(--nav-left-width) - 30px);
            background-color: #1c1c1c;
            border-radius: 10px;
        }

        .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;
        }

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

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

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

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

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

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


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

            .t_n_bar li {
                font-size: var(--nav-font-size-mobile);
            }

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

.t_header_btn.display_at_top_left {
    left: 20px;
    top: 20px;
    transform: none;
    display: flex;
}

.t_header_btn.display_at_middle {
    top: 50%;
    left: calc(var(--nav-left-width) + 15px);
    transform: translate(0%, -50%);
    display: flex;
}

/* Wrapped Mode (Top side only) */
.t_header {
    &.wrapped {
        min-height: var(--nav-wrapped-height);
        max-height: var(--nav-wrapped-height);

        .brand_box {
            padding: 0 15px;
        }

        .brand_box img {
            display: none;
        }

        .brand_box h1 {
            display: block;
            font-size: 18px;
        }

        .t_nav {
            padding: 0 0;
        }

        .t_n_bar li {
            font-size: var(--nav-text-wrapped-size);
            font-weight: 400;
            padding: 0 30px;
        }

        .t_n_bar li::after {
            display: none;
        }

        .a_avatar {
            display: none;
        }

        .a_a_alt {
            display: block;
        }
    }
}

/* Folded Mode (Left Side Only) */

.t_header {
    &.folded {
        opacity: 0;

        .brand_box img {
            display: none;
        }

        .brand_box h1 {
            display: none;
        }

        .t_n_bar {
            display: none;
        }

        .t_header_btn {
            background-color: var(--dropbox-item-hover-color);
        }

        .h_dropdown {
            display: none;
        }

        .header_brand {
            display: none;
        }
    }
}

main {
    flex: 1;
    padding-top: var(--nav-height);
    background-color: var(--main-bg-color);
    margin: 0 auto;
    overflow: hidden;
}

