<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Email Subscription</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            background-color: #f8f9fa;
        }
        .container {
            max-width: 600px;
            margin: 50px auto;
            padding: 20px;
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            text-align: center;
        }
        h1 {
            color: #333;
        }
        .form-group {
            margin-bottom: 15px;
        }
        .form-group label {
            display: block;
            margin-bottom: 5px;
        }
        .form-group input {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 5px;
        }
        button {
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            background-color: #28a745;
            color: white;
            font-size: 1em;
            cursor: pointer;
        }
        button:hover {
            background-color: #218838;
        }
        .success-message {
            color: green;
            font-weight: bold;
            margin-top: 15px;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>Email Subscription</h1>
        <form id="subscriptionForm">
            <div class="form-group">
                <label for="email">Enter your email:</label>
                <input type="email" id="email" name="email" required>
            </div>
            <button type="button" onclick="subscribe()">Subscribe</button>
        </form>
        <div id="message" class="success-message"></div>
    </div>
    <script>
        function subscribe() {
            const emailInput = document.getElementById('email');
            if (emailInput.value) {
                document.getElementById('message').textContent = 'Subscription successful!';
                emailInput.value = '';
            }
        }
    </script>
</body>
</html>