body {
    padding: 0;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
}

h1 {
    font-size: 16px;
    margin-top: 0;
}

p {
    color: rgb(107, 114, 128);
    font-size: 15px;
    margin-bottom: 10px;
    margin-top: 5px;
}

.card {
    max-width: 620px;
    margin: 0 auto;
    padding: 16px;
    border: 1px solid lightgray;
    border-radius: 16px;
}

.card p:last-child {
    margin-bottom: 0;
}

/* Button and toolbar styles */
.btn {
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.indent-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
}

.toolbar-btn {
    transition: all 0.2s;
}

.toolbar-btn:hover {
    background-color: #475569;
}

.toolbar-btn.active {
    background-color: #60a5fa;
    color: white;
}

/* Notification styles */
.notification {
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

/* Error highlight */
.error-highlight {
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
}

/* Menu bar styles */
.menu-bar {
    background-color: #334155;
    border-radius: 4px;
    margin-bottom: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.menu-item {
    color: #cbd5e1;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 2px;
}

.menu-item:hover {
    background-color: #475569;
}

.menu-item.active {
    background-color: #60a5fa;
    color: white;
}

/* Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #334155;
    min-width: 140px;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid #475569;
}

.dropdown-content a {
    color: #cbd5e1;
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    font-size: 13px;
}

.dropdown-content a:hover {
    background-color: #475569;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #334155;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    color: #f1f5f9;
}

.close {
    color: #94a3b8;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #f1f5f9;
}

/* Boolean select */
.boolean-select {
    background-color: #475569;
    color: #f1f5f9;
    border: 1px solid #64748b;
    border-radius: 4px;
    padding: 2px 4px;
}

/* Code Editor bracket coloring */
#jsonOutput {
    line-height: 1.6;
}

.bracket-layer-0 { color: #ef4444; text-shadow: 0 0 5px rgba(239, 68, 68, 0.5); }
.bracket-layer-1 { color: #f97316; text-shadow: 0 0 5px rgba(249, 115, 22, 0.5); }
.bracket-layer-2 { color: #eab308; text-shadow: 0 0 5px rgba(234, 179, 8, 0.5); }
.bracket-layer-3 { color: #22c55e; text-shadow: 0 0 5px rgba(34, 197, 94, 0.5); }
.bracket-layer-4 { color: #06b6d4; text-shadow: 0 0 5px rgba(6, 182, 212, 0.5); }
.bracket-layer-5 { color: #3b82f6; text-shadow: 0 0 5px rgba(59, 130, 246, 0.5); }
.bracket-layer-6 { color: #8b5cf6; text-shadow: 0 0 5px rgba(139, 92, 246, 0.5); }
.bracket-layer-7 { color: #ec4899; text-shadow: 0 0 5px rgba(236, 72, 153, 0.5); }

/* LCARS-style layer colors */
.lcars-layer-0 { --layer-color: #ef4444; }
.lcars-layer-1 { --layer-color: #f97316; }
.lcars-layer-2 { --layer-color: #eab308; }
.lcars-layer-3 { --layer-color: #22c55e; }
.lcars-layer-4 { --layer-color: #06b6d4; }
.lcars-layer-5 { --layer-color: #3b82f6; }
.lcars-layer-6 { --layer-color: #8b5cf6; }
.lcars-layer-7 { --layer-color: #ec4899; }

/* Layer indicator line */
.layer-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--layer-color);
    border-radius: 0 4px 4px 0;
    box-shadow: 2px 0 8px var(--layer-color);
}

/* LCARS horizontal connector */
.lcars-connector {
    position: absolute;
    left: 4px;
    top: 50%;
    height: 2px;
    width: calc(100% - 4px);
    background: var(--layer-color);
    opacity: 0.4;
}

/* JSON Editor styles */
.json-editor {
    background-color: #1e293b;
    border: none;
}

.json-item {
    transition: all 0.15s ease;
    position: relative;
}

.json-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.json-item:hover .json-key,
.json-item:hover .json-value {
    text-shadow: 0 0 8px var(--layer-color, #3b82f6);
}

/* Active row - bold text instead of background */
.json-item.active {
    background-color: transparent;
}

.json-item.active .json-key,
.json-item.active .json-value {
    font-weight: bold;
    text-shadow: 0 0 10px var(--layer-color);
}

.json-bracket {
    font-weight: bold;
}

.json-key {
    transition: all 0.15s ease;
}

.json-value {
    transition: all 0.15s ease;
}

/* Editable fields styling - clean and minimal */
.editable-field {
    border: none;
    background: transparent;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: inherit;
    font-size: inherit;
    width: auto;
    min-width: 30px;
    transition: all 0.2s ease;
    outline: none;
    color: inherit;
}

.editable-field:focus {
    background: rgba(255,255,255,0.15);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.3);
    color: inherit;
}

.editable-field.key-input {
    color: #93c5fd;
}

.editable-field.value-input {
    color: #6ee7b7;
}

/* Faint hint behind editable field */
.editable-hint {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    user-select: none;
    z-index: -1;
}

/* Saved indicator */
.saved-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transform: translateY(100px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.saved-indicator.show {
    transform: translateY(0);
}

/* New field highlight animation */
.new-field-highlight {
    animation: pulse-green 1s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% { background-color: rgba(34, 197, 94, 0.2); }
    50% { background-color: rgba(34, 197, 94, 0.4); }
}

/* Drag and drop styles */
.draggable {
    cursor: grab;
}

.draggable:active {
    cursor: grabbing;
}

.draggable.dragging {
    opacity: 0.5;
    background-color: rgba(255, 255, 255, 0.1);
}

.drag-over {
    border-top: 2px solid var(--layer-color, #3b82f6);
    background-color: rgba(59, 130, 246, 0.1);
    margin-top: 2px;
    margin-bottom: 2px;
}

.drag-over-above {
    border-top: 3px solid var(--layer-color, #3b82f6);
}

.drag-over-below {
    border-bottom: 3px solid var(--layer-color, #3b82f6);
}

.drag-over-inside {
    border-left: 4px solid var(--layer-color, #3b82f6);
    background-color: rgba(59, 130, 246, 0.15);
}

.drop-indicator {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--layer-color, #3b82f6), transparent);
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.drop-indicator.show {
    opacity: 1;
}

/* Drag handle icon */
.drag-handle {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    cursor: grab;
    padding: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.json-item:hover .drag-handle {
    opacity: 1;
}

.drag-handle:active {
    cursor: grabbing;
    color: rgba(255, 255, 255, 0.6);
}

/* Line numbers */
#lineNumbersLeft,
#lineNumbersRight {
    border-top: none;
    border-bottom: none;
}

/* Coordinates display */
#coordinates span {
    color: #60a5fa;
    margin: 0 2px;
}

/* Context menu */
.context-menu {
    position: fixed;
    background: #334155;
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 4px 0;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: none;
}

.context-menu-item {
    padding: 8px 16px;
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.context-menu-item:hover {
    background: #475569;
}

.context-menu-item i {
    width: 16px;
    text-align: center;
    color: #94a3b8;
}

.context-menu-divider {
    height: 1px;
    background: #475569;
    margin: 4px 0;
}