/* Custom Styles for AI Notes */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Note card hover effect */
.note-card {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.note-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* AI Dialog animations */
.ai-dialog-enter {
    animation: slideInFromRight 0.3s ease-out;
}

.ai-dialog-exit {
    animation: slideOutToRight 0.3s ease-in;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Loading animation for AI response */
.typing-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #3b82f6;
    animation: typing 1.4s infinite;
}

.typing-indicator:nth-child(1) { animation-delay: 0s; }
.typing-indicator:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Markdown content styling */
.markdown-content {
    line-height: 1.6;
    color: #374151;
}

.markdown-content h1 {
    @apply text-2xl font-bold text-gray-800 mt-6 mb-4;
}

.markdown-content h2 {
    @apply text-xl font-semibold text-gray-800 mt-5 mb-3;
}

.markdown-content h3 {
    @apply text-lg font-medium text-gray-800 mt-4 mb-2;
}

.markdown-content p {
    @apply mb-3;
}

.markdown-content ul, .markdown-content ol {
    @apply ml-6 mb-3;
}

.markdown-content li {
    @apply mb-1;
}

.markdown-content code {
    @apply bg-gray-100 px-2 py-1 rounded text-sm font-mono;
}

.markdown-content pre {
    @apply bg-gray-100 p-4 rounded-lg overflow-x-auto mb-3;
}

.markdown-content pre code {
    @apply bg-transparent px-0 py-0;
}

.markdown-content blockquote {
    @apply border-l-4 border-gray-300 pl-4 text-gray-600 italic mb-3;
}

/* iOS-style button */
.ios-button {
    @apply px-4 py-2 rounded-xl font-medium transition-all duration-200;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.ios-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.ios-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

/* Textarea focus state */
#noteContent:focus {
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Custom modal backdrop */
.modal-backdrop {
    backdrop-filter: blur(5px);
}

/* Responsive text areas */
@media (max-width: 768px) {
    #aiDialog {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
        width: 90% !important;
        max-width: 400px;
    }
}

/* Focus states for better accessibility */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}