/* Responsive hero-banner for smaller screens */
@media (max-width: 600px) {
	   .hero-banner {
		   height: 70px;
		   min-height: unset;
		   padding: 4px 0;
	   }
	   .hero-banner img {
		   height: 40px;
		   width: auto;
		   object-fit: cover;
	   }
	   .hero-banner h1 {
		   font-size: 1em;
		   margin: 4px 0 0 0;
	   }
}
html,
body {
	max-width: 100%;
	overflow-x: hidden;
}

body {
	margin: 0;
	background-color: #000;
	color: #fff;
	font-family: Arial, Helvetica, sans-serif;
	text-align: center;
}

* {
	box-sizing: border-box;
}

body.debug-overflow * {
	outline: 1px solid rgba(255, 0, 0, 0.45);
}

body.debug-overflow {
	overflow-x: hidden;
}

body.debug-overflow::before {
	content: "Responsive debug mode: ON (Ctrl+Shift+D to toggle)";
	position: sticky;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	padding: 8px 10px;
	background: #ffcc00;
	color: #000;
	font-size: 12px;
	font-weight: 700;
	z-index: 9999;
	text-align: center;
}

button,
input,
select,
textarea {
	font-family: inherit;
}

a {
	color: #fff;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

.hero-banner {
	position: relative;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}

.hero-banner img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: clamp(220px, 50vh, 560px);
	object-fit: cover;
}

.hero-banner h1 {
	position: static;
	margin: 12px auto 0;
	padding: 0 16px;
	font-size: clamp(1.3rem, 3.8vw, 2.2rem);
	line-height: 1.2;
	text-align: center;
	width: 100%;
}

.container {
	width: min(100%, 980px);
	margin: 0 auto;
	padding: clamp(12px, 3vw, 24px);
}

select,
textarea {
	background-color: #555;
	color: #fff;
	border: 1px solid #777;
	border-radius: 8px;
	width: min(100%, 720px);
	padding: 10px 12px;
	font-family: inherit;
}

select option {
	background-color: #555;
	color: #fff;
}

/* Shared button style for translate and speak */

#translateButton,
#speakButton {
	display: block;
	margin: 10px auto 0;
	background-color: #2e8b57;
	color: #fff;
	padding: 10px 18px;
	font-size: 16px;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 200ms ease-in 100ms;
	width: 100%;
	max-width: 720px;
	min-height: 44px;
	box-sizing: border-box;
}

#translateButton:hover,
#speakButton:hover {
	background-color: #267349;
}

#inputText {
	display: block;
	margin-left: auto;
	margin-right: auto;
	min-height: 120px;
}

#outputText,
#language {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

#outputText {
	min-height: 120px;
}

#language {
	min-height: 44px;
}

.resource-links {
	margin-top: 8px;
}

.resource-links a {
	display: block;
	padding: 6px 8px;
	margin-bottom: 6px;
	word-break: break-word;
}

.site-footer {
	background-color: #333;
	width: min(100% - 24px, 980px);
	margin: 24px auto 16px;
	padding: 10px 14px;
	border-radius: 6px;
}

.site-footer p {
	margin: 0;
	font-size: clamp(12px, 2.8vw, 14px);
}

@media (max-width: 600px) {
	body {
		text-align: left;
	}

	.hero-banner h1,
	.container,
	.site-footer {
		text-align: center;
	}

	#translateButton,
	#speakButton {
		width: 100%;
		max-width: 720px;
		min-height: 44px;
		font-size: 18px;
	}
}

@media (min-width: 768px) {
	.resource-links {
		display: flex;
		justify-content: center;
		align-items: center;
		gap: 10px;
		flex-wrap: wrap;
	}

	.resource-links a {
		display: inline-block;
		margin-bottom: 0;
	}
}
