@font-face {
	font-family: DIN;
	font-weight: 600;
	font-stretch: normal;
	src: url('fonts/DINMedium.ttf');
}
@font-face {
	font-family: DIN;
	font-weight: 700;
	font-stretch: normal;
	src: url('fonts/DINBold.ttf');
}
@font-face {
	font-family: BStyle;
	font-weight: 400;
	src: url('fonts/bstyle.regular.ttf');
}

:root {
	--b: #923564;
	--f: #9bafb9;
	--h: #ddd;
}

html {
	background: #000;
	height: 100vh;
}

input {box-sizing: content-box;}

body {
	height: 100vh;
	margin: 0;
	border-radius: 7px;
	background: var(--b);
	color: var(--f);
	font: 20px DIN, 'Lucida Sans Unicode', Roboto;
}
@media (min-width: 433px) {
	html {
		display: flex;
		justify-content: center;
		align-items: center;
	}
	body {
		width: 98vh;
		height: 98vh;
		padding: 22px;
		box-sizing: border-box;
	}
}
@media (max-width: 432px) {
	body {
		padding: 22px;
		overflow: hidden;
	}
}

header {
	position: relative;
	z-index: 4;
	float: right;
	font-family: BStyle;
	line-height: .72em;
}
@media (min-width: 433px) {
	header {
		font-size: 143px;
	}
}
@media (max-width: 432px) {
	header {
		font-size: 90px;
		line-height: .72em;
	}
}

main {
	position: relative;
	z-index: 2;
}

.top-row {
	display: inline-flex;
	align-items: flex-start;
}
@media (min-width: 433px) { .top-row {gap: 35px} }
@media (max-width: 432px) { .top-row {gap: 22px} }

#button {
	font: 20px Arial, sans-serif;
	background: var(--f);
	border: none;
	color: var(--b);
	width: 56px;
	height: 56px;
	display: flex;
	justify-content: left;
	align-items: center;
}
#button span {
	border-left: solid var(--b) 18px;
	border-top: solid transparent 10px;
	border-bottom: solid transparent 10px;
	margin-left: 20px;
}
@media (min-width: 433px) {
	#button:hover {
		background: var(--h);
		cursor: pointer;
	}
}
@media (max-width: 432px) {
	#button:active {
		background: var(--h);
	}
}
#button.playing {
	/*background: #0477fb;*/
	background: #180988;
}
#button.playing span {
	animation: playing 2s linear 0s infinite;
}
@media (min-width: 433px) {
	#button.playing.redhover:hover {
		/*background: #0477fb;*/
		background: #780500;
	}
}
@media (max-width: 432px) {
	#button.playing.redhover:active {
		background: #780500;
	}
}
@keyframes playing {
	0% {
		margin-left: 20px;
		opacity: 1;
	}
	27.222% {
		opacity: 1;
	}
	47.222% {
		margin-left: 37px;
		opacity: 0;
	}
	47.223% {
		margin-left: 1px;
		opacity: 0;
	}
	77.223% {
		opacity: 1;
	}
	100% {
		margin-left: 20px;
		opacity: 1;
	}
}

#estimated-time {
	font-size: 34px;
	line-height: .7em;
	font-weight: 600;
}

#form {
	display: table;
}
.line-and-row,
.row-and-line {
	display: inline-block;
}
@media (min-width: 433px) {
	.line-and-row,
	.row-and-line {
		display: inline-block;
	}
	.line-and-row {
		margin-top: 56px;
		border-top-style: solid;
		padding-top: 56px;
	}
	.row-and-line {
		margin-bottom: 56px;
		border-bottom-style: solid;
		padding-bottom: 56px;
		padding-bottom: 56px;
	}
}
@media (max-width: 432px) {
	#form {
		margin-top: 22px;
	}
	.row {
		display: inline-block;
	}
	#form .row.time-setting {
		display: inline-flex;
		justify-content: center;
		align-items: center;
	}
	.row {margin-top: 0}
	#form > div:nth-of-type(2) {margin-top: 4px}
	#form > div:nth-of-type(3) {margin-top: 25px}
}
@media (min-width: 433px) {
	.row {
		display: inline-flex;
		justify-content: center;
		align-items: center;
	}
	.label {
		text-align: center;
		width: 44px;
		margin-right: 8px;
	}
}
@media (max-width: 432px) {
	#form .row.time-setting .label {
		text-align: center;
		width: 29px;
		margin-right: 3px;
	}
	.label {
		margin-bottom: 2px;
	}
}
@media (min-width: 433px) {
	.margin-top {margin-top: 14px}
}
.label.wait {
	font-size: 34px;
}
.label.start-delay {
	text-shadow: 1px 0 var(--f), 0 -1px var(--f), 1px -1px var(--f);
}
.label.start-delay span {
	margin-left: -5px;
	letter-spacing: -9px;
	display: inline-block;
	transform: scaleY(.8) /*translateY(1px)*/;
}
.box {
	border: solid 3px var(--f);
	display: flex;
	align-items: center;
}
@media (min-width: 433px) {
	.box {
		padding: 28px;
	}
}
@media (max-width: 432px) {
	.box {
		padding: 10px;
	}
	.row.time-setting .box {
		border: none;
	}

}
span {
	display: inline-block;
}

span.operator {
	font-family: DIN;
	display: inline-block;
	line-height: .1em;
}
@media (min-width: 433px) {
	span.operator {
		font-size: 48px;
		margin: 10px;
		margin-top: -1px;
	}
}
@media (max-width: 432px) {
	span.operator {
		font-size: 39px;
		margin: 4px;
		margin-top: -4px;
	}
}
span.unit {
	font-style: normal;
	font-size: 29px;
	margin-left: 4px;
	margin-right: -1px;
}
input {
	font: 700 32px DIN;
	padding: 1px 8px 3px;
	font-weight: 700;
	border: none;
	margin: 0;
	text-align: right;
}
input[maxlength="3"] {width: 52px}
input[maxlength="2"] {width: 35px}

#form .button {
	border-style: solid;
	border-width: 3px;
	cursor: pointer;
}
@media (min-width: 433px) {
	#form .button {
		margin-left: 22px;
	}
}
@media (max-width: 432px) {
	#form .button {
		margin-left: 17px;
	}
}
span.generate {
	margin-top: -5px;
	margin-bottom: -5px;
	width: 33px;
	height: 33px;
	display: flex;
	justify-content: center;
	align-items: center;
}
span.generate span {
	width: 3px;
	height: 21px;
	position: absolute;
}
.hl span.generate span,
.no-hl span.generate:hover span {
	background: var(--b);
}
.no-hl span.generate span,
.hl span.generate:hover span {
	background: var(--f);
}
span.generate span:nth-child(2) {transform: rotate(60deg)}
span.generate span:nth-child(3) {transform: rotate(-60deg)}

@media (min-width: 433px) {
	span.generate {
		margin-left: 22px;
	}
}
@media (max-width: 432px) {
	span.generate {
		margin-left: 12px;
	}
}

.no-hl {
	cursor: pointer;
}
.no-hl .box {
	color: var(--f);
}
.hl .box {
	background: var(--f);
	color: var(--b);
}
.no-hl input, .no-hl .button.generate:hover {
	background: var(--f);
	color: var(--b);
}
.hl input, .hl .button.generate:hover {
	background: var(--b);
	color: var(--f);
}
.no-hl .button.generate {
	background: var(--b);
	color: var(--f);
	border-color: var(--f);
}
.hl .button.generate {
	background: var(--f);
	color: var(--b);
	border-color: var(--b);
}
span.lock {
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	flex-direction: column;
	justify-content: center;
}
span.lock span {
	position: relative;
	background: var(--b);
}
span.lock.locked span:nth-child(3) {
	display: none;
}
span.lock span:nth-child(1) {
	width: 6px;
	height: 6px;
	border: solid 3px var(--f);
	border-radius: 50%;
}
span.lock span:nth-child(2) {
	width: 6px;
	margin-top: -5px;
	height: 2px;
	border: solid var(--f);
	border-width: 0 3px;
}
span.lock span:nth-child(3) {
	width: 6px;
	height: 4px;
	border: solid var(--f);
	border-width: 0 0 0 3px;
	padding-right: 3px;
}
span.lock span:nth-child(4) {
	width: 10px;
	height: 7px;
	border: 3px solid var(--f);
}

span.lock:hover {
	background: var(--f);
}
span.lock:hover span {
	border-color: var(--b);
	background: var(--f);
}

@media (min-width: 433px) {
	#big-pause {display: none}
}
@media (max-width: 432px) {
	#form.hidden {
		margin-left: -110%;
		transition: margin-left .6s;
	}
	#big-pause {
		position: fixed;
		width: calc( 100% - 22px * 2 );
		left: 22px;
		top: 102px;
		background: var(--f);
		transition: margin-left .6s;
		display: flex;
		align-items: center;
		color: var(--b);
		font-size: 120px;
		justify-content: center;
	}
	#big-pause.hidden {
		margin-left: 110%;
	}
	#big-pause.enabled:active {
		background: var(--h);
	}
	#big-pause .pause {
		margin-top: -.12em;
	}
	#big-pause .resume {
		border-left: solid var(--b) 72px;
		border-top: solid transparent 40px;
		border-bottom: solid transparent 40px;
		position: relative;
		left: 7px;
	}
	#big-pause .disabled {
		margin-top: -.25em;
	}
	#big-pause.disabled .pause,
	#big-pause.disabled .resume,
	#big-pause.enabled .disabled,
	#big-pause.enabled.playing .resume,
	#big-pause.enabled.paused .pause {display: none}
}


#stats {
	position: absolute;
	z-index: 3;
	box-sizing: content-box;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	font-weight: 700;
}
#numbers {
	max-height: 100%;
	overflow: hidden auto;
}
#numbers .column {
	float: left;
	text-align: right;
}
#numbers .column span {
	padding: 1px 2px 2px 1px;
	width: 27px;
	line-height: .8em;
	font-size: 13.03px;
	font-weight: 600;
}
#numbers .column span.emph {
	font-size: 14px;
	font-weight: 700;
}
/*#numbers .column s {
	text-decoration: none;
	font-size: 10px;
	margin-left: 1px;
}*/
#totalTime {
	line-height: .9em;
}
@media (min-width: 433px) {
	#stats {
		right: calc( 50% - 49vh + 22px - 4px ); /* 4: scrollbar miatti jobb margó */
		bottom: calc( 1vh + 22px ); /* 22: külső margó; 5: szöveg alsó margója */
		font-size: 24px;
	}
	.numbers-box {
		height: 667px; /* 667: 23 magasságú oszlop */
		display: flex;
		align-items: flex-end;
	}
	#numbers .column:not(:first-child) {
		width: 120px;
	}
	#numbers .column:last-child {
		margin-right: 4px; /* scrollbar miatt */
	}
	#numbers .column span {
		background: var(--f);
		color: var(--b);
		position: relative;
		top: -3px;
	}
	#totalTime {
		margin-right: 4px; /* számok scrollbarja miatti jobb margó */
		margin-top: 18px;
		font-size: 35px;
	}
}
@media (max-width: 432px) {
	#stats {
		background: var(--b);
		width: 100%;
		position: absolute;
		left: 0;
		top: 0;
		justify-content: center;
		align-items: center;
		font-size: 18px;
		visibility: hidden;
	}
	.numbers-box {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
	}
	#numbers {
		background: var(--f);
		color: var(--b);
		box-sizing: border-box;
		padding: 10px 13px 13px;
	}
	#numbers .column:not(:first-child) {
		width: 56px;
	}
	#numbers .column div:not(:last-child) {
		margin-bottom: 10px;
	}
	#numbers .column span {
		background: var(--b);
		color: var(--f);
	}
	#totalTime {
		margin-top: 8px;
		font-size: 32px;
	}

	.stats-close {
		padding: 9px;
		position: relative;
		left: 7px;
		display: inline-flex;
		align-items: center;
		width: 28px;
		height: 28px;
	}
	.stats-close:active {
		cursor: pointer;
	}
	.stats-close div {
		position: absolute;
		background: var(--f);
		width: 28px;
		height: 4px;
	}
	.stats-close:active div {
		background: var(--h);
	}
	.stats-close div:nth-child(1) {transform: rotate(45deg)}
	.stats-close div:nth-child(2) {transform: rotate(-45deg)}
}

	
#blapp {
	position: fixed;
	z-index: 1;
}
@media (min-width: 432px) {
	#blapp {
		top: calc( 99vh - 88px - 22px );
	}
}
#blapp.hover {
	filter: grayscale(1) brightness(1.29);
}
