.product-shell-header {
    position: relative;
    background: var(--overlay-soft);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--divider);
    box-shadow: 0 18px 36px color-mix(in srgb, var(--shadow-color) 8%, transparent);
    transition: all var(--transition-base);
}

.product-shell-header::after {
    content: '';
    position: absolute;
    inset: auto 0 -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 40%, transparent), transparent);
    opacity: 0.72;
    pointer-events: none;
}

.product-shell-header .container {
    position: relative;
}

.product-shell-brand-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.product-shell-brand-image {
    display: block;
    width: auto;
    filter: drop-shadow(0 12px 24px var(--hero-glow));
    transform-origin: left center;
    transition: all var(--transition-base);
}

.product-shell-brand-link:hover .product-shell-brand-image,
.product-shell-brand-link:focus-visible .product-shell-brand-image {
    transform: scale(1.05);
}

.theme-logo.theme-logo-light {
    display: inline-block;
}

.theme-logo.theme-logo-dark {
    display: none;
}

:root[data-theme="dark"] .theme-logo.theme-logo-light {
    display: none;
}

:root[data-theme="dark"] .theme-logo.theme-logo-dark {
    display: inline-block;
}

.navbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.product-shell-theme-selector {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--overlay-muted);
    box-shadow: var(--shadow-sm);
}

.product-shell-theme-option {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    min-height: 36px;
    padding: 0.45rem 0.7rem;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.product-shell-theme-option:hover {
    background: var(--overlay-accent);
    color: var(--text-primary);
}

.product-shell-theme-option-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.product-shell-theme-option-label {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
}

:root:not([data-theme-mode]) .product-shell-theme-option-auto,
:root[data-theme-mode="auto"] .product-shell-theme-option-auto,
:root[data-theme-mode="light"] .product-shell-theme-option-light,
:root[data-theme-mode="dark"] .product-shell-theme-option-dark {
    background: color-mix(in srgb, var(--primary) 14%, var(--overlay-muted));
    color: var(--primary);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 34%, transparent);
}

.navbar-toggler {
    color: var(--text-primary);
}

.product-shell-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: transparent;
    padding: 0.35rem 0.55rem;
    list-style: none;
    cursor: pointer;
}

.product-shell-menu-toggle::-webkit-details-marker {
    display: none;
}

.product-shell-mobile-menu[open] .product-shell-menu-toggle {
    background: var(--overlay-accent);
}

.product-shell-menu-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.product-shell-header-actions {
    display: flex;
    align-items: center;
}

.product-shell-nav-collapse {
    gap: var(--space-md);
}

.product-shell-mobile-menu {
    position: static;
}

.product-shell-mobile-panel {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0.75rem;
    left: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-dropdown);
    max-width: min(32rem, calc(100vw - 1.5rem));
    margin-left: auto;
}

.product-shell-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    overflow: hidden;
}

.product-shell-nav-link:hover,
.product-shell-nav-link:focus-visible {
    color: var(--text-primary);
}

.product-shell-nav-text {
    position: relative;
    z-index: 2;
}

.product-shell-nav-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 16%, transparent), color-mix(in srgb, var(--accent-cyan) 12%, transparent));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.product-shell-nav-link:hover .product-shell-nav-glow,
.product-shell-nav-link:focus-visible .product-shell-nav-glow {
    opacity: 1;
}

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

.footer-modern {
    background: transparent;
    border-top: 1px solid var(--divider);
    padding: var(--space-3xl) 0 var(--space-xl);
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.footer-content {
    position: relative;
    z-index: 2;
    margin: 0 auto;
    max-width: 48rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.product-shell-footer-logo {
    display: inline-block;
    width: auto;
    opacity: 0.8;
}

.copyright {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    margin-inline: auto;
    text-align: center;
    white-space: nowrap;
}

.footer-links,
.social-links {
    justify-content: center;
}

.footer-links {
    row-gap: 0.75rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: all var(--transition-fast);
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width var(--transition-base);
}

.footer-link:hover {
    color: var(--primary);
}

.footer-link:hover::after {
    width: 100%;
}

.footer-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 300px;
    background: radial-gradient(circle at center, var(--spotlight) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    filter: blur(40px);
}

#blazor-error-ui {
    background: color-mix(in srgb, var(--error) 92%, var(--surface));
    backdrop-filter: blur(10px);
    bottom: 0;
    box-shadow: 0 -4px 16px color-mix(in srgb, var(--error) 26%, transparent);
    color: white;
    display: none;
    left: 0;
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    z-index: var(--z-toast);
    border-top: 1px solid color-mix(in srgb, var(--error) 36%, white);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

#blazor-error-ui .dismiss:hover {
    opacity: 1;
}

#blazor-error-ui .reload {
    color: white;
    font-weight: 700;
    text-decoration: underline;
    margin-left: 0.5rem;
}

.not-found-container {
    position: relative;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    overflow: hidden;
}

.not-found-content {
    position: relative;
    text-align: center;
    max-width: 600px;
    z-index: 1;
    background: var(--gradient-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    box-shadow: var(--shadow-2xl);
    transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.not-found-content:hover {
    box-shadow: var(--shadow-2xl);
    border-color: var(--border-light);
}

.error-code {
    font-size: clamp(6rem, 15vw, 10rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.not-found-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.1;
}

.error-message {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-weight: 400;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.not-found-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--gradient-primary);
    color: var(--text-on-accent);
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-primary);
    position: relative;
    overflow: hidden;
}

.not-found-action::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glass);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.not-found-action:hover {
    box-shadow: var(--shadow-xl);
    color: var(--text-on-accent);
}

.not-found-action:hover::before {
    opacity: 1;
}

.not-found-action i,
.not-found-action span {
    position: relative;
    z-index: 1;
}

.not-found-action i {
    font-size: 1.25rem;
}

.glow-effect {
    position: absolute;
    border-radius: 9999px;
    filter: blur(96px);
    opacity: 0.12;
    pointer-events: none;
}

.glow-primary {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -150px;
    right: -150px;
}

.glow-cyan {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    bottom: -125px;
    left: -125px;
}

@media (max-width: 991.98px) {
    .product-shell-header {
        background: var(--overlay-strong);
    }

    .product-shell-theme-option {
        padding-inline: 0.6rem;
    }

    .product-shell-theme-option-label {
        display: none;
    }

    .product-shell-nav-collapse {
        padding-top: 1rem;
    }

    .product-shell-nav-link {
        width: 100%;
        justify-content: flex-start;
        border-radius: var(--radius-md);
        padding: 0.85rem 1rem;
    }

    .product-shell-header-actions {
        width: 100%;
    }

    .product-shell-mobile-panel .product-shell-header-actions .btn {
        width: 100%;
    }

    .product-shell-mobile-panel .navbar-nav {
        align-items: stretch;
    }

    .footer-modern {
        padding-top: var(--space-2xl);
    }

    .copyright {
        white-space: normal;
    }
}

@media (max-width: 768px) {
    .not-found-container {
        padding: 2rem 1rem;
        min-height: calc(100vh - 150px);
    }

    .not-found-content {
        padding: 2rem 1.5rem;
    }

    .error-code {
        font-size: 5rem;
        margin-bottom: 1rem;
    }

    .not-found-content h1 {
        font-size: 1.75rem;
    }

    .error-message {
        font-size: 1rem;
    }

    .not-found-action {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }

    .glow-primary,
    .glow-cyan {
        width: 200px;
        height: 200px;
    }
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-logo.theme-logo-light {
        display: none;
    }

    :root:not([data-theme]) .theme-logo.theme-logo-dark {
        display: inline-block;
    }
}

@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .not-found-content {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}
