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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
    margin-bottom: 30px;
}

.mode-selector {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.mode-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.mode-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.mode-btn.active {
    background: #4CAF50;
    color: white;
}

.content {
    background: white;
    border-radius: 15px;
    min-height: 600px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

.guided-mode, .flowchart-mode {
    padding: 0;
    height: 100%;
    min-height: 600px;
}

.guided-mode {
    display: flex;
    height: 600px;
}

.navigation-panel {
    width: 300px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    padding: 20px;
    overflow-y: auto;
}

.current-panel {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.context-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.context-section h3 {
    color: #1976d2;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.context-text {
    color: #424242;
    font-weight: 500;
}

.history-section {
    margin-bottom: 20px;
}

.history-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1em;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

.history-item {
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.history-item:hover {
    background: #f0f7ff;
    border-color: #2196f3;
    transform: translateX(5px);
}

.history-question {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.history-answer {
    color: #666;
    font-style: italic;
    font-size: 0.85em;
}

.tooltip {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 10px;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.history-item:hover .tooltip {
    opacity: 1;
}

.tooltip::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #333;
}

.articles-section {
    padding: 15px;
    background: #e8f5e8;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
}

.articles-section h3 {
    color: #2e7d32;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.articles-list {
    list-style: none;
}

.articles-list li {
    margin-bottom: 5px;
    padding: 5px;
    background: white;
    border-radius: 4px;
    font-size: 0.9em;
    color: #1565c0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.articles-list li:hover {
    background: #e3f2fd;
}

#question-container {
    text-align: center;
}

.question {
    font-size: 1.8em;
    margin-bottom: 30px;
    color: #333;
    line-height: 1.4;
    font-weight: 500;
}

.choices {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.choice-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-width: 120px;
}

.choice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.outcome {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
    font-size: 1.2em;
    line-height: 1.6;
    border: 2px solid #4CAF50;
}

.outcome.gpai {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #4CAF50;
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #666;
}

.breadcrumb span {
    margin: 0 5px;
}

.restart-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.restart-btn:hover {
    background: #d32f2f;
}

.flowchart-mode {
    position: relative;
    overflow: hidden;
}

.controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.control-btn {
    background: white;
    border: 2px solid #ddd;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.control-btn:hover {
    background: #f0f0f0;
    border-color: #999;
    transform: scale(1.05);
}

.flowchart-container {
    width: 100%;
    height: 600px;
    overflow: hidden;
    cursor: grab;
    position: relative;
}

.flowchart-container:active {
    cursor: grabbing;
}

#mermaid-container {
    transform-origin: 0 0;
    transition: transform 0.3s ease;
}

.hidden {
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .mode-selector {
        flex-direction: column;
        align-items: center;
    }
    
    .guided-mode {
        flex-direction: column;
        height: auto;
    }
    
    .navigation-panel {
        width: 100%;
        max-height: 300px;
    }
    
    .current-panel {
        padding: 20px;
    }
    
    .question {
        font-size: 1.4em;
    }
    
    .choices {
        flex-direction: column;
        align-items: center;
    }
    
    .choice-btn {
        width: 100%;
        max-width: 300px;
    }
} 