diff --git a/Dictionary.css b/Dictionary.css
new file mode 100644
index 0000000..a83945a
--- /dev/null
+++ b/Dictionary.css
@@ -0,0 +1,295 @@
+/* --- Google Font Import --- */
+@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Lato:wght@400;700&display=swap');
+
+/* --- Main Body and Container Styling --- */
+body {
+ font-family: 'Lato', sans-serif;
+ background-color: #979797;
+ margin: 0;
+ padding: 20px;
+}
+.container {
+ background-color: #ffffff;
+ max-width: 800px;
+ margin: 0 auto;
+ padding: 20px 40px;
+ border-radius: 8px;
+ box-shadow: 0 2px 10px rgba(0,0,0,0.05);
+}
+
+/* --- Search Box Styling --- */
+.search-box { display: flex; gap: 10px; margin-bottom: 30px; }
+#word-input { flex-grow: 1; padding: 12px; border: 1px solid #ccc; border-radius: 5px; font-size: 16px; }
+#search-btn { padding: 12px 20px; border: none; background-color: #007bff; color: white; border-radius: 5px; cursor: pointer; font-size: 16px; transition: background-color 0.2s; }
+#search-btn:hover { background-color: #0056b3; }
+
+/* --- Result Header (Word and Pronunciation) --- */
+.result-header { border-bottom: 1px solid #e0e0e0; padding-bottom: 15px; margin-bottom: 20px; }
+.result-header h1 { font-family: 'Merriweather', serif; color: #d92727; font-size: 3rem; margin: 0; }
+.phonetics-container { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 10px; }
+.phonetic-item { display: flex; align-items: center; gap: 8px; }
+.phonetic { font-size: 1.2rem; color: #555; }
+.audio-btn { background: none; border: none; cursor: pointer; font-size: 1.5rem; }
+
+/* --- Part of Speech & Definitions --- */
+.part-of-speech-section { margin-bottom: 30px; }
+.part-of-speech-section h2 { font-family: 'Merriweather', serif; font-size: 1.5rem; color: #333; border-bottom: 2px solid #e0e0e0; padding-bottom: 5px; margin-bottom: 15px; }
+.definitions-list { list-style-type: decimal; padding-left: 20px; }
+.definitions-list li { margin-bottom: 15px; }
+.definitions-list p { margin: 0; line-height: 1.6; }
+.example { color: #666; font-style: italic; margin-top: 5px; padding-left: 15px; border-left: 3px solid #d0e0ff; }
+
+/* --- NEW: Synonyms/Antonyms Tags --- */
+.related-words { margin-top: 20px; }
+.related-words h3 { font-size: 1.1rem; color: #555; margin-bottom: 10px; }
+.tags-container { display: flex; flex-wrap: wrap; gap: 10px; }
+.tag {
+ background-color: #eef4ff;
+ color: #0056b3;
+ border: 1px solid #d0e0ff;
+ border-radius: 4px;
+ padding: 5px 10px;
+ font-size: 0.9rem;
+ cursor: pointer;
+ transition: background-color 0.2s, color 0.2s;
+}
+.tag:hover { background-color: #0056b3; color: white; }
+
+/* --- NEW: Source Section --- */
+.source-section {
+ border-top: 1px solid #e0e0e0;
+ padding-top: 15px;
+ margin-top: 20px;
+ font-size: 0.9rem;
+ color: #666;
+}
+.source-section a { color: #007bff; text-decoration: none; }
+.source-section a:hover { text-decoration: underline; }
+
+/* --- Utility --- */
+.error { color: #d92727; text-align: center; font-size: 1.2rem; }
+
+/* --- NEW: View Controls Styling --- */
+.view-controls {
+ display: flex;
+ justify-content: flex-start; /* CHANGE THIS from flex-end */
+ gap: 10px;
+ margin-bottom: 15px;
+}
+
+.view-btn {
+ background-color: #f0f0f0;
+ border: 1px solid #ccc;
+ padding: 5px 15px;
+ border-radius: 5px;
+ cursor: pointer;
+ font-size: 0.9rem;
+ color: #555;
+ font-size: 1.2rem; /* Make icons a bit bigger */
+ padding: 2px 10px; /* Adjust padding for a squarer look */
+}
+
+.view-btn.active {
+ background-color: #007bff;
+ color: white;
+ border-color: #007bff;
+}
+
+
+/* --- NEW: Grid Layout Rules --- */
+#result-body-container.grid-view { /* <-- THIS LINE WAS CORRECTED */
+ display: flex;
+ flex-wrap: wrap; /* Allows items to wrap to the next line if needed */
+ gap: 20px; /* Space between the columns */
+}
+
+#result-body-container.grid-view .part-of-speech-section { /* <-- THIS LINE WAS CORRECTED */
+ flex: 1; /* Each section will try to take up equal space */
+ min-width: 250px; /* Prevents columns from becoming too narrow */
+ margin-bottom: 0; /* Remove the bottom margin in grid view */
+}
+
+.synonym-section .tag {
+ background-color: #e6f9e6; /* Light green background */
+ color: #0d6b0d; /* Dark green text */
+ border-color: #b3e0b3; /* Green border */
+}
+
+.synonym-section .tag:hover {
+ background-color: #0d6b0d; /* Dark green background on hover */
+ color: white; /* White text on hover */
+}
+
+
+/* Style for Antonym tags (light red) */
+.antonym-section .tag {
+ background-color: #ffe6e6; /* Light red background */
+ color: #b30000; /* Dark red text */
+ border-color: #ffb3b3; /* Red border */
+}
+
+.antonym-section .tag:hover {
+ background-color: #b30000; /* Dark red background on hover */
+ color: white; /* White text on hover */
+}
+
+
+/* body
+{
+ font-family: Arial, sans-serif;
+ background-color: #f0f2f5;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+ margin: 0;
+}
+
+.container {
+ background-color: #ffffff;
+ padding: 30px;
+ border-radius: 10px;
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+ width: 90%;
+ max-width: 500px;
+}
+
+h1 {
+ text-align: center;
+ color: #333;
+}
+
+.search-box {
+ display: flex;
+ gap: 10px;
+ margin-bottom: 20px;
+}
+
+#word-input {
+ flex-grow: 1;
+ padding: 10px;
+ border: 1px solid #ccc;
+ border-radius: 5px;
+ font-size: 16px;
+}
+
+#search-btn {
+ padding: 10px 20px;
+ border: none;
+ background-color: #007bff;
+ color: white;
+ border-radius: 5px;
+ cursor: pointer;
+ font-size: 16px;
+}
+
+#search-btn:hover {
+ background-color: #0056b3;
+}
+
+#result-container {
+ margin-top: 20px;
+}
+
+.word-info h2 {
+ margin-bottom: 5px;
+}
+
+.word-info p {
+ color: #555;
+ margin: 5px 0;
+}
+
+.error {
+ color: red;
+ text-align: center;
+}
+
+.audio-btn {
+ background: none;
+ border: none;
+ cursor: pointer;
+ font-size: 1.2rem;
+ margin-left: 10px;
+ padding: 0;
+ vertical-align: middle;
+}body {
+ font-family: Arial, sans-serif;
+ background-color: #f0f2f5;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+ margin: 0;
+}
+
+.container {
+ background-color: #ffffff;
+ padding: 30px;
+ border-radius: 10px;
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+ width: 90%;
+ max-width: 500px;
+}
+
+h1 {
+ text-align: center;
+ color: #333;
+}
+
+.search-box {
+ display: flex;
+ gap: 10px;
+ margin-bottom: 20px;
+}
+
+#word-input {
+ flex-grow: 1;
+ padding: 10px;
+ border: 1px solid #ccc;
+ border-radius: 5px;
+ font-size: 16px;
+}
+
+#search-btn {
+ padding: 10px 20px;
+ border: none;
+ background-color: #007bff;
+ color: white;
+ border-radius: 5px;
+ cursor: pointer;
+ font-size: 16px;
+}
+
+#search-btn:hover {
+ background-color: #0056b3;
+}
+
+#result-container {
+ margin-top: 20px;
+}
+
+.word-info h2 {
+ margin-bottom: 5px;
+}
+
+.word-info p {
+ color: #555;
+ margin: 5px 0;
+}
+
+.error {
+ color: red;
+ text-align: center;
+}
+
+.audio-btn {
+ background: none;
+ border: none;
+ cursor: pointer;
+ font-size: 1.2rem;
+ margin-left: 10px;
+ padding: 0;
+ vertical-align: middle;
+}
+ */
\ No newline at end of file
diff --git a/Dictionary.html b/Dictionary.html
new file mode 100644
index 0000000..f77be57
--- /dev/null
+++ b/Dictionary.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+ Dictionary
+
+
+
+
+
+
Dictionary
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Dictionary.js b/Dictionary.js
new file mode 100644
index 0000000..1324faa
--- /dev/null
+++ b/Dictionary.js
@@ -0,0 +1,220 @@
+// input lete he
+const wordInput = document.getElementById('word-input');
+const searchBtn = document.getElementById('search-btn');
+const resultHeaderContainer = document.getElementById('result-header-container');
+const resultBodyContainer = document.getElementById('result-body-container');
+const stackedViewBtn = document.getElementById('stacked-view-btn');
+const gridViewBtn = document.getElementById('grid-view-btn');
+
+const wotdContainer = document.getElementById('wotd-container');
+
+//Event Listeners yani input dekhne vale
+searchBtn.addEventListener('click', () => searchWord(wordInput.value));
+wordInput.addEventListener('keyup', (event) => {
+ if (event.key === 'Enter') {
+ searchWord(wordInput.value);
+ }
+});
+stackedViewBtn.addEventListener('click', setStackedView);
+gridViewBtn.addEventListener('click', setGridView);
+
+// Main Search Function cpu
+async function searchWord(word) {
+ word = word.trim();
+ if (word === '') {
+ resultHeaderContainer.innerHTML = '';
+ resultBodyContainer.innerHTML = 'Please enter a word.
';
+ return;
+ }
+
+ setStackedView(); // ye padhna baki
+ try {
+ const apiUrl = `https://api.dictionaryapi.dev/api/v2/entries/en/${word}`;
+ const response = await fetch(apiUrl);
+ if (!response.ok) {
+ const errorData = await response.json();
+ throw new Error(errorData.title || 'Word not found.');
+ }
+ const data = await response.json();
+ displayResult(data);
+ } catch (error) {
+ resultHeaderContainer.innerHTML = '';
+ resultBodyContainer.innerHTML = `${error.message}
`;
+ }
+}
+
+// --- Display Function ---
+function displayResult(data) {
+ const entry = data[0];
+ const word = entry.word;
+ const sourceUrl = entry.sourceUrls?.[0];
+
+ let headerHtml = ``;
+ resultHeaderContainer.innerHTML = headerHtml;
+
+ let bodyHtml = '';
+ entry.meanings.forEach(meaning => {
+ bodyHtml += `${meaning.partOfSpeech}
`;
+ meaning.definitions.forEach(def => {
+ bodyHtml += `${def.definition}
${def.example ? `"${def.example}"
` : ''} `;
+ });
+ bodyHtml += `
`;
+ if (meaning.synonyms && meaning.synonyms.length > 0) {
+ // ADD 'synonym-section' class here
+ bodyHtml += `
`;
+ }
+ if (meaning.antonyms && meaning.antonyms.length > 0) {
+ // ADD 'antonym-section' class here
+ bodyHtml += `
`;
+ }
+ bodyHtml += `
`;
+ });
+
+
+ resultBodyContainer.innerHTML = bodyHtml;
+}
+
+// iss se grid ya stack change ho raha he
+function setStackedView() {
+ resultBodyContainer.classList.remove('grid-view');
+ stackedViewBtn.classList.add('active');
+ gridViewBtn.classList.remove('active');
+}
+function setGridView() {
+ resultBodyContainer.classList.add('grid-view');
+ gridViewBtn.classList.add('active');
+ stackedViewBtn.classList.remove('active');
+}
+
+
+
+
+/*searchBtn.addEventListener('click', searchWord);
+wordInput.addEventListener('keyup', (event) => {
+ if (event.key === 'Enter') {
+ searchWord();
+ }
+});
+
+stackedViewBtn.addEventListener('click', setStackedView);
+gridViewBtn.addEventListener('click', setGridView);
+
+async function searchWord() {
+ console.log("Searching...");
+}
+async function searchWord() {
+ const word = wordInput.value.trim();
+ if (word === '') {
+ resultContainer.innerHTML = 'Please enter a word.
';
+ return;
+ }
+ setStackedView();
+ try {
+ const apiUrl = `https://api.dictionaryapi.dev/api/v2/entries/en/${word}`;
+ const response = await fetch(apiUrl);
+ if (!response.ok) {
+ const errorData = await response.json();
+ throw new Error('Word not found. Sorry we will add it soon');
+ }
+ const data = await response.json();
+ displayResult(data);
+ } catch (error) {
+ resultContainer.innerHTML = `${error.message}
`;
+ }
+}
+function displayResult(data) {
+ const entry = data[0];
+ console.log(entry)
+ const word = entry.word;
+
+ const sourceUrl = entry.sourceUrls?.[0];
+ let headerHtml = `
+ `;
+
+ let meaningsHtml = '';
+ entry.meanings.forEach(meaning => {
+ meaningsHtml += ``;
+ meaningsHtml += `
${meaning.partOfSpeech}
`;
+ meaningsHtml += `
`;
+ meaning.definitions.forEach(def => {
+ meaningsHtml += `- `;
+ meaningsHtml += `
${def.definition}
`;
+ if (def.example) {
+ meaningsHtml += `"${def.example}"
`;
+ }
+ meaningsHtml += ` `;
+ });
+ meaningsHtml += `
`;
+
+ // Synonyms Section (now with clickable buttons)
+ if (meaning.synonyms && meaning.synonyms.length > 0) {
+ meaningsHtml += `
`;
+ }
+
+ // Antonyms Section
+ if (meaning.antonyms && meaning.antonyms.length > 0) {
+ meaningsHtml += `
`;
+ }
+ meaningsHtml += `
`;
+ });
+
+ // --- Add Source URL at the bottom ---
+ let footerHtml = '';
+ if(sourceUrl) {
+ footerHtml = `
+
+ `;
+ }
+
+ // Combine all parts and display
+ resultContainer.innerHTML = headerHtml + meaningsHtml + footerHtml;
+}
+// --- View Control Functions ---
+function setStackedView() {
+ resultContainer.classList.remove('grid-view');
+ stackedViewBtn.classList.add('active');
+ gridViewBtn.classList.remove('active');
+}
+
+function setGridView() {
+ resultContainer.classList.add('grid-view');
+ gridViewBtn.classList.add('active');
+ stackedViewBtn.classList.remove('active');
+}
+ */
\ No newline at end of file
diff --git a/Index.html b/Index.html
new file mode 100644
index 0000000..d422d64
--- /dev/null
+++ b/Index.html
@@ -0,0 +1,194 @@
+
+
+
+
+
+ Weather App
+
+
+
+
+ 🌤️ Location Weather Dashboard
+
+
+
+
+
+
+
+ Current Weather
+ {% if weather %}
+ {% if weather.error %}
+ {{ weather.error }}
+ {% else %}
+
+

+
+ City: {{ weather.city }}
+ Condition: {{ weather.condition }}
+ 🌡️ Temp: {{ weather.temperature }}{{ unit_symbol }}
+ 🤔 Feels Like: {{ weather.feels_like }}{{ unit_symbol }}
+ ⬆️ Max: {{ weather.temp_max }}{{ unit_symbol }} | ⬇️ Min: {{ weather.temp_min }}{{ unit_symbol }}
+ 💨 Wind: {{ weather.wind }} m/s
+ 💧 Humidity: {{ weather.humidity }}%
+ 🔵 Pressure: {{ weather.pressure }} hPa
+ 🌅 Sunrise: {{ weather.sunrise }} | 🌇 Sunset: {{ weather.sunset }}
+ {% endif %}
+ {% else %}
+ Enter a city or leave blank to auto-detect location.
+ {% endif %}
+
+
+
+
+ 5-Day Forecast
+ {% if forecast %}
+ {% if forecast.error %}
+ {{ forecast.error }}
+ {% else %}
+
+ {% for day in forecast %}
+
+
{{ day.date }}
+
+

+
+
{{ day.condition }}
+
🌡️ {{ day.temp }}{{ unit_symbol }}
+
💨 {{ day.wind }} m/s
+
+ {% endfor %}
+
+ {% endif %}
+ {% else %}
+ Forecast will appear here.
+ {% endif %}
+
+
+
+
+
+
diff --git a/Readme.md b/Readme.md
index e69de29..fb39e70 100644
--- a/Readme.md
+++ b/Readme.md
@@ -0,0 +1 @@
+I will add a authentication for Youtube using google sign in
\ No newline at end of file
diff --git a/ai/brain.js b/ai/brain.js
new file mode 100644
index 0000000..60860ed
--- /dev/null
+++ b/ai/brain.js
@@ -0,0 +1,142 @@
+// --- Element References ---
+const wordInput = document.getElementById('word-input');
+const searchBtn = document.getElementById('search-btn');
+const resultHeaderContainer = document.getElementById('result-header-container');
+const resultBodyContainer = document.getElementById('result-body-container');
+const stackedViewBtn = document.getElementById('stacked-view-btn');
+const gridViewBtn = document.getElementById('grid-view-btn');
+const wotdContainer = document.getElementById('wotd-container');
+const historyList = document.getElementById('history-list');
+
+// --- Event Listeners ---
+searchBtn.addEventListener('click', () => searchWord(wordInput.value));
+wordInput.addEventListener('keyup', (event) => {
+ if (event.key === 'Enter') searchWord(wordInput.value);
+});
+stackedViewBtn.addEventListener('click', setStackedView);
+gridViewBtn.addEventListener('click', setGridView);
+
+// --- Functions to run on page load ---
+window.addEventListener('load', () => {
+ fetchWordOfTheDay();
+ displayHistory();
+});
+
+// --- History Management ---
+function updateAndDisplayHistory(word) {
+ let history = JSON.parse(localStorage.getItem('searchHistory')) || [];
+ // Remove existing entry to move it to the top
+ history = history.filter(item => item.toLowerCase() !== word.toLowerCase());
+ // Add new word to the front
+ history.unshift(word);
+ // Keep history to a reasonable size (e.g., 15 words)
+ if (history.length > 15) history.pop();
+ // Save to localStorage
+ localStorage.setItem('searchHistory', JSON.stringify(history));
+ displayHistory();
+}
+
+function displayHistory() {
+ const history = JSON.parse(localStorage.getItem('searchHistory')) || [];
+ historyList.innerHTML = history.map(word =>
+ ``
+ ).join('');
+}
+
+// --- Word of the Day ---
+async function fetchWordOfTheDay() {
+ wotdContainer.innerHTML = `Loading Word of the Day...
`;
+ try {
+ const response = await fetch('https://random-word-api.herokuapp.com/word');
+ const [word] = await response.json();
+ // Use main search function to display its definition in the WOTD container
+ await searchWord(word, true);
+ } catch (error) {
+ wotdContainer.innerHTML = `Could not fetch Word of the Day.
`;
+ }
+}
+
+// --- Main Search Function ---
+async function searchWord(word, isWotd = false) {
+ word = word.trim();
+ if (word === '') {
+ resultBodyContainer.innerHTML = 'Please enter a word.
';
+ return;
+ }
+
+ const headerTarget = isWotd ? wotdContainer : resultHeaderContainer;
+ const bodyTarget = isWotd ? wotdContainer : resultBodyContainer;
+
+ if (!isWotd) setStackedView(); // Reset view only for manual searches
+ headerTarget.innerHTML = '';
+ bodyTarget.innerHTML = `Searching for "${word}"...
`;
+
+ try {
+ const response = await fetch(`https://api.dictionaryapi.dev/api/v2/entries/en/${word}`);
+ if (!response.ok) throw new Error('Word not found.');
+
+ const data = await response.json();
+ displayResult(data, isWotd);
+
+ // Add to history only on successful manual searches
+ if (!isWotd) {
+ updateAndDisplayHistory(word);
+ }
+ } catch (error) {
+ if (!isWotd) {
+ resultHeaderContainer.innerHTML = '';
+ resultBodyContainer.innerHTML = `${error.message}
`;
+ } else {
+ // If WOTD fails, try another word
+ fetchWordOfTheDay();
+ }
+ }
+}
+
+// --- Display Function (Refactored for WOTD) ---
+function displayResult(data, isWotd) {
+ const entry = data[0];
+ const word = entry.word;
+
+ let html = ``;
+
+ entry.meanings.forEach(meaning => {
+ html += `${meaning.partOfSpeech}
`;
+ meaning.definitions.forEach(def => {
+ html += `${def.definition}
${def.example ? `"${def.example}"
` : ''} `;
+ });
+ html += `
`;
+ if (meaning.synonyms?.length > 0) html += `
`;
+ if (meaning.antonyms?.length > 0) html += `
`;
+ });
+
+ if (isWotd) {
+ wotdContainer.innerHTML = html;
+ } else {
+ // Split HTML for regular search
+ const headerMatch = html.match(/