/* Tasks System Styles */
.tasks-section {
    max-width: 1400px;
    margin: 0 auto;
}

.tasks-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tasks-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tasks-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.tasks-progress {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

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

.progress-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.progress-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--warning);
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--warning), #FFD700);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.unlock-notice {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
    border: 2px solid #FFD700;
    border-radius: 12px;
    margin-bottom: 2rem;
}

/* Referral Section */
.referral-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.referral-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.referral-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.referral-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.referral-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.referral-stat {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.referral-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.referral-stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.referral-link-box {
    margin-top: 1.5rem;
}

.referral-link-box label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.referral-link-input {
    display: flex;
    gap: 0.5rem;
}

.referral-link-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
}

.copy-referral-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), #8B5CF6);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-referral-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.task-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    transition: all 0.3s ease;
    position: relative;
}

.task-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--shadow);
    border-color: var(--primary);
}

.task-card.completed {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.02));
}

.task-card.locked {
    opacity: 0.8;
}

.task-status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.task-status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.task-status-badge.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.task-status-badge.locked {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.task-status-badge.processing {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.task-status-badge.cooldown {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.task-card.pending-completion {
    border-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.02));
}

.task-card.on-cooldown {
    opacity: 0.6;
}

.task-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.task-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.task-reward {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.task-reward i {
    color: #FFD700;
    font-size: 1.1rem;
}

.task-reward-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #FFD700;
}

.task-reward-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.task-actions {
    display: flex;
    gap: 0.75rem;
}

.task-btn {
    flex: 1;
    padding: 0.875rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.task-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.task-btn-secondary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.task-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px var(--shadow);
}

.task-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.task-unlock-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #0f0f23;
}

/* Simple Action Section */
.task-simple-action {
    text-align: center;
    padding: 1rem 0;
}

/* Ready Message Section */
.ready-message-section {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.ready-message-section h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ready-message-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
}

/* Task Instructions Modal */
.task-instructions {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.task-instructions h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.task-instructions ol {
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.task-instructions li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.task-verification {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.task-verification h4 {
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.task-verification p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.support-link {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
}

.support-link:hover {
    color: var(--primary-light);
}

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

@media (max-width: 768px) {
    .tasks-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .task-status-badge {
        position: static;
        margin-bottom: 1rem;
        width: fit-content;
    }

    .tasks-progress {
        padding: 1.5rem;
    }

    .progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .progress-title {
        font-size: 1.1rem;
    }
    
    .progress-amount {
        font-size: 1.35rem;
    }
    
    .task-card {
        padding: 1.5rem;
    }
    
    .task-info h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .tasks-header h1 {
        font-size: 1.5rem;
    }
    
    .tasks-header p {
        font-size: 1rem;
    }
    
    .tasks-progress {
        padding: 1.25rem;
    }
    
    .progress-header {
        gap: 0.75rem;
    }
    
    .progress-title {
        font-size: 1rem;
    }
    
    .progress-amount {
        font-size: 1.25rem;
    }
    
    .task-card {
        padding: 1.25rem;
    }
    
    .task-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .task-info h3 {
        font-size: 1rem;
    }
    
    .task-info p {
        font-size: 0.9rem;
    }
    
    .unlock-notice {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .unlock-notice i {
        font-size: 2rem;
    }
}

/* Support Ticket Styles */
.support-ticket-modal .modal-content {
    max-width: 600px;
}

.support-ticket-form {
    padding: 0.5rem 0;
}

.support-ticket-form textarea {
    font-size: 0.95rem;
    line-height: 1.6;
}

.support-ticket-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.task-status-badge.ticket-review {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.task-card.ticket-pending {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(139, 92, 246, 0.02));
}
