<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ultraviolet</title>
<style>
* { box-sizing: border-box; }
 
body {
margin: 0;
min-height: 100vh;
font-family: Arial, sans-serif;
background: #0b1020;
color: white;
display: flex;
align-items: center;
justify-content: center;
}
 
.container {
width: min(90%, 620px);
text-align: center;
}
 
.logo {
font-size: 52px;
margin-bottom: 10px;
}
 
h1 {
font-size: 38px;
margin: 0 0 12px;
}
 
p {
color: #aab4ce;
line-height: 1.6;
}
 
.panel {
background: #151d32;
border: 1px solid #293552;
border-radius: 18px;
padding: 28px;
margin-top: 28px;
}
 
input {
width: 100%;
padding: 16px;
border-radius: 10px;
border: 1px solid #394765;
background: #0b1020;
color: white;
font-size: 16px;
outline: none;
}
 
input:focus {
border-color: #8b7cff;
}
 
button {
width: 100%;
margin-top: 14px;
padding: 15px;
background: #7865f5;
color: white;
border: none;
border-radius: 10px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
}
 
button:hover {
background: #6652df;
}
 
#message {
min-height: 24px;
font-size: 14px;
}
 
footer {
margin-top: 26px;
color: #7886a5;
font-size: 12px;
}
</style>
</head>
<body>
<main class="container">
<div class="logo">🌌</div>
<h1>Ultraviolet</h1>
<p>A clean, customizable web homepage.</p>
 
<section class="panel">
<form id="searchForm">
<input
id="address"
type="text"
placeholder="Enter a website address..."
autocomplete="url"
required
>
<button type="submit">Open Website</button>
</form>
<p id="message"></p>
</section>
 
<footer>
Ultraviolet-inspired interface · HTML
</footer>
</main>
 
<script>
document.getElementById("searchForm").addEventListener(
"submit",
function(event) {
event.preventDefault();
 
let address = document
.getElementById("address")
.value.trim();
 
if (!address) return;
 
if (!/^https?:\/\//i.test(address)) {
address = "https://" + address;
}
 
try {
const url = new URL(address);
 
if (!["http:", "https:"].includes(url.protocol)) {
throw new Error("Invalid protocol");
}
 
window.open(url.href, "_blank", "noopener,noreferrer");
 
document.getElementById("message").textContent =
"Website opened in a new tab.";
} catch {
document.getElementById("message").textContent =
"Please enter a valid website address.";
}
}
);
</script>
</body>
</html>