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


/* 基本样式 */

body,
html {
    margin: 0;
    padding: 0;
    font-family: 'Shadows Into Light', cursive;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: column;
    background-image: url("./image/back.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'Iansui', serif;
    padding-bottom: 50px;
    overflow: hidden;
}


/* 透明覆盖层样式 */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* 设置为白色，并调整不透明度 */
    z-index: 998;
    /* 置于星星背景之上，但在模态框之下 */
}


/* 星星背景 */

.star-field {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 200vw;
    height: 200vh;
    z-index: -1;
    perspective: 1000px;
    overflow: hidden;
    transform: translate(-50%, -50%);
    z-index: 999;
}

@keyframes fly {
    0% {
        transform: translateX(0) translateY(0) translateZ(0);
        opacity: 1;
    }
    100% {
        transform: translateX(calc(var(--x) * 1000px)) translateY(calc(var(--y) * 1000px)) translateZ(1500px);
        opacity: 0;
    }
}

.star {
    position: absolute;
    top: 50%;
    left: 50%;
    background-color: white;
    border-radius: 50%;
    animation: fly 8s linear infinite;
    opacity: 1;
    transform-origin: center;
    animation-delay: var(--delay);
    z-index: 1;
}


/* 模态框样式 */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    /* 確保模态框在星星背景的上層 */
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    overflow: hidden;
}

#question-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.question-page {
    min-width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.question-page h2 {
    font-size: 33px;
    margin-bottom: 20px;
    padding-left: 20px;
}

.question-page p {
    font-size: 25px;
    margin-bottom: 15px;
    padding-left: 20px;
}

.question-page input {
    width: 90%;
    padding: 10px;
    margin-bottom: 20px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-left: 20px;
}

.button-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.question-page button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    margin-left: 20px;
}

.question-page button:hover {
    background-color: #0056b3;
}

.error-message {
    color: red;
    font-size: 17px;
    display: none;
    /* 默認隱藏 */
    margin-top: 5px;
}

.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;
    z-index: 1999;
}

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

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


/* 主标题和段落样式 */

#main-p {
    color: red;
}

.q-p {
    color: red;
}


/* 响应式样式 */

@media screen and (min-width: 768px) and (max-width: 991px) {
    .q-title {
        font-size: 7vw;
    }
    .q-p {
        font-size: 20px;
        color: red;
    }
    #main-text {
        font-size: 7vw;
    }
    #main-p {
        font-size: 30px;
        color: red;
    }
    .navbar {
        justify-content: space-between;
    }
    .navbar a {
        display: none;
    }
    .navbar .menu-toggle {
        display: block;
    }
    .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;
    }
    .navbar a {
        font-size: 5vw;
    }
    .navbar button {
        font-size: 5vw;
    }
    .language-switch {
        margin: 10px 0;
    }
    .button-container {
        flex-direction: column;
    }
    .question-page button {
        width: 99.5%;
        margin-bottom: 10px;
        margin-left: 0;
    }
    .question-page h2 {
        padding-left: 0;
        font-size: 40px;
    }
    .question-page p {
        padding-left: 0;
        padding-top: 30px;
        font-size: 30px;
    }
    .question-page input {
        margin-left: 0;
        margin-bottom: 30px;
        width: 96%;
    }
    #index-text {
        font-size: 12vw;
    }
    #index-p {
        font-size: 6vw;
    }
    .content {
        padding-top: 200px;
    }
    .en-p {
        font-size: 5vw;
    }
    .footer {
        padding: 10px;
    }
    .language-switch {
        display: none;
    }
    .modal-content {
        height: 530px;
    }
    #main-p {
        padding-top: 30px;
    }
}

@media screen and (max-width: 767px) {
    .q-title {
        font-size: 7vw;
    }
    .q-p {
        font-size: 20px;
        color: red;
    }
    #main-text {
        font-size: 7vw;
    }
    #main-p {
        font-size: 20px;
        color: red;
    }
    .navbar {
        justify-content: space-between;
    }
    .navbar a {
        display: none;
    }
    .navbar .menu-toggle {
        display: block;
    }
    .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;
    }
    .navbar a {
        font-size: 5vw;
    }
    .navbar button {
        font-size: 5vw;
    }
    .language-switch {
        margin: 10px 0;
    }
    .button-container {
        flex-direction: column;
    }
    .question-page button {
        width: 100%;
        margin-bottom: 10px;
        margin-left: 0;
    }
    .question-page h2 {
        padding-left: 0;
    }
    .question-page p {
        padding-left: 0;
    }
    .question-page input {
        margin-left: 0;
    }
    #index-text {
        font-size: 12vw;
    }
    #index-p {
        font-size: 6vw;
    }
    .content {
        padding-top: 200px;
    }
    .en-p {
        font-size: 5vw;
    }
    .footer {
        padding: 10px;
    }
    .language-switch {
        display: none;
    }
    .modal-content {
        height: 400px;
    }
    #main-p {
        padding-top: 30px;
    }
}

@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: 8vw;
    }
    .white-section .text-right p,
    .next-section .text-left p {
        font-size: 5vw;
    }
    .image-next {
        max-width: 90%;
    }
    .content {
        padding-top: 200px;
    }
    .question-page input {
        font-size: 14px;
    }
    .button-container {
        gap: 10px;
    }
    .navbar a {
        padding: 10px;
    }
}


/* Footer 样式 */

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

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

#thank-you {
    color: orange;
}