@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --lg-bg: radial-gradient(circle at 20% 20%, rgba(34, 197, 235, 0.08), transparent 30%),
        radial-gradient(circle at 80% 10%, rgba(94, 92, 255, 0.08), transparent 28%),
        #0a1628;
    --lg-surface: #0f1c33;
    --lg-surface-2: #152238;
    --lg-card: #1a2942;
    --lg-border: rgba(255, 255, 255, 0.06);
    --lg-accent: #1dd3c3;
    --lg-accent-2: #f5c542;
    --lg-warn: #f97316;
    --lg-danger: #ef4444;
    --lg-text: #e8edf7;
    --lg-text-muted: #8b95a8;
    --lg-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
    --lg-radius: 16px;
}

.labgenz-challenges-tab {
    position: relative;
    font-family: 'Space Grotesk', 'Inter', 'Segoe UI', sans-serif;
    background: transparent;
    padding: 0 28px 28px;
    border-radius: 20px;
    overflow: visible;
    color: var(--lg-text);
}

.challenges-stats-section {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 28px 0 32px;
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.9), rgba(15, 32, 55, 0.9));
    overflow: hidden;
}

.challenges-stats-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    position: relative;
    z-index: 2;
}

.challenges-ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.challenges-ambient .orb {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.18;
}

.challenges-ambient .orb-one { background: radial-gradient(circle, rgba(29, 211, 195, 0.4), transparent 60%); top: -60px; left: -50px; }
.challenges-ambient .orb-two { background: radial-gradient(circle, rgba(245, 197, 66, 0.38), transparent 60%); bottom: -60px; right: -30px; }
.challenges-ambient .orb-three { background: radial-gradient(circle, rgba(124, 58, 237, 0.35), transparent 60%); top: 30%; right: 30%; }

.challenges-ambient .grid-lines {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 46px 46px;
    opacity: 0.35;
}

.challenges-main-tabs {
    display: inline-flex;
    gap: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    position: relative;
    z-index: 1;
}

.challenges-main-tabs .main-tab {
    border: 0;
    background: transparent;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 600;
    color: var(--lg-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.challenges-main-tabs .main-tab.active {
    background: linear-gradient(120deg, rgba(37, 99, 235, 0.14), rgba(34, 197, 94, 0.16));
    color: var(--lg-text);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.18);
}

.challenges-header {
    position: relative;
    z-index: 2;
    margin: 8px 0 16px;
    padding: 22px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.92), rgba(21, 34, 56, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--lg-shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.header-content h3 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.user-stats-compact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    padding: 10px 14px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
}

.user-points {
    background: linear-gradient(120deg, rgba(29, 211, 195, 0.22), rgba(94, 234, 212, 0.18));
    color: #0b1a2d;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 700;
}

.user-rank-badge {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font-weight: 600;
}

.challenges-stats-grid {
    position: relative;
    z-index: 2;
    margin: 18px 0 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.stat-card {
    background: var(--lg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--lg-shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(29, 211, 195, 0.08), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(245, 197, 66, 0.08), transparent 45%);
    opacity: 0.7;
    pointer-events: none;
}

.stat-emphasis {
    background: linear-gradient(135deg, rgba(29, 211, 195, 0.14), rgba(245, 197, 66, 0.12)), var(--lg-card);
}

.stat-label {
    font-size: 13px;
    letter-spacing: 0.02em;
    color: var(--lg-text-muted);
    text-transform: uppercase;
}

.stat-value {
    font-size: 30px;
    font-weight: 700;
    color: #ffffff;
    margin: 4px 0 8px;
}

.stat-icon {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 6px;
}

.stat-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--lg-text);
    font-weight: 600;
    font-size: 12px;
}

.pill-positive { background: rgba(34, 197, 94, 0.18); color: #bbf7d0; }
.pill-soft { background: rgba(29, 211, 195, 0.16); color: #c7fff7; }

.stat-progress {
    display: grid;
}

.stat-progress-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--lg-accent);
}


.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.progress-track .progress-bar {
    display: block;
    height: 100%;
    background: linear-gradient(120deg, #1dd3c3, #8b5cf6);
    border-radius: 999px;
}

.challenges-search-bar {
    position: relative;
    z-index: 1;
    margin: 8px 0 16px;
}

.challenge-search-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: var(--lg-text);
    font-size: 15px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    background: #f4f4f4;
}

.challenge-search-input::placeholder {
    color: var(--lg-text-muted);
}

.challenge-search-input:focus {
    outline: none;
    border-color: rgba(29, 211, 195, 0.4);
    box-shadow: 0 12px 30px rgba(29, 211, 195, 0.18);
}

.challenges-filters-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 14px;
    border: 1px solid rgba(10, 22, 40, 0.08);
}

.filters-top {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.filters-bottom {
    width: 100%;
}

.challenges-category-tabs {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.category-tab {
    border: 1px solid rgba(10, 22, 40, 0.12);
    background: #ffffff;
    color: #0a1628;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-tab.active {
    border-color: rgba(29, 211, 195, 0.5);
    background: #0a1628;
    color: #e8edf7;
    box-shadow: 0 12px 30px rgba(29, 211, 195, 0.18);
    transform: translateY(-2px);
}

.tab-count {
    background: rgba(10, 22, 40, 0.08);
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.challenges-dropdown-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.layout-toggle {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-left: 6px;
}

.layout-toggle-btn {
    border: 1px solid rgba(10, 22, 40, 0.12);
    background: #ffffff;
    color: #0a1628;
    border-radius: 12px;
    padding: 8px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    font-size: 18px;
}

.layout-toggle-btn.active {
    background: #0a1628;
    color: #e8edf7;
    border-color: rgba(29, 211, 195, 0.5);
    box-shadow: 0 10px 24px rgba(29, 211, 195, 0.18);
    transform: translateY(-1px);
}

.challenge-filter-select {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(10, 22, 40, 0.12);
    background: #ffffff;
    color: #0a1628;
    font-weight: 600;
}

.filter-search {
    flex: 1 1 240px;
    min-width: 220px;
}

.filters-bottom .challenges-search-bar {
    margin: 0;
}

.challenges-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.challenges-grid.layout-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 1024px) {
    .challenges-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.challenge-card {
    position: relative;
    border-radius: 18px 18px 14px 14px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

/* 100 Day Challenge Card Variant */
.challenge-card-hundred-day {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    /* border: 2px solid #fbbf24; */
    border-radius: 30px;
    box-shadow: 0 18px 45px rgba(251, 191, 36, 0.25), 0 0 40px rgba(245, 158, 11, 0.15);
    position: relative;
}

.challenge-card-hundred-day::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.challenge-card-hundred-day:hover::before {
    opacity: 0.3;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.challenge-card-hundred-day .card-accent {
    height: 8px;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.5);
}

.hundred-day-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    padding: 8px 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 10px;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
    border: 2px solid #fffbeb;
}

.hundred-day-badge .badge-icon {
    font-size: 16px;
    filter: drop-shadow(0 2px 4px rgba(120, 53, 15, 0.3));
}

.hundred-day-badge .badge-glow {
    position: absolute;
    inset: -4px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.6), transparent 70%);
    border-radius: 999px;
    z-index: -1;
    animation: badge-glow-pulse 3s ease-in-out infinite;
}

@keyframes badge-glow-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.challenge-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.challenge-card-hundred-day:hover {
    box-shadow: 0 28px 70px rgba(251, 191, 36, 0.35), 0 0 50px rgba(245, 158, 11, 0.25);
}

.card-accent {
    display: block;
    height: 5px;
    width: 100%;
    background: linear-gradient(90deg, #8b5cf6 0%, #a855f7 50%, #6366f1 100%);
    border-radius: 12px 12px 0 0;
}

.card-accent.dimension-physical { background: linear-gradient(90deg, #f97316, #fb923c); }
.card-accent.dimension-discipline { background: linear-gradient(90deg, #2563eb, #38bdf8); }
.card-accent.dimension-mental { background: linear-gradient(90deg, #8b5cf6, #6366f1); }
.card-accent.dimension-nutrition { background: linear-gradient(90deg, #16a34a, #22c55e); }
.card-accent.dimension-routine { background: linear-gradient(90deg, #0ea5e9, #22d3ee); }
.card-accent.dimension-general { background: linear-gradient(90deg, #8b5cf6, #6366f1); }

.challenge-card-inner {
    position: relative;
    padding: 18px;
    display: grid;
    gap: 14px;
    z-index: 1;
    color: #0f172a;
}

.challenges-grid.layout-list .card-link-overlay {
    display: flex;
    min-height: 100px;
}

.challenges-grid.layout-list .card-accent {
    width: 8px;
    height: auto;
    border-radius: 0;
}

.layout-list i {
    font-size: 50px !important;
}

.challenges-grid.layout-list .challenge-card-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    padding: 2px 15px;
}

.challenges-grid.layout-list .card-header {
    align-items: center;
    gap: 16px;
}

.challenges-grid.layout-list .card-icon {
    width: 80px;
    height: 80px;
    font-size: 42px;
    border-radius: 18px;
}

.challenges-grid.layout-list .challenge-description,
.challenges-grid.layout-list .card-meta-row,
.challenges-grid.layout-list .card-divider {
    display: none;
}

.challenges-grid.layout-list .card-title-block {
    flex: 1;
}

.challenges-grid.layout-list .challenge-title {
    font-size: 22px;
    line-height: 1.2;
    margin: 2px 0 0;
}

.challenges-grid.layout-list .card-label {
    font-size: 12px;
    letter-spacing: 0.16em;
}

.card-dimensions-dots {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.card-dimensions-dots .category-tag {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    padding: 0;
    font-size: 0;
    position: relative;
    background: #cbd5e1;
}

.card-dimensions-dots .category-tag::after {
    content: attr(data-label);
    position: absolute;
    left: 50%;
    top: -32px;
    transform: translateX(-50%);
    background: #0a1628;
    color: #e8edf7;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

.card-dimensions-dots .category-tag:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.card-dimensions-dots .category-physical { background: #f97316; }
.card-dimensions-dots .category-discipline { background: #2563eb; }
.card-dimensions-dots .category-mental { background: #8b5cf6; }
.card-dimensions-dots .category-nutrition { background: #16a34a; }
.card-dimensions-dots .category-routine { background: #0ea5e9; }
.card-dimensions-dots .category-general { background: #8b5cf6; }

.challenges-grid.layout-list .tag.type-tag {
    display: none;
}

.challenges-grid.layout-list .card-footer {
    margin-left: auto;
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.challenges-grid.layout-list .card-footer .stat-chip {
    padding: 8px 12px;
    font-size: 13px;
}

.challenges-grid.layout-list .xp-pill {
    padding: 10px 12px;
    font-size: 14px;
    gap: 6px;
}

.challenges-grid.layout-list .chip-icon {
    font-size: 16px;
}

.card-header {
    display: flex;
    gap: 12px;
    align-items: center;
}

.card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
    display: grid;
    place-items: center;
    font-size: 20px;
}

.card-icon i { font-size: 20px; line-height: 1; }

.card-icon .dimension-thumb {
    width: 26px;
    height: 26px;
    object-fit: cover;
    border-radius: 8px;
}

.card-icon.dimension-physical { background: rgba(249, 115, 22, 0.14); color: #c2410c; }
.card-icon.dimension-discipline { background: rgba(37, 99, 235, 0.14); color: #1d4ed8; }
.card-icon.dimension-mental { background: rgba(99, 102, 241, 0.16); color: #4338ca; }
.card-icon.dimension-nutrition { background: rgba(34, 197, 94, 0.16); color: #15803d; }
.card-icon.dimension-routine { background: rgba(14, 165, 233, 0.16); color: #0369a1; }
.card-icon.dimension-general { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }

.card-title-block { flex: 1; }

.card-label {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7c3aed;
    font-weight: 700;
}

.challenge-title {
    margin: 6px 0 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.label-stars {
    margin-left: 8px;
    font-size: 13px;
    color: #f59e0b;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.card-link-overlay {
    display: block;
    color: inherit;
    text-decoration: none;
}

.deadline-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid transparent;
}

.deadline-normal { background: rgba(37, 99, 235, 0.08); color: #1d4ed8; }
.deadline-warning { background: rgba(249, 115, 22, 0.12); color: #c2410c; }
.deadline-urgent { background: rgba(234, 88, 12, 0.16); color: #9a3412; }
.deadline-overdue { background: rgba(239, 68, 68, 0.18); color: #991b1b; }

.deadline-icon { opacity: 0.8; }

.challenge-description {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
}

.pill-difficulty { background: rgba(248, 113, 113, 0.12); color: #b91c1c; }
.pill-difficulty.difficulty-medium { background: rgba(251, 191, 36, 0.16); color: #b45309; }
.pill-difficulty.difficulty-easy { background: rgba(74, 222, 128, 0.18); color: #15803d; }
.pill-time { background: rgba(148, 163, 184, 0.16); color: #334155; }

.pill-icon { font-size: 12px; }

.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.challenges-grid.layout-list .card-tags {
    display: none;
}

.challenges-grid:not(.layout-list) .card-dimensions-dots {
    display: none;
}

.tag {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.category-tag { background: #eef2ff; color: #4338ca; }
.category-physical { background: #fef3c7; color: #b45309; }
.category-discipline { background: #e0f2fe; color: #0ea5e9; }
.category-mental { background: #ede9fe; color: #7c3aed; }

.type-tag { background: #f1f5f9; color: #334155; }

.card-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 6px 0 10px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.card-footer-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    font-size: 13px;
}

.chip-icon { font-size: 14px; }

.xp-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    background: #fef9c3;
    color: #854d0e;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(248, 180, 0, 0.25);
    border: 1px solid #fcd34d;
    margin-left: auto;
}

.xp-multiplier {
    background: rgba(133, 77, 14, 0.08);
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

.challenge-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item-label {
    font-size: 12px;
    color: var(--lg-text-muted);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.stat-item-value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--lg-text);
}

.stat-item-value .multiplier {
    padding: 4px 8px;
    background: rgba(29, 211, 195, 0.18);
    border-radius: 10px;
    font-size: 12px;
    color: #0b1a2d;
}

.badge-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
}

.rejection-notice {
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.12);
    border-radius: 12px;
    padding: 10px 12px;
    color: #fecdd3;
    display: grid;
    gap: 6px;
}

.challenge-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: linear-gradient(120deg, #1dd3c3, #8b5cf6);
    color: #0b1a2d;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--lg-text);
}

.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: 0.7; cursor: not-allowed; }

.empty-state,
.challenges-no-results {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px 24px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 16px;
    border: 1px solid var(--lg-border);
    box-shadow: var(--lg-shadow);
}

@media (max-width: 768px) {
    .header-content { flex-direction: column; align-items: flex-start; }
    .challenges-dropdown-filters { width: 100%; }
    .challenge-card-inner { padding: 16px; }
}

/* ── List-view overrides for new Tailwind card template ─────────────── */
.challenges-grid.layout-list article {
    width: 100%;
}

/* Card inner becomes a horizontal row */
.challenges-grid.layout-list .card-wrap {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    border-radius: 16px;
    max-height: 80px;
}

/* Hero image: fixed-width thumbnail on the left */
.challenges-grid.layout-list .card-hero {
    width: 120px !important;
    min-width: 120px !important;
    height: 80px !important;
    max-height: 80px !important;
    flex-shrink: 0;
    border-radius: 16px 0 0 16px;
}

.challenges-grid.layout-list .card-hero img {
    height: 80px !important;
    min-height: 80px;
    max-height: 80px;
    border-radius: 16px 0 0 16px;
}

/* Hide all overlaid elements on the hero in list view */
.challenges-grid.layout-list .card-hero > .absolute {
    display: none !important;
}

/* Body: fill remaining space, horizontal layout */
.challenges-grid.layout-list .card-body {
    flex: 1;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px;
    padding: 8px 20px !important;
    min-width: 0;
    max-height: 80px;
    overflow: hidden;
}

/* Description: single-line truncation */
.challenges-grid.layout-list .card-body > p {
    -webkit-line-clamp: 1;
    flex: 1;
    min-width: 0;
    margin: 0;
}

/* CTA row: push to the right with spacing */
.challenges-grid.layout-list .card-body > div:last-child {
    margin-left: auto;
    gap: 12px;
    flex-shrink: 0;
    padding-left: 16px;
}

/* Disable hover lift in list mode */
.challenges-grid.layout-list article:hover {
    transform: none;
}

/* Show list-only info block; hide description + CTA in list view */
.challenges-grid.layout-list .card-list-info {
    display: block !important;
    flex: 1;
    min-width: 0;
}

.challenges-grid.layout-list .card-list-info h4 {
    color: #0f172a !important;
}

.challenges-grid.layout-list .card-list-info .text-slate-400 {
    color: #64748b !important;
}

.challenges-grid.layout-list .card-body > p {
    display: none !important;
}

/* Hide the bottom status indicator in list view (already shown in card-list-info) */
.challenges-grid.layout-list .card-body > div:last-child > span:first-child {
    display: none;
}

@media (max-width: 640px) {
    .challenges-grid.layout-list .card-hero {
        width: 80px !important;
        min-width: 80px !important;
    }
    .challenges-grid.layout-list .card-body {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 8px 12px !important;
        gap: 6px;
        max-height: none;
    }
    .challenges-grid.layout-list .card-wrap {
        max-height: none;
    }
}
/* =====================================================
   CHALLENGES STATS SECTION - Hero/Dashboard Area
   ===================================================== */

.challenges-stats-section {
    position: relative;
    background: linear-gradient(135deg, #0a1628 0%, #0d1b2e 50%, #152238 100%);
    border-radius: 24px;
    padding: 48px 40px;
    margin-bottom: 32px;
    overflow: hidden;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Ambient Background Effects */
.challenges-ambient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.4;
}

.challenges-ambient .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.challenges-ambient .orb-one {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.4) 0%, transparent 70%);
    top: -200px;
    left: -100px;
}

.challenges-ambient .orb-two {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    animation-delay: -7s;
}

.challenges-ambient .orb-three {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, transparent 70%);
    top: 50%;
    right: 10%;
    animation-delay: -14s;
}

.challenges-ambient .grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Inner Content Container */
.challenges-stats-inner {
    position: relative;
    z-index: 2;
}

/* Header Section */
.challenges-header {
    margin-bottom: 40px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
}

.header-titles {
    flex: 1;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(34, 211, 238, 0.3);
    backdrop-filter: blur(10px);
}

.pill-soft {
    background: rgba(255, 255, 255, 0.08);
    color: #5eead4;
    border-color: rgba(255, 255, 255, 0.1);
}

.pill-positive {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.3);
}

.challenges-header h3 {
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.header-subtitle {
    font-size: 16px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.6;
    max-width: 600px;
}

/* User Stats Compact (Right side) */
.user-stats-compact {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.user-points {
    display: flex;
    align-items: center;
    gap: 8px;
}

.points-value {
    font-size: 20px;
    font-weight: 700;
    color: #fbbf24;
    white-space: nowrap;
}

.user-rank-badge {
    padding: 6px 12px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.rank-name {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Stats Grid */
.challenges-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Stat Cards */
.stat-card {
    background: rgba(26, 41, 66, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    background: rgba(26, 41, 66, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Pagination */
.challenges-pagination {
    position: relative;
    z-index: 1;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.pagination-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(26, 41, 66, 0.75);
    color: #e8edf7;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(29, 211, 195, 0.5);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.pagination-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.08);
}

.pagination-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e8edf7;
    font-weight: 700;
}

.pagination-separator {
    opacity: 0.6;
}

.stat-card.stat-emphasis {
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.3);
}

.stat-card.stat-emphasis:hover {
    background: rgba(34, 211, 238, 0.15);
    border-color: rgba(34, 211, 238, 0.4);
}

.stat-icon {
    font-size: 28px;
    margin-bottom: 12px;
    display: block;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value,
.stat-progress-value {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 12px;
}

/* Progress Track (for Categories card) */
.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 12px 0;
}

.progress-bar {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #22d3ee 0%, #06b6d4 100%);
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

/* Stat Meta Pills */
.stat-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.stat-meta .pill {
    margin: 0;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .challenges-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .challenges-stats-section {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .challenges-header h3 {
        font-size: 32px;
    }

    .header-subtitle {
        font-size: 14px;
    }

    .user-stats-compact {
        width: 100%;
        justify-content: space-between;
    }

    .challenges-stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-value,
    .stat-progress-value {
        font-size: 28px;
    }

    .challenges-ambient .orb {
        filter: blur(60px);
    }
}

@media (max-width: 480px) {
    .challenges-stats-section {
        padding: 24px 16px;
    }

    .challenges-header h3 {
        font-size: 28px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value,
    .stat-progress-value {
        font-size: 24px;
    }

    .user-stats-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}