/* 404 page + meteor dodge game */
.page404 {
    width: 90%;
    margin: 0 auto 28px;
    max-width: 860px;
}

.page404-hero {
    text-align: center;
    margin: 8px auto 20px;
}

.page404-code {
    margin: 0;
    font-size: clamp(64px, 14vw, 110px);
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #365a9c;
    text-align: center;
    text-shadow: 0 2px 0 #d8e1ef;
}

.page404-hero h1 {
    margin: 6px 0 10px;
    padding-top: 0;
    font-size: clamp(22px, 4vw, 30px);
    line-height: 1.25;
}

.page404-lead {
    margin: 0 auto;
    max-width: 34em;
    text-align: center;
    font-size: 18px;
    line-height: 1.45;
    color: #333;
}

.page404-path {
    margin: 12px auto 0;
    max-width: 40em;
    padding: 8px 12px;
    background: #f0f4fa;
    border: 1px solid #c5d2e8;
    border-radius: 6px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 14px;
    line-height: 1.4;
    color: #555;
    word-break: break-all;
    text-align: center;
}

.page404-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 12px;
    margin: 18px 0 8px;
    padding: 0;
    list-style: none;
}

.page404-actions li {
    margin: 0;
    padding: 0 !important;
}

.page404-actions a {
    display: inline-block;
    padding: 10px 16px;
    border: 2px solid #2E629D;
    border-radius: 6px;
    background: #fff;
    color: #2E629D;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
}

.page404-actions a:hover {
    background: #d8e1ef;
    color: #1a3f6e;
}

.page404-actions a.is-primary {
    background: #2E629D;
    color: #fff;
}

.page404-actions a.is-primary:hover {
    background: #1a3f6e;
    color: #fff;
}

.page404-game-section {
    margin: 28px auto 32px;
}

.page404-game-section h2 {
    text-align: center;
    margin: 0 0 6px;
    padding-top: 0;
}

.page404-game-hint {
    text-align: center;
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.4;
    color: #555;
}

.bolide-hud {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: bold;
    color: #365a9c;
}

.bolide-stage {
    position: relative;
    margin: 0 auto;
    max-width: 640px;
    border: 2px solid #2E629D;
    border-radius: 10px;
    overflow: hidden;
    background: #0a1224;
    box-shadow: 0 8px 24px rgba(26, 53, 96, 0.25);
    touch-action: none;
}

.bolide-stage canvas {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: top;
    cursor: grab;
}

.bolide-stage canvas:active {
    cursor: grabbing;
}

.bolide-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    background: rgba(8, 16, 32, 0.72);
    color: #fff;
    text-align: center;
}

.bolide-overlay[hidden] {
    display: none !important;
}

.bolide-overlay strong {
    display: block;
    font-size: clamp(22px, 5vw, 28px);
    line-height: 1.2;
    color: #ffd27a;
}

.bolide-overlay p {
    margin: 0;
    max-width: 22em;
    text-align: center;
    font-size: 15px;
    line-height: 1.4;
    color: #dce8ff;
}

.bolide-overlay button {
    margin-top: 8px;
    appearance: none;
    border: none;
    border-radius: 6px;
    padding: 12px 22px;
    background: #2E629D;
    color: #fff;
    font: inherit;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
}

.bolide-overlay button:hover {
    background: #1a3f6e;
}

.page404-products h2 {
    text-align: center;
    margin: 0 0 14px;
    padding-top: 12px;
    border-top: 1px solid #c5d2e8;
}

.page404-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page404-grid li {
    margin: 0;
    padding: 0 !important;
}

.page404-grid a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 10px 12px;
    background: #d8e1ef;
    border: 2px solid #2E629D;
    border-radius: 6px;
    text-decoration: none;
    color: #222;
    transition: background 0.15s ease;
}

.page404-grid a:hover {
    background: #c5d2e8;
}

.page404-grid img {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: block;
}

.page404-grid span {
    display: block;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.25;
    color: #365a9c;
}

.page404-grid small {
    display: block;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    color: #555;
}

@media screen and (max-width: 40em) {
    .page404 {
        width: 95%;
    }

    .page404-lead {
        font-size: 16px;
    }

    .bolide-hud {
        gap: 16px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bolide-stage {
        box-shadow: none;
    }
}
