/* ================================================
   YAWTEEF - 404 ERROR PAGE STYLES
   Version: 1.1
   Last Updated: March 2026
   ================================================ */

/* ================================================
   ERROR PAGE LAYOUT
   ================================================ */
.error-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.error-page .container {
    max-width: 700px;
    width: 100%;
}

/* ================================================
   ERROR VISUAL (Emoji + 404 Code)
   ================================================ */
.error-visual {
    position: relative;
    margin-bottom: 2rem;
}

.error-emoji {
    font-size: 4rem;
    display: block;
    margin-bottom: 0.5rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-15px); 
    }
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #667eea; /* Fallback */
    line-height: 1;
    margin: 0;
    letter-spacing: -0.02em;
}

/* ================================================
   ERROR MESSAGE & DESCRIPTION
   ================================================ */
.error-message {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1rem 0;
}

.error-description {
    font-size: 1.1rem;
    color: #6b7280;
    max-width: 500px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
}

/* ================================================
   ERROR BUTTONS - MAIN STYLING
   ================================================ */
.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0 3rem 0;
}

/* Base Button Style */
.error-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 2px solid transparent;
    line-height: 1.4;
    min-width: 180px;
}

/* Primary Button - Gradient Background */
.error-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.error-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    color: #ffffff;
}

.error-btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Secondary Button - Outlined */
.error-btn-secondary {
    background: #ffffff;
    color: #667eea;
    border: 2px solid #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.error-btn-secondary:hover {
    background: #f5f7ff;
    color: #5563d4;
    border-color: #5563d4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.error-btn-secondary:active {
    transform: translateY(0);
    background: #eef1ff;
}

/* ================================================
   POPULAR PAGES SECTION
   ================================================ */
.popular-pages {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.popular-pages h2 {
    font-size: 1.25rem;
    color: #374151;
    margin: 0 0 1.5rem 0;
    font-weight: 600;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.popular-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.popular-card:hover {
    border-color: #667eea;
    background: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.popular-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.popular-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    text-align: center;
    line-height: 1.3;
}

.popular-card:hover .popular-text {
    color: #667eea;
}

/* ================================================
   STILL LOST SECTION
   ================================================ */
.still-lost {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: #f0fdf4;
    border-radius: 12px;
    border: 1px solid #bbf7d0;
}

.still-lost p {
    margin: 0;
    color: #166534;
    font-size: 0.95rem;
}

.still-lost a {
    color: #15803d;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.still-lost a:hover {
    color: #166534;
    text-decoration-thickness: 2px;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */
@media (max-width: 768px) {
    .error-page {
        padding: 2rem 1rem;
        min-height: calc(100vh - 150px);
    }
    
    .error-code {
        font-size: 5rem;
    }
    
    .error-message {
        font-size: 1.5rem;
    }
    
    .error-description {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    /* Stack buttons on mobile */
    .error-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .error-btn {
        width: 100%;
        max-width: 280px;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    /* 2 columns for popular grid on tablet */
    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .error-emoji {
        font-size: 3rem;
    }
    
    .error-code {
        font-size: 4rem;
    }
    
    .error-message {
        font-size: 1.25rem;
    }
    
    /* Single column for popular grid on mobile */
    .popular-grid {
        grid-template-columns: 1fr;
        max-width: 280px;
    }
    
    /* Horizontal card layout on small screens */
    .popular-card {
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
        padding: 1rem;
        text-align: left;
    }
    
    .popular-text {
        text-align: left;
    }
    
    .still-lost {
        padding: 1rem;
    }
}

/* ================================================
   ACCESSIBILITY
   ================================================ */

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .error-emoji {
        animation: none;
    }
    
    .error-btn:hover,
    .popular-card:hover {
        transform: none;
    }
}

/* Focus states for keyboard navigation */
.error-btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.error-btn:focus:not(:focus-visible) {
    outline: none;
}

.error-btn:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.popular-card:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.popular-card:focus:not(:focus-visible) {
    outline: none;
}

.popular-card:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
    border-color: #667eea;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .error-code {
        -webkit-text-fill-color: #667eea;
        color: #667eea;
    }
    
    .error-btn {
        border-width: 3px;
    }
    
    .popular-card {
        border-width: 3px;
    }
}