html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* Vibrant Home Page Styles */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    padding: 100px 0 80px;
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(252, 82, 0, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    padding: 60px 0;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    
    /* Fallback color for mobile and unsupported browsers */
    color: white;
}

/* Desktop-only gradient text for hero title */
@media (min-width: 1024px) {
    @supports (-webkit-background-clip: text) {
        .hero-title {
            background: linear-gradient(45deg, #ffffff, #f8f9fa, #ffffff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
    }
}

.hero-description {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    opacity: 0.95;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    color: #222; /* Dark color for light mode */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .hero-description {
    color: #f8f9fa; /* Light color for dark mode */
    text-shadow: 0 2px 10px rgba(0,0,0,0.7); /* Stronger dark shadow for dark mode */
}

.hero-buttons .btn {
    padding: 15px 35px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 0 10px 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Hero buttons - mobile optimization */
.hero-buttons .btn-primary {
    background: linear-gradient(135deg, #fc5200 0%, #ff6b35 100%);
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
}

/* Desktop-only hover effects */
@media (min-width: 1024px) and (hover: hover) {
    .hero-buttons .btn-primary::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.5s;
    }

    .hero-buttons .btn-primary:hover::before {
        left: 100%;
    }

    .hero-buttons .btn-primary:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 15px 35px rgba(252, 82, 0, 0.4);
    }

    .hero-buttons .btn-outline-primary:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: white;
        color: white;
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 15px 35px rgba(255, 255, 255, 0.3);
    }
}

.hero-buttons .btn-outline-primary {
    border: 2px solid rgba(255, 255, 255, 0.9);
    color: white;
    background: rgba(255, 255, 255, 0.1);
    /* Use backdrop-filter with proper fallbacks */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(10px)) {
    .hero-buttons .btn-outline-primary {
        background: rgba(255, 255, 255, 0.25);
    }
}

/* Challenge Section */
.challenge-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

[data-bs-theme="dark"] .challenge-section {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
}

.challenge-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #fc5200, #ff6b35, #667eea, #764ba2);
}

.challenge-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 25px;
    padding: 60px 50px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(252, 82, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

[data-bs-theme="dark"] .challenge-card {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    border: 1px solid rgba(252, 82, 0, 0.3);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.challenge-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 35px 100px rgba(0, 0, 0, 0.2);
}

.challenge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #fc5200, #ff6b35);
}

.challenge-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #fc5200, #ff6b35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 35px;
    box-shadow: 0 15px 40px rgba(252, 82, 0, 0.4);
    position: relative;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 15px 40px rgba(252, 82, 0, 0.4); }
    50% { box-shadow: 0 15px 40px rgba(252, 82, 0, 0.6), 0 0 0 10px rgba(252, 82, 0, 0.1); }
    100% { box-shadow: 0 15px 40px rgba(252, 82, 0, 0.4); }
}

.challenge-icon i {
    font-size: 2.5rem;
    color: white;
}

/* Mobile-first approach for challenge title with fallbacks */
.challenge-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    padding: 20px 0;
    letter-spacing: -0.02em;
    
    /* Fallback colors for browsers without gradient text support */
    color: var(--theme-primary, #667eea);
}

/* Light mode: Simple, direct approach - force visible text */
.challenge-title {
    color: #4c63d2 !important;
    -webkit-text-fill-color: #4c63d2 !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    background-image: none !important;
}

/* Dark mode: Use bright, visible gradient with fallback */
[data-bs-theme="dark"] .challenge-title {
    /* Fallback color for better visibility */
    color: #a78bfa !important;
    
    /* Apply gradient only when supported */
    background: linear-gradient(135deg, #8b5cf6, #d946ef, #f59e0b) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* Fallback for browsers that don't support gradient text in dark mode */
@supports not (-webkit-background-clip: text) {
    [data-bs-theme="dark"] .challenge-title {
        color: #a78bfa !important;
        -webkit-text-fill-color: #a78bfa !important;
        background: none !important;
    }
}

/* Desktop-only gradient text effects - where they work reliably */
@media (min-width: 1024px) {
    @supports (-webkit-background-clip: text) {
        .challenge-title {
            /* Enhanced gradient using theme variables with fallbacks */
            background: linear-gradient(135deg, 
                var(--theme-primary, #667eea) 0%, 
                var(--theme-secondary, #764ba2) 25%, 
                var(--theme-accent, #f093fb) 50%, 
                var(--theme-primary, #667eea) 75%, 
                var(--theme-accent, #f093fb) 100%);
            background-size: 300% 300%;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            
            /* Animation for gradient movement */
            animation: gradientShift 4s ease-in-out infinite;
        }
    }
}


/* Desktop-only enhanced effects */
@media (min-width: 1024px) and (hover: hover) {
    @supports (filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3))) {
        .challenge-title {
            /* Add text shadow for depth and glow effect - desktop only */
            filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3)) 
                    drop-shadow(0 0 20px rgba(240, 147, 251, 0.2));
            
            /* Transform for subtle 3D effect */
            transform: perspective(1000px) rotateY(0deg);
            transition: all 0.3s ease;
        }
        
        .challenge-title:hover {
            transform: perspective(1000px) rotateY(2deg) scale(1.02);
            filter: drop-shadow(0 6px 12px rgba(102, 126, 234, 0.4)) 
                    drop-shadow(0 0 30px rgba(240, 147, 251, 0.3));
        }
    }
}

/* Mobile gets solid color text - no gradient effects */
@media (max-width: 1023px) {
    .challenge-title {
        /* Light mode: Use blue color for mobile */
        color: #4c63d2 !important;
        /* Disable all complex effects on mobile */
        animation: none !important;
        transform: none !important;
        filter: none !important;
        background: none !important;
        -webkit-text-fill-color: #4c63d2 !important;
        -webkit-background-clip: initial !important;
    }
    
    /* Dark mode: Use bright purple color for mobile */
    [data-bs-theme="dark"] .challenge-title {
        color: #a78bfa !important;
        -webkit-text-fill-color: #a78bfa !important;
        background: none !important;
        -webkit-background-clip: initial !important;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .challenge-title {
        animation: none !important;
        transition: none !important;
    }
}

/* Add a subtle stroke effect using pseudo-element - desktop only */
@media (min-width: 1024px) {
    .challenge-title::before {
        content: attr(data-text);
        position: absolute;
        top: 20px;
        left: 0;
        right: 0;
        z-index: -1;
        font-size: 3.5rem;
        font-weight: 800;
        text-align: center;
        color: transparent;
        -webkit-text-stroke: 2px rgba(102, 126, 234, 0.1);
        text-stroke: 2px rgba(102, 126, 234, 0.1);
        filter: blur(1px);
    }
}

/* Removed - handled by the unified rule above */

/* Desktop-only dark theme effects */
@media (min-width: 1024px) and (hover: hover) {
    @supports (filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.4))) {
        [data-bs-theme="dark"] .challenge-title {
            filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.4)) 
                    drop-shadow(0 0 25px rgba(240, 147, 251, 0.3));
        }
    }
}

/* Removed - handled in mobile rule above */

.challenge-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #495057;
    margin-bottom: 45px;
}

[data-bs-theme="dark"] .challenge-description {
    color: #e9ecef;
}

.challenge-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(252, 82, 0, 0.05), rgba(255, 107, 53, 0.05));
    border-radius: 15px;
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .stat-item {
    background: linear-gradient(135deg, rgba(252, 82, 0, 0.15), rgba(255, 107, 53, 0.15));
}

.stat-item:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(252, 82, 0, 0.1), rgba(255, 107, 53, 0.1));
}

[data-bs-theme="dark"] .stat-item:hover {
    background: linear-gradient(135deg, rgba(252, 82, 0, 0.25), rgba(255, 107, 53, 0.25));
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    
    /* Fallback color for mobile and unsupported browsers */
    color: #fc5200;
}

/* Desktop-only gradient text for stat numbers */
@media (min-width: 1024px) {
    @supports (-webkit-background-clip: text) {
        .stat-number {
            background: linear-gradient(135deg, #fc5200, #ff6b35);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
    }
}

.stat-label {
    font-size: 1rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

[data-bs-theme="dark"] .stat-label {
    color: #adb5bd;
}

.stat-divider {
    width: 2px;
    height: 50px;
    background: linear-gradient(135deg, #fc5200, #ff6b35);
    border-radius: 2px;
}

/* Features Section */
.features-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

[data-bs-theme="dark"] .features-section {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%);
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    
    /* Fallback colors */
    color: #2c3e50;
}

[data-bs-theme="dark"] .section-title {
    color: #f8f9fa;
}

/* Desktop-only gradient text for section titles */
@media (min-width: 1024px) {
    @supports (-webkit-background-clip: text) {
        .section-title {
            background: linear-gradient(135deg, #2c3e50, #34495e);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        
        [data-bs-theme="dark"] .section-title {
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
    }
}

.section-subtitle {
    font-size: 1.3rem;
    color: #495057;
    margin-bottom: 0;
    font-weight: 400;
}

[data-bs-theme="dark"] .section-subtitle {
    color: #e9ecef;
}

.feature-card {
    text-align: center;
    padding: 50px 35px;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #f1f3f4;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

[data-bs-theme="dark"] .feature-card {
    border: 1px solid #495057;
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.feature-icon i {
    font-size: 1.8rem;
    color: white;
}

.feature-card h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
}

[data-bs-theme="dark"] .feature-card h4 {
    color: #f8f9fa;
}

.feature-card p {
    color: #495057;
    line-height: 1.7;
    margin-bottom: 0;
}

[data-bs-theme="dark"] .feature-card p {
    color: #e9ecef;
}

/* Stats Section */
.stats-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    position: relative;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #fc5200, #ff6b35, #667eea, #764ba2);
}

.stat-box {
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 15px;
}

.stat-box:hover {
    background: rgba(252, 82, 0, 0.1);
    transform: translateY(-5px);
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    display: block;
    
    /* Fallback color for mobile and unsupported browsers */
    color: #fc5200;
}

/* Desktop-only gradient text for stat values */
@media (min-width: 1024px) {
    @supports (-webkit-background-clip: text) {
        .stat-value {
            background: linear-gradient(135deg, #fc5200, #ff6b35);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
    }
}

.stat-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #4a6741 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 500px;
    height: 500px;
    background: rgba(252, 82, 0, 0.1);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite;
}

.cta-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.cta-subtitle {
    font-size: 1.3rem;
    line-height: 1.7;
    margin-bottom: 40px;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons .btn {
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 0 10px 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.cta-buttons .btn-primary {
    background: linear-gradient(135deg, #fc5200 0%, #ff6b35 100%);
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-buttons .btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(252, 82, 0, 0.5);
}

.cta-buttons .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.cta-buttons .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .challenge-card {
        padding: 40px 30px;
    }
    
    .challenge-title {
        font-size: 2.2rem;
    }
    
    .challenge-stats {
        flex-direction: column;
        gap: 25px;
    }
    
    .stat-divider {
        width: 60px;
        height: 2px;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .cta-title {
        font-size: 2.2rem;
    }
    
    .hero-buttons .btn,
    .cta-buttons .btn {
        display: block;
        width: 100%;
        max-width: 280px;
        margin: 10px auto;
    }
}

/* Gradient animation keyframes for challenge title */
@keyframes gradientShift {
    0% { 
        background-position: 0% 50%;
        filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3)) 
                drop-shadow(0 0 20px rgba(240, 147, 251, 0.2));
    }
    50% { 
        background-position: 100% 50%;
        filter: drop-shadow(0 4px 8px rgba(240, 147, 251, 0.3)) 
                drop-shadow(0 0 20px rgba(102, 126, 234, 0.2));
    }
    100% { 
        background-position: 0% 50%;
        filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3)) 
                drop-shadow(0 0 20px rgba(240, 147, 251, 0.2));
    }
} 

/* Reduce animations and effects on mobile for better performance */
@media (max-width: 1023px) {
    /* Disable expensive animations */
    .hero-section::before,
    .hero-section::after,
    .cta-section::before {
        animation: none !important;
    }
    
    /* Simplify box shadows */
    .challenge-card,
    .feature-card {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    /* Disable hover effects that don't work well on touch */
    .challenge-card:hover,
    .feature-card:hover,
    .stat-item:hover {
        transform: none;
        box-shadow: inherit;
    }
    
    /* Simplify gradients */
    .hero-section {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
}

/* Improve performance on low-end devices */
@media (max-width: 768px) {
    /* Further reduce effects on smaller screens */
    .challenge-icon {
        animation: none;
    }
    
    /* Simplify backgrounds */
    .challenge-card,
    .feature-card {
        background: #ffffff;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    [data-bs-theme="dark"] .challenge-card,
    [data-bs-theme="dark"] .feature-card {
        background: #495057;
    }
}

/* Custom Loader Styles */
.app-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, #0075C9 0%, #004B82 70%, #003B66 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
}

.brand-logo {
    margin-bottom: 2rem;
    animation: logoPulse 2s infinite;
}

.brand-logo i {
    font-size: 4rem;
    color: #fc5200;
    filter: drop-shadow(0 0 15px rgba(252, 82, 0, 0.5));
}

.loading-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin: 1.5rem 0;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #fc5200;
    border-radius: 4px;
    width: var(--blazor-load-percentage, 0%);
    transition: width 0.2s ease;
    box-shadow: 0 0 10px rgba(252, 82, 0, 0.5);
}

.loading-messages {
    color: white;
    text-align: center;
}

.loading-messages .message {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    opacity: 0.9;
}

.loading-messages .percentage {
    font-size: 0.9rem;
    opacity: 0.7;
}

.loading-messages .percentage:after {
    content: var(--blazor-load-percentage-text, "0%");
}

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

/* Loading message animation */
@keyframes messageChange {
    0%, 100% { opacity: 0; transform: translateY(10px); }
    20%, 80% { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments for loader */
@media (max-width: 576px) {
    .loading-content {
        padding: 1.5rem;
    }
    
    .brand-logo i {
        font-size: 3rem;
    }
    
    .loading-messages .message {
        font-size: 1rem;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .brand-logo {
        animation: none;
    }
}

/* Hide original loading styles */
.loading-progress {
    display: none;
}

/* Social Feed Loading Animation Styles */
.loading-container {
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.loading-animation {
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.loading-icon {
    font-size: 4rem;
    color: var(--bs-primary);
    margin-bottom: 2rem;
}

.loading-pulse {
    animation: loadingPulse 2s infinite;
}

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

.loading-text-container {
    position: relative;
    height: 120px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-text {
    position: absolute;
    width: 100%;
    margin: 0;
    padding: 0 20px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--bs-secondary);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-in-out;
    text-align: center;
    line-height: 1.4;
    white-space: nowrap;
}

.loading-text.active {
    opacity: 1;
    transform: translateY(0);
}

/* Gradient text effect for loading messages */
.loading-text {
    background: linear-gradient(45deg, var(--bs-primary), var(--bs-info));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: loadingGradientShift 3s ease infinite;
}

@keyframes loadingGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Social Feed Specific Styles */
.workout-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 12px;
}

.workout-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.profile-picture {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-picture-placeholder {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-dark, #0d6efd));
}

.comment-avatar {
    width: 32px;
    height: 32px;
    object-fit: cover;
}

.comment-avatar-placeholder {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
}

.comment-bubble {
    background-color: var(--bs-light);
    border: 1px solid var(--bs-border-color, #dee2e6);
}

/* Dark mode support for comments */
[data-bs-theme="dark"] .comment-bubble {
    background-color: var(--bs-dark);
    border: 1px solid var(--bs-border-color, #495057);
    color: var(--bs-light);
}

.nav-tabs .nav-link {
    border-radius: 8px 8px 0 0;
    font-weight: 500;
    padding: 12px 24px;
    border: none;
    color: var(--bs-secondary);
}

.nav-tabs .nav-link.active {
    background-color: var(--bs-primary);
    color: white !important;
    border: none;
}

.nav-tabs .nav-link:hover:not(.active) {
    background-color: var(--bs-light);
    border: none;
    color: var(--bs-dark);
}

[data-bs-theme="dark"] .nav-tabs .nav-link:hover:not(.active) {
    background-color: var(--bs-dark);
    color: var(--bs-light);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-dark, #0d6efd)) !important;
}

.comment {
    animation: commentFadeIn 0.3s ease-in;
}

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

/* Responsive styles for loading animation */
@media (max-width: 768px) {
    .loading-container {
        min-height: 400px;
        padding: 1rem;
    }

    .loading-animation {
        max-width: 320px;
    }

    .loading-icon {
        font-size: 3rem;
    }

    .loading-text-container {
        height: 140px;
    }

    .loading-text {
        font-size: 1rem;
        padding: 0 10px;
        white-space: normal;
        word-wrap: break-word;
        max-width: 100%;
    }

    .profile-picture,
    .profile-picture-placeholder {
        width: 40px;
        height: 40px;
    }

    .nav-tabs .nav-link {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
} 

/* Mobile-first responsive adjustments for social feed */
@media (max-width: 576px) {
    .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .workout-card {
        border-radius: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }
}

/* Restore card styling for larger screens */
@media (min-width: 577px) {
    .workout-card {
        border-radius: 0.375rem !important;
        border: 1px solid rgba(0,0,0,.125) !important;
    }
}

/* --- Round controls for mobile responsiveness (moved from CreateWorkout.razor) --- */
.round-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.round-multiplier {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .round-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .round-controls > * {
        width: 100%;
    }

    .round-multiplier {
        width: 100%;
    }

    .round-multiplier .input-group {
        width: 100% !important;
    }

    .round-multiplier .btn {
        flex: 1;
    }
}
/* --- End round controls for mobile responsiveness --- */

.workout-notes-overview {
    background-color: #f8f9fa; /* Bootstrap light */
    color: #212529;
}

[data-bs-theme="dark"] .workout-notes-overview {
    background-color: #23272b; /* Bootstrap dark */
    color: #f8f9fa;
}

/* ================================
   Challenge Loading Overlay (Theme-aware)
   Works with Bootstrap data-bs-theme
   ================================ */

/* Base overlay */
.challenge-loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.35); /* default; overridden per theme below */
    z-index: 1050;
}

/* Card */
.challenge-loading-card {
    width: min(520px, 92vw);
    padding: 2rem 1.5rem;
    border-radius: 1.25rem;
    background: var(--bs-body-bg, #ffffff);
    color: var(--bs-body-color, #212529);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    text-align: center;
}

/* Title & logo */
.challenge-loading-logo {
    font-size: 2.25rem;
    line-height: 1;
}

.challenge-loading-title {
    margin: 0.75rem 0 1.25rem;
    font-weight: 700;
}

/* Progress */
.challenge-loading-progress {
    margin: 0.5rem auto 0;
    width: 100%;
    max-width: 420px;
}

.challenge-loading-bar {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.08); /* light default; overridden below */
}

.challenge-loading-bar-fill {
    height: 100%;
    width: 35%;
    border-radius: inherit;
    animation: challenge-load-pulse 1.2s ease-in-out infinite;
    background: linear-gradient( 90deg, rgba(13, 110, 253, 0.15), rgba(13, 110, 253, 0.45), rgba(13, 110, 253, 0.15) ); /* uses Bootstrap primary hue */
}

/* Dots */
.challenge-loading-dots {
    display: inline-flex;
    gap: 6px;
    margin-top: 0.6rem;
}

    .challenge-loading-dots span {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.35);
        animation: challenge-bounce 1.2s infinite ease-in-out;
    }

        .challenge-loading-dots span:nth-child(2) {
            animation-delay: 0.15s;
        }

        .challenge-loading-dots span:nth-child(3) {
            animation-delay: 0.3s;
        }

/* Tip */
.challenge-loading-tip {
    margin-top: 1rem;
    opacity: 0.65;
    font-size: 0.95rem;
}

/* ================================
   Light / Dark theme overrides
   ================================ */

/* LIGHT THEME */
[data-bs-theme="light"] .challenge-loading-overlay {
    background: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="light"] .challenge-loading-card {
    background: #ffffff;
    color: #212529;
}

[data-bs-theme="light"] .challenge-loading-bar {
    background: rgba(0, 0, 0, 0.08);
}

[data-bs-theme="light"] .challenge-loading-dots span {
    background: rgba(0, 0, 0, 0.35);
}

/* DARK THEME */
[data-bs-theme="dark"] .challenge-loading-overlay {
    background: rgba(0, 0, 0, 0.55);
}

[data-bs-theme="dark"] .challenge-loading-card {
    background: #1b1f24; /* pleasant dark surface */
    color: #e7e9ee;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .challenge-loading-bar {
    background: rgba(255, 255, 255, 0.12);
}

[data-bs-theme="dark"] .challenge-loading-bar-fill {
    background: linear-gradient( 90deg, rgba(13, 110, 253, 0.25), rgba(13, 110, 253, 0.55), rgba(13, 110, 253, 0.25) );
}

[data-bs-theme="dark"] .challenge-loading-dots span {
    background: rgba(255, 255, 255, 0.55);
}

[data-bs-theme="dark"] .challenge-loading-tip {
    opacity: 0.7;
}

/* ================================
   Motion preferences & accessibility
   ================================ */

@keyframes challenge-load-pulse {
    0% {
        transform: translateX(-60%);
    }

    50% {
        transform: translateX(10%);
    }

    100% {
        transform: translateX(120%);
    }
}

@keyframes challenge-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    40% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* Reduced motion: keep it subtle & accessible */
@media (prefers-reduced-motion: reduce) {
    .challenge-loading-bar-fill,
    .challenge-loading-dots span {
        animation: none !important;
    }

    .challenge-loading-bar-fill {
        width: 55%; /* static hint of progress */
    }
}

/* ================================
   Small-screen niceties
   ================================ */
@media (max-width: 576px) {
    .challenge-loading-card {
        padding: 1.5rem 1.25rem;
        border-radius: 1rem;
    }

    .challenge-loading-logo {
        font-size: 2rem;
    }

    .challenge-loading-title {
        font-size: 1.15rem;
    }

    /* Add to wwwroot/css/app.css */
    :root {
        /* Light theme variables */
        --highlight-bg-light: rgba(13, 110, 253, 0.08);
        --highlight-bg-hover-light: rgba(13, 110, 253, 0.12);
        --highlight-text-light: #0d6efd;
        --table-hover-light: rgba(0, 0, 0, 0.02);
        --card-header-custom: #f8f9fa;
        --card-footer-custom: #fd7e14; /* Bootstrap orange */
        --card-footer-text: #ffffff; /* White text on orange */
        --border-light: #dee2e6;
        --text-muted-light: #6c757d;
        --table-header-custom: #f8f9fa;
    }

    [data-bs-theme="dark"] {
        /* Dark theme variables */
        --highlight-bg-light: rgba(13, 202, 240, 0.15);
        --highlight-bg-hover-light: rgba(13, 202, 240, 0.25);
        --highlight-text-light: #0dcaf0;
        --table-hover-light: rgba(255, 255, 255, 0.05);
        --card-header-custom: #2b3035;
        --card-footer-custom: #e8590c; /* Darker orange for dark theme */
        --card-footer-text: #ffffff; /* White text on orange */
        --border-light: #495057;
        --text-muted-light: #adb5bd;
        --table-header-custom: #2b3035;
    }

    /* Smart highlighting that works in both themes */
    .highlight-value {
        background-color: var(--highlight-bg-light) !important;
        font-weight: 500;
        color: var(--highlight-text-light) !important;
        transition: all 0.2s ease-in-out;
        border-radius: 4px;
        padding: 2px 4px;
    }

        .highlight-value:hover {
            background-color: var(--highlight-bg-hover-light) !important;
            transform: scale(1.02);
        }

    /* Custom table header class with unique name */
    .table-header-custom {
        background-color: var(--table-header-custom) !important;
        border-bottom: 2px solid var(--border-light) !important;
        color: inherit !important;
    }

    /* Custom card header class with unique name */
    .card-header-custom {
        background-color: var(--card-header-custom) !important;
        border-bottom: 1px solid var(--border-light) !important;
        color: inherit !important;
    }

    /* Table styling improvements with theme support */
    .table-hover tbody tr:hover {
        background-color: var(--table-hover-light);
    }

    .table-sm th {
        font-size: 0.875rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 2px solid var(--border-light);
    }

    .table-sm td {
        font-size: 0.875rem;
        vertical-align: middle;
    }

    /* Responsive table improvements */
    .table-responsive {
        border-radius: 0.5rem;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    }

    [data-bs-theme="dark"] .table-responsive {
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
    }

    /* Dark mode specific table adjustments */
    [data-bs-theme="dark"] .table {
        color: #e9ecef;
    }

    [data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td {
        background-color: rgba(255, 255, 255, 0.02);
    }

    [data-bs-theme="dark"] .table-hover tbody tr:hover {
        background-color: rgba(255, 255, 255, 0.08);
    }

    /* Icon colors that adapt to theme */
    [data-bs-theme="dark"] .text-primary {
        color: #0dcaf0 !important;
    }

    [data-bs-theme="dark"] .text-muted {
        color: var(--text-muted-light) !important;
    }

    /* Add to wwwroot/css/app.css */

    /* Custom orange footer class */
    .orange-footer {
        --bs-card-bg: #fd7e14 !important;
        background-color: #fd7e14 !important;
        color: white !important;
        border-top: 1px solid rgba(0, 0, 0, 0.125) !important;
        padding: 0.75rem 1.25rem !important;
        border-radius: 0 0 calc(0.375rem - 1px) calc(0.375rem - 1px) !important;
    }

    /* Dark mode override */
    [data-bs-theme="dark"] .orange-footer {
        --bs-card-bg: #fd7e14 !important;
        background-color: #e8590c !important;
        color: white !important;
        border-top: 1px solid rgba(255, 255, 255, 0.125) !important;
    }

    /* Hover effect for better UX */
    .orange-footer:hover {
        background-color: #e8590c !important;
        transition: background-color 0.2s ease;
    }

    [data-bs-theme="dark"] .orange-footer:hover {
        background-color: #d63384 !important;
        transition: background-color 0.2s ease;
    }
}