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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    color: #2c3e50;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.95;
    font-weight: 300;
}

.description {
    padding: 30px 40px;
    background: #f8f9fa;
    border-bottom: 3px solid #e9ecef;
    font-size: 1.05em;
    line-height: 1.8;
    color: #495057;
}

.diagram-container {
    padding: 40px;
    background: white;
    min-height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mermaid {
    display: flex;
    justify-content: center;
    width: 100%;
    transform-origin: center;
    transition: transform 0.3s ease;
}

.mermaid svg {
    max-width: 100%;
    height: auto;
}

.controls {
    padding: 20px 40px;
    background: #f8f9fa;
    border-top: 2px solid #e9ecef;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.info-panel {
    padding: 40px;
    background: #f8f9fa;
}

.info-panel h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8em;
    text-align: center;
}

.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.component-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border-left: 5px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.component-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.component-card h3 {
    margin-bottom: 15px;
    font-size: 1.3em;
}

.component-card p {
    margin-bottom: 10px;
    color: #495057;
    line-height: 1.6;
}

.component-card p strong {
    color: #2c3e50;
}

.doc-card {
    border-left-color: #4dabf7;
}

.doc-card h3 {
    color: #1864ab;
}

.iframe-card {
    border-left-color: #ff922b;
}

.iframe-card h3 {
    color: #d9480f;
}

.code-card {
    border-left-color: #51cf66;
}

.code-card h3 {
    color: #2b8a3e;
}

.sim-card {
    border-left-color: #ff6b6b;
}

.sim-card h3 {
    color: #c92a2a;
}

.metadata-card {
    border-left-color: #cc5de8;
}

.metadata-card h3 {
    color: #862e9c;
}

.lms-card {
    border-left-color: #adb5bd;
}

.lms-card h3 {
    color: #495057;
}

.relationships {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-top: 20px;
}

.relationships h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8em;
    text-align: center;
}

.relationships h3 {
    color: #495057;
    margin: 25px 0 15px 0;
    font-size: 1.3em;
}

.flow-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.flow-section ol {
    margin-left: 20px;
    color: #495057;
}

.flow-section ol li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.flow-section ul {
    margin-left: 20px;
    color: #495057;
}

.flow-section ul li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.flow-section p {
    margin-bottom: 15px;
    color: #495057;
    line-height: 1.7;
}

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

    h1 {
        font-size: 1.8em;
    }

    .subtitle {
        font-size: 1em;
    }

    .description,
    .info-panel,
    .diagram-container {
        padding: 20px;
    }

    .component-grid {
        grid-template-columns: 1fr;
    }

    .controls {
        padding: 15px;
    }

    button {
        font-size: 0.9em;
        padding: 8px 16px;
    }
}

@media print {
    body {
        background: white;
        padding: 0;
    }

    .controls {
        display: none;
    }

    .container {
        box-shadow: none;
    }

    .component-card {
        page-break-inside: avoid;
    }
}
