/* 404 Error Page Styles */
/* Extends the main styles.css file */

.error-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 40px;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

/* Terminal Error Display */
.error-terminal {
    width: 100%;
    max-width: 600px;
    background: var(--card-bg);
    border: var(--frame-width) solid var(--border-color);
    position: relative;
    animation: terminalFlicker 3s ease-in-out infinite;
}

.terminal-controls .control-dot.error {
    background: var(--accent-orange);
    box-shadow: 0 0 10px var(--glow-orange);
    animation: pulse 2s ease-in-out infinite;
}

.terminal-controls .control-dot.warning {
    background: #ffaa00;
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.5);
    animation: pulse 2.5s ease-in-out infinite;
}

.error-lines {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.error-line {
    display: flex;
    gap: 12px;
    align-items: center;
}

.error-text {
    color: var(--accent-orange);
    font-weight: 700;
    text-shadow: 0 0 8px var(--glow-orange);
}

.status-error {
    color: var(--accent-orange);
    text-shadow: 0 0 8px var(--glow-orange);
    animation: textGlitch 4s ease-in-out infinite;
}

.status-warning {
    color: #ffaa00;
    text-shadow: 0 0 8px rgba(255, 170, 0, 0.5);
}

/* Main Error Display */
.error-display {
    text-align: center;
    margin: 40px 0;
}

.error-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.code-number {
    font-family: var(--font-display);
    font-size: clamp(120px, 15vw, 200px);
    font-weight: 900;
    color: var(--accent-cyan);
    text-shadow:
        0 0 20px var(--glow-cyan),
        0 0 40px var(--glow-cyan),
        0 0 60px var(--glow-cyan);
    animation: numberGlow 3s ease-in-out infinite alternate;
    line-height: 1;
}

.code-separator {
    width: 4px;
    height: 100px;
    background: linear-gradient(to bottom,
            transparent,
            var(--accent-cyan),
            transparent);
    animation: separatorPulse 2s ease-in-out infinite;
}

.error-message h1 {
    font-family: var(--font-display);
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 900;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    animation: titleFlicker 5s ease-in-out infinite;
}

.error-message p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Recovery Actions */
.recovery-actions {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.action-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.recovery-btn {
    text-decoration: none;
    display: inline-block;
}

.recovery-btn.primary .button-frame {
    padding: 16px 32px;
    background: linear-gradient(45deg, var(--accent-cyan), var(--accent-blue));
    border: 1px solid var(--accent-cyan);
}

.recovery-btn.secondary .button-frame {
    padding: 16px 32px;
    border: 1px solid var(--border-color);
    background: transparent;
}

.recovery-btn.primary .button-frame span {
    color: white;
    font-weight: 700;
}

.recovery-btn.secondary .button-frame span {
    color: var(--text-primary);
    font-weight: 500;
}

.quick-links {
    text-align: center;
}

.links-header {
    font-family: var(--font-display);
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.links-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.quick-link {
    padding: 8px 16px;
    font-size: 12px;
    text-decoration: none;
}

/* Glitch Overlay */
.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 98%,
            rgba(255, 107, 53, 0.05) 99%,
            transparent 100%);
    background-size: 3px 100%;
    animation: glitchScan 8s linear infinite;
    pointer-events: none;
    z-index: 10;
}

/* Animations */
@keyframes terminalFlicker {

    0%,
    98% {
        opacity: 1;
    }

    99% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
    }
}

@keyframes numberGlow {
    0% {
        text-shadow:
            0 0 20px var(--glow-cyan),
            0 0 40px var(--glow-cyan);
    }

    100% {
        text-shadow:
            0 0 30px var(--glow-cyan),
            0 0 60px var(--glow-cyan),
            0 0 90px var(--glow-cyan);
    }
}

@keyframes separatorPulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@keyframes titleFlicker {

    0%,
    96% {
        opacity: 1;
    }

    97% {
        opacity: 0.8;
    }

    98% {
        opacity: 0.9;
    }

    99% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

@keyframes textGlitch {

    0%,
    90% {
        transform: translateX(0);
    }

    91% {
        transform: translateX(-2px);
    }

    92% {
        transform: translateX(2px);
    }

    93% {
        transform: translateX(-1px);
    }

    94% {
        transform: translateX(1px);
    }

    95%,
    100% {
        transform: translateX(0);
    }
}

@keyframes glitchScan {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100vw);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.typing {
    overflow: hidden;
    border-right: 2px solid var(--accent-orange);
    animation: typing 2s steps(30) 1s forwards, blink 1s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {

    0%,
    50% {
        border-color: var(--accent-orange);
    }

    51%,
    100% {
        border-color: transparent;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .error-container {
        padding: 20px 16px;
        gap: 32px;
    }

    .error-code {
        gap: 12px;
    }

    .code-separator {
        height: 60px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .recovery-btn .button-frame {
        text-align: center;
    }

    .links-grid {
        gap: 4px;
    }

    .quick-link {
        padding: 6px 12px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .error-container {
        gap: 24px;
    }

    .error-terminal,
    .status-panel {
        padding: 16px;
    }

    .terminal-content {
        padding: 12px;
    }

    .error-lines {
        gap: 8px;
    }

}