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

body {
    background: linear-gradient(135deg, #0c1426 0%, #1a1a2e 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    height: 100vh;
    color: white;
}

body.drag-over::after {
    content: 'Drop JSON file to load';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(59, 130, 246, 0.15);
    border: 4px dashed #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    color: #3b82f6;
    z-index: 9999;
    pointer-events: none;
}

#skillCanvas {
    display: block;
    cursor: grab;
    will-change: contents;
    contain: strict;
}

#skillCanvas:active {
    cursor: grabbing;
}

/* Top Toolbar */
.top-toolbar {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 5px 11px;
    background: rgba(30, 40, 60, 0.9);
    border: 2px solid rgba(100, 150, 255, 0.6);
    border-radius: 11px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(100, 150, 255, 0.2);
}

/* Hidden restore zone - appears at top when toolbars hidden */
.toolbar-restore-zone {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    z-index: 101;
    display: none;
    justify-content: center;
    align-items: flex-start;
    pointer-events: none;
}

.toolbar-restore-zone .toolbar-restore-btn {
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.25s ease;
    background: rgba(30, 40, 60, 0.85);
    border: 1px solid rgba(100, 150, 255, 0.5);
    border-radius: 0 0 9px 9px;
    padding: 4px 14px;
    cursor: pointer;
    color: rgba(200, 220, 255, 0.85);
}

.toolbar-restore-zone .toolbar-restore-btn .toolbar-icon {
    width: 18px;
    height: 18px;
}

.toolbar-restore-zone .toolbar-restore-btn:hover {
    opacity: 1;
}

/* File status group - combines sync indicator with file name */
.file-status-group {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 13px;
    background: rgba(15, 25, 45, 0.8);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 9px;
}

.sync-indicator {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 4px;
    transition: background 0.2s;
}

.sync-indicator:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sync-icon {
    width: 20px;
    height: 20px;
}

.sync-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* Sync indicator colors - muted palette */
.sync-indicator.btn-sync .sync-icon {
    color: #b91c1c;
}

.sync-indicator.btn-sync.sync-warning .sync-icon {
    color: #d97706;
}

.sync-indicator.btn-sync.sync-ok .sync-icon {
    color: #16a34a;
}

.file-name {
    color: rgba(255, 255, 255, 0.95);
    font-weight: bold;
    font-size: 12px;
    font-family: 'Consolas', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    cursor: pointer;
    padding: 4px 6px;
}

.file-name:hover {
    color: #fff;
}

/* When synced */
.file-status-group.synced {
    border-color: rgba(100, 150, 255, 0.3);
}

/* When needs attention, add yellow tint */
.file-status-group.needs-sync {
    border-color: rgba(251, 191, 36, 0.4);
}

.btn {
    padding: 6px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s ease;
    font-weight: bold;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.9);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.context-menu {
    position: absolute;
    background: linear-gradient(145deg, rgba(40, 50, 70, 0.95), rgba(30, 40, 60, 0.95));
    border: 2px solid rgba(100, 150, 255, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(100, 150, 255, 0.3);
    z-index: 1000;
    min-width: 200px;
    overflow: hidden;
}

.menu-item {
    padding: 12px 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: linear-gradient(90deg, rgba(100, 150, 255, 0.3), rgba(150, 100, 255, 0.3));
    transform: translateX(5px);
    box-shadow: inset 5px 0 0 rgba(100, 150, 255, 0.8);
}

/* Compact Context Menu */
.compact-menu {
    min-width: 160px;
    padding: 10px;
}

.menu-name-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 0;
    min-width: 100%;
    overflow: hidden;
}


.menu-node-name {
    display: flex;
    align-items: center;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 12px;
    font-family: 'Consolas', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.menu-node-name-text {
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-node-name:hover {
    border-color: rgba(100, 150, 255, 0.7);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 6px rgba(100, 150, 255, 0.3);
}

.menu-name-input {
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.95);
    font-size: 12px;
    text-align: center;
    font-family: 'Consolas', monospace;
    font-weight: bold;
    box-sizing: border-box;
}

.menu-name-input:focus {
    outline: none;
}

.menu-color-row {
    display: grid;
    grid-template-columns: repeat(6, 24px);
    gap: 6px;
    justify-content: center;
    margin-bottom: 10px;
}

.menu-color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.menu-color-swatch:hover {
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 0.8);
}

.menu-color-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.menu-action-row {
    display: flex;
    gap: 4px;
    align-items: stretch;
}

.menu-action-btn {
    flex: 1;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
    color: #16a34a;
}

.menu-action-btn svg,
.menu-action-icon {
    width: 16px;
    height: 16px;
}

.menu-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.menu-action-btn.completed {
    color: #ffa032;
}

.menu-action-btn.note-edit {
    color: #ca8a04;
    flex: 0;
}

.menu-action-btn.delete {
    color: #b91c1c;
}

.menu-action-btn.delete:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.4);
}

/* Timer section in context menu */
.menu-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-section-title {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 5px;
    text-align: center;
}

/* Row with inputs on left and button on right */
.timer-set-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.timer-input-row {
    flex: 1;
}

.timer-inputs {
    display: flex;
    align-items: flex-end;
    gap: 2px;
}

.timer-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-input-group label {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 1px;
    text-transform: uppercase;
}

.timer-separator {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: bold;
    margin: 0 1px;
    margin-bottom: 10px;
}

.timer-input {
    width: 32px;
    padding: 4px 2px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 12px;
    text-align: center;
    font-family: 'Consolas', monospace;
    font-weight: bold;
}

.timer-input:focus {
    outline: none;
    border-color: rgba(100, 150, 255, 0.7);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 6px rgba(100, 150, 255, 0.3);
}

.timer-input::-webkit-inner-spin-button,
.timer-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Time spent: value + reset button in one row */
.time-spent-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
}

/* Shared small button style for timer panel */
.timer-small-btn {
    height: 24px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.timer-small-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.timer-small-btn.set,
.timer-small-btn.reset-spent {
    width: 52px;
    min-width: 52px;
}

.timer-small-btn.set {
    border-color: rgba(100, 150, 255, 0.4);
    color: rgba(150, 190, 255, 0.9);
}

.timer-small-btn.set:hover {
    background: rgba(100, 150, 255, 0.15);
    border-color: rgba(100, 150, 255, 0.6);
}

.timer-small-btn.reset-spent {
    border-color: rgba(220, 38, 38, 0.3);
    color: rgba(220, 100, 100, 0.9);
}

.timer-small-btn.reset-spent:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.5);
}

.timer-small-btn.stop {
    border-color: rgba(220, 38, 38, 0.3);
    color: rgba(220, 100, 100, 0.9);
}

.timer-small-btn.stop:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.5);
}

/* Sound picker */
.timer-sound-select {
    width: 100%;
    padding: 3px 6px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 9px;
    font-family: 'Segoe UI', sans-serif;
    cursor: pointer;
    margin-bottom: 4px;
}

.timer-sound-select:focus {
    outline: none;
    border-color: rgba(100, 150, 255, 0.7);
}

.timer-sound-select option {
    background: #1a1a2e;
    color: #fff;
}

.timer-sound-btn-row {
    display: flex;
    gap: 4px;
    align-items: stretch;
}

.timer-sound-btn-row .timer-small-btn {
    flex: 1;
    gap: 6px;
}

.timer-volume-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.timer-volume-label {
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Consolas', monospace;
    font-size: 11px;
    font-weight: bold;
    min-width: 32px;
    text-align: right;
}

.timer-volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(100, 150, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.timer-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(100, 150, 255, 0.8);
    border: 1px solid rgba(100, 150, 255, 0.5);
    cursor: pointer;
}

.timer-volume-slider::-webkit-slider-thumb:hover {
    background: rgba(100, 150, 255, 1);
}

.timer-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(100, 150, 255, 0.8);
    border: 1px solid rgba(100, 150, 255, 0.5);
    cursor: pointer;
}

.btn-icon,
.btn-icon svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

.time-spent-section {
    margin-top: 8px;
}

.time-spent-value {
    flex: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Consolas', monospace;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Floating timer window */
.timer-window {
    position: fixed;
    z-index: 1500;
    min-width: 200px;
    background: linear-gradient(to bottom, rgba(100, 150, 255, 0.5), rgba(40, 50, 70, 0.98));
    border: 2px solid rgba(100, 150, 255, 0.6);
    border-bottom: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 12px 20px 8px 20px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.timer-window-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-family: 'Consolas', monospace;
    font-size: 28px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 2px;
}

.timer-window-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.timer-window-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-window-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.timer-window-btn.play-pause {
    color: rgba(100, 200, 100, 0.9);
}

.timer-window-btn.reset {
    color: rgba(255, 180, 50, 0.9);
}

.timer-window-btn.close {
    color: rgba(220, 80, 80, 0.9);
}

.input-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.input-dialog {
    background: linear-gradient(145deg, rgba(40, 50, 70, 0.95), rgba(30, 40, 60, 0.95));
    border: 2px solid rgba(100, 150, 255, 0.8);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(100, 150, 255, 0.3);
    text-align: center;
    min-width: 300px;
}

.input-dialog h3 {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 10px;
    font-size: 0.9em;
}

.input-dialog h4 {
    color: rgba(255, 255, 255, 0.75);
    margin: 10px 0 6px 0;
    font-size: 0.85em;
}

.input-dialog input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 0.85em;
    margin-bottom: 10px;
}

.input-dialog input[type="color"] {
    width: 60px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    margin-right: 10px;
}

.input-dialog input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.input-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* Advanced Color Picker */
.color-dialog {
    min-width: 380px;
}

.recent-colors-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.recent-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.recent-colors {
    display: flex;
    gap: 8px;
}

.recent-color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.recent-color-swatch:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.color-picker-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 20px;
}

.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, 38px);
    gap: 8px;
}

.color-option {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-option:hover {
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.color-option.selected {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.8), 0 0 15px rgba(0, 212, 255, 0.5);
    transform: scale(1.1);
}

.color-spectrum-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 15px;
}

.color-spectrum-row input[type="color"] {
    width: 120px;
    height: 80px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: none;
}

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

.color-spectrum-row input[type="color"]::-webkit-color-swatch {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
}

.color-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.color-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.color-info input[type="text"] {
    width: 90px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-family: monospace;
    font-size: 14px;
    text-align: center;
}

.color-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.error-message {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

.success-message {
    color: #51cf66;
    background: rgba(81, 207, 102, 0.1);
    border: 1px solid rgba(81, 207, 102, 0.3);
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

/* Bottom Toolbar */
.bottom-toolbar {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 5px 11px;
    background: rgba(30, 40, 60, 0.9);
    border: 2px solid rgba(100, 150, 255, 0.6);
    border-radius: 11px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(100, 150, 255, 0.2);
}

.toolbar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 2px 7px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.toolbar-btn:active {
    transform: translateY(0);
}

.toolbar-btn.active {
    background: rgba(100, 150, 255, 0.2);
}

.toolbar-icon {
    font-size: 28px;
    height: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Lucide icons (SVG) */
i.toolbar-icon {
    width: 31px;
    height: 31px;
}

i.toolbar-icon svg {
    width: 26px;
    height: 26px;
    stroke-width: 2;
}

.toolbar-label {
    font-size: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.9;
}

.toolbar-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 7px;
}

/* Button icon and label colors - balanced saturation */
.toolbar-btn.btn-tool .toolbar-icon,
.toolbar-btn.btn-tool .toolbar-label {
    color: #5a90d8;
}

.toolbar-btn.btn-view .toolbar-icon,
.toolbar-btn.btn-view .toolbar-label {
    color: #94a3b8;
}

.toolbar-btn.btn-cut .toolbar-icon,
.toolbar-btn.btn-cut .toolbar-label {
    color: #d8673a;
}

.toolbar-btn.btn-copy .toolbar-icon,
.toolbar-btn.btn-copy .toolbar-label {
    color: #99d432;
}

.toolbar-btn.btn-create .toolbar-icon,
.toolbar-btn.btn-create .toolbar-label {
    color: #3cb868;
}

.toolbar-btn.btn-new .toolbar-icon,
.toolbar-btn.btn-new .toolbar-label {
    color: #3cb868;
}

.toolbar-btn.btn-save-file .toolbar-icon,
.toolbar-btn.btn-save-file .toolbar-label {
    color: #d4a832;
}

.toolbar-btn.btn-load .toolbar-icon,
.toolbar-btn.btn-load .toolbar-label {
    color: #9c60c8;
}

.toolbar-btn.btn-download .toolbar-icon,
.toolbar-btn.btn-download .toolbar-label {
    color: #5a90d8;
}

.toolbar-btn.btn-sync .toolbar-icon,
.toolbar-btn.btn-sync .toolbar-label {
    color: #d85050;
}

.toolbar-btn.btn-sync.sync-warning .toolbar-icon,
.toolbar-btn.btn-sync.sync-warning .toolbar-label {
    color: #d87830;
}

.toolbar-btn.btn-sync.sync-ok .toolbar-icon,
.toolbar-btn.btn-sync.sync-ok .toolbar-label {
    color: #3cb868;
}

.toolbar-btn.btn-connect .toolbar-icon,
.toolbar-btn.btn-connect .toolbar-label {
    color: #2b90fd;
}

.toolbar-btn.btn-direction .toolbar-icon,
.toolbar-btn.btn-direction .toolbar-label {
    color: #2b90fd;
}

.toolbar-btn.btn-direction .toolbar-icon {
    -webkit-text-stroke: 1.5px #2b90fd;
    font-weight: bold;
}

.toolbar-btn.btn-disconnect .toolbar-icon,
.toolbar-btn.btn-disconnect .toolbar-label {
    color: #d87830;
}

.toolbar-btn.btn-remove .toolbar-icon,
.toolbar-btn.btn-remove .toolbar-label {
    color: #d85050;
}

.toolbar-btn.btn-rename .toolbar-icon,
.toolbar-btn.btn-rename .toolbar-label {
    color: #7964bd;
}

.toolbar-btn.btn-paste .toolbar-icon,
.toolbar-btn.btn-paste .toolbar-label {
    color: #2daabb;
}

.toolbar-btn.btn-color .toolbar-icon,
.toolbar-btn.btn-color .toolbar-label {
    color: #ba50d4;
}

.toolbar-btn.btn-note .toolbar-icon,
.toolbar-btn.btn-note .toolbar-label {
    color: #d49032;
}

.toolbar-btn.btn-expand .toolbar-icon,
.toolbar-btn.btn-expand .toolbar-label {
    color: #2bbfd4;
}

.toolbar-btn.btn-complete .toolbar-icon,
.toolbar-btn.btn-complete .toolbar-label {
    color: #3cb868;
}

.toolbar-btn.btn-complete.undone-mode .toolbar-icon,
.toolbar-btn.btn-complete.undone-mode .toolbar-label {
    color: #d85050;
}

.toolbar-btn.btn-size .toolbar-icon,
.toolbar-btn.btn-size .toolbar-label {
    color: #94a3b8;
}

.toolbar-btn.btn-select .toolbar-icon,
.toolbar-btn.btn-select .toolbar-label {
    color: #c5c5c5;
}

.toolbar-btn.btn-select.hand-mode .toolbar-icon,
.toolbar-btn.btn-select.hand-mode .toolbar-label {
    color: #d4a832;
}

.toolbar-btn.btn-notif .toolbar-icon,
.toolbar-btn.btn-notif .toolbar-label {
    color: #e07898;
}

.toolbar-btn.btn-hide .toolbar-icon,
.toolbar-btn.btn-hide .toolbar-label {
    color: #6b9cc4;
}

.toolbar-btn.btn-help .toolbar-icon,
.toolbar-btn.btn-help .toolbar-label {
    color: #94a3b8;
}

/* Broken link icon */
.broken-link {
    position: relative;
    display: inline-block;
}

.broken-link::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110%;
    height: 3px;
    background: #b91c1c;
    transform: translate(-50%, -50%) rotate(-45deg);
    border-radius: 2px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
    z-index: 1;
}

/* Deselect icon (strikethrough effect) */
.deselect-icon {
    position: relative;
}

.deselect-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110%;
    height: 3px;
    background: #b91c1c;
    transform: translate(-50%, -50%) rotate(-45deg);
    border-radius: 2px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
}

/* Selected state icon (filled appearance) */
.selected-icon {
    text-shadow: 0 0 8px rgba(100, 150, 255, 0.8);
}

/* Undone icon (muted red color) */
.undone-icon {
    color: #a03232 !important;
}

/* Small label for longer text like "Undone" */
.toolbar-label.small-label {
    font-size: 5.5px;
}

/* Toolbar popup notification */
.toolbar-popup {
    position: fixed;
    z-index: 101;
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(100, 150, 255, 0.3);
    animation: popupSlideDown 0.3s ease-out;
    pointer-events: none;
}

.toolbar-popup.error {
    background: rgba(239, 68, 68, 0.95);
    border-color: rgba(239, 68, 68, 0.8);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(239, 68, 68, 0.3);
}

@keyframes popupSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Selection info panel - top left */
.selection-info {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 99;
    padding: 9px 15px;
    background: rgba(30, 40, 60, 0.9);
    border: 1px solid rgba(100, 150, 255, 0.3);
    border-radius: 11px;
    color: #fff;
    font-size: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    /* max-width is set dynamically by JS based on toolbar position */
    text-align: left;
    pointer-events: auto;
}

.selection-info.visible {
    display: block;
}

.selection-info .selection-count {
    color: rgba(255, 255, 255, 0.95);
    font-weight: bold;
    margin-bottom: 8px;
}

.selection-info .selection-names {
    color: #fff;
    font-size: 13px;
    line-height: 1.8;
    word-wrap: break-word;
}

.selection-info .selection-names .separator {
    color: #ff9500;
    font-weight: bold;
    margin: 0 8px;
}

.selection-info .selection-names .node-name {
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    border: 1px solid rgba(100, 150, 255, 0.3);
    padding: 4px 6px;
    border-radius: 4px;
    display: inline-block;
    margin: 2px 0;
}

.selection-info .selection-names .timer-total {
    color: #ff9500;
    font-family: 'Consolas', monospace;
    font-weight: bold;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 149, 0, 0.3);
    padding: 4px 6px;
    border-radius: 4px;
    display: inline-block;
    margin: 2px 0;
}

.selection-info .selection-note-wrapper {
    display: none;
    position: relative;
    margin-top: 8px;
}

.selection-info .selection-note-toggle {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    font-size: 9px;
    margin-left: 8px;
    user-select: none;
    vertical-align: middle;
}

.selection-info .selection-note-toggle:hover {
    color: rgba(255, 255, 255, 0.9);
}


.selection-info .selection-note {
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Consolas', 'Courier New', monospace;
    color: white;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.selection-info .selection-note-edit {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 150, 255, 0.5);
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Consolas', 'Courier New', monospace;
    color: white;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    resize: none;
    outline: none;
    box-sizing: border-box;
}

/* Note Dialog */
.note-dialog textarea {
    width: 50vw;
    height: 50vh;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 13px;
    font-family: 'Consolas', 'Courier New', monospace;
    resize: none;
    margin-bottom: 8px;
}

.note-dialog textarea:focus {
    outline: none;
    border-color: rgba(100, 150, 255, 0.5);
}

.note-dialog textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

textarea::-webkit-scrollbar,
.selection-note::-webkit-scrollbar {
    width: 6px;
}

textarea::-webkit-scrollbar-track,
.selection-note::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

textarea::-webkit-scrollbar-thumb,
.selection-note::-webkit-scrollbar-thumb {
    background: rgba(100, 150, 255, 0.3);
    border-radius: 3px;
}

textarea::-webkit-scrollbar-thumb:hover,
.selection-note::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 150, 255, 0.6);
}

/* HSV Color Picker */
.hsv-picker {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.sv-picker-container {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: crosshair;
}

.sv-picker-container canvas {
    display: block;
}

.sv-cursor {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.8), inset 0 0 2px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.hue-slider-container {
    position: relative;
    width: 24px;
    height: 200px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: crosshair;
}

.hue-slider-container canvas {
    display: block;
}

.hue-cursor {
    position: absolute;
    left: -2px;
    width: 28px;
    height: 6px;
    border: 2px solid #fff;
    border-radius: 3px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    transform: translateY(-50%);
    background: transparent;
}

.color-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.color-result .color-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.color-result input[type="text"] {
    width: 80px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-family: monospace;
    font-size: 13px;
    text-align: center;
}

.color-result input[type="text"]:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}