<!DOCTYPE html>
<html lang="en" data-theme="light">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ title or "404 - Not Found" }} - Sharey</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
    <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>📁</text></svg>">
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>📁 Sharey</h1>
            <button class="theme-toggle" id="themeToggle" aria-label="Toggle dark mode">🌙</button>
        </div>

        <div class="section">
            <div class="error-container">
                <div class="error-icon">❌</div>
                <h2>{{ title or "Content Not Found" }}</h2>
                <p>{{ message or "The requested content could not be found." }}</p>
                
                <div class="error-actions">
                    <a href="/" class="button">🏠 Go Home</a>
                    <button onclick="history.back()" class="button secondary">← Go Back</button>
                </div>
                
                <div class="error-help">
                    <h3>What happened?</h3>
                    <ul>
                        <li>The file or paste might have been deleted</li>
                        <li>The URL might be typed incorrectly</li>
                        <li>The content might have expired</li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <script src="{{ url_for('static', filename='script.js') }}"></script>
    <style>
        .error-container {
            text-align: center;
            max-width: 500px;
            margin: 0 auto;
            padding: 40px 20px;
        }
        
        .error-icon {
            font-size: 4rem;
            margin-bottom: 20px;
        }
        
        .error-actions {
            margin: 30px 0;
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }
        
        .button {
            display: inline-block;
            padding: 12px 24px;
            background-color: #4CAF50;
            color: white;
            text-decoration: none;
            border-radius: 8px;
            border: none;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s ease;
        }
        
        .button:hover {
            background-color: #45a049;
        }
        
        .button.secondary {
            background-color: #666;
        }
        
        .button.secondary:hover {
            background-color: #555;
        }
        
        .error-help {
            margin-top: 40px;
            text-align: left;
            background-color: var(--bg-secondary);
            padding: 20px;
            border-radius: 8px;
            border-left: 4px solid #2196F3;
        }
        
        .error-help h3 {
            margin-top: 0;
            color: #2196F3;
        }
        
        .error-help ul {
            margin: 10px 0;
            padding-left: 20px;
        }
        
        .error-help li {
            margin: 8px 0;
            color: var(--text-secondary);
        }
    </style>
</body>
</html>
