.not_found {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Not Found Container */
.not-found-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background-color: #f3f4f6;
    font-family: system-ui, -apple-system, sans-serif;
    /* Safe Area Insets */
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

/* Content Wrapper */
.not-found-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 600px;
    animation: fade-in 0.5s ease;
}

/* Image Styles */
.not-found-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 6px #0000001a);
    transition: transform 0.3s ease;
    content-visibility: auto;
}

.not-found-image:hover {
    transform: translateY(-5px);
}

.not-found-image.loading {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.not-found-image.error {
    display: none;
}

.image-error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Text Styles */
.not-found-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1rem;
}

.not-found-message {
    font-size: 1.125rem;
    color: #6b7280;
    margin: 0 0 2rem;
    line-height: 1.5;
}

/* Action Buttons */
.not-found-actions {
    display: flex;
    gap: 1rem;
}

.home-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    background-color: var(--primary, #3b82f6);
    color: #ffffff;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border, #d1d5db);
    background-color: #ffffff;
    color: var(--text-secondary, #374151);
}

/* Animation */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    .not-found-container {
        padding: 1rem;
    }

    .not-found-title {
        font-size: 2rem;
    }

    .not-found-message {
        font-size: 1rem;
    }

    .not-found-actions {
        flex-direction: column;
        width: 100%;
    }

    .home-button,
    .back-button {
        width: 100%;
        justify-content: center;
    }

    .not-found-image {
        width: 300px;
        height: 300px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .not-found-container {
        background-color: #1f2937;
    }

    .not-found-title {
        color: #f3f4f6;
    }

    .not-found-message {
        color: #9ca3af;
    }

    .back-button {
        background-color: #374151;
        color: #e5e7eb;
        border-color: #4b5563;
    }

    .back-button:hover {
        background-color: #4b5563;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .not-found-content,
    .not-found-image,
    .home-button,
    .back-button {
        animation: none;
        transition: none;
    }
}

/* Focus States */
.home-button:focus,
.back-button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.home-button:focus:not(:focus-visible),
.back-button:focus:not(:focus-visible) {
    outline: none;
}

/* High Contrast Mode */
@media (forced-colors: active) {
    .home-button,
    .back-button {
        border: 1px solid;
    }
}

/* Print Styles */
@media print {
    .not-found-container {
        background: none;
        padding: 0;
        height: auto;
    }

    .not-found-actions {
        display: none;
    }

    .not-found-image {
        max-width: 400px;
    }

    .not-found-message {
        color: #000;
    }
}

/* RTL Support */
[dir="rtl"] .not-found-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .back-button svg {
    transform: scaleX(-1);
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
