body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #000;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#scene {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#random-scene {
    width: 100%;
    max-height: 50vh;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

#video-container, #video-container-start {
    position: absolute;
    top: 10px;
    width: 100%;
    max-height: 50vh;
    padding-bottom: 0;
    height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

#scene-video, #intro-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    max-height: 50vh;
    aspect-ratio: 16 / 9;
}

#text-box {
    position: absolute;
    bottom: 10px;
    width: 80%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-size: 36px;
    z-index: 10;
	max-height: 80vh; /* 確保文字區域至少佔據畫面的一半高度 */    
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#options {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 3px;
}

#game-over {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 3px;
}

#game-over p {
    font-size: 36px;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px #000;
    font-family: 'Comic Sans MS', sans-serif;
    margin: 8px 0;
}

#return-home {
    background: linear-gradient(135deg, #4CAF50, #81C784);
    border: 3px solid #fff;
    border-radius: 15px;
    width: 150px;
    height: 50px;
    cursor: pointer;
    color: white;
    font-size: 24px;
    font-family: 'Comic Sans MS', sans-serif;
    text-shadow: 1px 1px 2px #000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 8px 0;
    z-index: 10;
}

#return-home:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #81C784, #4CAF50);
}

.disclaimer {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 10px;
    font-style: italic;
}

.line-add-friend img {
    width: 150px;
    height: 50px;
    margin: 8px 0;
    border: 3px solid #fff;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.line-add-friend:hover img {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

button.option-button {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53, #ffd700);
    border: 3px solid #fff;
    border-radius: 15px;
    width: 280px;
    height: 50px;
    margin: 3px;
    cursor: pointer;
    color: white;
    font-size: 24px;
    font-family: 'Comic Sans MS', sans-serif;
    text-shadow: 1px 1px 2px #000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: normal;
    word-wrap: break-word;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 10;
}

button.option-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #ffd700, #ff8e53, #ff6b6b);
}

#start-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

#start-background {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#start-content {
    position: relative;
    z-index: 11;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 25vh;
}

#title {
    color: white;
    font-size: clamp(40px, 6vw, 60px);
    font-family: 'Comic Sans MS', sans-serif;
    text-shadow: 2px 2px 4px #000, 0 0 10px #ff6b6b;
    margin: 10px 0;
}

#start-button {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    border: 3px solid #ffd700;
    border-radius: 15px;
    width: 150px;
    height: 50px;
    cursor: pointer;
    color: white;
    font-size: 22px;
    font-family: 'Comic Sans MS', sans-serif;
    text-shadow: 1px 1px 2px #000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: blink 1s infinite;
    transition: transform 0.2s;
    margin: 10px 0;
    z-index: 11;
}

#start-button:hover {
    background: linear-gradient(135deg, #ff8e53, #ff6b6b);
    transform: scale(1.05);
}

#start-screen .line-add-friend img {
    width: 150px;
    height: 50px;
    margin: 10px 0;
}

#watch-video-button {
    background: linear-gradient(135deg, #6bff6b, #ff8e53);
    border: 3px solid #ffd700;
    border-radius: 15px;
    width: 150px;
    height: 50px;
    cursor: pointer;
    color: white;
    font-size: 22px;
    font-family: 'Comic Sans MS', sans-serif;
    text-shadow: 1px 1px 2px #000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: blink 1s infinite;
    transition: transform 0.2s;
    margin: 10px 0;
    z-index: 11;
}

#watch-video-button:hover {
    background: linear-gradient(135deg, #ff8e53, #6bff6b);
    transform: scale(1.05);
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@media (orientation: landscape) {
    #options {
        flex-direction: row;
    }
    #text-box {
        width: 80%;
        font-size: 26px;
        padding: 10px;
        max-height: 60vh;
    }
    button.option-button {
        width: 280px;
        height: 50px;
        font-size: clamp(20px, 3.5vw, 28px);
        margin: 3px;
    }
    #game-over p {
        font-size: 40px;
    }
    #return-home {
        width: 150px;
        height: 50px;
        font-size: 28px;
    }
    #start-button {
        width: 150px;
        height: 50px;
        font-size: 26px;
    }
	#watch-video-button {
        width: 150px;
        height: 50px;
        font-size: 26px;
    }
}

@media (orientation: portrait) {
    #options {
        flex-direction: column;
    }
    #text-box {
        width: 90%;
        font-size: 26px;
        padding: 8px;
        max-height: 60vh;
        bottom: 54px;
    }
    button.option-button {
        width: 240px;
        height: 40px;
        font-size: clamp(20px, 3vw, 26px);
        margin: 3px 0;
    }
    #game-over p {
        font-size: 32px;
    }
    #return-home {
        width: 130px;
        height: 40px;
        font-size: 22px;
    }
    #start-button {
        width: 140px;
        height: 40px;
        font-size: 20px;
    }
	#watch-video-button {
        width: 140px;
        height: 40px;
        font-size: 20px;
    }
}