/* Custom Styles and Enhancements for NexusAI Task Master */

:root {
    --bg-dark: #0f172a;
    --surface-dark: #1e293b;
    --border-dark: #334155;
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-purple: #8b5cf6;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.4);
}

/* Glassmorphism helpers */
.glass {
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(30, 41, 59, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Priority Badges */
.badge-critical {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-high {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}
.badge-medium {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}
.badge-low {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 25px rgba(99, 102, 241, 0.6); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.animate-shake {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.animate-fade-in {
    animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pulse-glow {
    animation: pulseGlow 2.5s infinite;
}

/* Task Checkbox */
.task-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.375rem;
    border: 2px solid #64748b;
    outline: none;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}
.task-checkbox:checked {
    background-color: #10b981;
    border-color: #10b981;
}
.task-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Drag and Drop styling */
.kanban-column {
    min-height: calc(100vh - 230px);
}
.kanban-task-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    cursor: grab;
}
.kanban-task-card:active {
    cursor: grabbing;
}
.kanban-task-card.dragging {
    opacity: 0.4;
    transform: scale(0.98);
}
.drop-zone-active {
    background: rgba(99, 102, 241, 0.08) !important;
    border: 2px dashed rgba(99, 102, 241, 0.4) !important;
}

/* Toast container */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast-msg {
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Shimmer loading effect */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Markdown prose styling */
.prose-dark {
    color: #cbd5e1;
}
.prose-dark h1, .prose-dark h2, .prose-dark h3 {
    color: #f8fafc;
    font-weight: 600;
    margin-top: 0.8rem;
    margin-bottom: 0.4rem;
}
.prose-dark ul, .prose-dark ol {
    margin-left: 1.25rem;
    margin-bottom: 0.5rem;
}
.prose-dark li {
    margin-bottom: 0.25rem;
}
.prose-dark code {
    background: #0f172a;
    padding: 0.15rem 0.3rem;
    border-radius: 0.25rem;
    font-size: 0.85em;
    color: #38bdf8;
}
.prose-dark pre {
    background: #0f172a;
    padding: 0.75rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 0.5rem 0;
}
