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

body {
    font-family: 'Space Grotesk', 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    min-height: 100vh;
    color: #f5e6d3;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(245, 230, 211, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 117, 93, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(245, 230, 211, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.app-layout {
    display: flex;
    height: 100vh;
    position: relative;
    z-index: 2;
}

.sidebar {
    width: 280px;
    background: linear-gradient(145deg, #2d2d2d 0%, #1a1a1a 100%);
    border-right: 3px solid #8b755d;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #8b755d, #a0896b, #8b755d);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
    max-width: calc(100% - 280px);
}

.main-content header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    background: rgba(245, 230, 211, 0.95);
    padding: 20px 32px;
    border-radius: 20px;
    border: 2px solid #8b755d;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transform: rotate(-0.5deg);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.main-content header:hover {
    transform: rotate(0deg) scale(1.02);
}

h1 {
    color: #1a1a1a;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: lowercase;
    position: relative;
}

#currentFolderTitle {
    color: #8b755d !important;
}



.add-btn {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #f5e6d3;
    border: 2px solid #8b755d;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(245, 230, 211, 0.1);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.add-btn:hover {
    background: linear-gradient(135deg, #8b755d 0%, #a0896b 100%);
    color: #1a1a1a;
    transform: translateY(-3px) rotate(1deg);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.add-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 230, 211, 0.2), transparent);
    transition: left 0.6s ease;
}

.add-btn:hover::before {
    left: 100%;
}

.ai-btn {
    background: linear-gradient(135deg, #8b755d 0%, #a0896b 100%);
    color: #f5e6d3;
    border: 2px solid #8b755d;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(245, 230, 211, 0.1);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.ai-btn:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #f5e6d3;
    transform: translateY(-3px) rotate(-1deg);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ai-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 230, 211, 0.2), transparent);
    transition: left 0.6s ease;
}

.ai-btn:hover::before {
    left: 100%;
}

.settings-btn {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: #f5e6d3;
    border: 2px solid #6c757d;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(245, 230, 211, 0.1);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.settings-btn:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    color: #f5e6d3;
    transform: translateY(-3px) rotate(-0.5deg);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.settings-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 230, 211, 0.2), transparent);
    transition: left 0.6s ease;
}

.settings-btn:hover::before {
    left: 100%;
}

.sign-out-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #ffffff;
    border: 2px solid #dc3545;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 4px 15px rgba(220, 53, 69, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.sign-out-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    color: #ffffff;
    transform: translateY(-3px) rotate(0.5deg);
    box-shadow: 
        0 8px 25px rgba(220, 53, 69, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.sign-out-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.sign-out-btn:hover::before {
    left: 100%;
}

.notes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
    padding: 0 16px;
    flex: 1;
    overflow-y: auto;
    height: calc(100vh - 200px);
}

.note {
    background: linear-gradient(145deg, #f5e6d3 0%, #e6d7c3 100%);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid #8b755d;
    position: relative;
    width: 200px;
    height: 120px;
    cursor: pointer;
    transform: rotate(0deg);
    overflow: hidden;
}

.note:nth-child(odd) {
    transform: rotate(1deg);
}

.note:nth-child(even) {
    transform: rotate(-0.5deg);
}


.note:hover {
    transform: rotate(0deg) translateY(-8px) scale(1.02);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: #a0896b;
}

.note h3 {
    color: #1a1a1a;
    margin-bottom: 8px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    font-family: 'Space Grotesk', monospace;
    text-transform: lowercase;
    position: relative;
}

.note h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #8b755d;
    border-radius: 1px;
}

.note-content {
    color: #2d2d2d;
    line-height: 1.5;
    margin-bottom: 8px;
    word-wrap: break-word;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
}

.note-content strong {
    font-weight: 700;
}

.note-content em {
    font-style: italic;
}

.note-content u {
    text-decoration: underline;
}

.note-content mark {
    padding: 2px 4px;
    border-radius: 4px;
}

.note-actions {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateY(10px);
}

.note:hover .note-actions {
    opacity: 1;
    transform: translateY(0);
}

.edit-btn, .delete-btn {
    border: 1px solid #8b755d;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 11px;
    font-family: 'Space Grotesk', monospace;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(245, 230, 211, 0.9);
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
}

.edit-btn:hover {
    background: linear-gradient(135deg, #8b755d 0%, #a0896b 100%);
    color: #f5e6d3;
    transform: translateY(-2px) rotate(2deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.delete-btn:hover {
    background: linear-gradient(135deg, #2d1810 0%, #1a1a1a 100%);
    color: #f5e6d3;
    transform: translateY(-2px) rotate(-2deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: #1a1a1a;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at center, rgba(26, 26, 26, 0.95) 0%, rgba(45, 45, 45, 0.98) 100%),
        linear-gradient(45deg, transparent 30%, rgba(139, 117, 93, 0.1) 50%, transparent 70%);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: linear-gradient(145deg, #f5e6d3 0%, #e6d7c3 100%);
    margin: 0;
    padding: 0;
    border-radius: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    border: none;
    animation: modalSlide 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: none;
    overflow: hidden;
    position: relative;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    border-bottom: 2px solid #8b755d;
    background: linear-gradient(135deg, #8b755d 0%, #a0896b 100%);
    position: relative;
    flex-shrink: 0;
}


.modal-header h3 {
    color: #f5e6d3;
    font-weight: 800;
    font-size: 2rem;
    font-family: 'Space Grotesk', monospace;
    text-transform: lowercase;
    margin-left: 40px;
    letter-spacing: -0.02em;
}

.close {
    color: #f5e6d3;
    font-size: 32px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 12px;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(245, 230, 211, 0.3);
}

.close:hover {
    color: #1a1a1a;
    background: #f5e6d3;
    transform: rotate(90deg) scale(1.1);
    border-color: #f5e6d3;
}

.modal-body {
    padding: 24px 32px 32px 32px;
    background: linear-gradient(145deg, #f5e6d3 0%, #e6d7c3 100%);
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

#noteTitle {
    width: 100%;
    padding: 20px 24px;
    border: 2px solid #8b755d;
    border-radius: 16px;
    margin-bottom: 20px;
    font-size: 20px;
    font-family: 'Space Grotesk', monospace;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    backdrop-filter: blur(5px);
    flex-shrink: 0;
}

#noteTitle:focus {
    outline: none;
    border-color: #a0896b;
    box-shadow: 
        0 0 0 3px rgba(160, 137, 107, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Legacy textarea styles - now handled by rich-editor */

#noteContent:focus {
    outline: none;
    border-color: #a0896b;
    box-shadow: 
        0 0 0 3px rgba(160, 137, 107, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
    flex-shrink: 0;
}

.ai-assist-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.save-actions {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.save-btn, .cancel-btn {
    padding: 16px 32px;
    border: 2px solid #8b755d;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.save-btn {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #f5e6d3;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.save-btn:hover {
    background: linear-gradient(135deg, #8b755d 0%, #a0896b 100%);
    color: #1a1a1a;
    transform: translateY(-3px) rotate(1deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.cancel-btn {
    background: rgba(245, 230, 211, 0.5);
    color: #1a1a1a;
    backdrop-filter: blur(5px);
}

.cancel-btn:hover {
    background: rgba(245, 230, 211, 0.9);
    transform: translateY(-3px) rotate(-1deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.note-date {
    position: absolute;
    bottom: 12px;
    left: 20px;
    font-size: 11px;
    color: #8b755d;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(245, 230, 211, 0.8);
    padding: 4px 8px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

/* Trash folder styling */
.trash-folder {
    border-top: 1px solid rgba(139, 117, 93, 0.3);
    margin-top: 8px;
    padding-top: 8px;
}

.trash-folder .folder-name {
    color: #a0896b;
    opacity: 0.8;
}

.trash-folder .folder-icon {
    opacity: 0.8;
}

/* Trashed notes styling */
.trashed-note {
    opacity: 0.7;
    background: linear-gradient(145deg, #e6d7c3 0%, #d4c5b1 100%);
}

.trashed-note:hover {
    opacity: 0.9;
}

.note-trashed {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 10px;
    color: #8b755d;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    background: rgba(139, 117, 93, 0.1);
    padding: 3px 6px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(139, 117, 93, 0.2);
}

.restore-btn {
    background: rgba(139, 117, 93, 0.2);
    color: #8b755d;
    border: 1px solid #8b755d;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 11px;
    font-family: 'Space Grotesk', monospace;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
}

.restore-btn:hover {
    background: linear-gradient(135deg, #8b755d 0%, #a0896b 100%);
    color: #f5e6d3;
    transform: translateY(-2px) rotate(1deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.delete-btn.permanent {
    background: rgba(139, 117, 93, 0.1);
    color: #8b755d;
    border-color: #8b755d;
}

.delete-btn.permanent:hover {
    background: linear-gradient(135deg, #2d1810 0%, #1a1a1a 100%);
    color: #f5e6d3;
    border-color: #1a1a1a;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 2px solid #8b755d;
    background: linear-gradient(135deg, #8b755d 0%, #a0896b 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    color: #f5e6d3;
    font-family: 'Space Grotesk', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: -0.02em;
}

.add-folder-btn {
    background: rgba(245, 230, 211, 0.2);
    color: #f5e6d3;
    border: 2px solid rgba(245, 230, 211, 0.3);
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-folder-btn:hover {
    background: #f5e6d3;
    color: #1a1a1a;
    transform: rotate(90deg) scale(1.1);
    border-color: #f5e6d3;
}

.folder-list {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.folder-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    position: relative;
    justify-content: space-between;
}

.folder-item:hover {
    background: rgba(245, 230, 211, 0.1);
    border-left-color: #8b755d;
}

.folder-item.active {
    background: rgba(245, 230, 211, 0.15);
    border-left-color: #a0896b;
}

.folder-item.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #a0896b;
    border-radius: 2px 0 0 2px;
}

.folder-icon {
    font-size: 1.2rem;
    margin-right: 12px;
}

.custom-folder-icon {
    width: 20px;
    height: 16px;
    position: relative;
    display: inline-block;
    margin-right: 12px;
}

.custom-folder-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #a89984 0%, #b5a695 100%);
    border-radius: 3px 3px 2px 2px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(245, 230, 211, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-folder-icon::after {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    width: 8px;
    height: 6px;
    background: linear-gradient(135deg, #b5a695 0%, #c4b5a6 100%);
    border-radius: 2px 2px 0 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Folder icon hover and active states */
.folder-item:hover .custom-folder-icon::before {
    background: linear-gradient(135deg, #c4b5a6 0%, #d2c3b4 100%);
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(245, 230, 211, 0.4);
}

.folder-item:hover .custom-folder-icon::after {
    background: linear-gradient(135deg, #d2c3b4 0%, #e0d1c2 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.folder-item.active .custom-folder-icon::before {
    background: linear-gradient(135deg, #f5e6d3 0%, #e6d7c3 100%);
    box-shadow:
        0 3px 6px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.folder-item.active .custom-folder-icon::after {
    background: linear-gradient(135deg, #e6d7c3 0%, #d4c5b1 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* File icon styles */
.custom-file-icon {
    width: 14px;
    height: 18px;
    position: relative;
    display: inline-block;
    margin-right: 12px;
}

.custom-file-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #a89984 0%, #b5a695 100%);
    border-radius: 2px 6px 2px 2px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(245, 230, 211, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-file-icon::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #8b755d 0%, #a0896b 100%);
    clip-path: polygon(0 0, 100% 100%, 0 100%);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Trash icon styles */
.custom-trash-icon {
    width: 16px;
    height: 18px;
    position: relative;
    display: inline-block;
    margin-right: 12px;
}

.custom-trash-icon::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: 12px;
    height: 14px;
    background: linear-gradient(135deg, #8b755d 0%, #a0896b 100%);
    border-radius: 0 0 2px 2px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(245, 230, 211, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-trash-icon::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 0;
    width: 16px;
    height: 3px;
    background: linear-gradient(135deg, #a0896b 0%, #b5a695 100%);
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* File and trash icon hover states */
.folder-item:hover .custom-file-icon::before,
.folder-item:hover .custom-trash-icon::before {
    background: linear-gradient(135deg, #c4b5a6 0%, #d2c3b4 100%);
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(245, 230, 211, 0.4);
}

.folder-item:hover .custom-file-icon::after,
.folder-item:hover .custom-trash-icon::after {
    background: linear-gradient(135deg, #d2c3b4 0%, #e0d1c2 100%);
    transform: translateY(-1px);
}

.folder-name {
    flex: 1;
    color: #f5e6d3;
    font-family: 'Space Grotesk', monospace;
    font-weight: 500;
    text-transform: lowercase;
}

.note-count {
    color: #8b755d;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    background: rgba(139, 117, 93, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.folder-select {
    width: 100%;
    padding: 16px;
    border: 2px solid #8b755d;
    border-radius: 16px;
    margin-bottom: 16px;
    font-size: 16px;
    font-family: 'Space Grotesk', monospace;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    backdrop-filter: blur(5px);
}

.folder-select:focus {
    outline: none;
    border-color: #a0896b;
    box-shadow: 
        0 0 0 3px rgba(160, 137, 107, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.note-folder {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 11px;
    color: #8b755d;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    background: rgba(139, 117, 93, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(139, 117, 93, 0.2);
}

.delete-folder-btn {
    background: transparent;
    border: none;
    color: #8b755d;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
    margin-left: 8px;
}

.folder-item:hover .delete-folder-btn {
    opacity: 1;
}

.delete-folder-btn:hover {
    background: rgba(245, 230, 211, 0.2);
    color: #f5e6d3;
    transform: scale(1.2);
}

.folder-name-input {
    width: 100%;
    padding: 20px;
    border: 2px solid #8b755d;
    border-radius: 16px;
    margin-bottom: 20px;
    font-size: 18px;
    font-family: 'Space Grotesk', monospace;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    backdrop-filter: blur(5px);
}

.folder-name-input:focus {
    outline: none;
    border-color: #a0896b;
    box-shadow: 
        0 0 0 3px rgba(160, 137, 107, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Drag and Drop Styles */
.note.dragging {
    opacity: 0.5;
    transform: rotate(5deg) scale(0.95);
    z-index: 1000;
    cursor: grabbing;
}

.note {
    cursor: grab;
}

.folder-item.drag-over {
    background: rgba(245, 230, 211, 0.3);
    border-left-color: #a0896b;
    transform: scale(1.02);
}

.folder-item.drag-over::after {
    content: 'drop here!';
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #a0896b;
    font-family: 'Space Grotesk', monospace;
    font-weight: 600;
    animation: pulse 0.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

/* Rich Text Editor Styles */
.editor-container {
    border: 2px solid #8b755d;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    max-height: 60vh;
    position: relative;
}

.editor-container:focus-within {
    border-color: #a0896b;
    box-shadow: 
        0 0 0 3px rgba(160, 137, 107, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.formatting-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #8b755d 0%, #a0896b 100%);
    border-bottom: 1px solid rgba(26, 26, 26, 0.1);
}

.sticky-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.toolbar-separator {
    width: 1px;
    height: 24px;
    background: rgba(245, 230, 211, 0.3);
    margin: 0 4px;
}

.format-btn {
    background: rgba(245, 230, 211, 0.2);
    border: 1px solid rgba(245, 230, 211, 0.3);
    color: #f5e6d3;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Space Grotesk', monospace;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.format-btn:hover {
    background: rgba(245, 230, 211, 0.4);
    border-color: rgba(245, 230, 211, 0.5);
    transform: translateY(-1px);
}

.format-btn.active {
    background: #f5e6d3;
    color: #1a1a1a;
    border-color: #f5e6d3;
    transform: translateY(-1px);
}

.color-picker {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(245, 230, 211, 0.3);
    border-radius: 8px;
    cursor: pointer;
    background: none;
    transition: all 0.3s ease;
    margin-left: 4px;
}

.color-picker:hover {
    border-color: rgba(245, 230, 211, 0.5);
    transform: translateY(-1px);
}

.font-size-select {
    background: rgba(245, 230, 211, 0.2);
    border: 1px solid rgba(245, 230, 211, 0.3);
    color: #f5e6d3;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Space Grotesk', monospace;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 80px;
    height: 40px;
}

.font-size-select:hover {
    background: rgba(245, 230, 211, 0.4);
    border-color: rgba(245, 230, 211, 0.5);
    transform: translateY(-1px);
}

.font-size-select:focus {
    outline: none;
    background: rgba(245, 230, 211, 0.4);
    border-color: rgba(245, 230, 211, 0.6);
}

.font-size-select option {
    background: #8b755d;
    color: #f5e6d3;
    font-family: 'Space Grotesk', monospace;
}

.rich-editor {
    padding: 32px;
    font-size: 16px;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.8;
    color: #1a1a1a !important;
    background: #ffffff !important;
    outline: none;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    box-sizing: border-box;
    min-height: 400px;
}

/* Scrollbar styling for rich editor */
.rich-editor::-webkit-scrollbar {
    width: 12px;
}

.rich-editor::-webkit-scrollbar-track {
    background: rgba(139, 117, 93, 0.1);
    border-radius: 6px;
}

.rich-editor::-webkit-scrollbar-thumb {
    background: #8b755d;
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.rich-editor::-webkit-scrollbar-thumb:hover {
    background: #a0896b;
    background-clip: padding-box;
}

.rich-editor:empty::before {
    content: attr(placeholder);
    color: #8b755d !important;
    font-style: italic;
    pointer-events: none;
}

/* Ensure all text inside rich editor is visible */
.rich-editor * {
    color: inherit !important;
}

.rich-editor p {
    color: #1a1a1a !important;
    margin: 8px 0;
}

.rich-editor div {
    color: #1a1a1a !important;
}

.rich-editor strong {
    font-weight: 700;
}

.rich-editor em {
    font-style: italic;
}

.rich-editor u {
    text-decoration: underline;
}

.rich-editor mark {
    padding: 2px 4px;
    border-radius: 4px;
}

/* Remove the old textarea styles since we're using contenteditable */
#noteContent.rich-editor {
    border: none;
    resize: none;
    background: transparent;
    margin-bottom: 0;
}

#noteContent.rich-editor:focus {
    outline: none;
    border: none;
    box-shadow: none;
    transform: none;
}

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 3px solid #8b755d;
    }
    
    .sidebar::before {
        width: 100%;
        height: 4px;
        bottom: 0;
        right: 0;
        background: linear-gradient(90deg, #8b755d, #a0896b, #8b755d);
    }
    
    .main-content {
        max-width: 100%;
        padding: 10px;
    }
    
    .notes-container {
        grid-template-columns: 1fr;
        height: calc(100vh - 350px);
    }
    
    .main-content header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .folder-list {
        flex-direction: row;
        overflow-x: auto;
        padding: 8px 16px;
    }
    
    .folder-item {
        min-width: 120px;
        border-left: none;
        border-bottom: 4px solid transparent;
    }
    
    .folder-item:hover {
        border-bottom-color: #8b755d;
    }
    
    .folder-item.active {
        border-bottom-color: #a0896b;
    }
    
    /* Mobile modal adjustments - already fullscreen */
    .modal-content {
        width: 100vw;
        height: 100vh;
        margin: 0;
    }
    
    .rich-editor {
        min-height: 0;
        max-height: none;
        padding: 20px;
        font-size: 16px;
    }
    
    .formatting-toolbar {
        flex-wrap: wrap;
        gap: 6px;
        padding: 12px 16px;
        overflow-x: auto;
    }
    
    .format-btn {
        min-width: 36px;
        height: 36px;
        font-size: 14px;
        padding: 6px 10px;
        flex-shrink: 0;
    }
    
    .color-picker {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }
    
    .toolbar-separator {
        display: none;
    }
    
    .font-size-select {
        min-width: 70px;
        height: 36px;
        font-size: 12px;
        padding: 6px 8px;
        flex-shrink: 0;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-header h3 {
        font-size: 1.5rem;
        margin-left: 20px;
    }
    
    .close {
        width: 48px;
        height: 48px;
        font-size: 28px;
    }
    
    .modal-body {
        padding: 16px 20px 20px 20px;
    }
    
    #noteTitle {
        font-size: 18px;
        padding: 16px 20px;
        margin-bottom: 16px;
    }

    /* Mobile toolbar improvements */
    .sticky-toolbar {
        padding: 8px 12px;
        gap: 6px;
        flex-wrap: wrap;
    }

    .toolbar-group {
        gap: 4px;
    }

    .format-btn {
        min-width: 32px;
        height: 32px;
        padding: 4px 8px;
        font-size: 12px;
    }

    .font-size-select, .inline-font-select {
        min-width: 80px;
        font-size: 12px;
        padding: 4px 8px;
    }

    .color-picker {
        width: 28px;
        height: 28px;
    }

    .toolbar-separator {
        display: none;
    }
}

/* Chillian mascot styles */
.header-logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-chillian {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

.editor-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
}

.formatting-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(139, 117, 93, 0.1);
    border: 2px solid rgba(139, 117, 93, 0.2);
    border-radius: 12px;
    margin-bottom: 12px;
    backdrop-filter: blur(5px);
}

.inline-font-select {
    padding: 8px 12px;
    border: 2px solid #8b755d;
    border-radius: 8px;
    font-family: 'Space Grotesk', monospace;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    min-width: 140px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.inline-font-select:focus {
    outline: none;
    border-color: #a0896b;
    box-shadow: 0 0 0 2px rgba(160, 137, 107, 0.2);
}

.format-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid #8b755d;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    cursor: pointer;
    font-family: 'Space Grotesk', monospace;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.format-btn:hover {
    background: #8b755d;
    color: #f5e6d3;
    transform: translateY(-1px);
}

.format-btn.active {
    background: #a0896b;
    color: #f5e6d3;
    border-color: #a0896b;
}

.editor-mascot {
    position: absolute;
    bottom: 20px;
    right: 20px;
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
}

.editor-chillian {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(1px 1px 3px rgba(0, 0, 0, 0.3));
    transition: opacity 0.3s ease;
}

.rich-editor:focus + .editor-mascot .editor-chillian {
    opacity: 0.3;
}

/* AI Assist Panel Styles */
.ai-assist-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
    pointer-events: auto;
    z-index: 2;
}

.enhance-btn, .quiz-btn {
    background: linear-gradient(135deg, #8b755d 0%, #a0896b 100%);
    color: #f5e6d3;
    border: 2px solid #8b755d;
    padding: 16px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(245, 230, 211, 0.1);
    position: relative;
    overflow: hidden;
}

.enhance-btn:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #f5e6d3;
    transform: translateY(-3px) rotate(1deg);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.quiz-btn:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #f5e6d3;
    transform: translateY(-3px) rotate(-1deg);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.enhance-btn::before, .quiz-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 230, 211, 0.2), transparent);
    transition: left 0.6s ease;
}

.enhance-btn:hover::before, .quiz-btn:hover::before {
    left: 100%;
}

/* AI Modal Styles */
.ai-modal-content {
    background: linear-gradient(145deg, #f5e6d3 0%, #e6d7c3 100%);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ai-chillian {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
    animation: chillianPulse 2s ease-in-out infinite;
}

@keyframes chillianPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.ai-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-message, .user-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(139, 117, 93, 0.2);
    backdrop-filter: blur(5px);
}

.user-message {
    background: rgba(139, 117, 93, 0.1);
    border-color: rgba(139, 117, 93, 0.3);
    flex-direction: row-reverse;
    margin-left: 40px;
}

.ai-message {
    margin-right: 40px;
}

.message-avatar {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.2));
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    color: #1a1a1a;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.6;
    font-size: 14px;
}

.message-content h3 {
    color: #8b755d;
    font-family: 'Space Grotesk', monospace;
    font-weight: 700;
    margin-bottom: 8px;
}

.message-content ul, .message-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.message-content li {
    margin-bottom: 4px;
}

.chat-input-container {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 2px solid rgba(139, 117, 93, 0.2);
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #8b755d;
    border-radius: 25px;
    font-size: 16px;
    font-family: 'Space Grotesk', monospace;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-input:focus {
    outline: none;
    border-color: #a0896b;
    box-shadow: 
        0 0 0 3px rgba(160, 137, 107, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.send-btn {
    background: linear-gradient(135deg, #8b755d 0%, #a0896b 100%);
    color: #f5e6d3;
    border: 2px solid #8b755d;
    padding: 16px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.send-btn:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.send-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Quiz Modal Styles */
.quiz-modal-content {
    background: linear-gradient(145deg, #f5e6d3 0%, #e6d7c3 100%);
    display: flex;
    flex-direction: column;
    height: 90vh;
    max-height: 90vh;
    width: 90vw;
    max-width: 1200px;
    margin: 5vh auto;
    border-radius: 20px;
    border: 2px solid #8b755d;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.quiz-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

#quizContent {
    padding: 0;
}

#quizContent .quiz-container {
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Settings Modal Styles */
.settings-modal-content {
    background: linear-gradient(145deg, #f5e6d3 0%, #e6d7c3 100%);
    display: flex;
    flex-direction: column;
    height: 85vh;
    max-height: 85vh;
    width: 80vw;
    max-width: 900px;
    margin: 7.5vh auto;
    border-radius: 20px;
    border: 2px solid #8b755d;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.settings-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 32px 32px 32px;
}

.settings-section {
    margin-bottom: 32px;
}

.settings-section h4 {
    color: #1a1a1a;
    font-family: 'Space Grotesk', monospace;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #8b755d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.setting-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-group label {
    color: #2d2d2d;
    font-family: 'Space Grotesk', monospace;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.setting-select, .setting-input {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #8b755d;
    border-radius: 12px;
    padding: 12px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #1a1a1a;
    transition: all 0.3s ease;
}

.setting-select:focus, .setting-input:focus {
    outline: none;
    border-color: #a0896b;
    box-shadow: 0 0 0 3px rgba(160, 137, 107, 0.2);
    transform: translateY(-2px);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-slider {
    flex: 1;
    height: 8px;
    background: rgba(139, 117, 93, 0.2);
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
}

.setting-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #8b755d 0%, #a0896b 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.setting-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.setting-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #8b755d 0%, #a0896b 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#fontSizeValue {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: #8b755d;
    min-width: 40px;
    text-align: center;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex-direction: row !important;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #8b755d;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: #f5e6d3;
    font-weight: bold;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, #8b755d 0%, #a0896b 100%);
    border-color: #8b755d;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.setting-description {
    color: #6c757d;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-style: italic;
    margin-top: 4px;
}

.setting-btn {
    background: linear-gradient(135deg, #8b755d 0%, #a0896b 100%);
    color: #f5e6d3;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-family: 'Space Grotesk', monospace;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.setting-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.settings-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    border-top: 2px solid rgba(139, 117, 93, 0.2);
    margin-top: 32px;
}

.reset-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
    border: 2px solid #dc3545;
    padding: 14px 28px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.reset-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

/* Theme-specific overrides */
.no-animations * {
    animation: none !important;
    transition: none !important;
}

/* CSS Custom Properties for theme support */
:root {
    --primary-bg: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    --secondary-bg: linear-gradient(145deg, #2d2d2d 0%, #1a1a1a 100%);
    --accent-color: #8b755d;
    --accent-light: #a0896b;
    --text-primary: #f5e6d3;
    --text-secondary: #2d2d2d;
    --card-bg: linear-gradient(145deg, #f5e6d3 0%, #e6d7c3 100%);
    --border-color: #8b755d;
}

/* Theme classes will override these variables */
.theme-dark {
    --primary-bg: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    --secondary-bg: linear-gradient(145deg, #1a1a1a 0%, #0a0a0a 100%);
    --card-bg: linear-gradient(145deg, #2a2a2a 0%, #1f1f1f 100%);
    --text-primary: #e0e0e0;
    --accent-color: #4a4a4a;
    --accent-light: #6a6a6a;
    --border-color: #4a4a4a;
}

/* Nested folder styles */
.add-subfolder-btn {
    background: none;
    border: none;
    color: #8b755d;
    font-size: 14px;
    padding: 2px 6px;
    margin-left: 4px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.folder-item:hover .add-subfolder-btn {
    opacity: 1;
}

.add-subfolder-btn:hover {
    background-color: rgba(139, 117, 93, 0.1);
    color: #a0896b;
}

.folder-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    font-size: 10px;
    color: #8b755d;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    user-select: none;
}

.folder-toggle:hover {
    background: rgba(139, 117, 93, 0.2);
    color: #f5e6d3;
}

.folder-toggle-spacer {
    width: 24px;
    height: 16px;
    display: inline-block;
}
/* API Key Interface */
.api-key-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.toggle-btn {
    background: rgba(139, 117, 93, 0.2);
    border: 1px solid #8b755d;
    border-radius: 6px;
    padding: 8px 12px;
    color: #8b755d;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    background: rgba(139, 117, 93, 0.3);
    transform: translateY(-1px);
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(139, 117, 93, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(139, 117, 93, 0.2);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator.online {
    background: #4CAF50;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
}

.status-indicator.offline {
    background: #757575;
}

.status-indicator.warning {
    background: #FF9800;
    box-shadow: 0 0 6px rgba(255, 152, 0, 0.6);
}

.status-text {
    color: #8b755d;
    font-family: "JetBrains Mono", monospace;
    font-size: 13px;
    font-weight: 500;
}

.setting-description a {
    color: #8b755d;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.setting-description a:hover {
    color: #a0896b;
}
