/* Custom styles for Project Portfolio Tracker */

/* Smooth scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

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

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

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

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Card hover effects */
.project-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Focus states */
input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: none;
    ring: 2px;
    ring-color: var(--primary-color, #3b82f6);
}

/* Loading spinner */
.spinner {
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 0.6s linear infinite;
}

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

/* Progress bar animation */
.progress-bar {
    transition: width 0.5s ease-out;
}

/* Status dot indicator */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.idea { background-color: #9ca3af; }
.status-dot.planning { background-color: #3b82f6; }
.status-dot.designing { background-color: #8b5cf6; }
.status-dot.developing { background-color: #eab308; }
.status-dot.testing { background-color: #f97316; }
.status-dot.published { background-color: #22c55e; }
.status-dot.maintaining { background-color: #14b8a6; }
.status-dot.deprecated { background-color: #ef4444; }
.status-dot.abandoned { background-color: #64748b; }

/* Tag/pill styles */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.tag:hover {
    filter: brightness(0.95);
}

/* Table row hover */
tr.hover-row:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

.dark tr.hover-row:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Modal backdrop blur */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

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

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background: #1f2937;
    color: white;
    border-radius: 0.25rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    z-index: 50;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

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

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .project-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Emoji display fix */
.emoji {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

/* Custom selection color */
::selection {
    background-color: rgba(59, 130, 246, 0.3);
}

/* Transition utilities */
.transition-fast {
    transition-duration: 150ms;
}

.transition-normal {
    transition-duration: 200ms;
}

.transition-slow {
    transition-duration: 300ms;
}
