/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Note Card Animations */
.note-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.4s ease-out;
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Color Classes for Notes */
.note-yellow { background-color: #fef3c7; }
.note-blue { background-color: #dbeafe; }
.note-green { background-color: #dcfce7; }
.note-pink { background-color: #fce7f3; }
.note-purple { background-color: #f3e8ff; }

/* Modal Animation */
.modal-enter {
    opacity: 1;
    pointer-events: auto;
}

.modal-enter #modalContent {
    transform: scale(1);
    opacity: 1;
}

/* Line Clamp for note content */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Selection Ring for Colors */
.color-btn.selected {
    border-color: #374151;
    transform: scale(1.1);
}

/* Pin Animation */
.pin-active {
    color: #f59e0b !important;
    transform: rotate(-45deg);
}

/* AI Badge Animation */
@keyframes sparkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.note-card .bg-purple-600 {
    animation: sparkle 2s ease-in-out infinite;
}

/* Loading Spinner */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mode Toggle Transition */
#manualModeBtn, #autoModeBtn {
    transition: all 0.2s ease;
}

/* Generated Preview Scrollbar */
#generatedPreview ::-webkit-scrollbar {
    width: 6px;
}

#generatedPreview ::-webkit-scrollbar-thumb {
    background: #c4b5fd;
    border-radius: 3px;
}

/* Filter Button Active State */
.filter-btn.active {
    background-color: #111827;
    color: white;
}

/* Focus styles */
input:focus, textarea:focus {
    outline: none;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .note-card {
        margin-bottom: 1rem;
    }
}

/* Smooth transitions */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}