#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

#background {
    width: 100%;
    height: 100%;
    position: absolute;
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease;
}

#characters {
    width: 100%;
    height: 100%;
    position: absolute;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
}

#dialogue-box {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
}

#speaker-name {
    font-weight: bold;
    margin-bottom: 10px;
}

#choices {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.choice-button:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* 載入畫面樣式 */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7)), 
                url('/static/backgrounds/classroom.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
}

.loading-content {
    text-align: center;
    color: white;
    padding: 20px;
}

.game-title {
    font-size: 3em;
    margin-bottom: 10px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeIn 2s ease-in;
}

.game-subtitle {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #8BC34A;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: fadeIn 2s ease-in 0.5s both;
}

.progress-bar {
    width: 300px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 20px auto;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(75, 175, 80, 0.3);
}

.progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.3s ease;
    box-shadow: 0 0 5px rgba(75, 175, 80, 0.5);
}

.loading-text {
    font-size: 1.1em;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

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

/* AI 思考中動畫樣式 */
#ai-thinking {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 900;
}

.thinking-content {
    text-align: center;
    color: white;
}

.thinking-animation {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

.character {
    width: 400px;
    height: 600px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom;
    transition: all 0.3s ease;
}

.character.left {
    margin-left: 50px;
    transform: scaleX(-1);
}

.character.right {
    margin-right: 50px;
    transform: scaleX(1);
}

.character.center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* 學習歷程按鈕樣式 */
.history-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.history-button:hover {
    background: white;
    transform: scale(1.05);
}

/* 模態對話框樣式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 80%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 20px;
}

.modal-header {
    background: #4CAF50;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.close-button {
    cursor: pointer;
    font-size: 24px;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    padding-bottom: 30px;
}

.history-record {
    margin-bottom: 20px;
    padding: 15px;
    border-left: 4px solid #4CAF50;
    background: #f5f5f5;
}

.history-record:last-child {
    margin-bottom: 20px;
}

.history-record h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.history-record .timestamp {
    color: #666;
    font-size: 0.9em;
}

.history-record .content {
    margin-top: 10px;
    line-height: 1.5;
    padding-bottom: 10px;
}

/* 音樂控制按鈕樣式 */
.music-control {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.music-control:hover {
    transform: scale(1.1);
}

.music-control.muted .music-icon {
    opacity: 0.5;
}

.music-icon {
    font-size: 20px;
    transition: all 0.3s ease;
}

.music-notification {
    animation: fadeInOut 3s ease-in-out;
    font-size: 14px;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

.enter-button {
    margin-top: 20px;
    padding: 15px 40px;
    font-size: 1.2em;
    background: linear-gradient(45deg, #4CAF50, #8BC34A);
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
}

.enter-button.show {
    opacity: 1;
    transform: translateY(0);
}

.enter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.enter-button:active {
    transform: translateY(1px);
}

/* 添加新的背景過渡樣式 */
.background-transition {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
} 