/* NovaBoard V2 - Multi-workspace styles with TURBO UX/UI */

.nova-v2-container {
    display: flex;
    height: calc(100vh - 180px);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(20, 20, 40, 0.2));
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 🎨 GLASSMORPHISM MODAL STYLES */
.nova-modal {
    background: rgba(15, 15, 35, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(139, 92, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.nova-modal::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.1),
        rgba(167, 139, 250, 0.05),
        rgba(139, 92, 246, 0.1));
    pointer-events: none;
    z-index: -1;
}

/* Context Menu Glassmorphism */
#board-context-menu,
#workspace-context-menu {
    background: rgba(10, 10, 25, 0.9) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.6),
        0 10px 10px -5px rgba(0, 0, 0, 0.4) !important;
}

/* Sidebar - Enhanced with smooth interactions */
.nova-v2-sidebar {
    width: 260px;
    background: linear-gradient(180deg, rgba(10, 10, 30, 0.6), rgba(5, 5, 20, 0.8));
    border-right: 1px solid rgba(139, 92, 246, 0.2);
    overflow-y: auto;
    transition: all 0.3s ease;
}

.nova-v2-sidebar:hover {
    border-right-color: rgba(139, 92, 246, 0.4);
    box-shadow: inset -1px 0 0 rgba(139, 92, 246, 0.2);
}

/* 🎯 SIDEBAR BOARD ITEMS - Enhanced hover effects */
.nova-v2-sidebar button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nova-v2-sidebar button:hover {
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.15),
        rgba(167, 139, 250, 0.1)) !important;
    transform: translateX(4px);
    box-shadow:
        0 4px 12px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nova-v2-sidebar button::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg,
        rgba(139, 92, 246, 0.6),
        rgba(139, 92, 246, 0.3));
    transition: width 0.3s ease;
    z-index: 0;
}

.nova-v2-sidebar button:hover::before {
    width: 3px;
}

.nova-v2-sidebar button > * {
    position: relative;
    z-index: 1;
}

/* 📱 RESPONSIVE DESIGN - Turbo mobile experience */
@media (max-width: 768px) {
    .nova-v2-container {
        flex-direction: column;
        height: calc(100vh - 120px);
    }

    .nova-v2-sidebar {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid rgba(139, 92, 246, 0.2);
        overflow-x: auto;
        overflow-y: hidden;
    }

    .nova-v2-sidebar .px-2.pb-4 {
        display: flex;
        gap: 1rem;
        padding: 1rem;
        min-width: max-content;
    }

    .nova-v2-sidebar .mb-3 {
        margin-bottom: 0;
        min-width: 200px;
    }

    .nova-v2-sidebar button:hover {
        transform: translateY(-2px) !important;
    }

    .nova-modal {
        margin: 1rem !important;
        max-height: calc(100vh - 2rem) !important;
        overflow-y: auto !important;
    }
}

/* 🎨 BUTTON ANIMATIONS - Micro-interactions */
.nova-v2-topbar button {
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.nova-v2-topbar button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.1),
        rgba(167, 139, 250, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nova-v2-topbar button:hover::before {
    opacity: 1;
}

.nova-v2-topbar button:hover {
    transform: translateY(-1px);
    box-shadow:
        0 10px 25px rgba(139, 92, 246, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

.nova-v2-topbar button:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

.nova-v2-sidebar::-webkit-scrollbar {
    width: 4px;
}

.nova-v2-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.nova-v2-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* Main area */
.nova-v2-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top bar */
.nova-v2-topbar {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Board */
.nova-v2-board {
    flex: 1;
    overflow: auto;
}

/* Columns */
.nova-v2-column {
    width: 280px;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 300px);
}

.nova-v2-column-new {
    background: transparent;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.nova-v2-column-header {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nova-v2-column-tasks {
    flex: 1;
    padding: 0.5rem;
    overflow-y: auto;
    min-height: 200px;
}

.nova-v2-column-tasks::-webkit-scrollbar {
    width: 4px;
}

.nova-v2-column-tasks::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Task cards */
.nova-v2-task {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: grab;
    transition: all 0.2s ease;
    position: relative;
    group: true;
}

.nova-v2-task:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nova-v2-task:active {
    cursor: grabbing;
}

.nova-v2-task.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}

/* Add task button */
.nova-v2-add-task {
    margin: 0.5rem;
    padding: 0.5rem;
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nova-v2-add-task:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.6);
}

/* Drag over effect */
.nova-v2-column-tasks.drag-over {
    background: rgba(59, 130, 246, 0.1);
    border: 2px dashed rgba(59, 130, 246, 0.3);
    border-radius: 6px;
}

/* 💫 TASK CARD GLASSMORPHISM ENHANCEMENT */
.nova-v2-task {
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.nova-v2-task::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.05),
        rgba(167, 139, 250, 0.02),
        rgba(139, 92, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.nova-v2-task:hover::before {
    opacity: 1;
}

/* 🎨 MODAL ANIMATION ENHANCEMENTS */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
}

.nova-modal .bg-gray-800 {
    animation: modalSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nova-modal.closing .bg-gray-800 {
    animation: modalSlideOut 0.2s ease-in-out forwards;
}

/* 🎯 CONTEXT MENU PERFECT STYLING */
#board-context-menu {
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

#board-context-menu button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#board-context-menu button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(139, 92, 246, 0.1),
        rgba(167, 139, 250, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

#board-context-menu button:hover::before {
    opacity: 1;
}

#board-context-menu button:hover {
    background: rgba(139, 92, 246, 0.1) !important;
    transform: translateX(2px);
}

/* 🌟 TEMPLATE SELECTION STYLING */
.template-option {
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.template-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg,
        rgba(139, 92, 246, 0.4),
        rgba(139, 92, 246, 0.2));
    transition: width 0.3s ease;
}

.template-option:hover::before {
    width: 4px;
}

.template-option:hover {
    background: rgba(139, 92, 246, 0.08) !important;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

/* 🔥 COLUMN HEADER ENHANCEMENTS */
.nova-v2-column-header {
    backdrop-filter: blur(8px);
    position: relative;
}

.nova-v2-column-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(139, 92, 246, 0.3),
        transparent);
}

/* 💎 ENHANCED SCROLLBARS */
.nova-v2-column-tasks::-webkit-scrollbar {
    width: 6px;
}

.nova-v2-column-tasks::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

.nova-v2-column-tasks::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.4);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.nova-v2-column-tasks::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.6);
}

/* 📱 RESPONSIVE ENHANCEMENTS */
@media (max-width: 768px) {
    .nova-v2-sidebar {
        position: fixed;
        left: -260px;
        height: 100vh;
        z-index: 100;
        transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    }

    .nova-v2-sidebar.open {
        left: 0;
    }

    .nova-v2-column {
        width: 240px;
        min-width: 240px;
    }

    .nova-modal {
        padding: 0.5rem !important;
    }

    .nova-modal .bg-gray-800 {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* 🎯 PERFECT FOCUS STATES */
.nova-v2-add-task:focus {
    outline: 2px solid rgba(139, 92, 246, 0.5);
    outline-offset: 2px;
}

button:focus-visible {
    outline: 2px solid rgba(139, 92, 246, 0.5);
    outline-offset: 2px;
}

/* ✨ LOADING STATES */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-top: 2px solid rgba(139, 92, 246, 1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 🎨 SUPER COLUMN COLORS - Dynamic styling */
.nova-v2-column[data-color]:not([data-color=""]) .nova-v2-column-header {
    position: relative;
}

.nova-v2-column[data-color]:not([data-color=""]) .nova-v2-column-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--column-color);
    border-radius: 2px 0 0 2px;
}

.nova-v2-column[data-color]:not([data-color=""]) .nova-v2-column-header::after {
    background: linear-gradient(90deg,
        var(--column-color),
        transparent,
        var(--column-color));
    opacity: 0.3;
}

/* 🚀 ENHANCED ADD COLUMN BUTTON */
.nova-v2-add-column-btn {
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.1),
        rgba(167, 139, 250, 0.05));
    border: 2px dashed rgba(139, 92, 246, 0.3);
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.nova-v2-add-column-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.2),
        rgba(167, 139, 250, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nova-v2-add-column-btn:hover {
    border-color: rgba(139, 92, 246, 0.6);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.2);
}

.nova-v2-add-column-btn:hover::before {
    opacity: 1;
}

/* 💫 WORKSPACE HOVER EFFECTS */
.workspace-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.workspace-item::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(139, 92, 246, 0.1),
        transparent);
    transition: left 0.5s ease;
}

.workspace-item:hover::before {
    left: 100%;
}

.workspace-item:hover {
    background: rgba(139, 92, 246, 0.05);
    transform: translateX(2px);
}

/* 🎯 COLUMN MANAGEMENT ICONS */
.column-actions {
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.2s ease;
}

.nova-v2-column-header:hover .column-actions {
    opacity: 1;
    transform: translateY(0);
}

.column-action-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.column-action-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    color: white;
    transform: scale(1.1);
}

/* 🔄 DRAG AND DROP ENHANCEMENTS */
.nova-v2-task.dragging {
    opacity: 0.6;
    transform: rotate(5deg) scale(1.05);
    z-index: 1000;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.nova-v2-column-tasks.drag-over {
    background: rgba(139, 92, 246, 0.1);
    border: 2px dashed rgba(139, 92, 246, 0.4);
    transform: scale(1.02);
}

/* 🎨 COLOR PICKER ENHANCEMENTS */
input[type="color"] {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 12px;
}

input[type="color"]:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* 💎 PREMIUM TASK PRIORITIES */
.task-priority-urgent {
    border-left: 4px solid #ef4444;
    background: linear-gradient(135deg,
        rgba(239, 68, 68, 0.1),
        rgba(239, 68, 68, 0.05));
}

.task-priority-high {
    border-left: 4px solid #f97316;
    background: linear-gradient(135deg,
        rgba(249, 115, 22, 0.1),
        rgba(249, 115, 22, 0.05));
}

.task-priority-med {
    border-left: 4px solid #eab308;
    background: linear-gradient(135deg,
        rgba(234, 179, 8, 0.1),
        rgba(234, 179, 8, 0.05));
}

.task-priority-low {
    border-left: 4px solid #22c55e;
    background: linear-gradient(135deg,
        rgba(34, 197, 94, 0.1),
        rgba(34, 197, 94, 0.05));
}

/* 🌟 ICON SELECTOR GRID */
.icon-selector-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.icon-selector-grid::-webkit-scrollbar {
    width: 4px;
}

.icon-selector-grid::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.4);
    border-radius: 2px;
}

.icon-option {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.icon-option:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.1);
    border-color: rgba(139, 92, 246, 0.5);
}

.icon-option.selected {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.8);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
}