html {
	font-family: "Open Sans", "Arial", sans-serif;
	font-size: 17px;
}

body {
	background: rgb(34, 34, 31);
	--whiteTextColor: rgb(232, 232, 232);
	margin: 0;
}

h1 {
	text-align: center;
	color: var(--whiteTextColor);
	font-size: 1.1rem;
	margin-bottom: 0;
	margin-top: 0.6rem;
	/* Hide the title on mobile displays */
	display: none;
}

p {
	text-align: center;
	color: var(--whiteTextColor);
}

a {
	color: #ffc439;
}

input {
	accent-color: #6e6e6e;
}

input[type="checkbox"],
input[type="radio"],
input[type="checkbox"] + label,
input[type="radio"] + label {
	cursor: pointer;
}

.streak p {
	margin: 0;
	margin-bottom: 0;
	font-size: 0.65rem;
}

#current-streak {
	left: 0.23rem;
	float: left;
}

#current-streak-text,
#max-streak-text {
	margin: 0;
	font-size: 1rem;
}

.grow-animation {
	animation: grow-animation 0.5s;
}

@keyframes grow-animation {
	from {
		transform: scale(1.7);
	}
	to {
		transform: scale(1);
	}
}

#max-streak {
	right: 0.23rem;
	float: right;
}

#toppest-container {
	margin: auto;
}

#top-container {
	margin: 0.6rem;
	border-radius: 0.64rem;
	padding: 0.6rem;
	padding-top: 0.35rem;
	padding-bottom: 0.35rem;
	box-shadow: 0.3rem 0.3rem 0.36rem rgb(28, 28, 28);
	background: rgb(44, 43, 41);
}

#streak-container:after,
#settings-child-container:after {
	content: "";
	display: table;
	clear: both;
}

#streak-container {
	padding: 0.4rem;
	padding-top: 0.3rem;
}

#verb-box {
	display: inline-block;
	padding: 0.45rem;
	border-radius: 1.14rem;
	/* Using position relative because setting negative margins caused alignment to rely on streak text above*/
	position: relative;
}

#verb-box p {
	margin-left: 1.18rem;
	margin-right: 1.18rem;
}

#verb-container {
	text-align: center;
}

#verb-text {
	font-size: 2.2rem;
	margin-top: 0;
	margin-bottom: 0.25rem;

	display: flex;
	line-height: 1;
	align-items: flex-end;
	justify-content: center;
}

ruby {
	display: inline-flex;
	flex-direction: column-reverse;
}

span.rt {
	line-height: 1;
	font-size: 0.5em;
}

#translation {
	font-size: 0.8rem;
	margin-top: 0;
	margin-bottom: 0.18rem;
}

#verb-type {
	line-height: 1;
	font-size: 0.8rem;
	margin-top: 0.6rem;
	margin-bottom: 0.15rem;
}

#conjugation-inquery-text {
	font-size: 1.3rem;
	margin-top: 0.8rem;
	margin-bottom: 0.5rem;
}

#status-container {
	text-align: center;
	min-height: 4rem;
}

#status-box {
	display: inline-flex;
	background: green;
	border-radius: 0.91rem;
	min-width: 66%;
	min-height: 4rem;
	justify-content: center;
	flex-direction: column;
}

#status-text {
	line-height: 1.5;
	vertical-align: middle;
	font-size: 1.09rem;
	color: white;
	margin-left: 0.8rem;
	margin-right: 0.8rem;
	margin-top: 0.3rem;
	margin-bottom: 0.3rem;
}

.sub-conjugation-indicator {
	font-size: 0.8rem;
	display: inline-block;
	padding-left: 0.3rem;
}

#input-container {
	text-align: center;
	padding-top: 0.36rem;
	margin: 0.45rem;
	position: relative;
	margin-bottom: 0.3rem;
}

.tooltip-fade-animation {
	animation: tooltip-fade-animation 6s;
}

@keyframes tooltip-fade-animation {
	0% {
		opacity: 0;
	}
	6% {
		opacity: 1;
	}
	80% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

.tooltip {
	position: absolute;
	font-size: 0.66rem;
	color: white;
	background: red;
	border-radius: 0.3rem;
	padding: 0 0.4rem;
	bottom: 100%;
	left: 7%;

	opacity: 0;
}

.tooltip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 14%;
	margin-left: -5px;
	border-width: 5px;
	border-style: solid;
	border-color: red transparent transparent transparent;
}

#main-text-input,
#settings-child-container {
	width: 88%;
}

#main-text-input {
	border-radius: 5rem;
	font-size: 1rem;
	border: 0.068rem;
	background: white;
	padding-top: 0.27rem;
	padding-bottom: 0.18rem;
	padding-left: 0.45rem;
	padding-right: 0.45rem;
}

#main-text-input:hover:not(:focus):not(:disabled) {
	background: rgb(224, 224, 224);
}

#main-text-input:disabled {
	background: rgb(150, 150, 150);
}

#settings-container {
	text-align: center;
	margin: 0;
}

#settings-child-container {
	display: inline-block;
}

#settings-table {
	table-layout: fixed;
	width: 100%;
}

button {
	float: right;
	background: rgb(63, 63, 63);
	border: none;
	box-shadow: 0 0.045rem 0 rgb(35, 35, 35), 0.045rem 0 0 rgb(35, 35, 35),
		0.09rem 0.045rem 0 rgb(35, 35, 35), 0.045rem 0.09rem 0 rgb(35, 35, 35),
		0.136rem 0.09rem 0 rgb(35, 35, 35), 0.09rem 0.136rem 0 rgb(35, 35, 35);
	border-radius: 0.4rem;
	color: var(--whiteTextColor);
	padding-top: 0.18rem;
	padding-bottom: 0.18rem;
	padding-right: 0.27rem;
	padding-left: 0.55rem;
	font-size: 0.73rem;
	margin-right: -0.27rem;
}

#back-button {
	padding-right: 0.4rem;
}

button:hover {
	background: rgb(70, 70, 70);
	cursor: pointer;
}

button:disabled {
	background: rgb(40, 40, 40);
	color: rgb(135, 135, 135);
}

#press-any-key-text {
	margin: 0;
	font-size: 0.64rem;
	color: var(--whiteTextColor);
}

h2 {
	text-align: center;
	color: var(--whiteTextColor);
	margin-top: 0.1rem;
	margin-bottom: 0.45rem;
	font-size: 1rem;
}

#options-view {
	padding-left: 0.73rem;
	padding-right: 0.73rem;
}

#options-form {
	font-size: 0.8rem;
	text-align: left;
	color: var(--whiteTextColor);
}

#options-form .option-row {
	margin-bottom: 0.18rem;
}

#options-form .sub-option-row {
	margin-bottom: 0.09rem;
}

#top-must-choose {
	max-width: 70%;
}

.settings-error-text {
	float: right;
	color: rgb(236, 51, 51);
	text-align: right;
	font-size: 0.6rem;
}

#options-form td:not(.settings-error-text) {
	width: 35%;
}

#options-form input {
	min-width: 13px;
	min-height: 13px;
	width: 0.6rem;
	height: 0.6rem;
}

#options-form label {
	padding-left: 0.25rem;
	/* Japanese characters mess with line height - make it uniform */
	line-height: 1.4;
}

.options-indent {
	padding-left: 1.36rem;
}

#back-button-container {
	display: inline-block;
	width: 100%;
	margin-top: 0.45rem;
}

#options-form h3 {
	display: inline-block;
	margin-top: 0;
	margin-bottom: 0;
}

.transparent-furigana .rt,
.transparent {
	opacity: 0;
}

.hide-furigana .rt,
.display-none,
.hide-emojis .inquery-emoji {
	display: none !important;
}

.background-none {
	background: none !important;
}

hr {
	margin: 0.18rem;
	border: 0.045rem solid rgb(66, 66, 66);
}

#adjectives-h3-container,
#verbs-h3-container {
	margin-top: 0.45rem;
	margin-bottom: 0.45rem;
}

.footer-text {
	color: gray;
	font-size: 0.61rem;
	margin-bottom: 0.1rem;
	margin-top: 0.3rem;
}

#donation-section {
	margin: 0.6rem;
	text-align: center;
}

.conjugation-inquery {
	display: inline-block;
}

.inquery-emoji {
	font-size: 0.7rem;
	line-height: 1.1;
}

.inquery-text {
	line-height: 1.1;
}

.advanced-section {
	padding-left: 0.3rem;
	padding-right: 0.4rem;
	padding-top: 0.2rem;
	padding-bottom: 0.2rem;
	margin-left: -0.23rem;
	border-radius: 10px;
	max-width: fit-content;
	box-shadow: 0.14rem 0.1rem 5px #232323, 0.1rem 0.14rem 5px #232323;
	margin-bottom: 0.5rem;
	margin-top: 0.1rem;
	border: 2px solid #424242;
}
.advanced-option {
	margin-bottom: 0.2rem;
}

#advanced-text {
	font-size: 0.7em;
	font-weight: 600;
	padding-left: 0.2rem;
	font-style: italic;
	margin-bottom: 0.2rem;
	color: #6e6e6e;
	display: flex;
	align-items: center;
}

.question-screen #verb-type,
.results-screen #verb-box.background-none #verb-type {
	display: none;
}

.question-screen #status-container {
	min-height: 0.8rem;
}

/* On smaller screens, we prevent verb-type and status-container from taking up screen height when they're invisible so on-screen keyboards don't cover up parts of the app while answering.
On larger screens, we allow verb-type and status-container to always take up screen height so the app stays the same height between the question and results screen. */
@media screen and (min-height: 820px), screen and (min-width: 510px) {
	.question-screen #verb-type,
	.results-screen #verb-box.background-none #verb-type {
		display: block;
	}

	.question-screen #status-container {
		min-height: 4rem;
	}
}

@media screen and (min-width: 510px) {
	html {
		font-size: 18px;
	}
	#toppest-container {
		width: 510px;
	}
	#top-container {
		padding: 0.6rem 0.6rem;
	}
	h1 {
		font-size: 1.4rem;
		margin-bottom: 0.9rem;
		margin-top: 0.9rem;
		display: block;
	}
	#input-container {
		margin-bottom: 0.4rem;
	}
	#conjugation-inquery-text {
		margin-top: 1rem;
	}
	#status-container {
		margin: 1rem;
	}
}

@media screen and (min-width: 750px) {
	html {
		font-size: 20px;
	}
	#toppest-container {
		width: 575px;
	}
}

@media screen and (min-width: 1100px) {
	html {
		font-size: 22px;
	}
	#toppest-container {
		width: 650px;
	}
	h1 {
		margin-bottom: 1rem;
		margin-top: 1rem;
	}
}
