/* 全域樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Microsoft JhengHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 導航列 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.navbar h1 {
    color: #764ba2;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


/* 主要容器 */
.main-container {
    display: flex;
    max-width: 1400px;
    margin: 2rem auto;
    gap: 2rem;
    padding: 0 2rem;
    min-height: calc(100vh - 120px);
}

/* 側邊欄 */
.sidebar {
    width: 300px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 2rem;
    height: fit-content;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.lesson-menu h3 {
    color: #764ba2;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.lesson-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

.lesson-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.lesson-item.completed {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.lesson-item i {
    font-size: 1.2rem;
    width: 20px;
}

/* 內容區域 */
.content {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.lesson-content {
    display: none;
}

.lesson-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* 歡迎頁面 */
.hero-section {
    text-align: center;
    padding: 2rem 0;
}

.hero-section h2 {
    font-size: 2.5rem;
    color: #764ba2;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #764ba2;
    margin-bottom: 1rem;
}

.start-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem auto;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 概念視覺化 */
.concept-section {
    margin: 2rem 0;
}

.analogy-container {
    background: rgba(102, 126, 234, 0.1);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
}

.analogy-visual {
    margin: 1.5rem 0;
}

.save-points {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin: 2rem 0;
}

.save-point {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
}

.save-point.current {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    transform: scale(1.05);
}

/* Git 區域視覺化 */
.git-areas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.area {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    transition: all 0.3s ease;
}

.area:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.area h4 {
    color: #764ba2;
    margin-bottom: 0.5rem;
}

.area-visual {
    margin: 1rem 0;
}

.area-visual i {
    font-size: 2rem;
    color: #667eea;
}

.arrow {
    font-size: 2rem;
    color: #667eea;
    font-weight: bold;
}

/* 拖拉練習 */
.drag-exercise {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    border: 2px dashed #ddd;
}

.file-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: move;
    margin-bottom: 1rem;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.file-item:hover {
    border-color: #667eea;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2);
}

.file-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.drop-zones {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.drop-zone {
    flex: 1;
    padding: 2rem;
    border: 2px dashed #ddd;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.drop-zone.drag-over {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

/* 終端機模擬器 */
.terminal-container {
    margin: 2rem 0;
}

.terminal {
    background: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-family: 'Consolas', 'Monaco', monospace;
}

.terminal-header {
    background: #323232;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-title {
    color: #fff;
    font-size: 0.9rem;
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control.close { background: #ff5f57; }
.control.minimize { background: #ffbd2e; }
.control.maximize { background: #28ca42; }

.terminal-body {
    padding: 1rem;
    min-height: 300px;
}

.terminal-output {
    color: #00ff00;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.output-line {
    margin-bottom: 0.5rem;
}

.prompt {
    color: #00aaff;
    font-weight: bold;
}

.hint {
    color: #888;
    font-style: italic;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    flex: 1;
    outline: none;
}

.terminal-input::placeholder {
    color: #666;
}

/* 步驟指南 */
.step-guide {
    margin: 3rem 0;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
    border-left: 4px solid #4CAF50;
    transform: translateX(5px);
}

.step.completed {
    opacity: 1;
    background: rgba(76, 175, 80, 0.1);
}

.step-number {
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step.completed .step-number {
    background: #4CAF50;
}

.step-content h4 {
    color: #764ba2;
    margin-bottom: 0.5rem;
}

.step-content code {
    background: rgba(102, 126, 234, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Consolas', monospace;
    color: #764ba2;
}

/* 分支視覺化 */
.branch-visualization {
    margin: 2rem 0;
}

.branch-diagram {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    min-height: 300px;
    position: relative;
    overflow: hidden;
}

.branch-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.branch-controls button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.branch-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 任務面板 */
.mission-board {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.mission {
    border: 2px solid #e0e0e0;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.mission:hover {
    border-color: #667eea;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2);
}

.mission h4 {
    color: #764ba2;
    margin-bottom: 0.5rem;
}

.mission-button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.mission-button:hover {
    background: #45a049;
    transform: translateY(-1px);
}

/* 按鈕樣式 */

.next-button, .demo-button, .restart-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.next-button:hover, .demo-button:hover, .restart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 完成頁面 */
.completion-section {
    text-align: center;
    padding: 3rem 0;
}

.completion-section h3 {
    color: #4CAF50;
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        padding: 0 1rem;
    }
    
    .sidebar {
        width: 100%;
        order: -1;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .git-areas {
        flex-direction: column;
    }
    
    .arrow {
        transform: rotate(90deg);
    }
    
    .steps {
        gap: 0.5rem;
    }
    
    .step {
        padding: 1rem;
    }
    
    .branch-controls {
        flex-direction: column;
        align-items: center;
    }
}

/* 動畫效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.slide-in {
    animation: slideIn 0.5s ease;
}

/* 成功提示 */
.success-message {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid #4CAF50;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid #f44336;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hidden {
    display: none !important;
}

/* 課程完成慶祝畫面 */
.completion-celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-in;
}

.celebration-content {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.5s ease-out;
    max-width: 400px;
    margin: 0 1rem;
}

.celebration-content h2 {
    color: #764ba2;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.celebration-content p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.celebration-content button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.celebration-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.5);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* 側邊欄完成狀態 */
.lesson-item.completed {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid #4CAF50;
}

.completion-mark {
    color: #4CAF50;
    font-weight: bold;
    margin-left: auto;
    font-size: 1.2rem;
}

/* 拖拉練習增強視覺回饋 */
.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.highlight-drop-zone {
    border: 2px dashed #667eea;
    background: rgba(102, 126, 234, 0.1);
    animation: pulse-glow 1s infinite;
}

.drag-over {
    border: 2px solid #4CAF50;
    background: rgba(76, 175, 80, 0.2);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.drop-success {
    background: rgba(76, 175, 80, 0.3);
    border: 2px solid #4CAF50;
    animation: success-bounce 0.6s ease;
}

.drop-error {
    background: rgba(244, 67, 54, 0.3);
    border: 2px solid #f44336;
    animation: error-shake 0.6s ease;
}

.drop-success-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #4CAF50;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    animation: success-appear 0.5s ease;
    z-index: 10;
}

.file-in-zone {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(102, 126, 234, 0.2);
    padding: 0.5rem 1rem;
    margin: 0.5rem;
    border-radius: 20px;
    border: 2px solid #667eea;
    font-size: 0.9rem;
    font-weight: bold;
    color: #4a5568;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.file-in-zone i {
    color: #667eea;
    font-size: 1.1rem;
}

.zone-highlight {
    background: rgba(76, 175, 80, 0.2) !important;
    border-color: #4CAF50 !important;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3) !important;
    animation: zone-pulse 0.5s ease;
}

@keyframes zone-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.drag-guidance {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: bold;
    z-index: 1001;
    animation: guidance-slide 0.5s ease;
}

.zone-info {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    white-space: nowrap;
    animation: info-fade-in 0.3s ease;
}

/* 合併模擬器樣式 */
.merge-scenario {
    background: #f8f9ff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
}

.merge-scenario.conflict {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-color: #fc8181;
}

.merge-scenario.conflict-resolution {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border-color: #68d391;
}

.merge-steps .step {
    margin: 1.5rem 0;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.conflict-file-demo {
    margin: 1.5rem 0;
}

.code-editor {
    background: #1a202c;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
}

.code-editor.resolved {
    background: #065f46;
    border: 2px solid #10b981;
}

.conflict-code .conflict-marker {
    color: #fbbf24;
    font-weight: bold;
    display: block;
    background: rgba(251, 191, 36, 0.2);
    padding: 0.2rem 0.5rem;
    margin: 0.2rem 0;
}

.conflict-code .conflict-ours {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.2);
    display: block;
    padding: 0.2rem 0.5rem;
}

.conflict-code .conflict-theirs {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
    display: block;
    padding: 0.2rem 0.5rem;
}

.resolution-steps {
    margin: 1.5rem 0;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.8rem 0;
    padding: 0.8rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.step-number {
    background: #667eea;
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.demo-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.demo-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.scenario-commands {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.scenario-commands pre {
    margin: 0;
    font-family: 'Courier New', monospace;
}

.final-commands {
    background: #065f46;
    color: #d1fae5;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.final-commands pre {
    margin: 0;
    font-family: 'Courier New', monospace;
}

/* 動畫效果 */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.6); }
}

@keyframes success-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes error-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes success-appear {
    0% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    100% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes guidance-slide {
    0% { 
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    100% { 
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes info-fade-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* 改善成功訊息顯示系統 */
.message-notification {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    max-width: 500px;
    width: 90%;
    opacity: 0;
    transition: all 0.3s ease;
}

.message-notification.show {
    top: 20px;
    opacity: 1;
}

.message-notification.hide {
    top: -100px;
    opacity: 0;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid;
    position: relative;
    overflow: hidden;
}

.success-message .message-content {
    background: rgba(76, 175, 80, 0.95);
    border-color: #4CAF50;
    color: white;
}

.error-message .message-content {
    background: rgba(244, 67, 54, 0.95);
    border-color: #f44336;
    color: white;
}

.info-message .message-content {
    background: rgba(33, 150, 243, 0.95);
    border-color: #2196F3;
    color: white;
}

.message-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.message-text {
    flex: 1;
    font-weight: 500;
    font-size: 1.1rem;
}

.message-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.message-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 慶祝粒子效果 */
.celebration-particle {
    position: fixed;
    top: 0;
    width: 10px;
    height: 10px;
    background: #FFD700;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: celebration-fall 2s ease-out forwards;
}

.celebration-particle:nth-child(odd) {
    background: #FF6B6B;
}

.celebration-particle:nth-child(3n) {
    background: #4ECDC4;
}

@keyframes celebration-fall {
    0% {
        opacity: 1;
        transform: translateY(-20px) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(360deg);
    }
}

/* 成功訊息額外動畫 */
.success-message .message-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: success-shine 2s ease-in-out;
}

@keyframes success-shine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* 分支練習遊戲樣式 */
.mission-progress {
    margin: 2rem 0;
    text-align: center;
}

.mission-progress .progress-bar {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    height: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.mission-progress .progress-fill {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    height: 100%;
    width: 0%;
    border-radius: 25px;
    transition: width 0.5s ease;
}

.mission-progress .progress-text {
    color: #764ba2;
    font-weight: bold;
}

.mission-completed {
    background: rgba(76, 175, 80, 0.1);
    border: 2px solid #4CAF50;
}

.mission-completed h4 {
    color: #4CAF50;
}

.mission-completed .mission-button {
    background: #4CAF50;
    cursor: not-allowed;
}

.mission-appear {
    animation: mission-slide-in 0.5s ease;
}

.merge-button {
    background: linear-gradient(135deg, #FF6B6B, #FF5252);
    margin-left: 1rem;
}

.merge-button:hover {
    background: linear-gradient(135deg, #FF5252, #F44336);
}

.merged-state {
    border: 3px solid #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

@keyframes mission-slide-in {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 終端機使用體驗優化 */
.terminal-container {
    position: relative;
}

.terminal-input {
    font-family: 'Consolas', 'Monaco', monospace;
    background: transparent;
    border: none;
    outline: none;
    color: #00ff00;
    width: 100%;
    font-size: 14px;
    padding: 0;
}

.terminal-input::placeholder {
    color: rgba(0, 255, 0, 0.5);
}

.output-line.hint {
    color: #FFA500;
    background: rgba(255, 165, 0, 0.1);
    padding: 0.5rem;
    border-radius: 5px;
    border-left: 3px solid #FFA500;
    margin: 0.5rem 0;
}

.output-line.success {
    color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    padding: 0.5rem;
    border-radius: 5px;
    border-left: 3px solid #00ff00;
    margin: 0.5rem 0;
    font-weight: bold;
}

.output-line.error {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    padding: 0.5rem;
    border-radius: 5px;
    border-left: 3px solid #ff4444;
    margin: 0.5rem 0;
}

.output-line.suggestion {
    color: #87CEEB;
    background: rgba(135, 206, 235, 0.1);
    padding: 0.3rem;
    border-radius: 3px;
    font-style: italic;
    margin: 0.2rem 0;
}

.output-line.user-input {
    color: #ffffff;
    font-weight: bold;
}

/* 終端機滾動條美化 */
#terminalOutput {
    scrollbar-width: thin;
    scrollbar-color: #667eea transparent;
}

#terminalOutput::-webkit-scrollbar {
    width: 6px;
}

#terminalOutput::-webkit-scrollbar-track {
    background: transparent;
}

#terminalOutput::-webkit-scrollbar-thumb {
    background-color: #667eea;
    border-radius: 3px;
}

#terminalOutput::-webkit-scrollbar-thumb:hover {
    background-color: #5a6fd8;
}

/* 終端機游標閃爍效果 */
.terminal-input:focus::after {
    content: '|';
    animation: cursor-blink 1s infinite;
    color: #00ff00;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* 課程導航按鈕 */

/* 增強拖拉練習視覺效果 */
.file-in-zone {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 0.5rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.file-in-zone:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.file-status-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #28a745;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.zone-file-added {
    background: rgba(40, 167, 69, 0.1) !important;
    border-color: #28a745 !important;
    animation: zone-pulse 0.6s ease-in-out;
}

@keyframes zone-pulse {
    0% {
        transform: scale(1);
        background: rgba(40, 167, 69, 0.1);
    }
    50% {
        transform: scale(1.02);
        background: rgba(40, 167, 69, 0.2);
    }
    100% {
        transform: scale(1);
        background: rgba(40, 167, 69, 0.1);
    }
}

.celebration-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    animation: particle-float 1s ease-out forwards;
}

@keyframes particle-float {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px) scale(0);
        opacity: 0;
    }
}

/* 檔案演變動畫樣式 */
.version-progress {
    position: absolute;
    top: -12px;
    right: -12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: version-badge-pulse 2s ease-in-out infinite;
}

@keyframes version-badge-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }
}

.file-version {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.version-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-weight: bold;
    margin-bottom: 0.8rem;
    display: inline-block;
}

.file-preview {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.file-header {
    background: #e9ecef;
    padding: 0.5rem 1rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    border-bottom: 1px solid #ddd;
}

.file-content {
    padding: 1rem;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    white-space: pre-wrap;
}

.demo-button:disabled {
    background: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

/* 遊戲存檔點樣式 */
.save-point {
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    margin: 0.3rem 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
}

.save-point.current {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    font-weight: bold;
}

.save-point.interactive {
    position: relative;
    user-select: none;
}

.save-point.interactive:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.save-point.interactive.current:hover {
    transform: scale(1.02);
}

/* 互動提示樣式 */
.interaction-hint {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
    animation: hint-pulse 2s ease-in-out infinite;
}

.interaction-hint p {
    margin: 0.3rem 0;
}

.interaction-hint strong {
    font-size: 1.1em;
}

@keyframes hint-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(240, 147, 251, 0.4);
    }
}

/* Git 工作流程樣式 */
.workflow-step {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    text-align: center;
}

.action-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

.git-workflow {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.workflow-zones {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.workflow-zone {
    flex: 1;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 1rem;
    min-height: 180px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.workflow-zone.can-drop {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.workflow-zone.drag-over {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.working-zone {
    border-color: #ffc107;
}

.staging-zone {
    border-color: #fd7e14;
}

.repository-zone {
    border-color: #28a745;
}

.zone-header {
    text-align: center;
    margin-bottom: 0.8rem;
}

.zone-header h4 {
    margin: 0;
    color: #333;
    font-size: 0.9rem;
}

.zone-header p {
    margin: 0.2rem 0 0 0;
    color: #666;
    font-size: 0.75rem;
}

.zone-content {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin-bottom: 1rem;
}

.zone-command {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: auto;
}

.zone-command code {
    display: block;
    color: #4fc3f7;
    font-weight: bold;
    margin-bottom: 0.2rem;
}

.zone-command small {
    display: block;
    color: #e0e0e0;
    font-size: 0.65rem;
    font-family: Arial, sans-serif;
    opacity: 0.8;
}

.zone-command hr {
    margin: 0.4rem 0 !important;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.workflow-file {
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    user-select: none;
    min-width: 100px;
    max-width: 120px;
    margin: 0.5rem auto;
}

.workflow-file:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.workflow-file.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.workflow-file.staged {
    border-color: #fd7e14;
    background: rgba(253, 126, 20, 0.1);
}

.workflow-file.committed {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.workflow-file i {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
    color: #667eea;
}

.workflow-file span {
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.file-status {
    font-size: 0.7rem;
    color: #666;
    background: rgba(0, 0, 0, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
}

.workflow-hint {
    text-align: center;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid #667eea;
    border-radius: 8px;
    padding: 0.8rem;
    margin: 1rem 0;
    color: #333;
}

.workflow-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.git-command-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 120px;
    position: relative;
}

.git-command-btn .btn-description {
    font-size: 0.7rem;
    font-weight: normal;
    opacity: 0.8;
    font-family: Arial, sans-serif;
    text-align: center;
}

.git-command-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.git-command-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.git-command-btn i {
    margin-right: 0.3rem;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .workflow-zones {
        flex-direction: column;
    }
    
    .workflow-zone {
        min-height: 140px;
    }
    
    .zone-content {
        min-height: 60px;
        margin-bottom: 0.5rem;
    }
    
    .workflow-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .git-command-btn {
        width: 150px;
    }
    
    .zone-command {
        font-size: 0.7rem;
        padding: 0.4rem;
    }
}

/* 完成訊息樣式 */
.completion-message {
    text-align: center;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.completion-message h3 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.completion-message p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.completion-celebration-appear {
    animation: completion-appear 0.8s ease-out;
}

@keyframes completion-appear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    50% {
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 分支視覺化樣式 */
.current-branch-display {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.current-branch-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: branch-shine 3s ease-in-out infinite;
}

.branch-name {
    font-weight: bold;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.branch-indicator {
    width: 10px;
    height: 10px;
    background: #4CAF50;
    border-radius: 50%;
    animation: branch-pulse 2s ease-in-out infinite;
}

@keyframes branch-shine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

@keyframes branch-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.branch-list {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e0e0e0;
}

.branch-list h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1rem;
}

.branches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.branch-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.branch-item.active {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border-color: #4CAF50;
    transform: scale(1.05);
}

.branch-item:not(.active):hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.branch-item i {
    font-size: 0.8rem;
}

.branch-status {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

.branch-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.branch-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.branch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.branch-btn.merge-btn {
    background: linear-gradient(135deg, #FF6B6B, #FF5252);
}

.branch-btn.merge-btn:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* 分支切換動畫 */
.branch-switch-animation {
    animation: branch-switch 1s ease-in-out;
}

@keyframes branch-switch {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(5deg); }
    50% { transform: scale(1.05) rotate(-2deg); }
    75% { transform: scale(1.02) rotate(1deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* 合併動畫 */
.merge-animation {
    animation: merge-effect 2s ease-in-out;
}

@keyframes merge-effect {
    0% { transform: translateX(0); opacity: 1; }
    25% { transform: translateX(-10px); opacity: 0.8; }
    50% { transform: translateX(10px); opacity: 0.6; }
    75% { transform: translateX(-5px); opacity: 0.8; }
    100% { transform: translateX(0); opacity: 1; }
}

/* 合併分支頁面樣式 */
.merge-concept-intro {
    background: linear-gradient(135deg, #f8f9ff, #e3f2fd);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.merge-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.merge-type {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.merge-type:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

.merge-type h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

.merge-simulator {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.merge-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.merge-visualization {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 2rem;
    margin: 1.5rem 0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.scenario-display {
    color: #6c757d;
}

.scenario-display h4 {
    margin: 0 0 1rem 0;
    color: #495057;
}

.conflict-resolution {
    background: linear-gradient(135deg, #fff5f5, #ffeaea);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    border: 2px solid rgba(220, 53, 69, 0.2);
}

.conflict-example {
    margin-top: 1.5rem;
}

.conflict-editor {
    background: #2d3748;
    color: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    margin: 1rem 0;
    overflow-x: auto;
}

.conflict-editor pre {
    margin: 0;
    white-space: pre-wrap;
}

.conflict-editor code {
    font-size: 0.9rem;
    line-height: 1.5;
}

.conflict-resolution-steps {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.conflict-resolution-steps ol {
    margin: 0.5rem 0 0 1rem;
    padding: 0;
}

.conflict-resolution-steps li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.merge-best-practices {
    background: linear-gradient(135deg, #f0fff4, #e6fffa);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    border: 2px solid rgba(72, 187, 120, 0.2);
}

.practice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.practice-item {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.practice-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.practice-item i {
    font-size: 2rem;
    color: #48bb78;
    margin-bottom: 1rem;
    display: block;
}

.practice-item h4 {
    margin: 0 0 0.5rem 0;
    color: #2d3748;
}

.practice-item p {
    margin: 0;
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.5;
}

.completion-section {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 15px;
    padding: 2.5rem;
    margin: 2rem 0;
    text-align: center;
}

.completion-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.8rem;
}

.completion-section ul {
    text-align: left;
    max-width: 400px;
    margin: 1.5rem auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
}

.completion-section li {
    margin: 0.8rem 0;
    font-size: 1.1rem;
}

.final-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .merge-types {
        grid-template-columns: 1fr;
    }
    
    .merge-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .practice-grid {
        grid-template-columns: 1fr;
    }
    
    .final-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* 合併模擬器的詳細樣式 */
.merge-scenario {
    text-align: center;
    padding: 1rem;
}

.scenario-explanation {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border-left: 4px solid #667eea;
}

.merge-diagram {
    margin: 2rem 0;
    position: relative;
}

.commit-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    position: relative;
}

.commit {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.commit.current {
    background: #28a745;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.commit.merge {
    background: #fd7e14;
    box-shadow: 0 2px 8px rgba(253, 126, 20, 0.3);
}

.branch-pointer {
    background: #495057;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    position: absolute;
    top: -50px;
    transition: all 0.5s ease;
}

.branch-pointer.main {
    background: #667eea;
}

.branch-pointer.feature {
    background: #fd7e14;
}

.branch-pointer.moved {
    transform: translateX(60px);
}

.merge-arrow {
    font-size: 1.2rem;
    color: #28a745;
    font-weight: bold;
    margin: 1rem 0;
}

.three-way {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    position: relative;
}

.main-line {
    grid-column: 1;
}

.feature-line {
    grid-column: 1;
    margin-left: 2rem;
}

.scenario-commands {
    background: #2d3748;
    color: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    text-align: left;
    margin-top: 1rem;
}

.scenario-commands code {
    display: block;
    margin: 0.3rem 0;
    color: #4fd1c7;
}

.conflict-indicator {
    background: #fff5f5;
    border: 2px dashed #fc8181;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    text-align: center;
}

.conflict-file {
    font-size: 1.2rem;
    color: #e53e3e;
    margin-bottom: 0.5rem;
}

.conflict-file i {
    margin-right: 0.5rem;
}

.conflict-status {
    color: #c53030;
    font-weight: bold;
}