/* TW廣告任務 - Custom Styles */

/* Smooth Transitions */
* {
    transition: all 0.3s ease;
}

/* Page Content Animation */
.page-content {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation Active State */
.nav-link.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
}

/* Filter Button Active State */
.filter-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.filter-btn:hover {
    transform: translateY(-2px);
}

/* Withdrawal Filter Button Active State */
.withdrawal-filter-btn.active {
    background: #1f2937;
    color: white;
}

/* Task Card Hover Effects */
.task-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Task Card Badge */
.task-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

/* Video Thumbnail Overlay */
.video-thumbnail-overlay {
    transition: all 0.3s ease;
}

.task-card:hover .video-thumbnail-overlay {
    background: rgba(0, 0, 0, 0.7);
}

/* Wallet Button Pulse Animation */
.wallet-btn {
    animation: pulse-subtle 2s infinite;
}

@keyframes pulse-subtle {
    0%, 100% {
        box-shadow: 0 10px 25px rgba(251, 146, 60, 0.4);
    }
    50% {
        box-shadow: 0 15px 35px rgba(251, 146, 60, 0.6);
    }
}

/* Modal Animations */
#video-modal {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#video-modal > div {
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Progress Bar Animation */
@keyframes progressGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.8);
    }
}

#progress-bar {
    animation: progressGlow 1.5s infinite;
}

/* Success Overlay Animation */
#video-success-overlay {
    animation: successBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Countdown Number Animation */
#countdown-display {
    animation: countdownPulse 1s infinite;
}

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

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb, #7c3aed);
}

/* Table Styling */
table tbody tr {
    transition: background 0.2s ease;
}

table tbody tr:hover {
    background: #f9fafb;
}

/* Responsive Video Container */
video {
    object-fit: contain;
    background: #000;
}

/* Loading Spinner */
.loading-spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .task-card:hover {
        transform: none;
    }
    
    #video-modal > div {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Print Styles */
@media print {
    nav, footer, .wallet-btn, button {
        display: none !important;
    }
}

/* Accessibility Focus States */
button:focus,
a:focus {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .bg-gradient-to-r,
    .bg-gradient-to-br {
        background: #1f2937 !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 (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Currently using light theme only */
}

/* Custom Utility Classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.card-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Gradient Text Animation */
.gradient-text-animated {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s linear infinite;
}

@keyframes gradientShift {
    to {
        background-position: 200% center;
    }
}

/* Status Badge Styles */
.status-completed {
    background: #dcfce7;
    color: #166534;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-processing {
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 80px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: bold;
    color: #4b5563;
    margin-bottom: 10px;
}

.empty-state p {
    color: #9ca3af;
    font-size: 16px;
}
