:root {
    --error-primary: #dc3545;
    --error-secondary: #6c757d;
    --error-warning: #ffc107;
    --error-info: #17a2b8;
    --error-success: #28a745;
    --error-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --error-danger-gradient: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    --error-warning-gradient: linear-gradient(135deg, #ffd93d 0%, #ff9500 100%);
    --error-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --error-shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--error-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Error Container */
.error-container {
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.error-card {
    background: white;
    border-radius: 25px;
    box-shadow: var(--error-shadow);
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.8s ease-out;
}

.error-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--error-gradient);
}

/* Error Icon */
.error-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    position: relative;
    animation: pulse 2s infinite;
}

.error-icon.error-404 {
    background: var(--error-danger-gradient);
}

.error-icon.error-500 {
    background: var(--error-danger-gradient);
}

.error-icon.error-403 {
    background: var(--error-warning-gradient);
}

.error-icon.error-400 {
    background: var(--error-info);
}

.error-icon::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: ripple 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Error Content */
.error-code {
    font-size: 4rem;
    font-weight: 800;
    color: #2c3e50;
    margin: 0;
    line-height: 1;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 1rem 0;
}

.error-message {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 1.5rem 0 2rem;
    line-height: 1.6;
}

/* Action Buttons */
.error-actions {
    margin-top: 2rem;
}

.btn-error-primary {
    background: var(--error-gradient);
    border: none;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    display: inline-block;
    margin: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-error-primary::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;
}

.btn-error-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

.btn-error-primary:hover::before {
    left: 100%;
}

.btn-error-secondary {
    background: transparent;
    border: 2px solid #6c757d;
    color: #6c757d;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin: 0.5rem;
    transition: all 0.3s ease;
}

.btn-error-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-3px);
    text-decoration: none;
}

/* Help Section */
.error-help {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 2rem;
    border-left: 4px solid var(--error-info);
}

.error-help h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1rem;
}

.error-help ul {
    text-align: left;
    margin: 0;
    padding-left: 1.5rem;
}

.error-help li {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

/* Contact Support */
.error-support {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #dee2e6;
}

.error-support p {
    color: #6c757d;
    margin-bottom: 1rem;
}

.support-link {
    color: var(--error-info);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.support-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Back Navigation */
.back-nav {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.btn-back {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .error-card {
        padding: 2rem 1.5rem;
        margin: 0 15px;
    }
    
    .error-code {
        font-size: 3rem;
    }
    
    .error-title {
        font-size: 1.5rem;
    }
    
    .error-message {
        font-size: 1rem;
    }
    
    .error-icon {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .btn-error-primary,
    .btn-error-secondary {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .back-nav {
        top: 10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    .error-card {
        padding: 1.5rem 1rem;
    }
    
    .error-code {
        font-size: 2.5rem;
    }
    
    .error-title {
        font-size: 1.3rem;
    }
}