/**
 * Tasks Page Styles
 * Ecosystem design with expandable cards
 */

.tasks-page {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto 80px;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.page-header p {
    color: #6b7280;
    font-size: 14px;
}

/* Task Card Wrapper - Modern Clean Design */
.task-card-wrapper {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    margin-bottom: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.task-card-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.task-card-wrapper:hover::before {
    opacity: 1;
}

.task-card-wrapper:hover {
    transform: translateY(-2px);
    border-color: #3b82f6;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
}

/* Task Card Header - Clean & Modern */
.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: white;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    transition: all 0.3s ease;
}

.task-card-header:hover {
    background: linear-gradient(to right, #fafbfc, #eff6ff);
}

.task-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.task-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 16px;
    position: relative;
    flex-shrink: 0;
}

.task-icon svg {
    width: 32px;
    height: 32px;
}

.task-info {
    display: flex;
    flex-direction: column;
}

.task-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    color: #1f2937;
    letter-spacing: -0.2px;
}

.task-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 4px 0 0 0;
}

.task-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.task-reward {
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.task-expand-icon {
    width: 32px;
    height: 32px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-expand-icon svg {
    transition: transform 0.3s ease;
}

.task-card-header:hover .task-expand-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: transparent;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* Task Card Content */
.task-card-content {
    max-height: none;
    overflow: visible;
    transition: all 0.5s ease;
}

.task-card-content.collapsed {
    max-height: 0;
    overflow: hidden;
}

/* Task Content Inner - Clean Padding */
.task-content-inner {
    padding: 24px;
    background: linear-gradient(to bottom, #ffffff, #fafbfc);
}

/* Message Box - Modern Clean Style */
.message-box {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #bfdbfe;
    position: relative;
    overflow: hidden;
}

.message-box::before {
    content: '💬';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 80px;
    opacity: 0.08;
    transform: rotate(-15deg);
}

.message-text {
    white-space: pre-wrap;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    margin: 0;
}

/* Copy Button (Ecosystem Style) */
.copy-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn svg {
    fill: white;
}

/* Ecosystem Card Design */
.ecosystem-card {
    padding: 30px;
    position: relative;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.ecosystem-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.05;
    background-image: radial-gradient(circle at 1px 1px, #667eea 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

/* Message Preview */
.message-preview {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.message-preview h4 {
    margin: 0 0 16px 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

.whatsapp-message {
    background: #e3f2e8;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #25d366;
    font-family: system-ui, -apple-system;
    font-size: 14px;
    line-height: 1.6;
    position: relative;
}

.whatsapp-message::before {
    content: '';
    position: absolute;
    top: 10px;
    left: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 10px 0;
    border-color: transparent #e3f2e8 transparent transparent;
}

.whatsapp-message p {
    margin: 0;
    min-height: 1em;
}

.whatsapp-message strong {
    color: #075e54;
}

/* WhatsApp Share Button - Modern & Cheerful */
.whatsapp-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin: 0 auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25);
    text-transform: none;
    letter-spacing: 0.3px;
}

.whatsapp-share-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.whatsapp-share-btn:hover::before {
    width: 300px;
    height: 300px;
}

.whatsapp-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
}

.whatsapp-share-btn:active {
    transform: translateY(0) scale(0.98);
}

.whatsapp-share-btn svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* Share Progress */
.share-progress {
    margin-top: 24px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: #4b5563;
}

.progress-header span:last-child {
    font-weight: 600;
    color: #667eea;
}

.progress-bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.5s ease;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-note {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    text-align: center;
}

/* Copy Notification */
.copy-notification {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Social Media Card Styles */
.social-share-section {
    margin-top: 24px;
}

.image-display-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    z-index: 1;
}

.image-display-container h4 {
    margin: 0 0 16px 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

.success-story-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    margin: 0 auto 16px;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.download-image-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.download-image-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.download-image-btn:active {
    transform: translateY(0);
}

.social-message-preview {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    z-index: 1;
}

.social-message-preview h4 {
    margin: 0 0 16px 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

.social-message-box {
    background: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-family: system-ui, -apple-system;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.social-message-box p {
    margin: 0;
    color: #4b5563;
}

.social-share-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.facebook-share-btn,
.instagram-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 140px;
}

.facebook-share-btn {
    background: #1877f2;
    color: white;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.facebook-share-btn:hover {
    transform: translateY(-2px) scale(1.05);
    background: #166fe5;
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
}

.instagram-share-btn {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(225, 48, 108, 0.3);
}

.instagram-share-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(225, 48, 108, 0.4);
}

.facebook-share-btn:active,
.instagram-share-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .tasks-page {
        padding: 15px;
    }
    
    .task-card-header {
        padding: 15px;
    }
    
    .task-icon {
        font-size: 28px;
    }
    
    .task-title {
        font-size: 16px;
    }
    
    .task-reward {
        font-size: 20px;
    }
    
    .ecosystem-card {
        padding: 20px;
    }
    
    .whatsapp-share-btn {
        padding: 14px 28px;
        font-size: 16px;
    }
    
    .social-share-buttons {
        flex-direction: column;
    }
    
    .facebook-share-btn,
    .instagram-share-btn {
        width: 100%;
    }
    
    .success-story-image {
        max-width: 100%;
    }
}