@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* General Styles */
body {
	font-family: 'Roboto', sans-serif;
	margin: 0;
	padding: 0;
	transition: background-color 0.3s ease;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* Light Theme */
body.light-theme {
	background-color: #f5f5f5;
	color: #333;
}

/* Dark Theme */
body.dark-theme {
	background-color: #1a1a1a;
	color: #f5f5f5;
}

.container {
	background-color: #ffffff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
	padding: 20px;
	max-width: 100%;
	width: 100%;
	text-align: center;
	transition: background-color 0.3s ease, color 0.3s ease;
	margin: auto;
	margin-top: 20px;
	box-sizing: border-box;
	max-width: 600px;
}

/* Header */
header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	background-color: #f1f1f1;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

header h1 {
	margin: 0;
	font-size: 28px;
}

header nav {
	display: flex;
	align-items: center;
}

header nav button {
	margin-left: 10px;
	padding: 10px 20px;
	font-size: 16px;
	border: none;
	border-radius: 4px;
	background-color: #007bff;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

header nav button:hover {
	background-color: #0056b3;
}

header nav button i {
	margin-right: 5px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
	width: 12px;
	height: 12px;
}

/* Light Theme Scrollbar */
::-webkit-scrollbar-track {
	background-color: transparent;
}

::-webkit-scrollbar-thumb {
	background-color: #007bff;
	border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
	background-color: #0056b3;
}

.footer {
	background-color: transparent;
	margin-top: 40px;
	margin-bottom: 10px;
	padding: 10px;
	text-align: center;
	z-index: 999;
}

.footer a {
	color: black;
	text-decoration: none;
}

/* Search Box */
.search-box {
	display: flex;
	justify-content: center;
	margin-bottom: 20px;
}

#wordInput {
	padding: 10px;
	font-size: 16px;
	border: 1px solid #ccc;
	border-radius: 4px 0 0 4px;
	flex: 1;
	transition: border-color 0.3s ease;
}

body.dark-theme #wordInput {
	border-color: #444;
	color: #f5f5f5;
	background-color: #1a1a1a;
}

#searchBtn {
	background-color: #007bff;
	color: #fff;
	border: none;
	border-radius: 0 4px 4px 0;
	padding: 10px 20px;
	font-size: 16px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

#searchBtn:hover {
	background-color: #0056b3;
}

/* Result Container */
#resultContainer {
	text-align: left;
	padding: 5px;
}

/* Word Header */
.word-header {
	display: flex;
	align-items: baseline;
	margin-bottom: 10px;
}

.word {
	font-size: 36px;
	margin: 0;
	margin-right: 10px;
}

.phonetic {
	font-size: 18px;
	color: #666;
	margin: 0;
}

/* Audio Button */
.audio-btn {
	background-color: transparent;
	border: none;
	color: #007bff;
	cursor: pointer;
	font-size: 18px;
	margin-left: 10px;
	padding: 0;
	transition: color 0.3s ease;
}

.audio-btn:hover {
	color: #0056b3;
}

.audio-btn:disabled {
	color: #ccc;
	cursor: not-allowed;
}

/* Origin */
.origin {
	margin-bottom: 20px;
	font-size: 14px;
	color: #666;
}

/* Meanings */
.meanings {
	margin-bottom: 20px;
}

.meaning {
	margin-bottom: 10px;
}

.meaning h3 {
	margin-top: 0;
	margin-bottom: 5px;
	font-size: 18px;
}

.definition {
	margin-bottom: 10px;
	padding: 10px;
	background-color: #f1f1f1;
	border-radius: 4px;
}

body.dark-theme .definition {
	background-color: #26282e;
	color: #f5f5f5;
}

body.dark-theme .footer a {
	color: white;
	text-decoration: none;
}

body.dark-theme header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	background-color: #1e1f22;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

body.dark-theme .container {
	background-color: #1e1f22;
}

/* Dark Theme Scrollbar */
body.dark-theme::-webkit-scrollbar-track {
	background-color: transparent;
}

body.dark-theme::-webkit-scrollbar-thumb {
	background-color: #007bff;
	border-radius: 6px;
}

body.dark-theme::-webkit-scrollbar-thumb:hover {
	background-color: #0056b3;
}

/* Mobile styles */
@media (max-width: 768px) {
	header {
		box-sizing: border-box;
		flex-direction: column;
		align-items: center;
	}

	header h1 {
		font-size: 24px;
		margin-bottom: 10px;
	}

	header nav {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 5px;
	}

	header nav button {
		padding: 7px;
		font-size: 14px;
		border-radius: 5px;
	}

	.container {
		padding: 15px;
		margin-top: 15px;
		border-radius: 0;
		max-width: 100%;
		width: 100%;
		box-sizing: border-box;
	}

	.search-box {
		flex-direction: column;
	}

	#wordInput {
		border-radius: 5px;
		margin-bottom: 10px;
	}

	#searchBtn {
		border-radius: 5px;
	}

	.word-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.audio-btn {
		margin-top: 10px;
	}

	.footer {
		margin-top: 20px;
		padding: 5px;
		box-sizing: border-box;
	}
}