﻿/* 404 Code */
.not-found {
    background-image: url("/img/error/404.gif");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 800px auto; /* width 520px, height auto */
    height: 380px; /* adjust to what looks good */
    text-align: center;
}


.content-box {
    background-color: var(--sa-card-bg) !important;
    box-shadow: var(--shadow-box);
    padding: 20px 20px;
    margin-bottom: 20px;
    border-radius: var(--sa-radius);
    border: 1px solid var(--sa-border-color);
}


@media (max-width: 576px) {
    .not-found {
        background-size: 320px auto;
        height: 250px;
    }
}

.not-found .title {
    color: var(--sa-heading-color)
}

.not-found-desc {
    color: var(--sa-heading-color)
}

/* 503 Code */

.error-503 .container {
    min-height: 60vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center; /* center, not far apart */
    gap: 3rem; /* distance between text and cards */
    direction: ltr; /* so first child = left, second = right */
}

/* Text column (keep RTL inside) */
.error-503 .error {
    max-width: 420px;
    text-align: right;
    direction: rtl;
}

/* Stack of cards column */
.error-503 .stack-container {
    position: relative;
    width: 340px;
    height: 220px;
}

/* Layout for the 503 container */
.content > .container {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding-top: 60px;
    padding-bottom: 60px;
}

/* Left side text block */
.error {
    max-width: 420px;
    justify-items: center;
}

    .error h1 {
        font-size: 4rem;
        margin-bottom: 0.25rem;
    }

    .error h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .error p {
        margin-bottom: 0.4rem;
    }

    .error .subtitle {
        font-size: 0.8rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #b0b0b0;
    }

/* Right side: stack of cards */
.stack-container {
    position: relative;
    width: 340px;
    height: 220px;
}

/* Each card container sits on top of each other */
.card-container {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.perspec {
    perspective: 1000px;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Card itself */
.card {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    background: #1f2933;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
    transform-style: preserve-3d;
    /* base transform from CSS variables used in inline style */
    transform: translateX(var(--spreaddist, 0)) translateY(var(--vertdist, 0)) scale(var(--scaledist, 1));
    animation: floatCard 4s ease-in-out infinite;
}

/* Slightly different timing per stack item */
.card-container:nth-child(2) .card {
    animation-delay: 0.2s;
}

.card-container:nth-child(3) .card {
    animation-delay: 0.4s;
}

.card-container:nth-child(4) .card {
    animation-delay: 0.6s;
}

.card-container:nth-child(5) .card {
    animation-delay: 0.8s;
}

.card-container:nth-child(6) .card {
    animation-delay: 1.0s;
}

/* Inner content */
.writing {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: #111827;
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
}

/* Top bar with traffic lights */
.topbar {
    height: 32px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #020617;
}

    .topbar .red,
    .topbar .yellow,
    .topbar .green {
        width: 10px;
        height: 10px;
        border-radius: 50%;
    }

    .topbar .red {
        background: #f87171;
    }

    .topbar .yellow {
        background: #fbbf24;
    }

    .topbar .green {
        background: #34d399;
    }

/* Code lines */
.code {
    flex: 1;
    padding: 12px 14px 16px;
}

    .code ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

.writeLine {
    height: 6px;
    border-radius: 3px;
    margin-bottom: 6px;
    background: linear-gradient( to left, #4b5563 var(--linelength, 70%), transparent var(--linelength, 70%) );
}

/* Red “error” line */
.errorLine {
    background: linear-gradient( to left, #f97373 var(--linelength, 50%), transparent var(--linelength, 50%) );
}

/* Floating / shaking animation */
@keyframes floatCard {
    0%, 100% {
        transform: translateX(var(--spreaddist, 0)) translateY(var(--vertdist, 0)) scale(var(--scaledist, 1));
    }

    50% {
        transform: translateX(calc(var(--spreaddist, 0) + 6px)) translateY(calc(var(--vertdist, 0) - 10px)) scale(calc(var(--scaledist, 1) + 0.02));
    }
}

/* Basic responsiveness */
@media (max-width: 992px) {
    .content > .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .stack-container {
        margin-top: 2rem;
    }
}
