hr {
    display: block;
    /* margin-before: 0.5em;
    margin-after: 0.5em;
    margin-start: auto;
    margin-end: auto; */
    border-style: inset;
    border-width: 1px;
}

.loading-screen-content .text {
    background-color: transparent;
}

.loading-screen-content {
    background-color: #000000d0;
    z-index: 89;
    width: 100vw;
    height: 100vh;
    padding-top: 10vh;
    padding-bottom: 20vh;
    position: fixed;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.loading-image-container {
    position: relative;
    display: flex;
}

.loading-image-container>img {
    height: 20vh;
    width: 20vh;
    color: white;
    display: flex;
}

.finish-loading:disabled {
    color: #666;
    border-color: #666;
    pointer-events: none;
}

/* Banner */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family:
        'Noto Serif TC',
        'Source Han Serif',
        'PingFang TC',
        'Microsoft JhengHei',
        'SimSun',
        serif;
}

.picturecontainer {
    position: relative;
    height: 100vh;
    width: 100%;
}

.picturecontainer img {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;

}

.section1,
.section2 {
    background-color: #000000;
    position: relative;
}

.sticky {
    position: sticky;
    top: 10%;
}

.text {
    color: #FAFAFA;
    font-size: medium;
    letter-spacing: normal;
    text-align: center;
    background-color: #000000;
    letter-spacing: normal;
    padding-left: 20vh;
    padding-right: 20vh;
    padding-top: 20vh;
    padding-bottom: 20vh;
}

.conclusion {
    height: 250vh;
    width: 100%;
    background-color: #000000;
}

footer {
    text-align: left;
    background-color: #000000;
    color: #FAFAFA;
    font-size: medium;
    letter-spacing: normal;
    padding-left: 50vh;
    padding-right: 50vh;
    padding-top: 10vh;
    padding-bottom: 5vh;
}

.row {
    background-color: #000000;
    color: #FAFAFA;
    align-items: center;
    display: flex;
    justify-content: center;
}

.story {
    height: 100vh;
}

.wrapper,
.content {
    position: relative;
    width: 100%;
    z-index: 5;
    background-color: #000000;
    top: 0vh;
    object-fit: contain;
}

.content {
    overflow-x: hidden;
}

.content .section {
    width: 100%;
    height: 100vh;
}

.content .section.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    perspective: 500px;
    background-image: url(https://hsutingyun.github.io/ntujour2024/picture/Picture&Text/baby.PNG);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.content .section.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.bg {
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #000000;
}

.parallax-container {
    background-color: #000000;
    height: 30vh;
    align-items: center;
    display: flex;
    justify-content: center;
}

.parallax-text {
    color: #FAFAFA;
}

/*翻翻卡*/
/* 卡片容器樣式 */
.cards {
    background-color: #000000;
    color: #FAFAFA;
    height: 200vh;
    position: relative;
    z-index: 1;
}

.sticky-image {
    position: sticky;
    top: 10%;
    z-index: 2;
    background: none !important;
}


.cards-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 2rem;
    background-color: #0000;
}

.card-wrapper {
    perspective: 1000px;
    width: 300px;
    height: 400px;
    background-color: #0000;
}

.card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s;
    cursor: pointer;
}

.card.flipped {
    transform: rotateY(180deg);
}

.front,
.back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    clip-path: polygon(calc(100% - 5vmin) 0, 100% 5vmin, 100% 100%, 0 100%, 0 0);

}

.front {
    background-color: #A20B0B;
    border: 2px solid #A20B0B;
    color: #FAFAFA;
}

.back {
    background-color: #A20B0B;
    color: #FAFAFA;
    transform: rotateY(180deg);
}

.iwrap>img {
    max-width: 100%;
}

/* 卡片標題樣式 */
.front h2 {
    margin-bottom: 1rem;
    color: #FAFAFA;
}

/* 文字樣式 */
.front p,
.back p {
    line-height: 1.5;
    margin: 0;
}

/* 文字冒險遊戲 */
.game-container {
    background-color: #A20B0B;
    height: 100vh;
}

.character-selection {
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    background-color: #000000;
    color: #FAFAFA;
}

.character-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.character-btn {
    width: 300px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.character-btn:hover {
    transform: translateY(-10px);
}

.character-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.character-info {
    padding: 1rem;
    text-align: left;
}

.game-container {
    width: 100%;
    height: 75vh;
    margin: 2rem auto;
    position: relative;
    background-color: #000000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.scene {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
}

.character-avatar {
    width: 100%;
    height: 60vh;
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.dialog-box {
    position: absolute;
    bottom: 1vh;
    width: 40%;
    background-color: #000000;
    color: #FAFAFA;
    text-align: center;
    font-size: medium;
    padding-bottom: 10vh;
}

.choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1rem;
    font-size: larger;
}

.choice-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 10px;
    color: #FAFAFA;
    cursor: pointer;
    border-radius: 5px;
    text-align: left;
    transition: background 0.3s ease;
}

.choice-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.back-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: #333;
    color: #FAFAFA;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

text {
    font-size: large;
}

/*scrolltrigger*/
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@700&display=swap");

.container2 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    color: #FAFAFA;
    text-align: center;
}

.hero2 {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero2__inner {
    display: flex;
    position: relative;
    width: 100vw;
    max-height: 100vh;
    overflow: hidden;
    height: 100%;

    &::before {
        content: "";
        display: block;
        padding-bottom: calc(100% / (16 / 9));
    }
}

.hero2__images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero2__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 160%;
}

.hero2__content {
    display: none;
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.hero2__headline {
    --padding: 1.5vmin;
    --duration: 400ms;
    --delay: calc(var(--duration) / 2);
    --ease: cubic-bezier(0.25, 1, 0.5, 1);

    position: relative;
    display: inline-block;
    font-size: 10vmin;
    overflow: hidden;
    margin-top: calc(var(--padding) * -1);
    padding: var(--padding);
    font-size: 5vh;

    &::after {
        content: "";
        position: absolute;
        top: calc(100% - var(--padding));
        left: 0;
        background-color: #FAFAFA;
        width: 100%;
        height: 1.5vmin;
        transform: scaleX(0);
        transition: transform var(--duration) var(--delay) var(--ease);
    }

    span {
        display: block;
        transform: translateY(110%);
        transition: transform var(--duration) var(--ease);
    }

    .active & {
        &::after {
            transform: scaleX(1);
            transition-delay: 0s;
        }

        span {
            transform: translateY(0);
            transition-delay: var(--delay);
        }
    }
}

/*數據動態*/
.container4 {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.chart-container4 {
    width: 50%;
}

.sticky-chart {
    position: sticky;
    top: 20vh;
    padding: 5vmin;
    background: #0000;
    height: 40vh;
    /* 固定高度以保持位置 */
}

.content-container4 {
    width: 50%;
    padding: 20px;
}

.section4 {
    min-height: 100vh;
    padding: 40px;
    margin-bottom: 40px;
    color: #FAFAFA;

}

/* 針對圖表標題 */
.chart-title {
    font-size: 9px !important;
}

/* 針對圖表標籤 */
.chart-labels {
    font-size: 9px !important;
}

/*圖文搭配（一）*/
.container5 {
    display: flex;
    max-width: 100%;
    margin: 0 auto;
}

.story-container h2 {
    color: #000;
}

.image-container5 {
    width: 40%;
}

.sticky-image {
    position: sticky;
    top: 20%;
    padding-left: 10vmin;
    background: #00000000;
    height: 50vh;
    z-index: 2;
}

.sticky-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* 保持圖片比例 */
    opacity: 0;
    transition: opacity 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.sticky-image img.active {
    opacity: 1;
}

.content-container5 {
    width: 60%;
}

.section5 {
    min-height: 80vh;
    padding-right: 10vw;
    margin-bottom: 5vw;
    color: #FAFAFA;
}

/*圖文搭配（二）*/
@import url(https://hsutingyun.github.io/ntujour2024/picture/Picture&Text/1.png);

#circle-shape-example {
    font-family: Open Sans, sans-serif;
    margin: 2rem;
    color: #FAFAFA;
    left: 20%;
    right: 20%;
    top: 20%;
    bottom: 20%;
}

#circle-shape-example p {
    line-height: 1.8;
}

#circle-shape-example .curve {
    width: 33%;
    height: auto;
    min-width: 150px;
    float: left;
    margin-right: 2rem;
    border-radius: 50;
    left: 20%;
    right: 20%;
    top: 20%;
    bottom: 20%;
}

@import url(https://hsutingyun.github.io/ntujour2024/picture/Picture&Text/2.png);

#circle-shape-example2 {
    font-family: Open Sans, sans-serif;
    margin: 4rem;
    color: #FAFAFA;
    left: 20%;
    right: 20%;
    top: 20%;
    bottom: 20%;
}

#circle-shape-example2 p {
    line-height: 1.8;
}

#circle-shape-example2 .curve {
    width: 33%;
    height: auto;
    min-width: 150px;
    float: left;
    margin-right: 2rem;
    border-radius: 50;
    left: 20%;
    right: 20%;
    top: 20%;
    bottom: 20%;
}

/* Conclusion text*/
.conclusion-container {
    height: 100vh;
    background-color: #940808;
    color: #FAFAFA;
    font-size: medium;
    letter-spacing: normal;
    text-align: left;
    padding-left: 50vh;
    padding-right: 50vh;
    padding-top: 20vh;
    padding-bottom: 20vh;
}

/*video */
.content-section6 {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 4rem 2rem;
    background: white;
    color: black;
}

.content-text6 {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 20vh;
    padding-bottom: 20vh;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.content-text6.active {
    opacity: 1;
    transform: translateY(0);
}

.video-section6 {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    /* 外邊距 */
}

.video-container6 {
    position: relative;
    width: 80%;
    /* 影片寬度佔容器80% */
    max-width: 80%;
    /* 最大寬度 */
    aspect-ratio: 16/9;
    /* 保持影片比例 */
    margin: 0 auto;
    /* 水平置中 */
}

.video-container6 video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* 保持影片比例 */
    opacity: 0;
    transition: opacity 0.5s ease, filter 0.5s ease;
    border-radius: 10px;
    /* 圓角 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    /* 陰影效果 */
}

.video-container6 video.active {
    opacity: 1;
}

/*animate-storytelling*/
.scroll-container {
    height: 800vh;
    position: relative;
}

/* 第一個場景：監視器 */
.sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background-color: #000;
}

.monitor-frame {
    position: absolute;
    width: 90%;
    height: 90vh;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 20px solid #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    background: #000;
}

.screen-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1) 1px, transparent 1px, transparent 2px);
    background-size: 100% 2px;
    animation: scan 8s linear infinite;
    pointer-events: none;
    z-index: 2;
}

/* 場景容器 */
.scene-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* 場景圖層 */
.scene-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease-out;
}

/* 監視器文字框 */
.monitor-dialog {
    position: absolute;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    z-index: 3;
}

.monitor-dialog.center {
    bottom: 50vh;
}

.monitor-text {
    font-size: 1.2em;
    line-height: 1.6;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.typing-hand {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.5s ease;
    background-image: url('https://hsutingyun.github.io/ntujour2024/picture/Picture&Text/screen.GIF');
    background-size: cover;
    background-position: center;
}

.sticky-note {
    position: absolute;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.5s ease;
    color: #000;
    z-index: 4;
    width: 200px;
    /* 調整便利貼寬度 /
    height: 100px;
    / 調整便利貼高度 */
}

.sticky-note:nth-child(1) {
    top: 20%;
    left: 15%;
}

.sticky-note:nth-child(2) {
    top: 50%;
    left: 70%;
}

.sticky-note:nth-child(3) {
    top: 15%;
    left: 65%;
}

.sticky-note:nth-child(4) {
    top: 45%;
    left: 17%;
}

.sticky-note.visible {
    opacity: 1;
    transform: scale(1);
}

@keyframes scan {
    0% {
        background-position: 0 -100vh;
    }

    100% {
        background-position: 0 100vh;
    }
}

.monitor-status {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #ff0000;
    font-family: monospace;
    z-index: 3;
    font-size: 60px;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* 時間軸 */
/* TIMELINE
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.timeline ul {
    background: #0000;
    padding: 50px 0;
}

.timeline ul li {
    list-style-type: none;
    position: relative;
    width: 6px;
    margin: 0 auto;
    padding-top: 50px;
    background: #ffff;
}

.timeline ul li::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: inherit;
    z-index: 1;
}

.timeline ul li div {
    position: relative;
    bottom: 0;
    width: 400px;
    padding: 15px;
    background: #ffff;
}

.timeline ul li div::before {
    content: "";
    position: absolute;
    bottom: 7px;
    width: 0;
    height: 0;
    border-style: solid;
}

.timeline ul li:nth-child(odd) div {
    left: 45px;
}

.timeline ul li:nth-child(odd) div::before {
    left: -15px;
    border-width: 8px 16px 8px 0;
    border-color: transparent #ffff transparent transparent;
}

.timeline ul li:nth-child(even) div {
    left: -439px;
}

.timeline ul li:nth-child(even) div::before {
    right: -15px;
    border-width: 8px 0 8px 16px;
    border-color: transparent transparent transparent #ffff;
}

time {
    display: block;
    font-size: 1.2rem;
    font-weight: bolder;
    margin-bottom: 8px;
    color: #A20B0B;
}


/* EFFECTS
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.timeline ul li::after {
    transition: background 0.5s ease-in-out;
}

.timeline ul li.in-view::after {
    background: #A20B0B;
}

.timeline ul li div {
    visibility: hidden;
    opacity: 0;
    transition: all 0.5s ease-in-out;
}

.timeline ul li:nth-child(odd) div {
    transform: translate3d(200px, 0, 0);
}

.timeline ul li:nth-child(even) div {
    transform: translate3d(-200px, 0, 0);
}

.timeline ul li.in-view div {
    transform: none;
    visibility: visible;
    opacity: 1;
}


/* GENERAL MEDIA QUERIES
–––––––––––––––––––––––––––––––––––––––––––––––––– */

@media screen and (max-width: 900px) {
    .timeline ul li div {
        width: 250px;
    }

    .timeline ul li:nth-child(even) div {
        left: -289px;
        /*250+45-6*/
    }
}

@media screen and (max-width: 600px) {
    .timeline ul li {
        margin-left: 20px;
    }

    .timeline ul li div {
        width: calc(100vw - 91px);
    }

    .timeline ul li:nth-child(even) div {
        left: 45px;
    }

    .timeline ul li:nth-child(even) div::before {
        left: -15px;
        border-width: 8px 16px 8px 0;
        border-color: transparent #A20B0B transparent transparent;
    }
}


/* EXTRA/CLIP PATH STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.timeline-clippy ul li::after {
    width: 40px;
    height: 40px;
    border-radius: 0;
}

.timeline-rhombus ul li::after {
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.timeline-rhombus ul li div::before {
    bottom: 12px;
}

.timeline-star ul li::after {
    clip-path: polygon(50% 0%,
            61% 35%,
            98% 35%,
            68% 57%,
            79% 91%,
            50% 70%,
            21% 91%,
            32% 57%,
            2% 35%,
            39% 35%);
}

.timeline-heptagon ul li::after {
    clip-path: polygon(50% 0%,
            90% 20%,
            100% 60%,
            75% 100%,
            25% 100%,
            0% 60%,
            10% 20%);
}

.timeline-infinite ul li::after {
    animation: scaleAnimation 2s infinite;
}

@keyframes scaleAnimation {
    0% {
        transform: translateX(-50%) scale(1);
    }

    50% {
        transform: translateX(-50%) scale(1.25);
    }

    100% {
        transform: translateX(-50%) scale(1);
    }
}

/* 螢光筆 */
/* Start | Hightlisht Style */
@keyframes highlight {
    to {
        background-position: 0;
    }
}

mark {
    background-color: transparent !important;
    color: inherit;
    background: linear-gradient(to right,
            rgb(247, 231, 152) 50%,
            transparent 50%);
    /* background: orange; */
    background-position: 100%;
    background-size: 200% 100%;
    padding: 0 !important;
    transition: background-position 3s ease-out, color 3s ease-out;
}

mark.animate {
    color: #000;
    background-position: 0%;
}

/* Eend | Hightlisht Style */
.game-container {
    background: black;
    width: 80%;
    height: 100%;
    margin: 0 auto;
    padding: 30px;
    backdrop-filter: blur(10px);
    height: 80vh;
    object-fit: contain;
}

.game-title {
    text-align: center;
    color: #FAFAFA;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-subtitle {
    text-align: center;
    color: #fafaff;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.character-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.character-card {
    background: linear-gradient(145deg, #FAFAFA);
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: #000;
    width: 100%;
}

.character-card:hover {
    transform: translateY(-5px);
    border-color: #000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.character-card.selected {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    color: black;
    border-color: #000;
}

.character-card img {
    object-fit: contain;
    left: 50%;
    width: 80%;
    height: 80%;
    display: block;
    justify-self: center;
}


.character-name {
    font-size: 1.2em;
    font-weight: bold;
    padding-top: 1em;
}

.character-desc {
    font-size: 0.9em;
    opacity: 0.8;
}

.game-content {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.story-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px ;
    font-size: 1.2rem;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
    margin-bottom: 15px;
    border: none;
    object-fit: contain;
    width: 100%;
    max-width: 100%;
    /** ✅ 修正：不要固定高度，改為自動高度以包覆內容 */
    height:max-content;
    box-sizing: border-box;
    padding-top: 1em;
    border-bottom: 5vh;
}

.story-text {
    font-size: 1.1em;
    color: black;
    margin-bottom: 20px;
}

.choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    object-fit: contain;
    padding: 1.2em 1.5em;
    font-size: 1em;
    flex-direction: column;
    width: 100%; /* ✅ 讓按鈕撐滿區塊，避免擠壓 */
    box-sizing: border-box;
    padding-top: 1em;
    border-bottom: 10vh;
}

.choice-btn {
    background: linear-gradient(145deg, #f38376);
    color: black;
    border: #940808;
    padding: 5px 10px;
    border-radius: 10px;
    border-style: outset;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    /* 直向排列 */
    gap: 5px;
    padding-top: 0.5em;
    
}
@media (min-width: 768px) {
    .choices {
        flex-direction: row;
        flex-wrap: wrap; /* ✅ 避免按鈕被壓扁時自動換行 */
    }

    .choice-btn {
        flex: 1 1 calc(50% - 10px); /* 每行最多兩個，留 gap */
    }
}

@media (min-width: 768px) {
    .choice-btn {
        flex-direction: row;
        /* 寬螢幕下橫向排列 */
    }

    .story-section button {
        flex: 1;
    }
}

.choice-btn:hover {
    transform: translateY(-2px);
    background-color: #c0392b;
}

.choice-btn:active {
    transform: translateY(0);
}

.character-info {
    background: #efe9e9;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.character-avatar {
    font-size: 4em;
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    padding: 20px;
    border-radius: 50%;
    display: flex;
    align-items: left;
    justify-content: center;
    min-width: 100px;
    height: 100px;
    z-index: -10;
    width: 10px;
}

.character-details {
    flex: 1;
}

.character-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #000;
    margin-bottom: 5px;
}

.character-description {
    color: #000;
    font-size: 1.1em;
    line-height: 1.4;
}

.restart-btn {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.ending {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    color: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    margin-top: 20px;
}

.ending h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

@media (max-width: 600px) {
    .game-container {
        padding: 20px;
    }

    .game-title {
        font-size: 2em;
    }

    .character-selection {
        grid-template-columns: repeat(2, 1fr);
    }
}
