<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Amar's Engine</title>
<style>
/* Basic Reset */
* {
box-sizing: border-box;
}
/* Body Styling */
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
background-image: url('https://www.transparenttextures.com/patterns/asfalt-dark.png');
font-family: 'Arial', sans-serif;
color: #333;
padding: 20px;
}
/* Container Styling */
.container {
width: 100%;
max-width: 600px;
text-align: center;
background-color: rgba(255, 255, 255, 0.9);
padding: 30px;
border-radius: 12px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
/* Header */
h1 {
font-size: 2.5em;
margin-bottom: 20px;
color: #111;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}
/* Engine Button */
.engine-button {
padding: 15px;
margin: 20px 0;
border: none;
cursor: pointer;
border-radius: 30px;
background: transparent;
outline: none;
transition: transform 0.3s, background-color 0.3s;
display: flex;
align-items: center;
justify-content: center;
color: #333;
font-weight: bold;
font-size: 1.2em;
}
.engine-button:hover {
transform: scale(1.05);
background-color: rgba(0, 0, 0, 0.05);
}
/* Input and Button */
.search-container {
display: flex;
width: 100%;
max-width: 500px;
margin: auto;
}
input[type="text"] {
padding: 15px;
flex: 1;
border-radius: 24px 0 0 24px;
border: 2px solid #333;
outline: none;
font-size: 1em;
background-color: rgba(255, 255, 255, 0.9);
color: #111;
}
button {
padding: 15px 20px;
background-color: #4CAF50;
color: white;
border: none;
cursor: pointer;
border-radius: 0 24px 24px 0;
font-size: 1em;
}
button:hover {
background-color: #45a049;
}
/* Footer */
footer {
margin-top: 30px;
font-size: 0.9em;
text-align: center;
color: #333;
}
footer a {
color: #4CAF50;
text-decoration: none;
}
/* Responsive Styles */
@media (max-width: 600px) {
h1 {
font-size: 2em;
}
.container {
padding: 20px;
}
.search-container {
flex-direction: column;
}
input[type="text"], button, .engine-button {
width: 100%;
border-radius: 24px;
margin: 5px 0;
}
}
</style>
</head>
<body>
<div class="container">
<h1>Amar's Engine</h1>
<button class="engine-button" id="searchButton" onclick="changeEngine()">
<span style="font-size: 1.3em;">I wanna search with</span>
<img src="https://upload.wikimedia.org/wikipedia/commons/2/2f/Google_2015_logo.svg" alt="Google Logo" />
</button>
<div class="search-container">
<input type="text" id="searchQuery" placeholder="Enter your search term" />
<button onclick="search()">Search</button>
</div>
<footer>
<p>Powered by <a href="https://www.buymeacoffee.com/pokemonmeme" target="_blank">amar</a></p>
</footer>
</div>
<script>
const engines = [
{ name: "Google", url: "https://www.google.com/search?q=", logo: "https://upload.wikimedia.org/wikipedia/commons/2/2f/Google_2015_logo.svg" },
{ name: "Bing", url: "https://www.bing.com/search?q=", logo: "https://upload.wikimedia.org/wikipedia/commons/9/9c/Bing_Fluent_Logo.svg" },
{ name: "DuckDuckGo", url: "https://duckduckgo.com/?q=", logo: "https://upload.wikimedia.org/wikipedia/en/8/88/DuckDuckGo_logo.svg"},
{ name: "Yahoo", url: "https://search.yahoo.com/search?p=", logo: "https://upload.wikimedia.org/wikipedia/commons/3/3a/Yahoo%21_%282019%29.svg" }
];
let currentEngineIndex = 0;
function changeEngine() {
currentEngineIndex = (currentEngineIndex + 1) % engines.length;
const button = document.getElementById("searchButton");
const logo = engines[currentEngineIndex].logo;
button.innerHTML = `<span style="font-size: 1.0em;">I wanna search with</span> <img src="${logo}" alt="${engines[currentEngineIndex].name} Logo" />`;
}
function search() {
const query = document.getElementById("searchQuery").value.trim();
if (query) {
const engineUrl = engines[currentEngineIndex].url;
window.open(engineUrl + encodeURIComponent(query), '_blank');
} else {
alert("Please enter a search term.");
}
}
</script>
</body>
</html>