/* ----------------------------- */
/* Global 基本設定 */
/* ----------------------------- */
* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: "Noto Serif TC", serif;
    font-size: 22px;
    font-weight: 500;
    text-align: justify;
    line-height: 1.5;
    color: #366067;
    width: 100%;
    overflow: hidden;
}

img {
    display: block;
    width: 100%;
    object-fit: contain;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 通用動畫 */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes fadeOnly {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-out {
    animation: fadeOut 1s ease forwards;
}

.fade-in {
    animation: fadeIn 1s ease forwards;
}

.fade-only {
    animation: fadeOnly 1s ease forwards;
}

.hidden {
    display: none;
}

/* ----------------------------- */
/* Intro Page 分段入場動畫 */
/* ----------------------------- */
.intro-page.fade-sequence {
    animation: fadeOnly 1s ease forwards;
    /* 背景先淡入 */
}

/* 角落圖 + logo */
.intro-page.fade-sequence .corner,
.intro-page.fade-sequence .logo {
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

/* 標題 + 文字 */
.intro-page.fade-sequence .title,
.intro-page.fade-sequence .main {
    animation: fadeInUp 1s ease forwards;
    animation-delay: 1.2s;
    opacity: 0;
}

/* 按鈕 */
.intro-page.fade-sequence .enter-button {
    animation: fadeInUp 1s ease forwards;
    animation-delay: 2.0s;
    opacity: 0;
}

/* ----------------------------- */
/* Start Page 區塊 */
/* ----------------------------- */
.start-page {
    width: 100%;
    height: 100dvh;
    background-image: url(../img/pc/bg.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.start-page .corner,
.start-page .title,
.start-page .enter-button {
    position: absolute;
    opacity: 0;
    overflow: hidden;
}

/* logo */
.start-page .logo-130th {
    top: 15px;
    left: 15px;
    width: 4.5%;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.2s;
}

/* 角落圖片 */
.start-page .bottom-left {
    min-width: 40%;
    max-width: 45%;
    max-height: 52%;
    left: 0;
    bottom: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.4s;
}

.start-page .bottom-right {
    min-width: 36%;
    max-width: 50%;
    max-height: 60%;
    bottom: 0;
    right: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.6s;
}

.start-page .top-right {
    min-width: 50%;
    max-width: 54%;
    top: 0;
    right: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.8s;
}

/* 主內容 */
.start-page .main-content {
    width: 45%;
    position: absolute;
    top: 12%;
    left: 5%;
}

.start-page .title {
    width: 100%;
    position: relative;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 1.4s;
}

/* .start-page .portrait-title {
    display: none;
} */

/* 按鈕 */
.start-page .enter-button {
    width: 17%;
    min-width: 100px;
    position: absolute;
    bottom: -15%;
    right: -11%;
    cursor: pointer;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 1.6s;
}

.start-page .enter-button .btn-default,
.start-page .enter-button .btn-hover {
    display: block;
    width: 100%;
}

.start-page .enter-button .btn-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.start-page .enter-button:hover .btn-hover {
    opacity: 1;
}

.start-page .enter-button:hover .btn-default {
    opacity: 0;
}

/* 首頁1400px */
@media ((max-width: 1400px)) {
    .start-page .enter-button {
        width: 20%;
    }

    .start-page .top-right {
        min-width: 50%;
        max-width: 60%;
    }

    .start-page .main-content {
        width: 50%;
        position: absolute;
        top: 16%;
        left: 5%;
    }
}

/* 橫向平板 */
@media (max-width: 1200px) and (orientation: landscape) {
    .start-page .main-content {
        max-width: 55%;
        position: absolute;
        top: 16%;
        left: 5%;
    }

    .start-page .portrait-title {
        display: none;
    }
}

/* RWD：直向平板 */
@media (max-width: 1200px) and (orientation: portrait) {
    .start-page .logo-130th {
        width: 12%;
    }

    .start-page .bottom-left {
        min-width: 80%;
        max-height: 100%;
        width: 80%;
    }

    .start-page .bottom-right {
        opacity: 0 !important;
        animation: none !important;
    }

    .start-page .top-right {
        min-width: 75%;
        top: 0;
        right: 0;
    }

    .start-page .main-content {
        width: 80%;
        padding-top: 20%;
        left: calc((100% - 90%) / 2);
    }
}

/* RWD：手機 */
@media (max-width: 539px) {
    .start-page .logo-130th {
        width: 12%;
    }

    .start-page .bottom-left {
        min-width: 85%;
        max-height: 100%;
        top: 30%;
    }

    .start-page .top-right {
        min-width: 15%;
        max-width: 30%;
        /* max-height: 100%; */
    }

    .start-page .bottom-right {
        display: none;
    }

    .start-page .main-content {
        width: 60%;
        position: static;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 0 auto;
        padding-top: 15%;
    }

    .start-page .enter-button {
        min-width: 100px;
        position: fixed;
        bottom: 6%;
        right: 10%;
    }
}

/* 小手機調整 */
@media ((max-width: 374px)) and (orientation: portrait) {
    .start-page .bottom-left {
        min-width: 75%;
        max-height: 100%;
        top: 30%;
    }

    .start-page .main-content {
        width: 50%;
    }
}

/* ----------------------------- */
/* Intro Page 區塊 */
/* ----------------------------- */
.intro-page {
    width: 100%;
    height: 100dvh;
    background-image: url(../img/pc/bg2.jpg);
    background-size: cover;
    background-repeat: repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding-top: 10%;
}

.intro-page .logo {
    max-width: 4.5%;
    /* width: 4%; */
    position: absolute;
    top: 30px;
    right: 30px;
}

.intro-page .title {
    position: absolute;
    width: 45%;
    top: 5%;
}

/* 文字區塊 */
.intro-page .main {
    width: 55%;
    height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15%;
}

.content-area {
    width: 100%;
    height: 80%;
    display: flex;
    flex-direction: column;
    align-items: end;
    justify-content: center;
}

/* 中英日按鈕區 */
.intro-page .lang-switch {
    display: flex;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.3);
    margin-bottom: 12px;
    padding: 4px;
    gap: 8px;
    border-radius: 100px;
}

/* 按鈕 */
.intro-page .lang-switch button {
    border: none;
    outline: none;
    background: none;
    color: #366067;
    font-family: "Noto Serif TC", serif;
    font-weight: 600;
    font-size: 20px;

    min-width: 40px;
    aspect-ratio: 1 / 1;
    flex: none;
    border-radius: 50%;
    padding: 6px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    cursor: pointer;
}

.intro-page .lang-switch button.active {
    color: white;
    background-color: #B9C4C1;
}

.intro-page .container {
    width: 100%;
    min-height: 100%;
    max-height: 100%;
    padding: 50px 10px;
    border-radius: 12px;
    display: flex;
    background-color: rgba(255, 255, 255, 0.3);
}

.intro-page p {
    display: none;
}

.lang-ch .ch {
    display: block;
}

.lang-en .en {
    display: block;
}

.lang-jp .jp {
    display: block;
}

/* 日文專屬字體優化 */
.lang-jp .jp {
    line-height: 1.8;
    /* 日文通常間距大一點比較好閱讀 */
    font-family: "Noto Serif JP", serif;
}

.intro-page .text {
    padding: 0px 40px;
    overflow-y: auto;
}

.intro-page .text .en {
    font-size: 20px;
    text-align: left;
    line-height: 1.6;
}

.intro-page .first-paragraph {
    margin: 0;
}

/* 按鈕 */
.intro-page .enter-button {
    max-width: 14%;
    min-width: 100px;
    position: relative;
    cursor: pointer;
}

.intro-page .enter-button .btn-default,
.intro-page .enter-button .btn-hover {
    display: block;
    width: 100%;
}

.intro-page .enter-button .btn-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.intro-page .enter-button:hover .btn-hover {
    opacity: 1;
}

.intro-page .enter-button:hover .btn-default {
    opacity: 0;
}

/* 角落圖片 */
.intro-page .corner {
    position: absolute;
    opacity: 1;
    overflow: hidden;
}

.intro-page .bottom-left {
    width: 24%;
    left: 0;
    bottom: 0;
}

/* 橫向 */
@media (orientation: landscape) {
    .intro-page .portrait-title {
        display: none;
    }

    .intro-page .bottom-right {
        width: 10%;
        bottom: 0;
        right: 0;
        display: none;
    }
}

/* 螢幕小於1400px字體變成20px，按鈕調整 */
@media (max-width: 1400px) and (orientation: landscape) {
    body {
        font-size: 20px;
    }

    .intro-page p,
    .intro-page .text .en {
        font-size: 20px;
    }

    .intro-page .enter-button {
        max-width: 18%;
        min-width: 100px;
    }

    .intro-page .lang-switch button {
        font-size: 18px;
    }
}

/* 小於1024字體變16px */
@media (max-width: 1024px) and (orientation: landscape) {

    .intro-page p,
    .intro-page .text .en {
        font-size: 16px;
    }

    .intro-page .container {
        padding: 30px 10px;
        border-radius: 12px;
        background-color: rgba(255, 255, 255, 0.3);
    }

    .intro-page .text {
        padding: 0 20px;
        overflow-y: auto;
    }

    .intro-page .lang-switch button {
        font-size: 14px;
        min-width: 32px;
    }

}

/* 手機 */
@media (orientation: portrait) {
    .intro-page {
        align-items: start;
        padding: 15% 30px 0 30px;
        font-size: 14px;
    }

    .intro-page .logo {
        min-width: 12%;
        left: 15px;
        top: 15px;
    }

    .intro-page .landscape-title {
        display: none;
    }

    .intro-page .title {
        width: 60%;
        right: 15px;
        top: 30px;
    }

    .intro-page .main {
        width: 75%;
        max-height: 80%;
        padding-top: 8%;
    }

    .content-area {
        align-items: start;
    }

    .intro-page .container {
        padding: 30px 10px;
        border-radius: 12px;
        background-color: rgba(255, 255, 255, 0.3);
    }

    .intro-page .lang-switch button {
        font-size: 14px;
        min-width: 32px;
    }

    .intro-page .text {
        padding: 0 20px;
        overflow-y: auto;
    }

    .intro-page .text .en {
        font-size: 14px;
    }

    .intro-page .enter-button {
        min-width: 100px;
        /* max-width: 35%; */
    }

    .intro-page .bottom-right {
        opacity: 1;
        width: 40%;
        bottom: 0;
        right: 0;
    }

    .intro-page .bottom-left {
        display: none;
    }
}

/* 直向平板 */
@media (min-width: 540px) and (orientation: portrait) {
    .intro-page {
        padding: 15% 40px 0 40px;
    }

    .intro-page .logo {
        top: 15px;
        left: 15px;
    }

    .intro-page p,
    .intro-page .text .en {
        font-size: 18px;
    }

    .intro-page .lang-switch button {
        font-size: 18px;
        min-width: 40px;
    }

    .intro-page .enter-button {
        min-width: 100px;
        max-width: 120px;
    }
}

/* 滾輪樣式 */
::-webkit-scrollbar {
    width: 4px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: #ABB6B0;
    border-radius: 10px;
}