/* ========================
 *   Tsinglan Coding Club
 * ========================
 *  - By Lanbin with ❤️. 
 *  - All rights reserved.
 * 
 * Credits:
 * - Nunito Font: Google Fonts
 * - Loading Tutorial: https://www.cnblogs.com/liao123/p/14219809.html
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 6px;
    height: 1px;
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: #979797;
}

body {
    font-family: 'Nunito', Arial, sans-serif;
    background-color: #fefefe;
}

header {
    background-color: #fefefe;
    padding: 15px 20px;
    /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); */
    width: 100%;
    transition: all 0.3s ease;
    height: 51.33px;
}

.fake-nav {
    height: 51.33px;
    width: 100%;
    display: none;
}

.fake-nav.active {
    display: block;
}

header.shadow {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: fixed;
    z-index: 1000;
}


nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    /* 横向排列 */
    display: flex;
    list-style: none;
}

nav ul li a {
    margin-left: 20px;
    font-weight: normal;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
    text-decoration: none;
}

nav ul li.title {
    margin-left: auto;
}

nav ul li a:hover {
    color: #007BFF;
}

main {
    display: flex;
    /* 上下排列 */
    flex-direction: column;
    margin-bottom: 200px;
}

.intro {
    width: 60vw;
    height: 95vh;
    /* 里面的东西居中 */
    display: flex;
    justify-content: center;
    align-items: center;
}

.intro h1 {
    font-size: 5.8rem;
    font-weight: 400;
    color: #333;
}

.intro p {
    font-size: 1.7rem;
    color: #666;
    margin-top: 10px;
    margin-left: 8px;
}

.box {
    /* 写一个拟态小盒子 */
    width: 70%;
    margin: auto;
    height: auto;
    padding: 60px;
    padding-bottom: 40px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 5px 3px rgba(0, 0, 0, 0.02);
}

.box h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: bold;
}

.box h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}

.box p {
    font-size: 1.13rem;
    color: #212121;
    margin-bottom: 20px;
    /* 行间距 */
    line-height: 1.8;
}

.box hr {
    /* 删除分割线，加大边距 */
    border: none;
    height: 0px;
    /* background-color: #f0f0f0; */
    margin: 20px 0;
}

.box ul {
    list-style-type: disc;
    padding-left: 20px;
    color: #333;
    font-size: 1.13rem;
    line-height: 1.8;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 1.3s ease-in-out, transform 1s ease-out;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

#top {
    cursor: pointer;
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fefefe;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    z-index: 2000;
    transition: opacity 0.3s ease;
}

.path {
    stroke-dasharray: 187;
    /*创建虚线*/
    stroke-dashoffset: 0;
    /*偏移量*/
    -webkit-transform-origin: center;
    -ms-transform-origin: center;
    transform-origin: center;
    stroke: #565656;
    -webkit-animation: dash 1.4s ease-in-out infinite;
    animation: dash 1.4s ease-in-out infinite;
}

@-webkit-keyframes dash {
    0% {
        stroke-dashoffset: 187;
    }

    50% {
        stroke-dashoffset: 46.75;
        -webkit-transform: rotate(135deg);
        transform: rotate(135deg);
    }

    100% {
        stroke-dashoffset: 187;
        -webkit-transform: rotate(450deg);
        transform: rotate(450deg);
    }
}

@keyframes dash {
    0% {
        stroke-dashoffset: 187;
    }

    50% {
        stroke-dashoffset: 46.75;
        -webkit-transform: rotate(135deg);
        transform: rotate(135deg);
    }

    100% {
        stroke-dashoffset: 187;
        -webkit-transform: rotate(450deg);
        transform: rotate(450deg);
    }
}

.spinner {
    -webkit-animation: rotator 1.4s linear infinite;
    animation: rotator 1.4s linear infinite;
}

@-webkit-keyframes rotator {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(270deg);
        transform: rotate(270deg);
    }
}

@keyframes rotator {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(270deg);
        transform: rotate(270deg);
    }
}