/* ============================================
   TASK CARD COMPONENT STYLES
   ============================================ */

/* Tasks Grid */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem;
    transition: all 0.3s var(--ease-smooth);
    display: flex;
    flex-direction: column;
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.875rem;
}

.task-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.625rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

.task-category-badge i {
    font-size: 0.65rem;
}

/* No color from DB: neutral badge */
.task-category-badge--no-color {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
}

.task-category-badge--no-color i {
    color: var(--text-secondary) !important;
}

.task-category-badge.social {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.task-category-badge.survey {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.task-category-badge.video {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.task-category-badge.app {
    background: var(--gradient-primary);
}

.task-difficulty-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.task-difficulty-badge.easy {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.task-difficulty-badge.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.task-difficulty-badge.hard {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.task-content {
    flex: 1;
    margin-bottom: 0.875rem;
}

.task-title {
    font-size: var(--font-size-body);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.task-description {
    font-size: var(--font-size-tiny);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.625rem;
}

.task-meta {
    display: flex;
    gap: 0.875rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.meta-item i {
    font-size: 0.65rem;
}

/* Emphasis colors for meta info: time (warning) & completed count (success) */
.task-meta .meta-item:first-child {
    color: #f59e0b;
}

.task-meta .meta-item:first-child i {
    color: #f59e0b;
}

.task-meta .meta-item:last-child {
    color: #10b981;
}

.task-meta .meta-item:last-child i {
    color: #10b981;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.875rem;
    border-top: 1px solid var(--border-color);
}

.task-reward {
    flex: 1;
}

.reward-amount {
    font-size: var(--font-size-h4);
    font-weight: 800;
    color: var(--color-success);
}

/* Tasks Empty State */
.tasks-empty-state {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.4) 0%, rgba(17, 24, 39, 0.6) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 20px;
    padding: 4.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease-smooth);
}

.tasks-empty-state::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.tasks-empty-state .empty-state-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
    border: 2px solid rgba(139, 92, 246, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    animation: float-icon 4s ease-in-out infinite, pulse-glow 3s ease-in-out infinite;
}

@keyframes float-icon {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(3deg);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
        border-color: rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(6, 182, 212, 0.45);
        border-color: rgba(6, 182, 212, 0.5);
    }
}

.tasks-empty-state .empty-state-icon i {
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(139, 92, 246, 0.4));
}

.tasks-empty-state .empty-state-title {
    font-size: var(--font-size-h3);
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    z-index: 1;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #f9fafb 0%, #d1d5db 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tasks-empty-state .empty-state-text {
    font-size: var(--font-size-small);
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    max-width: 420px;
    line-height: 1.6;
    z-index: 1;
}

.tasks-empty-state .empty-state-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    z-index: 1;
    margin-top: 0.5rem;
}

.tasks-empty-state .empty-state-actions .btn {
    padding: 0.625rem 1.25rem;
    font-size: var(--font-size-small);
    border-radius: 10px;
    transition: all 0.3s var(--ease-smooth);
}

.tasks-empty-state .empty-state-actions .btn-primary:hover {
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.tasks-empty-state .empty-state-actions .btn-secondary:hover {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}


/* Responsive Styles */
@media (max-width: 1024px) {
    .tasks-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

/* 2 columns until 600px */
@media (max-width: 768px) {
    .tasks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }
}

/* Single column below 600px */
@media (max-width: 600px) {
    .tasks-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tasks-grid {
        gap: 0.875rem;
    }
    
    .task-card {
        padding: 0.875rem;
    }
}
