.annotation-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 60px;
}

.annotation-input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.annotation-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.annotation-save, .annotation-cancel {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.annotation-save {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: rgb(34, 197, 94);
}

.annotation-save:hover {
    background: rgba(34, 197, 94, 0.3);
}

.annotation-cancel {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: rgb(239, 68, 68);
}

.annotation-cancel:hover {
    background: rgba(239, 68, 68, 0.3);
}

.annotation-display {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.form-input:focus {
    outline: none;
    background: #f8f8fb;
    box-shadow: 
        inset 2px 2px 4px rgba(174, 174, 192, 0.3),
        inset -2px -2px 4px rgba(255, 255, 255, 0.9),
        0 0 0 3px rgba(102, 126, 234, 0.1);
    color: #2d3748;
}

/* Glass morphism select field to match form-input */
.form-select {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 16px;
    outline: none;
    margin: 8px 0;
    width: 100%;
    box-sizing: border-box;
}

.form-select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.5);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 0 3px rgba(99, 102, 241, 0.2);
    color: rgba(255, 255, 255, 1);
}

.form-select option {
    background: rgba(15, 23, 42, 0.95);
    color: rgba(255, 255, 255, 0.9);
    padding: 16px;
    font-size: 16px;
}

.form-select option:checked {
    background: rgba(99, 102, 241, 0.3);
    color: rgba(255, 255, 255, 1);
}

.form-select option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 1);
}

/* Remove default backgrounds from grouped components */
fieldset {
    background-color: transparent !important;
    background: none !important;
}

/* Override glass background for fieldsets - they should be transparent containers */
fieldset.glass {
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Keep fieldsets completely transparent even on hover */
fieldset.glass:hover {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Ensure legends have proper glass backgrounds */
fieldset legend {
    background-color: transparent;
}

/* Global text readability improvements */
body, * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Neumorphic text styling */
.text-white {
    color: #2d3748;
}

.text-dark {
    color: #2d3748;
}

/* Neumorphic placeholder text */
::placeholder {
    color: #a0aec0;
    font-size: 16px;
}

/* Simple, fast collapsible */
.fieldset-content {
    overflow: hidden;
}

.fieldset-content.expanded {
    max-height: 500px;
    overflow-y: auto;
    display: block;
}

.fieldset-content.collapsed {
    max-height: 0;
    overflow: hidden;
    display: none;
}

/* Custom scrollbar for fieldset content */
.fieldset-content::-webkit-scrollbar {
    width: 6px;
}
.fieldset-content::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 3px;
}
.fieldset-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.38);
    border-radius: 4px;
}
.fieldset-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.54);
}

/* Arrow rotation - no animation */
.collapse-arrow {
    /* No transition for instant feedback */
}

.collapse-arrow.collapsed {
    transform: rotate(-90deg);
}

.collapse-arrow.expanded {
    transform: rotate(0deg);
}

/* Neumorphic preset cards */
.glass-preset {
    background: #f0f0f3;
    border: none;
    border-radius: 16px;
    box-shadow: 
        8px 8px 16px rgba(174, 174, 192, 0.4),
        -8px -8px 16px rgba(255, 255, 255, 0.9);
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    color: #2d3748;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 500;
    padding: 24px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin: 12px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.glass-preset:hover {
    box-shadow: 
        12px 12px 24px rgba(174, 174, 192, 0.45),
        -12px -12px 24px rgba(255, 255, 255, 0.95);
    transform: translateY(-6px);
    background: #f8f8fb;
}

.glass-preset:active {
    box-shadow: 
        4px 4px 8px rgba(174, 174, 192, 0.5),
        -4px -4px 8px rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

/* Neumorphic selected template */
.glass-preset.template-selected {
    background: #e8e8ed;
    box-shadow: 
        inset 6px 6px 12px rgba(174, 174, 192, 0.3),
        inset -6px -6px 12px rgba(255, 255, 255, 0.8);
    color: #667eea;
    font-weight: 600;
    transform: translateY(-2px);
}

.glass-preset.template-selected:hover {
    background: #e0e0e5;
    box-shadow: 
        inset 4px 4px 8px rgba(174, 174, 192, 0.4),
        inset -4px -4px 8px rgba(255, 255, 255, 0.9);
}

/* Modern share button styling */
.share-btn {
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.25);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    border-radius: 8px;
}

.share-btn:hover {
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.35);
    transform: translateY(-1px) scale(1.02);
}

.share-btn:active {
    transform: translateY(0) scale(1.01);
    box-shadow: 0 1px 4px rgba(147, 51, 234, 0.3);
}

/* Modern export button styling */
.export-btn {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    border-radius: 8px;
}

.export-btn:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px) scale(1.02);
}

.export-btn:active {
    transform: translateY(0) scale(1.01);
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.3);
}

/* Summary preview styling */
.summary-preview {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    margin-top: 0;
}

.summary-preview.show {
    opacity: 1;
    max-height: 100px;
    margin-top: 0.5rem;
}

/* High contrast modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* High contrast readable modal */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 480px;
    background: #ffffff;
    border: 2px solid rgba(148, 163, 184, 0.4);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 61;
    color: #1e293b;
}

.modal.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Modal shake animation */
.modal.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translate(-50%, -50%) scale(1) translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-50%, -50%) scale(1) translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translate(-50%, -50%) scale(1) translateX(5px); }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-content {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Side Drawer Styles */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 650px;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(15, 23, 42, 0.95) 0%,
        rgba(15, 23, 42, 0.9) 100%);
    backdrop-filter: blur(25px) saturate(200%);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 51;
    display: flex;
    flex-direction: column;
}

/* Responsive drawer width */
@media (max-width: 768px) {
    .drawer {
        width: 90%;
        max-width: 650px;
    }
}

.drawer.open {
    transform: translateX(0);
}

.drawer-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.drawer-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Drawer scrollbar */
.drawer-content::-webkit-scrollbar {
    width: 6px;
}

.drawer-content::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 3px;
}

.drawer-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 3px;
}

/* Hide scrollbars from input textboxes in drawer */
.drawer-content input[type="text"],
.drawer-content input[type="number"],
.drawer-content input[type="email"],
.drawer-content input[type="password"],
.drawer-content textarea,
.drawer-content select {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.drawer-content input[type="text"]::-webkit-scrollbar,
.drawer-content input[type="number"]::-webkit-scrollbar,
.drawer-content input[type="email"]::-webkit-scrollbar,
.drawer-content input[type="password"]::-webkit-scrollbar,
.drawer-content textarea::-webkit-scrollbar,
.drawer-content select::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

/* Help text styling - hidden by default */
.help-text {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.help-text.show {
    opacity: 1;
    max-height: 200px;
    transform: translateY(0);
    pointer-events: auto;
}

/* Field container for hover detection */
.field-container {
    position: relative;
}

/* Remove margins from second div child of field-container */
.field-container > div:nth-child(2) {
    margin: 0 !important;
}

/* YAML highlight overlay for field matching */
.yaml-highlight-overlay {
    position: absolute;
    background: rgba(255, 193, 7, 0.15);
    border: 2px solid rgba(255, 193, 7, 0.6);
    border-radius: 4px;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: all 0.2s ease;
    box-shadow: 
        0 0 0 1px rgba(255, 193, 7, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: subtle-pulse 2s infinite;
}

.yaml-highlight-overlay.active {
    opacity: 1;
}

@keyframes subtle-pulse {
    0%, 100% { 
        background: rgba(255, 193, 7, 0.15);
        border-color: rgba(255, 193, 7, 0.6);
    }
    50% { 
        background: rgba(255, 193, 7, 0.2);
        border-color: rgba(255, 193, 7, 0.8);
    }
}

/* Field container hover state */
.field-container:hover {
    position: relative;
}

.field-container:hover::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    pointer-events: none;
    z-index: 1;
}


/* Edit button for complex sections - same style as preset buttons */
.edit-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    box-shadow: 
        0 4px 16px rgba(31, 38, 135, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-button:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.08) 100%);
    box-shadow: 
        0 6px 20px rgba(31, 38, 135, 0.3),
        0 0 0 2px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-2px) scale(1.05);
}

/* Animated status indicator */
.status-indicator {
    position: relative;
    overflow: hidden;
}

.status-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

/* Delete button styling for navigation items */
.delete-yml-btn,
.delete-group-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-yml-btn:hover,
.delete-group-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-radius: 4px;
}

/* Navigation item actions container */
.nav-item-actions {
    transition: opacity 0.2s ease;
}

/* Like Button Styles */
.like-btn {
    position: relative;
    transition: all 0.3s ease;
}

.like-btn:hover {
    transform: scale(1.1);
}

.like-btn.liked {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #f87171 100%) !important;
    animation: heartbeat 1.2s ease-in-out infinite;
}

.like-btn.liked svg {
    fill: currentColor;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.5));
}

.like-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Heartbeat animation for liked state */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.1);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(1);
    }
}

/* Ensure proper spacing and layout for navigation items with actions */
.nav-template-item .yml-content {
    flex: 1;
    min-width: 0;
}

/* Show delete button when hovering over group header */
.nav-section-header:hover .delete-group-btn {
    opacity: 1;
}

/* Share Modal Styles */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-modal-overlay.show {
    opacity: 1;
}

.share-modal {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.share-modal-overlay.show .share-modal {
    transform: scale(1);
}

.share-modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.share-modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.share-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 1);
}

.share-modal-content {
    padding: 24px;
}

/* Form styling for share modal */
.form-field {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.share-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.share-input:focus {
    outline: none;
    border-color: rgba(147, 51, 234, 0.6);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.2);
}

.share-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.character-count {
    text-align: right;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
}

.share-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.notification-success {
    background: rgba(34, 197, 94, 0.9);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.notification-error {
    background: rgba(239, 68, 68, 0.9);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.notification-warning {
    background: rgba(245, 158, 11, 0.9);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.notification-info {
    background: rgba(59, 130, 246, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.3);
}