html, body {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    background-color: #fafafa;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #1976d2;
}

.btn-primary {
    color: #fff;
    background-color: #1976d2;
    border-color: #1565c0;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #1976d2;
}

.content {
    padding-top: 1.1rem;
}

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

.invalid {
    outline: 1px solid #f44336;
}

.validation-message {
    color: #f44336;
}

#blazor-error-ui {
    color-scheme: light only;
    background: #fff3cd;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-top: 1px solid #ffeaa7;
}

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

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0L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NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #f44336;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

.loading-progress {
    position: relative;
    display: block;
    width: 10rem;
    height: 10rem;
    margin: 15vh auto 2rem auto;
    filter: drop-shadow(0 4px 12px rgba(25, 118, 210, 0.3));
}

    .loading-progress circle {
        fill: none;
        stroke-width: 0.4rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
        transition: all 0.3s ease-in-out;
    }

    .loading-progress circle:first-child {
        stroke: #e3f2fd;
        opacity: 0.3;
    }

    .loading-progress circle:last-child {
        stroke: url(#progressGradient);
        stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
        stroke-linecap: round;
        animation: progressPulse 2s ease-in-out infinite;
        transition: stroke-dasharray 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
    inset: calc(15vh + 4.5rem) 0 auto 0;
    color: #1565c0;
    opacity: 0.9;
    animation: textFade 2s ease-in-out infinite;
}

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

    .loading-progress-text:before {
        content: "";
        display: block;
        width: 24px;
        height: 24px;
        margin: 0 auto 0.5rem auto;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231565c0'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E") no-repeat center;
        background-size: contain;
        opacity: 0;
        animation: iconSlideIn 1s ease-out 0.5s forwards;
    }

/* Gradient definition for the progress circle */
.loading-progress:before {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

/* Add gradient via JavaScript injection or inline SVG */
.loading-progress:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2rem;
    height: 2rem;
    background: radial-gradient(circle, #1976d2 0%, #1565c0 70%, transparent 70%);
    border-radius: 50%;
    opacity: 0.1;
    animation: centerPulse 2s ease-in-out infinite;
}

/* Keyframe animations */
@keyframes progressPulse {
    0%, 100% {
        stroke-width: 0.4rem;
        opacity: 1;
    }
    50% {
        stroke-width: 0.5rem;
        opacity: 0.8;
    }
}

@keyframes textFade {
    0%, 100% {
        opacity: 0.9;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes iconSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 0.7;
        transform: translateY(0);
    }
}

@keyframes centerPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.2;
    }
}

/* Loading backdrop */
#app {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    min-height: 100vh;
    position: relative;
}

#app:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(25, 118, 210, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(21, 101, 192, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Enhanced loading state */
.loading-progress-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.loading-progress-subtitle {
    color: #666;
    font-size: 0.875rem;
    font-weight: 400;
    margin-top: 1rem;
    opacity: 0;
    animation: subtitleFadeIn 1s ease-out 1s forwards;
}

@keyframes subtitleFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 0.7;
        transform: translateY(0);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    #app {
        background: linear-gradient(135deg, #121212 0%, #1e1e1e 100%);
    }
    
    .loading-progress circle:first-child {
        stroke: #333;
    }
    
    .loading-progress-text {
        color: #90caf9;
    }
    
    .loading-progress-subtitle {
        color: #999;
    }
}

/* MudBlazor customizations */
.mud-paper {
    border-radius: 8px !important;
}

.mud-button {
    text-transform: none !important;
}

.mud-chip {
    border-radius: 16px !important;
}

/* Custom professional styling */
.professional-header {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.feature-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.file-icon {
    opacity: 0.8;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .mud-container {
        padding: 0.5rem !important;
    }
    
    .monaco-editor-container {
        height: 250px;
    }
}

/* Editor wrapper responsive height */
.editor-wrapper {
    height: 350px;
}

@media (max-width: 600px) {
    .editor-wrapper {
        height: 220px;
    }
}

@media (min-width: 601px) and (max-width: 960px) {
    .editor-wrapper {
        height: 280px;
    }
}