/**
 * Error Pages Styling
 * Professional yet playful error pages for InfoScanner
 */

/* ============================================
   ERROR PAGE LAYOUT
   ============================================ */

.error-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.error-container {
    max-width: 900px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* ============================================
   ERROR VISUALS
   ============================================ */

.error-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.error-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.1));
}

[data-theme="dark"] .error-svg {
    filter: drop-shadow(0 4px 30px rgba(0, 0, 0, 0.4));
}

/* ============================================
   ERROR CONTENT
   ============================================ */

.error-content {
    text-align: left;
}

.error-title {
    font-size: 6rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, var(--acc) 0%, var(--warn) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    animation: titlePulse 2s ease-in-out infinite;
}

.error-subtitle {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--fg);
    margin: 0 0 1rem 0;
}

.error-description {
    font-size: 1.1rem;
    color: var(--muted);
    line-height: 1.7;
    margin: 0 0 1rem 0;
}

.error-hint {
    font-size: 1rem;
    color: var(--muted);
    font-style: italic;
    opacity: 0.8;
    margin: 0 0 2rem 0;
}

/* ============================================
   ERROR ACTIONS
   ============================================ */

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.error-actions a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes titlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes scanMove {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(120px);
        opacity: 0.5;
    }
}

@keyframes blinkSlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes blinkMedium {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes blinkFast {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        opacity: 1;
    }
}

@keyframes glassSearch {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(5px);
    }
}

/* SVG Animation classes */
.scan-line {
    animation: scanMove 2s ease-in-out infinite;
}

.status-led.blink-slow {
    animation: blinkSlow 2s ease-in-out infinite;
}

.status-led.blink-medium {
    animation: blinkMedium 1s ease-in-out infinite;
}

.status-led.blink-fast {
    animation: blinkFast 0.5s ease-in-out infinite;
}

.particle {
    animation: float 4s ease-in-out infinite;
}

.particle-1 { animation-delay: 0s; }
.particle-2 { animation-delay: 1s; }
.particle-3 { animation-delay: 2s; }
.particle-4 { animation-delay: 3s; }

.error-particle {
    animation: float 3s ease-in-out infinite;
}

.ep-1 { animation-delay: 0s; }
.ep-2 { animation-delay: 0.75s; }
.ep-3 { animation-delay: 1.5s; }
.ep-4 { animation-delay: 2.25s; }

.magnifying-glass {
    animation: float 3s ease-in-out infinite;
}

.glass-search {
    animation: glassSearch 2s ease-in-out infinite;
}

.question-mark {
    animation: sparkle 1.5s ease-in-out infinite;
}

.error-spark {
    animation: sparkle 0.8s ease-in-out infinite;
}

.warning-icon {
    animation: float 2s ease-in-out infinite;
}

.server-error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .error-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .error-content {
        text-align: center;
    }

    .error-title {
        font-size: 4rem;
    }

    .error-subtitle {
        font-size: 1.4rem;
    }

    .error-description {
        font-size: 1rem;
    }

    .error-actions {
        justify-content: center;
    }

    .error-svg {
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .error-page {
        padding: 1rem;
    }

    .error-title {
        font-size: 3rem;
    }

    .error-subtitle {
        font-size: 1.2rem;
    }

    .error-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .error-actions a {
        justify-content: center;
    }

    .error-svg {
        max-width: 250px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .error-title,
    .scan-line,
    .status-led,
    .particle,
    .error-particle,
    .magnifying-glass,
    .glass-search,
    .question-mark,
    .error-spark,
    .warning-icon {
        animation: none;
    }
}

/* Focus styles for accessibility */
.error-actions a:focus-visible {
    outline: 3px solid var(--acc);
    outline-offset: 2px;
}
