body {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: "Arial", "Segoe UI", "Microsoft Yahei", "黑体", "sans-serif";
    background-color: #0f0f0f;
    overflow-x: hidden;
    overflow-Y: hidden;
}

/* 滚动条的轨道 */
::-webkit-scrollbar {
    width: 2.5px;
}

/* 滚动条的轨道背景 */
::-webkit-scrollbar-track {
    background-color: #060606;
}

/* 滚动条的滑块 */
::-webkit-scrollbar-thumb {
    background-color: #495377;
    border-radius: 6px;
}

/* 当滚动条处于活动状态（鼠标悬停在滚动条上）时的滑块样式 */
::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}


.grid {
    display: flex;
    flex-wrap: wrap;
    width: 96%;
    margin: 0 auto;
}

.grid__item {
    box-sizing: border-box;
    width: calc(25% - 20px);
    margin: 10px;
    overflow: hidden;
    user-select: none;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.grid__sizer {
    width: calc(25% - 20px);
    margin: 10px;
    min-height: 150px;
}

.grid-item--width2 {
    width: calc(25% - 20px);
}

.grid-item img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 1200px) {
    .grid__item {
        width: calc(33.33% - 20px);
    }
}

@media (max-width: 768px) {
    .grid__item {
        width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .grid__item {
        width: calc(100% - 20px);
    }
}

.grid__item img,
.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.grid__item,
.grid-item {
    box-sizing: border-box;
    margin: 10px;
    overflow: hidden;
    user-select: none;
    position: relative;
    min-height: 150px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.grid__item:hover,
.grid-item:hover {
    transform: scale(1.05);
}

#navbar {
    position: relative;
    width: 100%;
    min-height: auto;
    background-color: #1E1E1E;
    box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.2);
    z-index: 800;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 2em 1em 2em;
    box-sizing: border-box;
    transition: opacity 0.5s ease;
    user-select: none;
}

.middle-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    grid-column: 2;
    transform: translateY(-35px);
}

#home {
    text-align: center;
    color: #619fffe0;
    font-size: 2em;
    user-select: none;
    font-weight: bold;
    z-index: 860;
    font-family: 'Gochi Hand', "Segoe UI", cursive;
    margin-bottom: 0;
}

.nav-links {
    text-align: center;
}

#navbar a {
    color: #e09855;
    text-decoration: none;
    margin: 0 1em;
    font-size: 1.45em;
    font-weight: bold;
    position: relative;
    z-index: 910;
    transition: all 0.3s ease;
    padding: 8px 10px;
}

#navbar a:hover {
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

#navbar a::after,
#glassNavbar a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

#navbar a:hover::after,
#glassNavbar a:hover::after,
#navbar a.current::after,
#glassNavbar a.current::after {
    width: 100%;
}

#avatar-link {
    flex-shrink: 0;
    background: transparent !important;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    display: inline-block;
    line-height: 0;
    justify-self: end;
    grid-column: 1;
}

#avatar-link:focus,
#avatar-link:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

#avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #e09855;
    z-index: 850;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: transparent !important;
    display: block;
    outline: none !important;
}

#avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6), 0 0 40px rgba(97, 159, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.95);
}

#avatar-link::after {
    display: none !important;
}

@media only screen and (max-width: 1200px) {
    #navbar {
        padding: 0.5em 1em 2.5em 1em;
    }
}

@media only screen and (max-width: 767px) {
    #navbar {
        display: flex;
        flex-direction: column;
        padding: 1em 1em 2em 1em;
        gap: 1em;
    }

    .middle-area {
        transform: translateY(0);
    }

    #avatar-link {
        justify-self: auto;
    }

    #myColorSwitch {
        justify-self: auto;
        position: absolute;
        top: 0;
        right: 2rem;
        transform: translateX(-50%);
    }

    #home {
        font-size: 1.2em;
    }

    #home h1 {
        font-size: 1em;
        margin: 0;
    }

    .nav-links {
        margin-top: 0.5em;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5em;
    }

    #navbar a {
        font-size: 0.9em;
        margin: 0;
    }

    #avatar {
        width: 80px;
        height: 80px;
    }
}

#rightCornerText {
    position: absolute;
    top: 1.5em;
    right: 2%;
    padding: 8px;
    color: #b6b6b6e0;
    font-size: 14.5px;
    font-weight: bold;
    user-select: none;
    z-index: 900;
    font-family: 'Bree Serif', "Segoe UI";
}

#galleryContainer {
    margin-top: -20px;
}

#hitokoto {
    position: absolute;
    top: 23%;
    left: 50%;
    transform: translateX(-50%);
    color: #de3939;
    font-family: "Arial", "Segoe UI", "Microsoft Yahei", 黑体, sans-serif;
    font-size: 14px;
    z-index: 870;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(197, 51, 51, 0.54);
    transition: font-family 0.5s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 1;
}

#hitokoto.font-loaded {
    font-family: "LXGW WenKai", "Segoe UI", "Microsoft Yahei", 黑体, sans-serif;
}

@media only screen and (max-width: 767px) {
    #hitokoto {
        top: 17.3em;
        font-size: 9px;
        line-height: 13px;
        white-space: normal;
        word-wrap: break-word;
        width: auto;
    }

    #rightCornerText {
        position: static;
        text-align: center;
        width: 100%;
        padding-top: 1em;
        font-size: 10px;
    }
}

#myColorSwitch {
    justify-self: end;
    grid-column: 3;
    font-size: 1.2em;
    z-index: 999;
    padding: 10px;
    border: none !important;
    background: none;
    outline: none;
    cursor: pointer;
    color: #e08255;
    font-weight: bold;
    font-family: 'Gochi Hand', "Segoe UI", cursive;
}

@media only screen and (max-width: 767px) {
    #myColorSwitch {
        right: -4rem;
    }
}

#backToTopBtn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999;
    width: 45px;
    height: 45px;
    background-color: #000;
    -webkit-backdrop-filter: blur(5px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    outline: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#backToTopBtn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTopBtn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

#glassNavbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgb(0 0 0 / 75%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

#glassNavbar.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#glassNavbar a {
    color: #e09855;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    position: relative;
    transition: color 0.3s ease;
    padding: 8px 16px;
}

#glassNavbar a:hover {
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

@media only screen and (max-width: 767px) {
    #glassNavbar {
        gap: 16px;
        height: 50px;
    }

    #glassNavbar a {
        font-size: 14px;
    }
}