/* BrainMatrix v1.8 - Custom Styles */

/* Matrix Grid Background */
.matrix-grid {
    background-image: 
        linear-gradient(rgba(212, 175, 55, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: matrixPulse 20s ease-in-out infinite;
}

@keyframes matrixPulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.15; }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

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

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

/* Card Hover Effects */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.1);
}

.chu-thuyet-card {
    transition: all 0.3s ease;
}

.chu-thuyet-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.15);
}

.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.05);
}

/* Navigation Active State */
.nav-link.active {
    background: rgba(212, 175, 55, 0.1);
    color: #D4AF37;
}

/* Form Inputs Focus */
input:focus, select:focus, textarea:focus {
    border-color: #D4AF37 !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Button Hover Effects */
button {
    transition: all 0.2s ease;
}

/* Idea Card Styles */
.idea-card {
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid rgba(31, 31, 46, 0.5);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.2s ease;
}

.idea-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
}

.idea-card.new-ideal {
    border-left: 3px solid #10b981;
}

.idea-card.old-idea {
    border-left: 3px solid #f59e0b;
}

.idea-card.delete-idea {
    border-left: 3px solid #ef4444;
    opacity: 0.7;
}

/* Task Card Styles */
.task-card {
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid rgba(31, 31, 46, 0.5);
    padding: 16px;
    transition: all 0.2s ease;
}

.task-card:hover {
    background: rgba(18, 18, 26, 0.9);
}

.task-card.completed {
    opacity: 0.6;
}

.task-card.completed .task-title {
    text-decoration: line-through;
}

/* Note Card Styles */
.note-card {
    background: rgba(18, 18, 26, 0.9);
    border: 1px solid rgba(31, 31, 46, 0.5);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}

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

/* Điều Kiện Card */
.dk-card {
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid rgba(31, 31, 46, 0.5);
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.dk-card:hover {
    background: rgba(18, 18, 26, 0.9);
}

.dk-card.met {
    border-left: 3px solid #10b981;
}

.dk-card.not-met {
    border-left: 3px solid #ef4444;
}

/* Vương Sản Card */
.vuong-san-card {
    padding: 16px;
    transition: all 0.2s ease;
}

.vuong-san-card:hover {
    background: rgba(18, 18, 26, 0.5);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-draft {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.status-ai_tested {
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
}

.status-production {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

/* Priority Indicators */
.priority-5 { color: #ef4444; }
.priority-4 { color: #f59e0b; }
.priority-3 { color: #D4AF37; }
.priority-2 { color: #10b981; }
.priority-1 { color: #6b7280; }

/* Category Tags */
.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
}

.category-brainfarm { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.category-thucchung { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.category-insight { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
.category-khac { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }

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

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in {
    animation: slideIn 0.3s ease forwards;
}

/* Modal Animations */
.modal-enter {
    animation: modalEnter 0.3s ease forwards;
}

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

/* Pulse Animation for Important Elements */
.pulse-gold {
    animation: pulseGold 2s infinite;
}

@keyframes pulseGold {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(212, 175, 55, 0);
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(212, 175, 55, 0.1);
    border-top-color: #D4AF37;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
    .stat-card {
        padding: 12px 16px;
    }
    
    .stat-card .text-3xl {
        font-size: 1.5rem;
    }
    
    h1.text-5xl {
        font-size: 2.5rem;
    }
    
    h2.text-4xl {
        font-size: 2rem;
    }
    
    /* Quick Actions buttons on mobile */
    section#quick-access .grid.grid-cols-2 button {
        padding: 12px 8px;
    }
    
    section#quick-access .grid.grid-cols-2 button span {
        font-size: 0.75rem;
    }
    
    /* Modal responsive */
    .fixed.inset-0 > div {
        margin: 16px;
        max-height: calc(100vh - 32px);
    }
    
    /* Task card mobile */
    .task-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .task-card > button {
        align-self: flex-end;
    }
    
    /* Vuong san card mobile */
    .vuong-san-card {
        flex-direction: column;
        gap: 12px;
    }
    
    .vuong-san-card > div:last-child {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    section#quick-access .grid.grid-cols-2.md\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .text-4xl {
        font-size: 1.75rem;
    }
    
    .text-3xl {
        font-size: 1.5rem;
    }
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: #1f1f2e;
    color: #e0e0e0;
    font-size: 0.75rem;
    border-radius: 4px;
    white-space: nowrap;
    margin-bottom: 4px;
}

/* Print Styles */
@media print {
    nav, footer, button, .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .bg-brain-card, .bg-brain-dark, .bg-brain-darker {
        background: white !important;
        border-color: #ddd !important;
    }
    
    .text-white, .text-brain-text, .text-brain-gold {
        color: black !important;
    }
}

/* Selection */
::selection {
    background: rgba(212, 175, 55, 0.3);
    color: white;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 2px;
}

/* Checkbox Custom */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #1f1f2e;
    border-radius: 4px;
    background: #0a0a0f;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
    background: #D4AF37;
    border-color: #D4AF37;
}

input[type="checkbox"]:checked::after {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0a0f;
    font-size: 14px;
    font-weight: bold;
}

/* Number Input Spinner */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: #1f1f2e;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #D4AF37, #f59e0b);
    transition: width 0.5s ease;
}

/* Glass Effect */
.glass {
    background: rgba(18, 18, 26, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #D4AF37, #f59e0b, #D4AF37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glow Effects */
.glow-gold {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.glow-accent {
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
}

/* Empty State */
.empty-state {
    padding: 40px;
    text-align: center;
    color: #888888;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}
