/* UNIX Family Tree - vis-network MicroSim Stylesheet
 * ==================================================
 * Color Coding:
 * - Blue (#3498db): Original UNIX lineage
 * - Purple (#9b59b6): BSD variants
 * - Red (#e74c3c): Commercial UNIX (System V)
 * - Green (#27ae60): GNU/Linux ecosystem
 */

/* ===========================================
   RESET & BASE STYLES
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: aliceblue;
}

/* ===========================================
   MAIN CONTAINER & NETWORK CANVAS
   =========================================== */
.container {
    position: relative;
    width: 100%;
    height: 100vh;
}

#network {
    width: 100%;
    height: 100%;
    background-color: aliceblue;
}

/* ===========================================
   TITLE (Top Center)
   =========================================== */
.title {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    font-weight: bold;
    color: black;
    background-color: aliceblue;
    padding: 5px 15px;
    border-radius: 5px;
    z-index: 10;
}

/* ===========================================
   LEGEND (Upper Left)
   =========================================== */
.legend {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 10px 12px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
    font-size: 12px;
}

.legend-color {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    margin-right: 8px;
    border: 2px solid #333;
}

/* Color coding for legend */
.color-unix {
    background-color: #3498db;
    border-color: #2980b9;
}

.color-bsd {
    background-color: #9b59b6;
    border-color: #8e44ad;
}

.color-sysv {
    background-color: #e74c3c;
    border-color: #c0392b;
}

.color-gnu {
    background-color: #27ae60;
    border-color: #1e8449;
}

/* ===========================================
   RIGHT PANEL (Info & Instructions)
   =========================================== */
.right-panel {
    position: absolute;
    top: 50px;
    right: 10px;
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

/* ===========================================
   STATUS INFO PANEL
   =========================================== */
.status-info {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-title {
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}

.status-text {
    font-size: 12px;
    line-height: 1.6;
    color: #555;
}

/* ===========================================
   INSTRUCTIONS PANEL
   =========================================== */
.instructions {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.instructions ul {
    margin-left: 16px;
    font-size: 12px;
    color: #555;
}

.instructions li {
    margin: 4px 0;
}

/* ===========================================
   DETAIL SECTIONS IN STATUS
   =========================================== */
.detail-year {
    font-weight: bold;
    color: #2980b9;
    margin-bottom: 4px;
}

.detail-creator {
    font-style: italic;
    color: #666;
    margin-bottom: 6px;
}

.detail-features {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

/* ===========================================
   RESPONSIVE STYLES
   =========================================== */
@media (max-width: 768px) {
    .title {
        font-size: 16px;
        top: 5px;
    }

    .legend {
        padding: 6px 8px;
        top: 5px;
        left: 5px;
    }

    .legend-item {
        font-size: 10px;
        margin: 3px 0;
    }

    .legend-color {
        width: 14px;
        height: 14px;
    }

    .right-panel {
        width: 220px;
        top: 40px;
        right: 5px;
    }

    .status-info,
    .instructions {
        padding: 8px;
    }

    .status-title {
        font-size: 12px;
    }

    .status-text {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .right-panel {
        width: 180px;
    }

    .legend {
        max-width: 150px;
    }
}
