:root {
    /* Blood-red theme - "Krew" means blood in Polish */
    --md-primary-fg-color: #ef5552;
    --md-primary-fg-color--light: #ff7875;
    --md-primary-fg-color--dark: #c62828;
    --md-accent-fg-color: #ef5552;
    --md-accent-fg-color--transparent: rgba(239, 85, 82, 0.1);
}

/* Dark mode adjustments */
[data-md-color-scheme="slate"] {
    --md-primary-fg-color: #ef5552;
    --md-accent-fg-color: #ff7875;
}

/* Mermaid diagram improvements for large/complex diagrams */
.mermaid {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    text-align: center;
}

/* Make mermaid diagrams expand on hover for better readability */
.mermaid svg {
    max-width: 100%;
    height: auto;
    cursor: zoom-in;
    transition: transform 0.2s ease-in-out;
}

.mermaid:hover svg {
    transform: scale(1.02);
}

/* For very tall diagrams, add a max-height with scroll */
.mermaid-tall {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 4px;
    padding: 8px;
}

/* For wide diagrams, ensure horizontal scroll works well */
.mermaid-wide {
    min-width: 100%;
    overflow-x: scroll;
    padding-bottom: 12px;
}

/* Improve flowchart node text legibility */
.mermaid .nodeLabel {
    font-size: 0.9em !important;
}