body .pwa-updater[b-pwa-updater] {
    --pwa-updater-font-size: 0.875rem;
    --pwa-updater-font-family: Roboto, Arial, sans-serif;
    --pwa-updater-bar-height: 40px;
    --pwa-updater-bar-color: white;
    --pwa-updater-bar-backcolor: #121E55;
    --pwa-updater-bar-z-index: 1400;
}

/* Lensa Simulation Stage CSS */
.demo-canvas-wrapper {
    position: relative;
    width: 100%;
    max-width: 720px;
    aspect-ratio: 4 / 3; /* keep it square */
    margin: 0 auto; /* center */
    overflow: hidden;
}

    /* all layers fill the wrapper */
    .demo-canvas-wrapper > canvas,
    .demo-canvas-wrapper > svg,
    #math-overlay,
    #grid-input-overlay {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

.mol-simulation-stage:fullscreen {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column; /* Stack canvas and controls */
    justify-content: center;
    background: #111; /* Dark background for focus */
    padding-left: 20px;
    padding-right: 20px;
}

    .mol-simulation-stage:fullscreen .demo-canvas-wrapper {
        max-width: 100%;
        max-height: 100vh;
    }

/* Positioning the icon container */
.canvas-controls-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 100; /* Ensure it stays above SVG and Math layers */
    display: flex;
    pointer-events: auto; /* Ensure clicks work */
}

.canvas-controls-overlay-refresh {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 100; /* Ensure it stays above SVG and Math layers */
    display: flex;
    pointer-events: auto; /* Ensure clicks work */
}

/*******************************************************************************/

.public-layout-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.public-layout-main {
    flex: 1 0 auto;
}

/* Mimicking MudBlazor's d-flex align-center justify-center */
.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90vh;
    width: 100%;
    background-color: #ffffff;
    font-family: "Avenir", sans-serif;
}

.loading-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px; /* Matches MudStack Spacing="6" (6 * 4px) */
}

.loading-logo {
    width: 300px;
    object-fit: contain;
}

.loading-label {
    font-size: 1.0rem; /* Matches MudText Typo="h5" */
    color: #424242;
    font-weight: 500;
    font-family: var(--mud-typography-h6-family)
}

/* CSS Spinner that looks exactly like MudProgressCircular */
.mud-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #594ae2; /* MudBlazor Default Primary Color */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.lensa-home {
    background: #f4f6fb;
    min-height: 100vh;
}

.lensa-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #121E55 0%, #163C7A 55%, #4689E3 100%);
}

.lensa-hero-bg {
    position: absolute;
    inset: 0;
    opacity: .22;
    background: radial-gradient(circle at 20% 22%, rgba(255,255,255,.9), transparent 16%), radial-gradient(circle at 78% 28%, rgba(255,255,255,.65), transparent 13%), radial-gradient(circle at 50% 82%, rgba(255,255,255,.55), transparent 18%);
}

.lensa-hero-content {
    position: relative;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.hero-chip {
    color: white !important;
    background-color: rgba(255,255,255,.14) !important;
    margin-bottom: 1rem;
}

.hero-title {
    color: white;
    font-weight: 800 !important;
    line-height: 1.06 !important;
    max-width: 680px;
}

.hero-subtitle {
    color: rgba(255,255,255,.82);
    margin-top: 1.5rem;
    max-width: 620px;
    line-height: 1.6;
    font-weight: 400;
}

.hero-button {
    margin-top: 2rem;
    border-radius: 18px;
    padding-inline: 1.75rem;
    font-weight: 700;
}

.hero-preview-shell {
    border-radius: 28px;
    padding: 1rem;
    background: white;
}

.lensa-metric-strip {
    border-radius: 24px !important;
    padding: 1.5rem 1rem;
    background: white;
    width: 100%;
}

.metric-item {
    text-align: center;
    padding: 1rem;
}

.metric-item-border {
    border-left: 1px solid rgba(15, 23, 42, .10);
}

.metric-value {
    font-weight: 800 !important;
    color: #121E55;
}

.metric-label {
    margin-top: .35rem;
    color: #475569;
}

@media (max-width: 600px) {
    /* .metric-item-border {
            border-left: none;
            border-right: none;
            border-top: 1px solid rgba(15, 23, 42, .10);
            border-bottom: 1px solid rgba(15, 23, 42, .10);
        } */
}

.feature-card {
    height: 100%;
    padding: 1.5rem;
    border-radius: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.section-title {
    font-weight: 800 !important;
    color: #111827;
}

.simulation-card {
    height: 100%;
    overflow: hidden;
    cursor: pointer;
}

.simulation-thumb {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.thumb-image {
    width: 100%;
    height: 100%;
}

.simulation-title {
    font-weight: 700;
}

.level-row {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .75rem;
}

@keyframes orbit-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 960px) {
    .lensa-hero-content {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .hero-title {
        font-size: 2.6rem;
    }
}

/*********************************************/
.animation-control-buttons {
    justify-content: flex-start;
}

@media (max-width: 959.98px) {
    .animation-control-buttons {
        justify-content: center;
    }
}
