/* YouTube Tasks & Earning Platform - Premium Dashboard UI */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Brand Palette - Deep & Rich */
    --primary-color: #ff0000;
    --primary-gradient: linear-gradient(135deg, #ff0000 0%, #d30404 100%);
    --primary-glow: rgba(255, 0, 0, 0.35);
    
    /* Secondary Colors */
    --secondary-color: #64748b;
    --success-color: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    /* Backgrounds & Surfaces */
    --bg-body: #f3f4f6;
    --bg-surface: #ffffff;
    --bg-sidebar: #0f172a; /* Deep Navy/Black */
    
    /* UI Elements */
    --border-radius-lg: 20px;
    --border-radius-md: 12px;
    --box-shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    --box-shadow-hover: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   Global Styles & Reset
   ========================================= */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    /* Subtle mesh background pattern */
    background-image: 
        radial-gradient(at 0% 0%, rgba(255, 0, 0, 0.03) 0px, transparent 50%), 
        radial-gradient(at 100% 100%, rgba(15, 23, 42, 0.03) 0px, transparent 50%);
    color: #1e293b;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* =========================================
   Navbar (Glass Effect)
   ========================================= */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}


.bg-danger {
    --bs-bg-opacity: 1;
    background-color: rgb(33 37 41) !important;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

/* =========================================
   Sidebar (Modern Dashboard Style)
   ========================================= */
.sidebar {
    min-height: calc(100vh - 56px);
    background: var(--bg-sidebar);
    box-shadow: 4px 0 24px rgba(0,0,0,0.05);
    padding-top: 1.5rem;
}

.sidebar .nav-link {
    color: #94a3b8; /* Muted Blue-Grey */
    padding: 0.9rem 1.5rem;
    margin: 4px 12px;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    transition: all 0.3s var(--ease-smooth);
    display: flex;
    align-items: center;
}

.sidebar .nav-link i {
    font-size: 1.2rem;
    margin-right: 12px;
    transition: transform 0.3s ease;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateX(4px);
}

.sidebar .nav-link:hover i {
    transform: scale(1.1);
}

.sidebar .nav-link.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 8px 16px -4px rgba(220, 38, 38, 0.5);
}

/* =========================================
   Cards & Stats
   ========================================= */
.card {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-card);
    transition: all 0.4s var(--ease-smooth);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
    border-color: rgba(0,0,0,0.05);
}

/* Dashboard Stats Cards */
.stat-card {
    border-radius: var(--border-radius-lg);
    padding: 1.75rem;
    color: white;
    position: relative;
    overflow: hidden;
    border: none;
    z-index: 1;
}

/* Abstract circles overlay on stat cards */
.stat-card::before, .stat-card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    z-index: -1;
}
.stat-card::before { width: 150px; height: 150px; top: -50px; right: -50px; }
.stat-card::after { width: 100px; height: 100px; bottom: -20px; left: -20px; }

.stat-card.primary { background: var(--primary-gradient); box-shadow: 0 10px 20px -5px var(--primary-glow); }
.stat-card.success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); box-shadow: 0 10px 20px -5px var(--success-glow); }
.stat-card.warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); box-shadow: 0 10px 20px -5px rgba(245, 158, 11, 0.4); }
.stat-card.info { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4); }

.stat-card .stat-icon {
    font-size: 3.5rem;
    position: absolute;
    right: 1.5rem;
    bottom: 0.5rem;
    opacity: 0.15;
    transform: rotate(-15deg);
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0;
    line-height: 1.2;
}
.stat-card small { font-weight: 500; opacity: 0.9; text-transform: uppercase; letter-spacing: 1px; font-size: 0.75rem; }

/* =========================================
   Task Cards (The Core Feature)
   ========================================= */
.task-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.03);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s var(--ease-smooth);
    border-left: 5px solid transparent; /* Replaced by pseudo-element for better style */
    overflow: hidden;
}

/* Use a gradient strip instead of solid border */
.task-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: #e2e8f0;
    transition: 0.3s;
}

.task-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}
.task-card:hover::before {
    background: var(--primary-color);
    width: 6px;
}

.task-card .task-reward {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    display: inline-block;
}

.task-card .task-type {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Refined Colors for Tags */
.task-type.subscribe { background-color: #fef2f2; color: #dc2626; border: 1px solid #fee2e2; }
.task-type.like { background-color: #eff6ff; color: #2563eb; border: 1px solid #dbeafe; }
.task-type.comment { background-color: #f0fdf4; color: #16a34a; border: 1px solid #dcfce7; }
.task-type.watch { background-color: #fff7ed; color: #ea580c; border: 1px solid #ffedd5; }

/* =========================================
   Wallet & Payments
   ========================================= */
.wallet-balance {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); /* Dark Premium Card Look */
    color: white;
    padding: 2.5rem;
    border-radius: 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.wallet-balance .balance-amount {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wallet-balance::after {
    content: 'CURRENT BALANCE';
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: #64748b;
}

/* =========================================
   Upload & Forms
   ========================================= */
.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: var(--border-radius-lg);
    padding: 4rem 2rem;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background-color: #fef2f2;
    transform: scale(0.99);
}

.upload-area i {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: 0.3s;
}

.upload-area:hover i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Form Inputs */
.form-control, .form-select {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    background-color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

/* Buttons - Modern Gradient */
.btn-gradient-primary {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
    color: white;
}

/* =========================================
   Tables & Status
   ========================================= */
.table-custom {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-card);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.table-custom thead th {
    background: #f8fafc;
    color: #64748b;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 1.25rem 1rem;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 700;
}

.table-custom td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-weight: 500;
}

/* Status Badges - Soft Style */
.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-badge.pending { background-color: #fffbeb; color: #b45309; }
.status-badge.approved { background-color: #ecfdf5; color: #047857; }
.status-badge.rejected { background-color: #fef2f2; color: #b91c1c; }
.status-badge.completed { background-color: #eff6ff; color: #1d4ed8; }

/* =========================================
   Admin & Utility
   ========================================= */
.video-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    border: 4px solid white;
}

.screenshot-preview {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 4px;
    background: white;
    transition: transform 0.3s ease;
}
.screenshot-preview:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Verification Steps */
.verification-step {
    background: white;
    border: 1px solid #f1f5f9;
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.verification-step.success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

.verification-step i {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    margin-right: 1rem;
}

/* Referral Box */
.referral-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
}
.referral-box input {
    background: white;
    border: 1px solid #cbd5e1;
    color: var(--primary-color);
    font-family: monospace;
    font-size: 1.1rem;
}

.text-muted {
    --bs-text-opacity: 1;
    color: rgb(255 0 0 / 75%) !important;
}

/* Responsive Tweak */
@media (max-width: 768px) {
    .sidebar { position: fixed; z-index: 1000; height: 100%; width: 250px; left: -250px; transition: 0.3s; }
    .sidebar.active { left: 0; }
    .stat-card { margin-bottom: 1rem; }
    .wallet-balance .balance-amount { font-size: 2.5rem; }
}