/* --- General Button Styles --- */
.control-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.control-button.active {
    background-color: #0369a1; /* sky-700 */
    color: white;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.control-button.inactive {
    background-color: #f1f5f9; /* slate-100 */
    color: #0369a1; /* sky-700 */
    border-color: #e2e8f0; /* slate-200 */
}

.control-button.reset-button {
    background-color: #fee2e2; /* red-100 */
    color: #b91c1c; /* red-800 */
    border-color: #fca5a5; /* red-300 */
}

.control-button:hover {
    transform: translateY(-2px);
}

.jump-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e3a8a; /* blue-900 */
    background-color: #dbeafe; /* blue-100 */
    border: 1px solid #93c5fd; /* blue-300 */
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.jump-button:hover {
    background-color: #bfdbfe; /* blue-200 */
    color: #1e40af; /* blue-800 */
}

.modal-button {
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: 1px solid transparent;
    flex-grow: 1;
}

.modal-button.confirm {
    background-color: #dc2626; /* red-600 */
    color: white;
}
.modal-button.confirm:hover {
    background-color: #b91c1c; /* red-800 */
}

.modal-button.cancel {
    background-color: #e2e8f0; /* slate-200 */
    color: #475569; /* slate-600 */
    border-color: #cbd5e1; /* slate-300 */
}
.modal-button.cancel:hover {
    background-color: #cbd5e1; /* slate-300 */
}

/* --- Tier Title --- */
.tier-title {
    text-align: center;
    font-weight: 700;
    color: #475569; /* slate-600 */
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    border-bottom: 2px solid #cbd5e1; /* slate-300 */
    padding-bottom: 0.5rem;
    position: relative;
    z-index: 2;
    background-color: #f1f5f9;
}

/* --- Node Base Styles --- */
.node {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    border: 1px solid #e2e8f0; /* slate-200 */
    position: relative;
    z-index: 5; /* Stellt sicher, dass alle Knoten über dem Canvas (z-index: 1) liegen */
}

.node:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    z-index: 15;
    filter: none !important;
}

.node.active {
    box-shadow: 0 0 0 4px #38bdf8; /* sky-400 */
    border-color: #0284c7; /* sky-600 */
    transform: scale(1.05);
    z-index: 20;
    filter: none !important;
}

.node.related {
    outline: 2px dashed #22d3ee; /* cyan-400 */
    filter: none !important;
}

.node.faded {
    filter: saturate(30%);
}

.node.faded .node-title,
.node.faded .node-keywords {
    color: #9ca3af !important; /* gray-400 */
}

.node-content {
    text-align: center;
}
.node-title {
    font-weight: 600;
    word-break: break-word; /* Erzwingt Zeilenumbrüche, wenn ein Wort zu lang ist */
    -webkit-hyphens: auto; /* Für Webkit-Browser (Chrome, Safari) */
    -ms-hyphens: auto;     /* Für Microsoft-Browser (Edge, IE) */
    hyphens: auto;         /* Standard für andere Browser (Firefox) */
}
.node-keywords {
    font-size: 0.8rem;
    line-height: 1.2;
    color: #475569; /* slate-600 */
    word-break: break-word; /* Erzwingt Zeilenumbrüche */
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

.node.locked {
    background-color: #e2e8f0 !important; /* slate-200 */
    border-color: #94a3b8 !important; /* slate-400 */
    filter: none;
}

.node.locked .node-content {
    display: none;
}
.node-locked-icon {
    display: none;
    font-size: 2.5rem;
    font-weight: 700;
    color: #64748b; /* slate-500 */
}
.node.locked .node-locked-icon {
    display: block;
}

/* --- Connector Styles --- */
.connector-line {
    stroke: #64748b; /* slate-500 */
    stroke-width: 2;
    stroke-opacity: 0.5;
    transition: all 0.3s;
}
.connector-line.highlighted {
    stroke: #0ea5e9; /* sky-500 */
    stroke-width: 3.5;
    stroke-opacity: 1;
}

/* --- Quiz Panel Styles --- */
.quiz-answer-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    border: 1px solid #cbd5e1; /* slate-300 */
    border-radius: 0.5rem;
    background-color: white;
    font-weight: 500;
    transition: all 0.2s ease;
}

.quiz-answer-btn:hover {
    border-color: #38bdf8; /* sky-400 */
    background-color: #f0f9ff; /* sky-50 */
}

.quiz-answer-btn.correct {
    background-color: #dcfce7; /* green-100 */
    border-color: #4ade80; /* green-400 */
    color: #15803d; /* green-700 */
}

.quiz-answer-btn.incorrect {
    background-color: #fee2e2; /* red-100 */
    border-color: #f87171; /* red-400 */
    color: #b91c1c; /* red-800 */
}

.quiz-answer-btn.correct:hover {
    background-color: #dcfce7;
    border-color: #4ade80;
}

.quiz-answer-btn.incorrect:hover {
    background-color: #fee2e2;
    border-color: #f87171;
}

.feedback-in-progress {
    cursor: not-allowed !important;
}

.feedback-in-progress .quiz-answer-btn {
    cursor: not-allowed !important;
}



/* --- Quiz Status Display --- */
#quiz-status-display {
    transition: opacity 0.3s;
}

/* --- Animations --- */
@keyframes pulse {
    0%, 100% {
        transform: scale(1.05);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.5);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 7px rgba(239, 68, 68, 0.7);
    }
}

.node.quiz-active {
    background-color: #fee2e2 !important; /* red-100 */
    border-color: #f87171 !important; /* red-400 */
    animation: pulse 1.5s infinite ease-in-out;
}

.node.quiz-active .node-locked-icon {
    display: block;
    color: #b91c1c; /* red-800 */
}

.node.quiz-active:hover {
    transform: none;
}

@keyframes pulse-with-translate {
    0%, 100% {
        transform: translateX(-50%) scale(1.05);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.5);
    }
    50% {
        transform: translateX(-50%) scale(1.15);
        box-shadow: 0 0 0 7px rgba(239, 68, 68, 0.7);
    }
}

.node.node-centered-x.quiz-active {
    animation-name: pulse-with-translate;
}

.node.node-centered-x.quiz-active:hover {
    transform: translateX(-50%);
}

.zeitraum-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 1rem;
    align-items: center;
}
.zeitraum-label {
    font-weight: 600;
    color: #475569; /* slate-600 */
}
.zeitraum-data {
    color: #1e3a8a; /* blue-900 */
}


