/* Scientific Method Workflow Diagram Styles */

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: aliceblue;
}

.container {
    padding: 10px;
}

.main-content {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-bottom: 10px;
}

.diagram-container {
    flex: 1;
    min-width: 350px;
    background: aliceblue;
    padding-bottom: 40px;
    overflow: visible;
}

.mermaid {
    display: block;
    min-height: 650px;
    margin-left: -70px;
    margin-top: -60px;
    overflow: visible;
}

.mermaid svg {
    overflow: visible;
}

/* Ensure Mermaid diagram elements use proper font size */
.mermaid .node text,
.mermaid .edgeLabel {
    font-size: 16px !important;
}

/* Make nodes interactive */
.mermaid .node {
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.mermaid .node:hover {
    filter: brightness(1.1);
}

.mermaid .node.highlighted {
    filter: brightness(1.2) drop-shadow(0 0 8px rgba(0,0,0,0.3));
}

/* Infobox styles */
.infobox {
    flex: 0 0 250px;
    width: 250px;
    background: aliceblue;
    border-radius: 8px;
    padding: 15px;
    border: 2px solid #e1e8ed;
    height: fit-content;
    font-size: 0.9em;
    position: relative;
    top: 0;
    transition: top 0.3s ease;
}

.infobox h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.infobox p {
    color: #34495e;
    line-height: 1.6;
    font-size: 1em;
    margin-bottom: 15px;
}

.example-box {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin-top: 15px;
}

.example-box strong {
    color: #667eea;
    display: block;
    margin-bottom: 8px;
}

.example-box p {
    margin: 0;
    font-size: 0.95em;
    color: #555;
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

button:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

.color-legend {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e1e8ed;
    margin-bottom: 20px;
}

.color-legend h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.color-legend ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.color-legend li {
    font-size: 0.95em;
    display: flex;
    align-items: center;
}

.color-box {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    border-radius: 4px;
    border: 2px solid #333;
}

footer {
    text-align: center;
    padding-top: 15px;
    border-top: 2px solid #e1e8ed;
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 600px) {
    .main-content {
        flex-direction: column;
    }

    .diagram-container {
        width: 100%;
        overflow-x: auto;
    }

    .infobox {
        width: 100%;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0px;
    }

    .container {
        padding: 10px;
    }

    .controls {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    .color-legend ul {
        flex-direction: column;
        gap: 10px;
    }
}


