.graphViz-workspace {
    min-height: 75vh;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    margin: 4em auto;
}

.graphViz-content-area {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 18px;
}

.graphViz-graph-panel {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 13px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.graph-container-single {
    width: 100%;
    height: 475px;
    background: #ffffff;
    border: 1px solid #dfe4ea;
    border-radius: 6px;
    background-image: 
        linear-gradient(to right, #dfe4ea 1px, transparent 1px),
        linear-gradient(to bottom, #dfe4ea 1px, transparent 1px);
    background-size: 18px 18px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.graph-container-split {
    width: 48%;
    height: 475px;
    background: #ffffff;
    border: 1px solid #dfe4ea;
    border-radius: 6px;
    background-image: 
        linear-gradient(to right, #dfe4ea 1px, transparent 1px),
        linear-gradient(to bottom, #dfe4ea 1px, transparent 1px);
    background-size: 18px 18px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
    display: inline-block;
    vertical-align: top;
    margin-right: 2%;
}

.graph-container-split:last-child {
    margin-right: 0;
}

.graphViz-bottom-toolbar {
    background: white;
    padding-top: 9px;
    display: flex;
    gap: 5px;
    z-index: 10;
    margin-top: -5px;
    margin-bottom: 5px;
    align-self: center;
}

.graphViz-bottom-toolbar button {
    padding: 0;
    width: 34px;
    height: 34px;
    background-color: #fff;
    color: #2c3e50;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
}

.graphViz-bottom-toolbar button:hover {
    background: linear-gradient(70deg, #f9f9f9, #e5e6e8);
    color: #fff;
    transform: scale(1.05);
}

.graphViz-bottom-toolbar button:active {
    transform: scale(0.95);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.graphViz-bottom-toolbar select {
    padding: 5px 20px 5px 5px;
    border: 1px solid #dfdfdf;
    font-size: 14px;
    background: #fff;
    color: #2c3e50;
    transition: all 0.3s ease;
    width: 50px;
    height: 34px;
    appearance: none;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSI0IiB2aWV3Qm94PSIwIDAgMTAgNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMSAxbDUgNC41TDkgMSIgc3Ryb2tlPSIjMzQ5OGRiIiBzdHJva2Utd2lkdGg9IjEuMiIvPjwvc3ZnPg==');
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 7px 4px;
    border-radius: 4px;
    text-align: center;
}

.graphViz-bottom-toolbar select:hover {
    border-color: #3498db;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.graphViz-bottom-toolbar select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.graphViz-analysis-panel {
    background: #ffffff;
    border-radius: 6px;
    padding: 18px;
}

.graphViz-analysis-panel table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
}

.graphViz-analysis-panel h3 {
    text-align: left;
    color: #2e3842;
    margin-bottom: 11px;
    font-size: 1.1em;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.graphViz-analysis-panel h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #2e3842;
}

.graphViz-analysis-panel th {
    background: transparent;
    color: #2e3842;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8em;
    padding: 9px 13px;
    border-bottom: 1px solid #dfdfdf;
    text-align: left;
}

.graphViz-analysis-panel td {
    padding: 9px 13px;
    color: #4E4852;
    border-bottom: 1px solid #dfdfdf;
    font-size: 0.85em;
    transition: background 0.3s ease;
}

.graphViz-analysis-panel tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.0375);
}

.graphViz-analysis-panel tr:hover td {
    background: rgba(0, 0, 0, 0.05);
}

#graphViz-shortestPathInfo {
    margin-top: 1.4em;
}

#graphViz-shortestPathInfo h3 {
    font-size: 1.1em;
    color: #2e3842;
    margin-bottom: 11px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

#graphViz-shortestPathInfo h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #2e3842;
}

#graphViz-shortestPathInfo table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
}

#graphViz-shortestPathInfo table tr td {
    padding: 9px 13px;
    border-bottom: 1px solid #dfdfdf;
    color: #4E4852;
    font-size: 0.85em;
}

#graphViz-shortestPathInfo table tr td:first-child {
    font-weight: 600;
    color: #2e3842;
    width: 40%;
}

.graphViz-top-toolbar {
    background: #f8f9fa;
    width: 100%;
    max-width: 1100px;
    margin: -4.5em auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
    border-radius: 4px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.toolbar-tabs {
    display: flex;
    background: #e9ecef;
    border-bottom: 1px solid #ced4da;
    padding: 5px 10px;
}

.tab-btn {
    padding: 8px 20px;
    background: #e9ecef;
    border: none;
    border-right: 1px solid #ced4da;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn:hover {
    background: #dee2e6;
}

.tab-btn.active {
    background: #ffffff;
    color: #007bff;
    border-bottom: 2px solid #007bff;
}

.toolbar-content-wrapper {
    background: #ffffff;
    padding: 10px 15px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-content {
    display: none;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
}

.toolbar-content.active {
    display: flex;
}

.toolbar-group {
    display: flex;
    gap: 10px;
    align-items: center;
    border-right: 1px solid #e9ecef;
    padding-right: 20px;
}

.toolbar-group:last-child {
    border-right: none;
}

.group-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    margin-right: 10px;
}

.toolbar-content button {
    padding: 0;
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    height: 34px;
    background-color: #ffffff;
    color: #495057;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.toolbar-content button:hover {
    background: #e9ecef;
    border-color: #007bff;
    color: #007bff;
}

.toolbar-content button:active {
    transform: scale(0.95);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

#graphViz-dijkstraBtn {
    padding: 0;
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    height: 34px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ced4da;
    background-color: #ffffff;
}

/* Stilim bazë për të gjithë select-et */
.toolbar-content select {
    padding: 6px 20px 6px 6px;
    border: 1px solid #ced4da;
    font-size: 14px;
    background: #ffffff;
    color: #495057;
    transition: all 0.3s ease;
    height: 34px;
    appearance: none;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSI0IiB2aWV3Qm94PSIwIDAgMTAgNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMSAxbDUgNC41TDkgMSIgc3Ryb2tlPSIjMDA3YmZmIiBzdHJva2Utd2lkdGg9IjEuMiIvPjwvc3ZnPg==');
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 8px 4px;
    border-radius: 4px;
    text-align: left;
}

/* Select-et me tekst të gjatë (edgeType dhe edgeOrientation) */
#graphViz-edgeType,
#graphViz-edgeOrientation {
    width: auto;
    min-width: 181px;
    max-width: 300px;
}

/* Select-et me gjerësi fikse (startNode dhe endNode) */
#graphViz-startNode,
#graphViz-endNode {
    width: 50px;
    text-align: center;
}

.toolbar-content select:hover {
    border-color: #007bff;
    background: #e9ecef;
}

.toolbar-content select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 4px rgba(0, 123, 255, 0.5);
}

.toolbar-content .color-picker-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.graphViz-left-toolbar {
    position: absolute;
    top: 18px;
    left: 18px;
    display: flex;
    flex-direction: row;
    gap: 5px;
    z-index: 20;
}

.graphViz-left-toolbar button {
    padding: 0;
    width: 34px;
    height: 34px;
    background-color: #fff;
    color: #2c3e50;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 4px;
}

.graphViz-left-toolbar button:hover {
    background: linear-gradient(70deg, #2e3842, #2e3842);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.graphViz-left-toolbar button:active {
    transform: scale(0.95);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.split-graph-analysis {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
}

.split-graph-table {
    width: 50%;
    background: #ffffff;
    border: 1px solid #dfe4ea;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.split-graph-table h3 {
    margin-top: 0;
    color: #2c3e50;
    text-align: center;
}

.split-graph-table table {
    width: 100%;
    border-collapse: collapse;
}

.split-graph-table th {
    color: #ffffff;
    padding: 8px;
    text-align: center;
}

.split-graph-table td {
    padding: 5px;
    border-bottom: 1px solid #dfe4ea;
}

.split-left-table {
    margin-right: 5px;
}

.split-right-table {
    margin-left: 5px;
}

.isomorphism-result {
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

.isomorphism-result h3 {
    color: #2c3e50;
}

.isomorphism-result p {
    font-size: 1.2em;
    margin: 10px 0 0;
}

/* Stilet e reja për popup-et */
.graphViz-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
    width: 80vw;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    padding: 20px;
}

.graphViz-popup h3 {
    margin: 0 0 15px 0;
    color: #2e3842;
    font-size: 1.2em;
    font-weight: 600;
    text-align: center;
    position: relative;
}

.graphViz-popup h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: #3498db;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.popup-content {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 500px; /* Lartësi fikse për konsistencë */
    gap: 20px;
}

.graph-container {
    width: 50%;
    height: 100%;
    border: 1px solid #dfe4ea;
    border-radius: 6px;
    background: #ffffff;
    background-image: 
        linear-gradient(to right, #dfe4ea 1px, transparent 1px),
        linear-gradient(to bottom, #dfe4ea 1px, transparent 1px);
    background-size: 18px 18px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.matrix-container {
    width: 50%;
    display: flex;
    flex-direction: column;
    overflow: auto;
    background: #ffffff;
    border: 1px solid #dfe4ea;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.matrix-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #dfe4ea;
}

.matrix-controls label {
    font-size: 14px;
    color: #2e3842;
    font-weight: 500;
}

.matrix-controls input[type="number"] {
    width: 60px;
    height: 34px;
    padding: 5px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    color: #2c3e50;
    background: #fff;
    text-align: center;
}

.matrix-controls input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 4px rgba(52, 152, 219, 0.5);
}

.matrix-controls button {
    padding: 7px 14px;
    background: #2e3842;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.matrix-controls button:hover {
    background: #3498db;
    transform: scale(1.05);
}

.matrix-container table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    flex-grow: 1;
}

.matrix-container th,
.matrix-container td {
    padding: 8px 10px;
    border: 1px solid #dfe4ea;
    text-align: center;
    font-size: 0.9em;
    color: #4E4852;
}

.matrix-container th {
    background: #f5f6f5;
    color: #2e3842;
    font-weight: 600;
    text-transform: uppercase;
}

.matrix-container input {
    width: 40px;
    height: 40px;
    text-align: center;
    border: 1px solid #dfe4ea;
    border-radius: 4px;
    font-size: 14px;
    color: #2c3e50;
    background: #fff;
    transition: all 0.3s ease;
}

.matrix-container input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 4px rgba(52, 152, 219, 0.5);
}

.button-group {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #dfe4ea;
}

.button-group button {
    padding: 8px 16px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.button-group button:hover {
    background: #2e3842;
    transform: scale(1.05);
}

/* Popup për custom mesazhe */
.graphViz-customPopup {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.graphViz-customPopup.graphViz-show {
    opacity: 1;
}

/* Media Queries */
@media screen and (max-width: 1366px) {
    .graphViz-workspace {
        min-height: 60vh;
        padding: 12px;
        max-width: 900px;
        margin: 3.5em auto;
    }

    .graphViz-content-area {
        gap: 15px;
    }

    .graphViz-graph-panel {
        padding: 10px;
    }

    .graph-container-single,
    .graph-container-split {
        height: 375px;
        background-size: 15px 15px;
    }

    .graph-container-split {
        width: 47%;
        margin-right: 1%;
    }

    .graphViz-bottom-toolbar {
        gap: 4px;
        padding-top: 8px;
    }

    .graphViz-bottom-toolbar button {
        width: 27px;
        height: 27px;
        font-size: 12px;
    }

    .graphViz-bottom-toolbar select {
        padding: 4px 15px 4px 4px;
        font-size: 12px;
        width: 45px;
        height: 27px;
        background-position: right 4px center;
        background-size: 6px 3px;
    }

    .graphViz-analysis-panel {
        padding: 15px;
    }

    .graphViz-analysis-panel h3 {
        font-size: 0.9em;
        margin-bottom: 9px;
    }

    .graphViz-analysis-panel th {
        font-size: 0.65em;
        padding: 8px 10px;
    }

    .graphViz-analysis-panel td {
        font-size: 0.7em;
        padding: 8px 10px;
    }

    .graphViz-top-toolbar {
        max-width: 900px;
        margin: -3.5em auto;
    }

    .tab-btn {
        padding: 6px 16px;
        font-size: 12px;
    }

    .toolbar-content-wrapper {
        padding: 8px 12px;
        gap: 15px;
    }

    .toolbar-content button {
        width: 30px;
        min-width: 30px;
        max-width: 30px;
        height: 30px;
        font-size: 14px;
    }

    #graphViz-edgeType,
    #graphViz-edgeOrientation {
        min-width: 100px;
        max-width: 150px;
        padding: 4px 15px 4px 4px;
        font-size: 12px;
        height: 30px;
    }

    #graphViz-startNode,
    #graphViz-endNode {
        width: 45px;
        height: 30px;
        padding: 4px 15px 4px 4px;
        font-size: 12px;
    }

    .graphViz-left-toolbar {
        top: 15px;
        left: 15px;
        gap: 4px;
    }

    .graphViz-left-toolbar button {
        width: 27px;
        height: 27px;
        font-size: 12px;
    }

    .graphViz-popup {
        width: 85vw;
        max-width: 900px;
        padding: 15px;
    }

    .popup-content {
        height: 400px;
    }

    .graph-container {
        width: 50%;
    }

    .matrix-container {
        width: 50%;
    }

    .matrix-controls input[type="number"] {
        width: 50px;
        height: 30px;
        font-size: 12px;
    }

    .matrix-controls button {
        padding: 6px 12px;
        font-size: 12px;
    }

    .matrix-container th,
    .matrix-container td {
        padding: 6px 8px;
        font-size: 0.8em;
    }

    .matrix-container input {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .button-group button {
        padding: 6px 12px;
        font-size: 12px;
    }

    .close-btn {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
}