:root {
    --primary-color: #2e2bb1;
    --secondary-color: #791291;
    --accent-color: #ff6b6b;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
}

.error-page-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.error-page-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%239C92AC' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.error-content {
    position: relative;
    z-index: 2;
}

/* Error Graphic */
.error-graphic {
    position: relative;
}

.error-number {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    font-size: 12rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: 6px 6px 0px rgba(46, 43, 177, 0.1);
    position: relative;
}

.number-4 {
    position: relative;
    animation: float 3s ease-in-out infinite;
}

.number-4:nth-child(1) {
    animation-delay: 0s;
}

.number-4:nth-child(3) {
    animation-delay: 1.5s;
}

.floating-planet {
    position: relative;
    width: 120px;
    height: 120px;
    animation: rotate 10s linear infinite;
}

.planet {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 30px rgba(46, 43, 177, 0.3);
}

.planet::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 30%;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    filter: blur(2px);
}

/* Error Message */
.error-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.error-description {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #4a46d4);
    border: none;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #25219c, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 43, 177, 0.3);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-dark {
    border: 2px solid var(--text-dark);
    color: var(--text-dark);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-dark:hover {
    background-color: var(--text-dark);
    color: white;
    transform: translateY(-2px);
}

/* Quick Links */
.quick-links {
    border-top: 1px solid #e2e8f0;
    padding-top: 3rem;
}

.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.quick-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(46, 43, 177, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
}

.quick-link-card i {
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.quick-link-card:hover i {
    transform: scale(1.1);
}

.quick-link-card span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Search Bar */
.error-search {
    border-top: 1px solid #e2e8f0;
    padding-top: 3rem;
}

.search-container .form-control {
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    font-size: 1rem;
}

.search-container .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(46, 43, 177, 0.25);
}

.search-container .btn {
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .error-number {
        font-size: 8rem;
        gap: 1rem;
    }
    
    .floating-planet {
        width: 80px;
        height: 80px;
    }
    
    .error-title {
        font-size: 2rem;
    }
    
    .error-description {
        font-size: 1rem;
    }
    
    .error-actions .row {
        flex-direction: column;
        align-items: center;
    }
    
    .error-actions .col-auto {
        margin-bottom: 1rem;
    }
    
    .quick-links .row {
        gap: 1rem;
    }
    
    .quick-link-card {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .error-number {
        font-size: 6rem;
        gap: 0.5rem;
    }
    
    .floating-planet {
        width: 60px;
        height: 60px;
    }
    
    .error-title {
        font-size: 1.75rem;
    }
    
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .quick-links .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Loading animation for elements */
.error-graphic, .error-message, .error-actions, .quick-links, .error-search {
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-graphic {
    animation-delay: 0.1s;
}

.error-message {
    animation-delay: 0.3s;
}

.error-actions {
    animation-delay: 0.5s;
}

.quick-links {
    animation-delay: 0.7s;
}

.error-search {
    animation-delay: 0.9s;
}