body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #ffffff;
    transition: background-color 0.3s, color 0.3s;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header, footer {
    padding: 1rem;
    text-align: center;
}

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

input[type="color"] {
    width: 50px;
    height: 30px;
    padding: 0;
    cursor: pointer;
    background: none;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
}

label {
    color: #d0d0d0;
}

button, input, select {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="text"], input[type="number"] {
    cursor: text;
}

button:hover {
    filter: brightness(0.85);
    transform: scale(1.02);
}

input:hover, select:hover {
    filter: brightness(0.85);
}

button:active {
    outline: none;
    border: 1px solid #ffffff;
    box-shadow: 0 0 5px rgb(133, 133, 133);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-add {
    background-color: #28a745;
}

#tree-svg {
    display: block;
    margin: 0;
}

#tree-container {
    width: 100%;
    max-width: 90%;
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    overflow: auto;
}

.divisor {
    height: 2px;
    background-color: #333;
    width: 75%;
    margin: 20px auto;
}

input:focus,
select:focus {
    outline: none;
    border: 1px solid #d7d7d7;
    box-shadow: 0 0 5px rgb(133, 133, 133);
}

.pair-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pair-container label {
    flex: 1;
}

#import-export-container {
    background-color: #2d2d2d;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

#import-export-container h3 {
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3em;
    border-bottom: 2px solid #4a4a4a;
    padding-bottom: 10px;
}

.import-export-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.import-export-section {
    flex: 1;
    min-width: fit-content;
    width: 250px;
    background-color: #333333;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
}

.import-export-section:hover {
    border-color: rgba(134, 134, 134, 0.5);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    filter: brightness(1.10);
}

.import-export-section h4 {
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    border-bottom: 1px solid #4a4a4a;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
}

.import-export-section h4 i {
    margin-right: 10px;
    color: #4CAF50;
}

.import-export-section input[type="number"],
.import-export-section select {
    padding: 0.5rem;
    background-color: #444444;
}

.import-export-section input[type="number"] {
    width: 45px;
}

.file-input-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.file-input-wrapper input[type="file"] {
    display: none;
}

.file-input-wrapper .file-input-button {
    font-size: 14px;
    background-color: #444444;
    color: #fff;
    border: 1px solid #555;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input-wrapper .file-input-button:hover {
    filter: brightness(0.85);
    transform: scale(1.02);
}

.file-input-wrapper .file-input-button:active {
    outline: none;
    border: 1px solid #ffffff;
    box-shadow: 0 0 5px rgb(133, 133, 133);
}

.file-input-wrapper .file-name {
    margin-left: 10px;
    color: #a0a0a0;
    pointer-events: none;
}

.file-name {
    color: #a0a0a0;
    font-style: italic;
}

#import-tree, #export-tree {
    background-color: #2ea395;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#import-tree:hover, #export-tree:hover {
    filter: brightness(0.80);
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .import-export-grid {
        flex-direction: column;
    }
}

#tree-options-container {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.options-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

#tree-options-container h3 {
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3em;
    border-bottom: 2px solid #4a4a4a;
    padding-bottom: 10px;
}

.tree-option-section {
    flex: 1;
    min-width: fit-content;
    width: 200px;
    background-color: #333333;
    padding: 15px;
    border: 1px solid transparent;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
}

.tree-option-section:hover {
    border-color: rgba(134, 134, 134, 0.5);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    filter: brightness(1.10);
}

.tree-option-section h4 {
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    border-bottom: 1px solid #4a4a4a;
    padding-bottom: 8px;
}

.section-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pair-container-tree-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pair-container-tree-section label {
    flex: 1;
    color: #d0d0d0;
}

.pair-container-tree-section input[type="color"] {
    width: 45px;
    height: 30px;
}

.pair-container-tree-section input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.pair-container-tree-section input[type="number"] {
    width: 45px;
    padding: 0.5rem;
    background-color: #444444;
}

@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
}

.tree-line {
    transition: all 0.5s ease;
}

.tree-node,
.tree-line {
    transition: all 0.5s ease;
}

.tree-node:not(.selected).hover {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5)) brightness(1.15);
}

.tree-node.selected circle {
    stroke-width: 3.5;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.tree-node circle,
.tree-node text {
    transition: all 0.3s ease;
}

.tree-node.selected text {
    font-weight: bold;
}

.node-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    background-color: #2a2a2a;
    border-left: 1px solid #444;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease-in-out;
    z-index: 1000;
}

.node-menu.visible {
    right: 0;
}

.menu-header {
    background-color: #333;
    padding: 15px;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-header h3 {
    margin: 0;
    color: #fff;
}

.node-menu h4 {
    margin: 0;
    color: #fff;
}

.node-id-container {
    display: flex;
    align-content: center;
    margin: 10px 0;

}

.node-id-container label {
    margin-right: 10px;
}

.node-id {
    color: #4CAF50;
    font-weight: bold;
    font-style: italic;
}

#selected-count {
    background-color: #2ea395;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.9em;
}

.menu-content {
    padding: 15px;
}

.node-properties, .highlight-options, .node-actions {
    margin-bottom: 20px;
}

.node-menu label {
    display: block;
    margin-bottom: 5px;
    color: #ddd;
}

.node-menu input[type="text"] {
    width: 100%;
    padding: 8px;
    margin-right: 10px;
    margin-bottom: 10px;
    background-color: #444;
    border-radius: 4px;
    box-sizing: border-box;
    cursor: text;
}

.node-menu input[type="color"] {
    width: 100%;
    padding: 4px;
    margin-bottom: 10px;
    background-color: #444;
    border: 1px solid #555;
    color: #fff;
    border-radius: 4px;
}

.preset-highlights {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.highlight-btn {
    flex: 1;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
}

.node-menu button {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#remove-highlight.active {
    background-color: #f44336;
}

#remove-highlight.inactive {
    background-color: #555;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-danger {
    background-color: #f44336;
    color: white;
}

h3 {
    text-align: center;
    margin-top: 0;
}

.reset-buttons {
    position: static;
    transform: none;
    background-color: transparent;
    box-shadow: none;
    padding: 0;
}

.reset-buttons button {
    display: compact;
    flex: 1;
    margin: 0 5px;
}

.notification {
    background-color: #333333;
    border-left: 4px solid #007bff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 10px;
    max-width: 300px;
    opacity: 0;
    padding: 15px;
    transition: opacity 0.3s ease-in-out;
}

.notification.show {
    opacity: 1;
}

.notification.success {
    border-left-color: #28a745;
}

.notification.error {
    border-left-color: #dc3545;
}

.notification.warning {
    border-left-color: #ffc107;
}