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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

.header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    font-size: 24px;
    color: #2c3e50;
}

.session-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

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

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #7f8c8d;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.session-select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    min-width: 200px;
}

.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.scene-panel, .tree-panel {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.scene-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.scene-header h2 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.scene-id {
    color: #7f8c8d;
    font-size: 12px;
}

.orga-content {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.orga-content h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
}

.orga-text {
    color: #333;
    line-height: 1.8;
    white-space: pre-wrap;
}

.character-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #ecf0f1;
}

.character-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
}

.character-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: #7f8c8d;
    transition: all 0.3s;
    position: relative;
}

.tab-btn:hover {
    color: #3498db;
}

.tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-btn.empty {
    opacity: 0.6;
}

.tab-empty-indicator {
    font-size: 11px;
    font-style: italic;
    margin-left: 5px;
    color: #95a5a6;
}

.character-content {
    margin-bottom: 30px;
    min-height: 200px;
}

.no-character-content {
    padding: 40px;
    text-align: center;
    color: #95a5a6;
    font-style: italic;
}

.character-panel {
    display: none;
}

.character-panel.active {
    display: block;
}

.introduction, .information {
    margin-bottom: 20px;
}

.introduction h4, .information h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.introduction p, .information p {
    color: #555;
    white-space: pre-wrap;
}

.choices-panel {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #ecf0f1;
}

.choices-panel h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.choices-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-btn {
    padding: 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    transition: all 0.3s;
}

.choice-btn:hover {
    background: #2980b9;
    transform: translateX(5px);
}

.choice-conditional {
    margin-bottom: 10px;
    padding: 10px;
    background: #fff3cd;
    border-radius: 5px;
    border-left: 3px solid #ffc107;
}

.choice-conditional .choice-btn {
    width: 100%;
    margin-bottom: 5px;
}

.choice-condition {
    font-size: 12px;
    color: #856404;
    font-style: italic;
}

.no-content, .no-choices, .no-session {
    padding: 40px;
    text-align: center;
    color: #7f8c8d;
}

.navigation-panel {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #ecf0f1;
}

.tree-panel h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.acte-group {
    margin-bottom: 30px;
}

.acte-group h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
}

.scene-node {
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.scene-node.not-visited {
    opacity: 0.5;
    background: #f8f9fa;
}

.scene-node.not-accessible {
    opacity: 0.3;
    cursor: not-allowed;
}

.scene-node.current {
    background: #3498db;
    color: white;
    font-weight: bold;
}

.scene-node.completed {
    background: #2ecc71;
    color: white;
}

.scene-node:not(.not-accessible):hover {
    background: #ecf0f1;
    transform: translateX(5px);
}

.scene-node.current:hover {
    background: #2980b9;
}

.scene-node.completed:hover {
    background: #27ae60;
}

.scene-label {
    flex: 1;
}

.current-indicator {
    margin-left: 10px;
    font-size: 18px;
}

.complete-btn, .uncomplete-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 16px;
}

.complete-btn:hover, .uncomplete-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

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

.close:hover {
    color: #000;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-content label {
    font-weight: bold;
    color: #2c3e50;
}

.modal-content input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

