:root {
    --not-found-accent: #3b82f6;
    --not-found-accent-dark: #1d4ed8;
    --not-found-ink: #0f172a;
    --not-found-muted: #475569;
    --not-found-surface: rgba(255, 255, 255, 0.92);
    --not-found-border: rgba(59, 130, 246, 0.16);
    --not-found-shadow: 0 30px 80px rgba(15, 23, 42, 0.12);
}

html,
body {
    min-height: 100%;
}

body.not-found-page {
    margin: 0;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 32%),
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.16), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.not-found-page #header-placeholder,
.not-found-page #footer-placeholder {
    position: relative;
    z-index: 10;
}

.not-found-page .main-content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7.5rem 1.25rem 4rem;
}

.not-found-page .error-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: min(720px, 100%);
    padding: 3rem clamp(1.5rem, 4vw, 3.5rem);
    border-radius: 32px;
    background: var(--not-found-surface);
    border: 1px solid var(--not-found-border);
    box-shadow: var(--not-found-shadow);
    backdrop-filter: blur(14px);
    overflow: hidden;
}

.not-found-page .error-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.08), transparent 38%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.12), transparent 30%);
    pointer-events: none;
}

.not-found-page .error-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--not-found-accent-dark);
    border: 1px solid rgba(59, 130, 246, 0.14);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.not-found-page .error-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 112px;
    margin-bottom: 1.75rem;
    border-radius: 28px;
    font-size: 3.4rem;
    color: var(--not-found-accent);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(219, 234, 254, 0.95) 100%);
    border: 1px solid rgba(59, 130, 246, 0.16);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 18px 40px rgba(59, 130, 246, 0.18);
}

.not-found-page .error-title {
    position: relative;
    z-index: 1;
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.05;
    color: var(--not-found-ink);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.not-found-page .error-message {
    position: relative;
    z-index: 1;
    font-size: 1.08rem;
    line-height: 1.75;
    color: var(--not-found-muted);
    max-width: 560px;
    margin: 0 0 1.5rem;
}

.not-found-page .error-code {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.95rem;
    background: #f8fbff;
    color: var(--not-found-ink);
    padding: 0.85rem 1.05rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    margin-bottom: 2rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    word-break: break-word;
}

.not-found-page .error-code strong {
    color: var(--not-found-accent-dark);
}

.not-found-page .error-actions {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.not-found-page .error-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 52px;
    padding: 0.95rem 1.35rem;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--not-found-accent) 0%, var(--not-found-accent-dark) 100%);
    border: none;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 18px 36px rgba(59, 130, 246, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.not-found-page .error-actions button.btn {
    cursor: pointer;
    font: inherit;
}

.not-found-page .error-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(59, 130, 246, 0.34);
    filter: saturate(1.05);
}

.not-found-page .error-actions .btn:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.24);
    outline-offset: 4px;
}

.not-found-page .error-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.88);
    color: var(--not-found-ink);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.not-found-page .error-actions .btn-secondary:hover {
    box-shadow: 0 16px 30px rgba(148, 163, 184, 0.18);
    filter: none;
}

.not-found-page .class-access-card {
    align-items: stretch;
    text-align: left;
}

.not-found-page .class-access-card .error-badge,
.not-found-page .class-access-card .error-icon,
.not-found-page .class-access-card .class-access-name,
.not-found-page .class-access-card .error-title,
.not-found-page .class-access-card .error-message,
.not-found-page .class-access-card .error-actions {
    align-self: center;
}

.not-found-page .class-access-card .error-message {
    text-align: center;
    max-width: 620px;
    margin-bottom: 2.25rem;
}

.not-found-page .class-access-name {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 1.25rem;
    padding: 0.85rem 1.15rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(219, 234, 254, 0.82) 100%);
    border: 1px solid rgba(59, 130, 246, 0.16);
    color: var(--not-found-accent-dark);
    font-size: 1rem;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    max-width: min(100%, 520px);
    text-align: center;
}

.not-found-page .class-access-details {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    margin: 0 0 2.5rem;
}

.not-found-page .class-access-detail {
    display: flex;
    justify-content: center;
    width: 100%;
}

.not-found-page .class-access-detail-value {
    color: var(--not-found-ink);
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    line-height: 1.3;
    font-weight: 700;
    text-align: center;
    max-width: 28ch;
}

.not-found-page .class-access-card .error-actions {
    margin-top: 0.25rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 1.25rem;
    width: min(100%, 720px);
    padding-inline: 0.75rem;
}

.not-found-page .class-access-card .error-actions .btn {
    width: 100%;
    justify-content: center;
}

.not-found-page .error-orb {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(12px);
    opacity: 0.9;
}

.not-found-page .error-orb.left {
    top: 30px;
    left: -40px;
    width: 140px;
    height: 140px;
    background: rgba(96, 165, 250, 0.15);
}

.not-found-page .error-orb.right {
    right: -22px;
    bottom: 26px;
    width: 110px;
    height: 110px;
    background: rgba(59, 130, 246, 0.12);
}

@media (max-width: 640px) {
    .not-found-page .main-content {
        padding: 6.5rem 0.75rem 2rem;
        align-items: stretch;
    }

    .not-found-page .error-container {
        min-height: calc(100vh - 112px);
        border-radius: 24px;
        padding: 2rem 1.2rem;
    }

    .not-found-page .error-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .not-found-page .class-access-card .error-actions {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .not-found-page .class-access-detail-value {
        font-size: 1.08rem;
    }

    .not-found-page .error-icon {
        width: 92px;
        height: 92px;
        font-size: 2.8rem;
        border-radius: 24px;
    }
}
