<?php get_header(); ?>

<main id="primary" class="site-main">
    <div class="container">
        <div class="content-area">

            <div class="error-404-container">

                <div class="error-404-visual">
                    <div class="error-404-code">404</div>
                    <div class="error-404-blocks">
                        <!-- Minecraft-style Blöcke als Dekoration -->
                        <span class="block block-grass"></span>
                        <span class="block block-dirt"></span>
                        <span class="block block-stone"></span>
                    </div>
                </div>

                <div class="error-404-content">
                    <h1 class="error-404-title">
                        <?php _e('Diese Seite ist verloren gegangen...', 'minecraft-modern-theme'); ?>
                    </h1>
                    <p class="error-404-subtitle">
                        <?php _e('Wie eine Map ohne Spawn-Punkt – diese Seite existiert nicht (mehr).', 'minecraft-modern-theme'); ?>
                    </p>

                    <div class="error-404-actions">
                        <a href="<?php echo esc_url( home_url('/') ); ?>" class="error-404-btn primary">
                            <i class="fas fa-home"></i> <?php _e('Zur Startseite', 'minecraft-modern-theme'); ?>
                        </a>
                        <a href="javascript:history.back()" class="error-404-btn secondary">
                            <i class="fas fa-arrow-left"></i> <?php _e('Zurück', 'minecraft-modern-theme'); ?>
                        </a>
                    </div>

                    <!-- Suchformular -->
                    <div class="error-404-search">
                        <p><?php _e('Oder suche direkt nach dem was du brauchst:', 'minecraft-modern-theme'); ?></p>
                        <?php get_search_form(); ?>
                    </div>

                    <!-- Letzte Beiträge als Hilfestellung -->
                    

                </div>
            </div>

        </div>
    </div>
</main>

<style>
.error-404-container {
    display: flex;
    gap: 60px;
    align-items: center;
    padding: 60px 0;
    min-height: 60vh;
}

.error-404-visual {
    flex-shrink: 0;
    text-align: center;
}

.error-404-code {
    font-size: clamp(80px, 15vw, 160px);
    font-weight: 900;
    line-height: 1;
    color: var(--primary-accent, #00d4ff);
    text-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
    letter-spacing: -4px;
}

.error-404-blocks {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.block {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: inline-block;
    image-rendering: pixelated;
}
.block-grass  { background: linear-gradient(to bottom, #5c8a1e 40%, #6b4c2a 40%); }
.block-dirt   { background: #6b4c2a; }
.block-stone  { background: #888; }

.error-404-content {
    flex: 1;
}

.error-404-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin: 0 0 12px;
}

.error-404-subtitle {
    color: var(--text-muted, #a0a0a0);
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.error-404-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.error-404-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.error-404-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.error-404-btn.primary {
    background: var(--primary-accent, #00d4ff);
    color: #fff;
}
.error-404-btn.secondary {
    background: var(--card-bg);
    color: inherit;
    border: 1px solid rgba(255,255,255,0.1);
}

.error-404-search {
    margin-bottom: 30px;
}
.error-404-search p {
    color: var(--text-muted, #a0a0a0);
    margin-bottom: 10px;
}

.error-404-recent h3 {
    font-size: 1rem;
    color: var(--text-muted, #a0a0a0);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.error-404-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.error-404-recent-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 10px;
}
.error-404-recent-list li i {
    color: var(--primary-accent, #00d4ff);
    font-size: 0.75rem;
    flex-shrink: 0;
}
.error-404-recent-list a {
    text-decoration: none;
    transition: color 0.2s;
}
.error-404-recent-list a:hover {
    color: var(--primary-accent, #00d4ff);
}

@media (max-width: 768px) {
    .error-404-container {
        flex-direction: column;
        gap: 30px;
        padding: 40px 0;
        text-align: center;
    }
    .error-404-actions {
        justify-content: center;
    }
}
</style>

<?php get_footer(); ?>