* {
  box-sizing: border-box;
}

html {
	margin: 0;
    padding: 0;
	height: -webkit-fill-available;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	background: #212121;
	margin: 0;
	padding: 0;
	height: -webkit-fill-available;
}

a, a:visited {
    color: #818384;
}

/* width */
::-webkit-scrollbar {
	width: 8px;
}

/* Track */
::-webkit-scrollbar-track {
	background: #2e2e2e;
}

/* Handle */
::-webkit-scrollbar-thumb {
	background: #272729;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
	background: #252526;
}

#main-container {
	width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
	min-height: -webkit-fill-available;
}

#header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 50px;
	color: #d7dadc;
	border-bottom: 1px solid #3a3a3c;
}

#header .title {
	font-weight: 700;
	font-size: 36px;
	letter-spacing: 0.2rem;
	text-transform: uppercase;
	text-align: center;
	position: absolute;
	left: 0;
	right: 0;
	pointer-events: none;
}

.menu {
	padding: 4px 8px 0;
}

.menu button {
	color: #d7dadc;
}

.menu button.icon {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0 4px;
}

#board-container {
	display: flex;
	justify-content: center;
	align-items: center;
	flex: 1 1 1px;
	overflow: auto;
	min-height: 100px;
	padding: 25px 0;
}

#board {
	display: grid;
	grid-template-rows: repeat(6, 1fr);
	grid-gap: 5px;
	width: 220px;
}

.board-row {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
    grid-gap: 5px;
}

.tile {
	aspect-ratio: 1;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	font-size: 2rem;
	line-height: 2rem;
	font-weight: bold;
	vertical-align: middle;
	box-sizing: border-box;
	color: #d7dadc;
	border: 2px solid #3a3a3c;
	text-transform: uppercase;
	user-select: none;
}

.tile.correct {
	background-color: #538d4e;
}

.tile.absent {
	background-color: #3a3a3c;
}

.tile.present {
	background-color: #b59f3b;
}

#keyboard {
	height: 200px;
    margin: 0 8px;
    user-select: none;
}

.row {
    display: flex;
    width: 100%;
    margin: 0 auto 8px;
    touch-action: manipulation;
}

#keyboard button {
    font-family: inherit;
    font-weight: bold;
    border: 0;
    padding: 0;
    margin: 0 5px 0 0;
    height: 58px;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    background-color: #818384;
    color: #d7dadc;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
}

#keyboard button.correct {
	background-color: #538d4e;
    color: #d7dadc;
}

#keyboard button.absent {
	background-color: #3a3a3c;
    color: #d7dadc;
}

#keyboard button.present {
	background-color: #b59f3b;
    color: #d7dadc;
}

.half {
    flex: 0.5;
}

.overlay {
	display: none;
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	justify-content: center;
	align-items: center;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 9999;
}

.overlay .content {
	position: relative;
	border-radius: 8px;
	border: 1px solid #1a1a1b;
	background-color: #121213;
	color: #d7dadc;
	box-shadow: 0 4px 23px 0 rgb(0 0 0 / 20%);
	width: 90%;
	max-height: 90%;
	overflow-y: auto;
	animation: SlideIn 200ms;
	max-width: 500px;
	padding: 16px 16px 32px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.overlay .content.closing {
	animation: SlideOut 150ms;
}

.overlay .content .close-icon {
    width: 24px;
    height: 24px;
    position: absolute;
    top: 16px;
    right: 16px;
	color: #d7dadc;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0 4px;
}

.overlay .content .save-icon {
    width: 24px;
    height: 24px;
    position: absolute;
    top: 16px;
    left: 16px;
	color: #d7dadc;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0 4px;
}

.overlay .content .back-to-stats-icon {
    width: 24px;
    height: 24px;
    position: absolute;
    top: 16px;
    left: 16px;
	color: #d7dadc;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0 4px;
}

.overlay .content h1 {
	font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
    margin: 20px 0 4px;
}

.overlay .content h1.first {
	margin-bottom: 11px;
}

.overlay .content p {
	width: 100%;
	margin: 3px 0 0;
}

.overlay .overlay-disclaimer {
	width: 80% !important;
	font-size: 11px;
}

#save-content {
	width: 80%;
}

.save-button-container {
	text-align: center;
}

.outlined-button {
	display: inline-block;
	width: 250px;
	outline: none;
	cursor: pointer;
	font-size: 16px;
	line-height: 20px;
	font-weight: 600;
	border-radius: 8px;
	padding: 13px 23px;
	border: 1px solid #222222;
	background: #fff;
	color: #222222;          
}

#info-tutorial-container {
	display: flex;
	flex-direction: column;
}

.tutorial-row {
	display: flex;
	justify-content: start;
	gap: 5px;
	margin: 10px 0 5px;
}

.tutorial-row.last {
	margin-top: 25px;
}

.tutorial-tile {
	width: 50px;
	height: 50px;
}

#statistics {
    display: flex;
	gap: 40px;
    margin-bottom: 10px;
}

.statistic-container {
    flex: 1;
}

.statistic-container .statistic {
    font-size: 36px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    letter-spacing: 0.05em;
    font-variant-numeric: proportional-nums;
}

.statistic-container .label {
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#guess-distribution {
	width: 80%;
}

#guess-distribution .graph-container {
	width: 100%;
	height: 23px;
	display: flex;
	align-items: center;
	padding-bottom: 4px;
	font-size: 14px;
	line-height: 20px;
}

#guess-distribution .graph-container .guess {
    width: 18px;
}

#guess-distribution .graph-container .guess.faded {
    color: #818384;
}

#guess-distribution .graph-container .graph {
    width: 100%;
    height: 100%;
    padding-left: 4px;
}

#guess-distribution .graph-container .graph .graph-bar {
    height: 100%;
    width: 7%;
    position: relative;
    background-color: #3a3a3c;
    display: flex;
    justify-content: center;
}

#guess-distribution .graph-container .graph .graph-bar.highlight {
    background-color: #538d4e;
}

#guess-distribution .graph-container .graph .graph-bar.failed-highlight {
    background-color: #b8a146;
}

#guess-distribution .graph-container .graph .graph-bar.align-right {
    justify-content: flex-end;
    padding-right: 8px;
}

#guess-distribution .graph-container .graph .num-guesses {
    font-weight: bold;
    color: #d7dadc;
}

.footer {
	display: none;
	width: 100%;
	margin-top: 30px;
	justify-content: center;
	align-items: center;
}

.countdown {
	border-right: 1px solid #d7dadc;
	padding-right: 12px;
	width: 50%;
}

.countdown h1 {
	margin: 10px 0 2px !important;
}

.statistic.timer {
    font-variant-numeric: initial;
}

.share {
	display: flex;
	justify-content: center;
	align-items: center;
	padding-top: 6px;
	padding-left: 12px;
	width: 50%;
}

button#share-button {
	background-color: #538d4e;
	color: #d7dadc;
	font-family: inherit;
	font-weight: bold;
	border-radius: 4px;
	cursor: pointer;
	border: none;
	user-select: none;
	display: flex;
	justify-content: center;
	align-items: center;
	text-transform: uppercase;
	-webkit-tap-highlight-color: rgba(0,0,0,0.3);
	width: 80%;
	font-size: 20px;
	height: 52px;
	-webkit-filter: brightness(100%);
}

button#share-button:hover {
	opacity: 0.9;
}

button#share-button span {
	padding-top: 6px;
	margin: 0;
	padding-left: 5px;
}

@keyframes SlideIn {
	0% {
		transform: translateY(30px);
		opacity: 0;
	}
	100% {
		transform: translateY(0px);
		opacity: 1;
	}
}

@keyframes SlideOut {
	0% {
		transform: translateY(0px);
		opacity: 1;
	}
	90% {
		opacity: 0;
	}
	100% {
		opacity: 0;
		transform: translateY(60px);
	}
}