:root {
    --error-bg: #f3f8fc;
    --error-bg-soft: #e7f1f9;
    --error-primary: #143c5a;
    --error-accent: #9fd7ff;
    --error-accent-strong: #5ea9dd;
    --error-text: #1a2c3b;
    --error-muted: #4b6477;
    --error-card: #ffffff;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body.acne-error-body {
    min-height: 100vh;
    font-family: "Open Sans", "Segoe UI", Tahoma, sans-serif;
    color: var(--error-text);
    background:
        radial-gradient(circle at 8% 10%, rgba(159, 215, 255, 0.36) 0, rgba(159, 215, 255, 0) 44%),
        radial-gradient(circle at 92% 14%, rgba(20, 60, 90, 0.14) 0, rgba(20, 60, 90, 0) 34%),
        linear-gradient(180deg, var(--error-bg) 0%, var(--error-bg-soft) 100%);
}

.acne-error-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
    overflow: hidden;
}

.acne-error-page::before,
.acne-error-page::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.acne-error-page::before {
    width: 420px;
    height: 420px;
    top: -220px;
    right: -140px;
    background: linear-gradient(135deg, rgba(159, 215, 255, 0.45), rgba(20, 60, 90, 0.08));
}

.acne-error-page::after {
    width: 360px;
    height: 360px;
    left: -180px;
    bottom: -180px;
    background: linear-gradient(135deg, rgba(20, 60, 90, 0.2), rgba(159, 215, 255, 0.2));
}

.acne-error-shell {
    position: relative;
    z-index: 2;
    width: min(920px, 100%);
    background: var(--error-card);
    border-radius: 24px;
    box-shadow: 0 20px 52px rgba(20, 60, 90, 0.16);
    padding: 26px;
}

.acne-error-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}

.acne-error-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--error-primary);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 14px;
}

.acne-error-logo img {
    width: 56px;
    height: auto;
}

.acne-error-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--error-primary);
    background: rgba(159, 215, 255, 0.35);
}

.acne-error-content {
    border-radius: 18px;
    padding: 28px;
    background: linear-gradient(135deg, #fff 0%, #f7fbff 100%);
    border: 1px solid rgba(20, 60, 90, 0.08);
}

.acne-error-code {
    margin: 0;
    font-family: "Roboto Condensed", "Arial Narrow", sans-serif;
    font-size: clamp(72px, 13vw, 156px);
    line-height: 0.92;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--error-primary);
}

.acne-error-title {
    margin: 12px 0 8px;
    font-family: "Roboto Condensed", "Arial Narrow", sans-serif;
    font-size: clamp(28px, 4.8vw, 46px);
    line-height: 1.04;
    font-weight: 700;
    color: var(--error-primary);
}

.acne-error-text {
    margin: 0;
    max-width: 680px;
    color: var(--error-muted);
    font-size: 17px;
    line-height: 1.6;
}

.acne-error-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.acne-error-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.acne-error-btn:hover {
    transform: translateY(-1px);
}

.acne-error-btn_primary {
    color: #fff;
    background: var(--error-primary);
    box-shadow: 0 10px 26px rgba(20, 60, 90, 0.28);
}

.acne-error-btn_secondary {
    color: var(--error-primary);
    background: rgba(159, 215, 255, 0.4);
}

.acne-error-footer-note {
    margin-top: 18px;
    font-size: 13px;
    color: #6f8596;
}

.acne-error-humor {
    display: inline-flex;
    margin-top: 14px;
    border-radius: 10px;
    background: rgba(20, 60, 90, 0.08);
    color: var(--error-primary);
    padding: 8px 11px;
    font-size: 13px;
    font-weight: 700;
}

.acne-error-debug {
    margin-top: 18px;
    padding: 12px;
    border-radius: 10px;
    background: #f8f3f3;
    border: 1px solid rgba(165, 44, 44, 0.18);
    color: #5c1f1f;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 700px) {
    .acne-error-shell {
        border-radius: 18px;
        padding: 18px;
    }

    .acne-error-content {
        padding: 20px;
    }

    .acne-error-logo img {
        width: 48px;
    }

    .acne-error-text {
        font-size: 15px;
    }

    .acne-error-actions {
        flex-direction: column;
    }

    .acne-error-btn {
        width: 100%;
    }
}
