/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Base styles */
* { 
    font-family: 'Inter', sans-serif; 
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: #111827;
    color: #ffffff;
    overflow-x: hidden;
}

.dark { 
    color-scheme: dark; 
}

/* Glassmorphism effects */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animated gradients */
.gradient-bg {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Neon glow effects */
.neon-blue { 
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5); 
}

.neon-purple { 
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.5); 
}

.neon-green { 
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.5); 
}

.neon-red { 
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5); 
}

/* Floating animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float { 
    animation: float 6s ease-in-out infinite; 
}

/* Pulse animations */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.6); }
}

.pulse-glow { 
    animation: pulse-glow 2s ease-in-out infinite; 
}

/* Custom scrollbar */
::-webkit-scrollbar { 
    width: 8px; 
}

::-webkit-scrollbar-track { 
    background: rgba(0,0,0,0.1); 
    border-radius: 10px; 
}

::-webkit-scrollbar-thumb { 
    background: linear-gradient(45deg, #667eea, #764ba2); 
    border-radius: 10px; 
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #667eea rgba(0,0,0,0.1);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .mobile-hidden { 
        display: none !important; 
    }
    
    .mobile-full { 
        width: 100% !important; 
    }
    
    .mobile-text-sm { 
        font-size: 0.875rem !important; 
    }
    
    .mobile-p-4 { 
        padding: 1rem !important; 
    }
    
    .mobile-gap-4 { 
        gap: 1rem !important; 
    }
    
    .mobile-grid-1 { 
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important; 
    }
    
    .mobile-grid-2 { 
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important; 
    }
    
    .sidebar-mobile { 
        position: fixed !important;
        left: -100% !important;
        transition: left 0.3s ease !important;
        z-index: 1000 !important;
        height: 100vh !important;
        top: 0 !important;
        width: 288px !important;
    }
    
    .sidebar-mobile.open { 
        left: 0 !important; 
    }
    
    .mobile-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    
    .mobile-overlay.show { 
        display: block; 
    }
}

/* Particle background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

#particleCanvas {
    width: 100%;
    height: 100%;
}

/* Task card hover effects */
.task-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.task-card:hover::before { 
    left: 100%; 
}

.task-card:hover { 
    transform: translateY(-8px) scale(1.02); 
}

/* Progress rings */
.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.35s;
    transform-origin: 50% 50%;
}

/* Notification styles */
.notification {
    transform: translateX(400px);
    transition: transform 0.3s ease-in-out;
}

.notification.show {
    transform: translateX(0);
}

/* Calendar day hover */
.calendar-day {
    transition: all 0.3s ease;
    cursor: pointer;
}

.calendar-day:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1)) !important;
}

/* Sidebar icons */
.nav-icon {
    transition: all 0.3s ease;
}

.nav-btn:hover .nav-icon {
    transform: scale(1.2) rotate(5deg);
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top: 3px solid #3b82f6;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Kanban board styles */
.kanban-column {
    min-height: 500px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.kanban-column[data-status="todo"] {
    border-left: 4px solid #6b7280;
}

.kanban-column[data-status="inprogress"] {
    border-left: 4px solid #f59e0b;
}

.kanban-column[data-status="done"] {
    border-left: 4px solid #10b981;
}

/* Drag and drop styles */
.task-card[draggable="true"] {
    cursor: grab;
}

.task-card[draggable="true"]:active {
    cursor: grabbing;
}

.kanban-column.drag-over {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
}

/* Time tracker styles */
.time-display {
    font-family: 'Courier New', monospace;
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .time-display {
        font-size: 2rem;
    }
}

/* Achievement badges */
.achievement-badge {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Button hover effects */
button {
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

/* Form input focus effects */
input:focus, textarea:focus, select:focus {
    outline: none;
    ring: 2px;
    ring-color: rgba(59, 130, 246, 0.5);
    border-color: transparent;
}

/* Modal backdrop blur */
.modal-backdrop {
    backdrop-filter: blur(8px);
}

/* Priority colors */
.priority-high {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    color: white;
}

.priority-medium {
    background: linear-gradient(45deg, #f59e0b, #d97706);
    color: white;
}

.priority-low {
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
}

/* Category colors */
.category-work {
    background: linear-gradient(45deg, #3b82f6, #2563eb);
    color: white;
}

.category-personal {
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
    color: white;
}

.category-health {
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
}

.category-learning {
    background: linear-gradient(45deg, #f59e0b, #d97706);
    color: white;
}

/* Status indicators */
.status-todo {
    background: #6b7280;
    color: white;
}

.status-inprogress {
    background: #f59e0b;
    color: white;
}

.status-done {
    background: #10b981;
    color: white;
}

/* Chart styles */
.chart-bar {
    transition: all 0.3s ease;
}

.chart-bar:hover {
    transform: scaleY(1.1);
    filter: brightness(1.2);
}

/* Progress bar animations */
.progress-bar {
    transition: width 0.5s ease-in-out;
}

/* Tooltip styles */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::before {
    opacity: 1;
}

/* Login page specific styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.login-form {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 28rem;
    position: relative;
    z-index: 10;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Navigation active state */
.nav-btn.active {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

/* Responsive grid layouts */
@media (max-width: 640px) {
    .grid-responsive {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .grid-responsive {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 769px) {
    .grid-responsive {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Animation delays for staggered effects */
.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Slide in animations */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out forwards;
}

/* Scale in animation */
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.scale-in {
    animation: scaleIn 0.3s ease-out forwards;
}

/* Glow effect for important elements */
.glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    transition: box-shadow 0.3s ease;
}

.glow:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

/* Text gradient effects */
.text-gradient {
    background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-blue {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-purple {
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-green {
    background: linear-gradient(45deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3b82f6;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Success/Error states */
.success {
    border-left: 4px solid #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.error {
    border-left: 4px solid #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.warning {
    border-left: 4px solid #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.info {
    border-left: 4px solid #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .glass {
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid #ffffff;
    }
    
    .glass-dark {
        background: rgba(0, 0, 0, 0.9);
        border: 2px solid #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .glass,
    .glass-dark {
        background: white !important;
        border: 1px solid #000 !important;
    }
}

/* Dark mode specific adjustments */
@media (prefers-color-scheme: dark) {
    body {
        background: #0f172a;
    }
}

/* Light mode fallback */
@media (prefers-color-scheme: light) {
    body {
        background: #f8fafc;
        color: #1e293b;
    }
    
    .glass {
        background: rgba(255, 255, 255, 0.8);
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .glass-dark {
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
}

/* Custom utility classes */
.backdrop-blur-xl {
    backdrop-filter: blur(24px);
}

.backdrop-blur-2xl {
    backdrop-filter: blur(40px);
}

.backdrop-blur-3xl {
    backdrop-filter: blur(64px);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styles */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}

/* Focus trap for modals */
.modal-focus-trap {
    position: fixed;
    inset: 0;
    z-index: 50;
}

/* Skeleton loading animation */
@keyframes skeleton {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton 1.5s infinite;
}

/* Responsive text sizes */
@media (max-width: 640px) {
    .text-responsive-sm { font-size: 0.875rem; }
    .text-responsive-base { font-size: 1rem; }
    .text-responsive-lg { font-size: 1.125rem; }
    .text-responsive-xl { font-size: 1.25rem; }
    .text-responsive-2xl { font-size: 1.5rem; }
    .text-responsive-3xl { font-size: 1.875rem; }
}

@media (min-width: 641px) {
    .text-responsive-sm { font-size: 1rem; }
    .text-responsive-base { font-size: 1.125rem; }
    .text-responsive-lg { font-size: 1.25rem; }
    .text-responsive-xl { font-size: 1.5rem; }
    .text-responsive-2xl { font-size: 2rem; }
    .text-responsive-3xl { font-size: 2.5rem; }
}

/* Container queries support */
@container (max-width: 400px) {
    .container-sm {
        padding: 0.5rem;
    }
}

@container (min-width: 401px) {
    .container-sm {
        padding: 1rem;
    }
}

/* Modern CSS Grid layouts */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.grid-auto-fill {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* Aspect ratio utilities */
.aspect-square {
    aspect-ratio: 1 / 1;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-photo {
    aspect-ratio: 4 / 3;
}

/* Modern button styles */
.btn-modern {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-modern:hover::before {
    left: 100%;
}

/* Improved accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

