/* ============================================================
   404 错误页样式 404.css
   ============================================================ */

.error-hero {
    position: relative;
    padding: calc(var(--header-height) + 70px) 0 80px;
    background:
        radial-gradient(60% 60% at 20% 10%, rgba(51, 175, 225, 0.18), transparent 70%),
        radial-gradient(50% 50% at 85% 30%, rgba(255, 107, 107, 0.14), transparent 70%),
        radial-gradient(40% 40% at 50% 100%, rgba(255, 210, 63, 0.18), transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #f4f8fb 100%);
    overflow: hidden;
    text-align: center;
}

.error-doodles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.error-doodle {
    position: absolute;
    opacity: 0.65;
}
.err-d1 { top: 14%;  left: 6%;   width: 220px; transform: rotate(-8deg); }
.err-d2 { top: 22%;  right: 5%;  width: 160px; transform: rotate(10deg); }
.err-d3 { bottom: 18%; left: 10%; width: 110px; transform: rotate(-15deg); }
.err-d4 { bottom: 22%; right: 8%; width: 120px; transform: rotate(6deg); }
.err-d5 { top: 50%;   left: 48%; width: 56px;  opacity: 0.4; }

.error-doodle path,
.error-doodle circle {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: errStroke 2.4s ease forwards;
}
.err-d1 path { animation-delay: 0.05s; }
.err-d2 path { animation-delay: 0.25s; }
.err-d3 path { animation-delay: 0.45s; }
.err-d4 path { animation-delay: 0.65s; }
.err-d5 circle { animation-delay: 0.85s; }

@keyframes errStroke {
    to { stroke-dashoffset: 0; }
}

.error-inner {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
}

.error-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(51, 175, 225, 0.12);
    color: var(--color-primary-dark);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 28px;
}

/* ---------- 巨型 404 数字 ---------- */
.error-number {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2vw, 24px);
    margin: 0 auto 24px;
    line-height: 1;
}

.err-digit {
    font-size: clamp(120px, 22vw, 260px);
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #33AFE1 0%, #1F8FBF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    -webkit-user-select: none;
    user-select: none;
}

.err-d-4-1 {
    transform: rotate(-4deg);
    animation: errBounce 3s ease-in-out infinite;
}
.err-d-4-2 {
    transform: rotate(4deg);
    animation: errBounce 3s ease-in-out 0.4s infinite;
}
@keyframes errBounce {
    0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
    50%      { transform: translateY(-10px) rotate(var(--r, 0deg)); }
}
.err-d-4-1 { --r: -4deg; }
.err-d-4-2 { --r: 4deg; }

/* 中间的 0 改成一个画笔围绕的圆 */
.err-d-0 {
    position: relative;
    width: clamp(110px, 18vw, 220px);
    height: clamp(130px, 22vw, 260px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.err-d-0 svg:first-of-type {
    width: 100%;
    height: 100%;
    animation: errSpin 12s linear infinite;
}
.err-pen {
    position: absolute;
    width: 56px;
    height: 56px;
    top: 4%;
    right: 4%;
    filter: drop-shadow(0 6px 12px rgba(31, 143, 191, 0.35));
    animation: errPen 4s ease-in-out infinite;
}
@keyframes errSpin {
    to { transform: rotate(360deg); }
}
@keyframes errPen {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50%      { transform: translate(-6px, 6px) rotate(-8deg); }
}

/* ---------- 文案 ---------- */
.error-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    margin: 0 0 18px;
    color: var(--color-text);
    line-height: 1.3;
}
.error-title .en {
    display: block;
    font-size: clamp(14px, 1.5vw, 18px);
    font-weight: 500;
    color: var(--color-text-muted);
    margin-top: 10px;
    letter-spacing: 0.02em;
}

.error-desc {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.85;
    max-width: 640px;
    margin: 0 auto 36px;
}

.error-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.error-actions .btn {
    padding: 14px 28px;
    font-size: 15px;
    gap: 8px;
}

/* ---------- 快捷入口卡片 ---------- */
.error-quicklinks-head {
    text-align: center;
    margin-bottom: 36px;
}
.error-quicklinks-head h2 {
    font-size: clamp(22px, 2.6vw, 30px);
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--color-text);
}
.error-quicklinks-head p {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0;
}

.error-quicklinks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1080px;
    margin: 0 auto;
}

.error-link-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 26px 24px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}
.error-link-card::after {
    content: "→";
    position: absolute;
    top: 22px;
    right: 22px;
    font-size: 18px;
    color: var(--color-text-muted);
    transition: transform 0.25s ease, color 0.25s ease;
}
.error-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(26, 39, 51, 0.10);
    border-color: var(--color-primary);
}
.error-link-card:hover::after {
    transform: translateX(4px);
    color: var(--color-primary);
}

.elc-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--c, #33AFE1) 14%, transparent);
    color: var(--c, #33AFE1);
}
.elc-icon svg { width: 22px; height: 22px; }

.elc-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
}
.elc-sub {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .error-quicklinks { grid-template-columns: repeat(2, 1fr); }
    .err-d1, .err-d2 { width: 140px; }
    .err-d3, .err-d4 { width: 90px; }
}
@media (max-width: 560px) {
    .error-hero { padding: calc(var(--header-height) + 40px) 0 60px; }
    .error-quicklinks { grid-template-columns: 1fr; }
    .err-d-4-1, .err-d-4-2 { font-size: 110px; }
    .err-d-0 { width: 90px; height: 110px; }
    .err-pen { width: 40px; height: 40px; }
}
