/* 404 Error Page Styles - Glassy Modern Design */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, 
        rgba(102, 103, 171, 0.1) 0%, 
        rgba(139, 140, 199, 0.05) 25%, 
        rgba(237, 190, 220, 0.08) 50%, 
        rgba(102, 103, 171, 0.1) 75%, 
        rgba(139, 140, 199, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

/* Animated glassy background elements */
.error-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(102, 103, 171, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 140, 199, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(237, 190, 220, 0.12) 0%, transparent 50%);
    animation: float 25s ease-in-out infinite;
    pointer-events: none;
    filter: blur(1px);
}

.error-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236667ab' fill-opacity='0.03'%3E%3Ccircle cx='40' cy='40' r='3'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%238b8cc7' fill-opacity='0.02'%3E%3Ccircle cx='60' cy='60' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
    pointer-events: none;
    animation: patternFloat 30s linear infinite;
}

@keyframes float {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg) scale(1); 
        opacity: 0.8;
    }
    25% { 
        transform: translate(40px, -40px) rotate(90deg) scale(1.1); 
        opacity: 1;
    }
    50% { 
        transform: translate(-30px, 30px) rotate(180deg) scale(0.9); 
        opacity: 0.6;
    }
    75% { 
        transform: translate(20px, 20px) rotate(270deg) scale(1.05); 
        opacity: 0.9;
    }
}

@keyframes patternFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-120px); }
}

/* Glassy error container */
.error-container {
    max-width: 700px;
    width: 100%;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    animation: slideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.error-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--primary-color), 
        var(--secondary-color), 
        var(--accent-color), 
        var(--primary-color));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.error-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
    border-radius: var(--radius-2xl);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Glassy error header */
.error-header {
    margin-bottom: var(--spacing-xl);
    position: relative;
    z-index: 2;
}

/* Enhanced glassy 404 number */
.error-code {
    font-size: 9rem;
    font-weight: 900;
    line-height: 1;
    margin: 0;
    background: linear-gradient(135deg, 
        var(--primary-color) 0%, 
        var(--secondary-color) 25%, 
        var(--accent-color) 50%, 
        var(--secondary-color) 75%, 
        var(--primary-color) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(102, 103, 171, 0.3);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    animation: gradientShift 6s ease-in-out infinite;
    position: relative;
}

.error-code::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140%;
    height: 140%;
    background: 
        radial-gradient(circle, rgba(102, 103, 171, 0.08) 0%, transparent 60%),
        radial-gradient(circle, rgba(139, 140, 199, 0.05) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: -1;
    animation: ripple 8s ease-in-out infinite;
    filter: blur(3px);
}

.error-code::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: 
        radial-gradient(circle, rgba(237, 190, 220, 0.06) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: -2;
    animation: ripple 8s ease-in-out infinite 1s;
    filter: blur(4px);
}

/* Pulse animation removed for subtler effect */

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes ripple {
    0% { 
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.4);
    }
}

/* Glassy error title */
.error-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: var(--spacing-sm) 0 var(--spacing-md) 0;
    animation: fadeInUp 1s ease-out 0.2s both;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.error-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--primary-color), 
        var(--secondary-color), 
        var(--accent-color));
    border-radius: 2px;
    animation: expandWidth 1s ease-out 0.6s both;
    box-shadow: 0 2px 8px rgba(102, 103, 171, 0.3);
}

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

@keyframes expandWidth {
    from { width: 0; }
    to { width: 80px; }
}

/* Glassy error description */
.error-description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 4px solid var(--primary-color);
    animation: fadeInUp 1s ease-out 0.4s both;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Glassy action buttons */
.error-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.error-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-xl);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    min-width: 160px;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.error-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.6s ease;
    z-index: -1;
}

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

/* Primary button with glassy effect */
.btn-primary {
    background: linear-gradient(135deg, 
        rgba(102, 103, 171, 0.9), 
        rgba(139, 140, 199, 0.8));
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(102, 103, 171, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, 
        rgba(102, 103, 171, 1), 
        rgba(139, 140, 199, 0.9));
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(102, 103, 171, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: bounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Secondary button with glassy effect */
.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
    border-color: rgba(102, 103, 171, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, 
        rgba(102, 103, 171, 0.9), 
        rgba(139, 140, 199, 0.8));
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(102, 103, 171, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(-3px); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-5px); }
}

.btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Glassy help section */
.error-help {
    padding-top: var(--spacing-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
}


.error-help h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-md) 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.error-help p {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-lg) 0;
}

/* Glassy search suggestion */
.search-suggestion {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.search-suggestion::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent);
    transition: left 0.8s ease;
}

.search-suggestion:hover::before {
    left: 100%;
}

.search-hint {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-align: center;
    position: relative;
    z-index: 1;
}

.inline-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(102, 103, 171, 0.2);
}

.inline-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
    text-shadow: 0 2px 4px rgba(102, 103, 171, 0.3);
}

/* Glassy recent posts section */
.recent-posts-suggestion {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

/* Glassy suggested post cards */
.suggested-post {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.suggested-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, 
        var(--primary-color), 
        var(--secondary-color), 
        var(--accent-color));
    transform: scaleY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.suggested-post:hover::before {
    transform: scaleY(1);
}

.suggested-post:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.suggested-post-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
}

.suggested-post-link:hover {
    transform: scale(1.02);
}

.suggested-post-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-sm) 0;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.suggested-post-excerpt {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-sm) 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.suggested-post-date {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-weight: 500;
    opacity: 0.8;
}

/* Dark mode adjustments for glassy design */
@media (prefers-color-scheme: dark) {
    .error-container {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 
            0 25px 50px rgba(0, 0, 0, 0.3),
            0 0 0 1px rgba(255, 255, 255, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    .error-description {
        background: rgba(0, 0, 0, 0.2);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .search-suggestion {
        background: rgba(0, 0, 0, 0.2);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .suggested-post {
        background: rgba(0, 0, 0, 0.2);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .suggested-post:hover {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .btn-secondary {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(102, 103, 171, 0.3);
    }
}

/* Mobile responsiveness for glassy design */
@media (max-width: 768px) {
    .error-page {
        padding: var(--spacing-md);
    }
    
    .error-container {
        padding: var(--spacing-xl);
        border-radius: var(--radius-xl);
        margin: var(--spacing-md);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
    
    .error-code {
        font-size: 7rem;
    }
    
    .error-title {
        font-size: var(--font-size-2xl);
    }
    
    .error-description {
        font-size: var(--font-size-base);
        padding: var(--spacing-md);
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }
    
    .error-actions .btn {
        width: 100%;
        max-width: 300px;
        padding: var(--spacing-md) var(--spacing-lg);
    }
    
    .recent-posts-suggestion {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .suggested-post {
        padding: var(--spacing-md);
    }
    
    .suggested-post-title {
        font-size: var(--font-size-base);
    }
    
    .suggested-post-excerpt {
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 480px) {
    .error-container {
        padding: var(--spacing-lg);
        margin: var(--spacing-sm);
    }
    
    .error-code {
        font-size: 6rem;
    }
    
    .error-title {
        font-size: var(--font-size-xl);
    }
    
    .error-actions .btn {
        min-width: auto;
        padding: var(--spacing-sm) var(--spacing-md);
    }
}
