* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.page {
    display: none;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.page.active {
    display: block;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin: 10px 0;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.progress {
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
    color: #666;
}

.question {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.option-btn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.option-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.option-btn.selected {
    background-color: #4CAF50;
    color: white;
}

#result-page {
    text-align: center;
}

#recommended-course {
    font-size: 24px;
    margin: 20px 0;
    color: #2c3e50;
}

#course-description {
    margin-bottom: 30px;
    line-height: 1.8;
}

.intro-content {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.intro-content p {
    margin: 15px 0;
    font-size: 16px;
    color: #495057;
    text-align: center;
}

#intro-page h1 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 20px;
}

#goto-welcome-btn {
    background-color: #2ecc71;
    margin-top: 30px;
}

#goto-welcome-btn:hover {
    background-color: #27ae60;
}

.intro-progress {
    text-align: center;
    color: #666;
    margin: 20px 0;
    font-size: 14px;
}

.intro-description p {
    margin: 15px 0;
    font-size: 16px;
    color: #495057;
    text-align: center;
}

.intro-btn {
    background-color: #2ecc71;
    margin-top: 20px;
}

.intro-btn:hover {
    background-color: #27ae60;
}

.welcome-content {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.welcome-content p {
    margin: 15px 0;
    font-size: 16px;
    color: #495057;
    text-align: center;
}

#personal-welcome-title {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 20px;
}

#goto-quiz-btn {
    background-color: #3498db;
    margin-top: 30px;
}

#goto-quiz-btn:hover {
    background-color: #2980b9;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.menu-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.menu-item h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.menu-item p {
    color: #666;
    margin: 0;
}

/* 添加讀取提示的樣式 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
}

.loading.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.loading-text {
    color: #333;
    font-size: 18px;
}

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

/* 添加開發模式的樣式 */
.dev-scores {
    display: none; /* 預設隱藏 */
    font-size: 12px;
    color: #666;
    padding: 5px;
    margin-top: 5px;
    background-color: #f8f9fa;
    border-radius: 4px;
    text-align: left;
}

/* 開發模式時顯示 */
body.dev-mode .dev-scores {
    display: block;
}

.option-container {
    margin-bottom: 15px;
}

#total-scores {
    margin-top: 20px;
    padding: 10px;
    border-top: 1px solid #ddd;
}

/* 添加開發模式連結的樣式 */
.dev-link {
    background-color: #f8f9fa;
    border: 1px dashed #666;
}

.dev-link h2 {
    color: #666;
}

.dev-link:hover {
    background-color: #e9ecef;
}

/* 添加對話框樣式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 10px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#show-flowchart-btn {
    background-color: #95a5a6;
    margin-bottom: 20px;
}

#show-flowchart-btn:hover {
    background-color: #7f8c8d;
}

/* 調整 mermaid 圖表的樣式 */
.mermaid {
    margin: 20px 0;
    overflow-x: auto;
}

#current-node-highlight {
    padding: 10px;
    margin-top: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
}

.option-button {
    transition: all 0.3s ease;
}

.option-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.option-button.selected {
    background-color: #4CAF50;
    color: white;
} 