/* Error Pages Custom Styles */

/* Global Error Page Animations */
@keyframes errorFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

@keyframes errorPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes errorGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(59, 130, 246, 0.6);
    }
}

/* Error Number Styles */
.error-code {
    background: linear-gradient(135deg, var(--error-primary), var(--error-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Error Icon Containers */
.error-icon-container {
    position: relative;
    display: inline-block;
}

.error-icon-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: errorPulse 2s ease-in-out infinite;
}

/* Floating Particles */
.error-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: errorFloat 3s ease-in-out infinite;
}

.error-particle:nth-child(1) { animation-delay: 0s; }
.error-particle:nth-child(2) { animation-delay: 0.5s; }
.error-particle:nth-child(3) { animation-delay: 1s; }
.error-particle:nth-child(4) { animation-delay: 1.5s; }

/* Button Hover Effects */
.error-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.error-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.error-button:hover::before {
    left: 100%;
}

.error-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Progress Bars */
.error-progress {
    position: relative;
    overflow: hidden;
    border-radius: 9999px;
    background-color: #e5e7eb;
}

.error-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: move 1s linear infinite;
}

@keyframes move {
    0% { background-position: 0 0; }
    100% { background-position: 1rem 0; }
}

/* Card Animations */
.error-card {
    transition: all 0.3s ease;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.error-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Quote Styles */
.error-quote {
    position: relative;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 1rem;
    border-left: 4px solid;
}

.error-quote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 4rem;
    color: rgba(0, 0, 0, 0.1);
    font-family: serif;
}

/* Loading Spinner */
.error-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notification Styles */
.error-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    max-width: 400px;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.error-notification.show {
    transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 640px) {
    .error-code {
        font-size: 6rem;
    }

    .error-icon-container {
        width: 3rem;
        height: 3rem;
    }

    .error-particle {
        width: 0.5rem;
        height: 0.5rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .error-card {
        background: #1f2937;
        color: #f9fafb;
    }

    .error-quote {
        background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .error-particle,
    .error-icon-container::before,
    .error-button,
    .error-card {
        animation: none;
        transition: none;
    }
}

/* Print Styles */
@media print {
    .error-button,
    .error-particle,
    .error-icon-container::before {
        display: none;
    }

    .error-code {
        color: #000 !important;
    }
}
