@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400;700&family=Roboto:wght@300;400&display=swap');

:root {
    --primary-color: #ff9a9e;
    --secondary-color: #fecfef;
    --text-color: #333;
    --bg-color: #1a1a1a;
    --dialog-bg: rgba(255, 255, 255, 0.9);
    --accent-color: #ff6b6b;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Noto Serif TC', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Layers */
#background-layer {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.7);
    transition: opacity 1s ease-in-out;
    z-index: 0;
}

#character-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vh;
    height: 100vh;
    max-width: 100vw;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 10;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transition: opacity 1s ease-in-out;
}

/* UI Layer */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

#speaker-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

#dialogue-text {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #333;
}

/* Text Box */
#dialogue-box {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 25vh;
    background: var(--dialog-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--primary-color);
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.5s;
    backdrop-filter: blur(5px);
}

#dialogue-box.visible {
    opacity: 1;
}

/* Choices */
#choices-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: auto;
    z-index: 100;
}

.choice-btn {
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    font-size: 1.2rem;
    font-family: 'Noto Serif TC', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.choice-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

/* Main Menu */
#main-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
    pointer-events: auto;
}

#main-menu h1 {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 50px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

#start-btn {
    padding: 20px 50px;
    font-size: 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

#start-btn:hover {
    transform: scale(1.1);
    background: var(--accent-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 1s forwards;
}

/* Placeholder Utility */
.placeholder-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
}