/* 基本样式 */

body,
html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Iansui', serif;
    height: 100%;
    transition: background-color 0.5s ease;
}

@font-face {
    font-family: 'Iansui';
    src: url('../static/Iansui-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ThePeakFontBeta_V0_101';
    src: url('../static/ThePeakFontBeta_V0_101.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'cjkFonts_allseto_v1.11';
    src: url('../static/cjkFonts_allseto_v1.11.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ChenYuluoyan';
    src: url('../static/ChenYuluoyan-Thin-Monospaced.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.flex {
    display: flex;
}

.container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../static/image/底.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.character {
    width: 400px;
    height: auto;
    transition: opacity 1s ease-in-out;
}

.arc {
    width: 350px;
    height: 175px;
    border: 5px solid lightblue;
    border-top-left-radius: 175px;
    border-top-right-radius: 175px;
    border-bottom: none;
    position: absolute;
    top: 42%;
    left: 50%;
    transform-origin: center bottom;
    transform: translate(-50%, -50%) rotate(0deg);
    animation: rotateAndColorChange 1.5s ease-out forwards;
}

@keyframes rotateAndColorChange {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
        border-color: lightblue;
    }
    33% {
        border-color: lightgreen;
    }
    66% {
        border-color: lightpink;
    }
    100% {
        transform: translate(-50%, -50%) rotate(180deg);
        border-color: plum;
    }
}

.homepage {
    display: none;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    position: relative;
    background-image: url('../static/image/back.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.homepage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: -1;
    pointer-events: none;
}

.darkened-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.navbar {
    background-color: rgba(0, 0, 0, 0.8);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 20px;
    transition: transform 0.3s ease;
}

.language-switch {
    margin-left: auto;
    padding-right: 50px;
}

.language-switch button {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    padding: 10px 20px;
    margin-left: 5px;
    cursor: pointer;
    font-family: 'Iansui', serif;
    font-size: 1.6rem;
}

.language-switch button:hover {
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
}

.navbar a {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 20px;
    text-decoration: none;
    font-size: 1.6rem;
}

.navbar a:hover {
    background-color: #ddd;
    color: black;
}

.navbar .menu-toggle {
    display: none;
    cursor: pointer;
    padding-right: 350px;
}


/* Menu toggle button styles */

.navbar .menu-toggle div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    transition: all 0.3s ease;
}

.content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    position: relative;
    flex-direction: column;
    z-index: 2;
}

.grid-container {
    z-index: 1000;
}

.text-section h1 {
    font-size: 150px;
    color: aliceblue;
    text-align: center;
    margin-bottom: 20px;
    font-family: "ThePeakFontBeta_V0_101", serif;
    ;
}

.text-section p {
    font-size: 60px;
    color: blanchedalmond;
    text-align: center;
    margin: 0;
    font-family: "ThePeakFontBeta_V0_101", serif;
    ;
}

.next-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: black;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s ease, transform 1s ease;
    padding: 90px 0;
}

.section-content {
    width: 80%;
    margin: 0 auto;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
}

.section-content .text-left {
    width: 50%;
}

.section-content .image-right {
    width: 50%;
    display: flex;
    justify-content: flex-end;
}

.text-left h2 {
    font-size: 80px;
    color: aliceblue;
    text-align: left;
}

.text-left p {
    font-size: 40px;
    color: blanchedalmond;
    text-align: left;
    margin: 0;
    line-height: 1.6;
}

.image-left {
    width: 50%;
    display: flex;
    justify-content: flex-start;
}

.text-right {
    padding-left: 50px;
    width: 50%;
    color: black;
    text-align: left;
}

.image-left,
.image-right {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50%;
    flex: 1;
}

.section-content {
    width: 90%;
    margin: 0 auto;
}

.image-next {
    max-width: 90%;
    height: auto;
}

.white-section {
    background-color: white;
    color: black;
    padding: 0;
    line-height: 1.6;
    padding-bottom: 100px;
}

.white-section .text-right h2 {
    color: black;
    font-size: 80px;
}

.white-section .text-right p {
    font-size: 40px;
    color: rgb(255, 181, 70);
}

.menu-toggle a {
    text-decoration: none;
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.fade-in.visible {
    opacity: 1;
}

.highlight {
    color: red;
}

@media screen and (min-width: 768px) and (max-width: 991px) {
    .navbar .menu-toggle div {
        width: 50px;
        height: 5px;
        margin-bottom: 10px;
    }
    .flex {
        display: block;
    }
    .section-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    .section-content .text-left,
    .section-content .text-right,
    .section-content .image-left,
    .section-content .image-right {
        width: 100%;
    }
    .image-left,
    .image-right {
        justify-content: center;
        margin-bottom: 20px;
    }
    .image-next {
        max-width: 80%;
    }
    .white-section {
        padding: 40px 20px;
    }
    .white-section .text-right h2,
    .next-section .text-left h2 {
        font-size: 70px;
    }
    .white-section .text-right p,
    .next-section .text-left p {
        font-size: 30px;
        padding-top: 20px;
        padding: 0;
    }
    .navbar {
        background-color: rgba(0, 0, 0, 0);
    }
    .navbar a {
        display: none;
    }
    .navbar .menu-toggle {
        display: block;
        padding-right: 750px;
        top: 15px;
        position: absolute;
    }
    .navbar.responsive {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.9);
        transform: translateX(0);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding-top: 60px;
    }
    .navbar.responsive a {
        display: block;
        width: 100%;
        text-align: left;
        padding: 14px 20px;
        border-bottom: 1px solid #444;
    }
    #index-text {
        font-size: 17vw;
    }
    #index-p {
        font-size: 7vw;
    }
    .content {
        padding-top: 200px;
        left: 2%;
    }
    .en-p {
        font-size: 5vw;
    }
    .navbar a {
        font-size: 5vw;
    }
    .navbar button {
        font-size: 5vw;
    }
    .character {
        width: 700px;
    }
    .arc {
        width: 560px;
        height: 280px;
        border: 10px solid lightblue;
        border-top-left-radius: 280px;
        border-top-right-radius: 280px;
        border-bottom: none;
        position: absolute;
        top: 42%;
        left: 50%;
        transform-origin: center bottom;
        transform: translate(-50%, -50%) rotate(0deg);
        animation: rotateAndColorChange 1.5s ease-out forwards;
    }
}

@media screen and (max-width: 767px) {
    .flex {
        display: block;
    }
    .text-right {
        padding-left: 0;
    }
    .section-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    .section-content .text-left,
    .section-content .text-right,
    .section-content .image-left,
    .section-content .image-right {
        width: 100%;
    }
    .image-left,
    .image-right {
        justify-content: center;
        margin-bottom: 20px;
    }
    .image-next {
        max-width: 80%;
    }
    .white-section {
        padding-top: 15px;
        padding-bottom: 15px;
    }
    .next-section {
        padding: 0;
        padding-bottom: 20px;
        padding-top: 5px;
    }
    .white-section .text-right h2,
    .next-section .text-left h2 {
        font-size: 70px;
    }
    .white-section .text-right p,
    .next-section .text-left p {
        font-size: 30px;
    }
    .navbar {
        justify-content: space-between;
    }
    .grid-item {
        padding-bottom: 5px;
        height: 50px;
    }
    .navbar a {
        display: none;
    }
    .navbar.responsive .menu-toggle {
        top: 15px;
    }
    .navbar .menu-toggle {
        position: absolute;
        display: block;
        padding-right: 0;
        left: 15px;
        background-color: rgba(0, 0, 0, 0.3);
    }
    .navbar.responsive {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.9);
        transform: translateX(0);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding-top: 60px;
    }
    .navbar.responsive a {
        display: block;
        width: 100%;
        text-align: left;
        padding: 14px 20px;
        border-bottom: 1px solid #444;
    }
    #index-text {
        font-size: 15vw;
    }
    #index-p {
        font-size: 7vw;
    }
    .content {
        padding-bottom: 20%;
        left: 0;
    }
    .en-p {
        font-size: 5vw;
    }
    .navbar a {
        font-size: 5vw;
    }
    .navbar button {
        font-size: 5vw;
    }
}

@media (max-width: 480px) {
    .text-section h1 {
        font-size: 10vw;
    }
    .text-section p {
        font-size: 5vw;
    }
    .white-section .text-right h2,
    .next-section .text-left h2 {
        font-size: 9vw;
    }
    .white-section .text-right p,
    .next-section .text-left p {
        font-size: 6vw;
        padding-top: 20px;
        padding-bottom: 20px;
    }
    .image-next {
        max-width: 90%;
        padding-top: 5px;
        padding-bottom: 5px;
    }
}

.footer {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    position: relative;
    bottom: 0;
    width: 100%;
}

.header-footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
}

.language-switch {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.language-switch button {
    background-color: transparent;
    color: white;
    border: 1px solid white;
    padding: 5px 15px;
    margin-left: 5px;
    cursor: pointer;
    font-family: 'Iansui', serif;
}

.language-switch button:hover {
    background-color: white;
    color: black;
}

.footer {
    width: 100%;
    padding: 10px 20px;
    text-align: center;
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.8);
}

main-title {
    font-size: 70px;
}

main-p {
    font-size: 30px;
}

.grid-container {
    position: absolute;
    bottom: 40px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: 1fr;
    width: 100%;
    height: 50px;
    gap: 5px;
}

.grid-item {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.grid-item:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: rgba(0, 0, 0, 0.8);
}

@media screen and (min-width: 768px) and (max-width: 991px) {
    .grid-container {
        display: grid;
        grid-template-columns: 50% 50%;
        grid-template-rows: repeat(3, 1fr);
        font-size: 1.5rem;
        position: absolute;
        bottom: 20px;
        left: 0;
        width: 100%;
        height: auto;
    }
    .grid-container .grid-item:nth-child(7) {
        grid-column: span 2;
        width: 100%;
    }
    .grid-item {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .grid-container {
        display: grid;
        grid-template-columns: 50% 50%;
        grid-template-rows: repeat(3, 1fr);
        gap: 5px;
    }
    .grid-container .grid-item:nth-child(7) {
        grid-column: span 2;
        width: 100%;
    }
    .grid-item {
        font-size: 1.2rem;
    }
    .navbar {
        flex-direction: column;
        align-items: center;
        background-color: rgba(0, 0, 0, 0);
    }
    .language-switch {
        margin: 10px 0;
    }
    .footer {
        padding: 10px;
    }
    .language-switch {
        display: none;
    }
    .grid-item {
        height: 50px;
        padding-bottom: 5px;
        font-size: 4.5vw;
    }
    .grid-container {
        bottom: 190px;
    }
}

@media screen and (max-width: 1024px) and (min-width: 1023px) {
    .grid-container {
        bottom: 100px;
    }
}