/* Family Task Manager Styles */

/* Font setup */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Custom animations */
@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes slideInUp {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes fadeInScale {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Login screen animations */
.login-card {
    animation: bounceIn 0.6s ease-out;
}

.profile-button {
    animation: slideInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.profile-button:nth-child(1) { animation-delay: 0.1s; }
.profile-button:nth-child(2) { animation-delay: 0.2s; }
.profile-button:nth-child(3) { animation-delay: 0.3s; }

/* Main app animations */
.tab-content {
    animation: fadeInScale 0.3s ease-out;
}

.dashboard-card {
    transition: all 0.3s ease;
    animation: slideInUp 0.4s ease-out;
}

.dashboard-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-card:nth-child(2) { animation-delay: 0.2s; }
.dashboard-card:nth-child(3) { animation-delay: 0.3s; }

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Task animations */
.task-item {
    animation: slideInUp 0.3s ease-out;
    transition: all 0.3s ease;
}

.task-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Message animations */
.message-item {
    animation: slideInUp 0.2s ease-out;
}

.message-sent {
    animation: slideInUp 0.2s ease-out;
}

/* Button hover effects */
.btn-gradient {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: linear-gradient(45deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Notification styles */
.notification {
    backdrop-filter: blur(10px);
    border-left: 4px solid currentColor;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Profile selection styling */
.profile-selector label {
    transition: all 0.2s ease;
}

.profile-selector label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-selector input[type="radio"]:checked + label {
    border-color: #8b5cf6 !important;
    background-color: #f3f4f6 !important;
    transform: scale(1.02);
}

/* Login form animations */
.login-form-container {
    animation: slideInUp 0.4s ease-out;
}

#selectedUserInfo {
    animation: fadeInScale 0.3s ease-out;
}

/* Password input styling */
#passwordInput:focus {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Responsive profile grid */
@media (max-width: 480px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

/* Progress bars */
.progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    transition: width 0.5s ease;
}

/* Task status indicators */
.status-pending {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    color: #e17055;
}

.status-progress {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
}

.status-completed {
    background: linear-gradient(135deg, #55a3ff, #28a745);
    color: white;
}

/* Priority indicators */
.priority-low {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
}

.priority-medium {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    color: white;
}

.priority-high {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white;
}

/* Card hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Navigation active state */
.nav-tab.active {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid white;
}

/* Modal animations */
.modal {
    animation: fadeInScale 0.3s ease-out;
}

.modal-backdrop {
    backdrop-filter: blur(5px);
    background: rgba(0, 0, 0, 0.5);
}

/* Calendar styling */
.calendar-day {
    transition: all 0.2s ease;
    border-radius: 8px;
}

.calendar-day:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: scale(1.05);
}

.calendar-day.selected {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* Loading animations */
.loading-spinner {
    animation: spin 1s linear infinite;
}

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

/* Success checkmark animation */
.checkmark {
    animation: checkmark 0.6s ease-in-out;
}

@keyframes checkmark {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Responsive design helpers */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .task-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .message-item {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Mobile navigation */
    .nav-tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }
    
    .nav-tab {
        flex: 1;
        min-width: 80px;
        padding: 8px 12px !important;
        font-size: 0.875rem;
        text-align: center;
    }
    
    /* Mobile header */
    .mobile-header {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .mobile-title {
        font-size: 1.5rem !important;
    }
    
    /* Mobile cards */
    .mobile-card {
        margin: 8px;
        padding: 16px;
    }
    
    /* Mobile form spacing */
    .mobile-form {
        padding: 16px;
        margin: 8px;
    }
    
    /* Mobile task items */
    .task-item-mobile {
        flex-direction: column;
        gap: 12px;
    }
    
    .task-actions-mobile {
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
    }
    
    .task-actions-mobile button {
        flex: 1;
        font-size: 0.875rem;
        padding: 8px 12px;
    }
    
    /* Mobile messages */
    .messages-container-mobile {
        height: 60vh;
        padding: 12px;
    }
    
    .message-input-mobile {
        flex-direction: column;
        gap: 8px;
    }
    
    .message-input-mobile input {
        width: 100%;
    }
    
    .message-input-mobile button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .profile-selector label {
        padding: 16px;
        text-align: center;
    }
    
    .login-container {
        padding: 16px;
        margin: 8px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .nav-tab {
        padding: 6px 8px !important;
        font-size: 0.75rem;
    }
    
    .nav-tab i {
        display: block;
        margin-bottom: 4px;
    }
    
    .content-padding {
        padding: 12px;
    }
}

/* Focus states for accessibility */
button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gradient-to-r {
        background: #000 !important;
        color: #fff !important;
    }
}

/* 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;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background: #1a1a1a;
        color: #ffffff;
    }
}