/* Font Awesome Icon compatability */
nav i, nav [class^="mdi-"], nav [class*="mdi-"], nav i.material-icons {
	display: inline-block;
	user-select: none;
}

nav i.material-icons:not(:first-child) {
	padding: 0 0 0 15px;
}

nav i.material-icons.fa {
	position: relative;
	top: -3px;
}

/* Nav formatting */
nav {
	background: #1f1f1f;
	position: relative;
	z-index: 2;
	opacity: 0.8;
}

@media only screen and (min-width: 601px) {
	nav .nav-wrapper h1 {
		height: 64px;
		line-height: 64px;
	}
}

/* Disabled polyfill */
a[disabled]:not([disabled="false"]) {
	pointer-events: none;
	cursor: default;
	opacity: 0.5;
}

/* Canvas formatting */
body {
	background: #111111;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
}

html, body {
	height: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
}

#wrapper {
	flex-grow: 1;
	height: 100%;
	position: relative;
}

#wrapper > * {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	image-rendering: pixelated;
	image-rendering: crisp-edges;
}

.card-image > a {
	display: block;
	padding-top: 100%;
}

.card-image > a > img {
	position: absolute !important;
}

#canvas {
	display: block;
}

/* Input */
#input {
	font-size: 7px;
}

@font-face {
	font-family: 'Silkscreen';
	src: url('games/pong/slkscr.ttf');
}

/* 2048 */
#canvas-2048 {
	margin: 0 auto;
	display: block;
	image-rendering: pixelated;
	background: #bbada0;
	border-radius: 3px;
	font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
	font-weight: bold;
	box-shadow: 0px 0px 2px rgba(150, 150, 150, 0.2);
	padding: 5px;
}

#canvas-2048 > div {
	position: relative;
	width: 100%;
	height: 100%;
}

#canvas-2048 .tile {
	width: 25%;
	height: 25%;
	position: absolute;
	padding: 5px;
	color: transparent;
	justify-content: center;
	align-items: center;
	font-size: 10vmin;
	transition: all 0.2s;
	top: 0;
	left: 0;
}

#canvas-2048 .tile:before {
	content: attr(title);
	width: calc(100% - 10px);
	height: calc(100% - 10px);
	border-radius: 3px;
	position: absolute;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: all 0.2s;
}

#canvas-2048 #grid-2048 .tile:before {
	background-color: #cdc1b4;
	box-shadow: 0px 0px 2px rgba(150, 150, 150, 0.2);
}

#canvas-2048 .tile.r0 {top:   0%;}
#canvas-2048 .tile.r1 {top:  25%;}
#canvas-2048 .tile.r2 {top:  50%;}
#canvas-2048 .tile.r3 {top:  75%;}

#canvas-2048 .tile.c0 {left:  0%;}
#canvas-2048 .tile.c1 {left: 25%;}
#canvas-2048 .tile.c2 {left: 50%;}
#canvas-2048 .tile.c3 {left: 75%;}

#canvas-2048 .tile.top {z-index: 2;}

#canvas-2048 .tile[title]:before        {color: #f9f6f2; background: #3c3a32; font-size: 6vmin;}
#canvas-2048 .tile[title="2"]:before    {color: #645A51; background: #eee4da; font-size: 10vmin;}
#canvas-2048 .tile[title="4"]:before    {color: #645A51; background: #ede0c8; font-size: 10vmin;}
#canvas-2048 .tile[title="8"]:before    {color: #f9f6f2; background: #f2b179; font-size: 10vmin;}
#canvas-2048 .tile[title="16"]:before   {color: #f9f6f2; background: #f59563; font-size: 10vmin;}
#canvas-2048 .tile[title="32"]:before   {color: #f9f6f2; background: #f67c5f; font-size: 10vmin;}
#canvas-2048 .tile[title="64"]:before   {color: #f9f6f2; background: #f65e3b; font-size: 10vmin;}
#canvas-2048 .tile[title="128"]:before  {color: #f9f6f2; background: #edcf72; font-size: 8vmin;}
#canvas-2048 .tile[title="256"]:before  {color: #f9f6f2; background: #edcc61; font-size: 8vmin;}
#canvas-2048 .tile[title="512"]:before  {color: #f9f6f2; background: #edc850; font-size: 8vmin;}
#canvas-2048 .tile[title="1024"]:before {color: #f9f6f2; background: #edc53f; font-size: 6vmin;}
#canvas-2048 .tile[title="2048"]:before {color: #f9f6f2; background: #edc22e; font-size: 6vmin;}

#canvas-minesweeper {
	text-align: center;
	margin: 0 auto;
}

#canvas-minesweeper > div {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column
}

#canvas-minesweeper div {
	background: #bcbcbc;
	padding: 8px;
	text-align: center;
	border: 0.6vmin solid #7e7e7e;
	border-right-color: #ffffff;
	border-bottom-color: #ffffff;
}

#canvas-minesweeper div div {
	margin-bottom: 8px;
	display: flex;
	justify-content: space-between;
}

#canvas-minesweeper div div span {
	display: flex;
	justify-content: center;
	align-items: center;
	background: black;
	color: red;
	font-size: 6vmin;
	padding: 0 5px;
	border: 0.6vmin solid #7e7e7e;
	border-right-color: #ffffff;
	border-bottom-color: #ffffff;
}

#canvas-minesweeper div div button {
	background: #bcbcbc;
	font-size: 6vmin;
	border: 0.6vmin solid #7e7e7e;
}

#canvas-minesweeper div div button:not(:active) {
	border-left-color: #ffffff;
	border-top-color: #ffffff;
	border-right-color: #000000;
	border-bottom-color: #000000;
}

#canvas-minesweeper div table {
	flex-grow: 1;
	table-layout: fixed;
	width: 100%;
	min-width: 300px;
	min-height: 300px;
	display: flex;
	flex-direction: column;
	border-spacing: 0;
	border-collapse: collapse;
	border: 0.6vmin solid #7e7e7e;
	border-right-color: #ffffff;
	border-bottom-color: #ffffff;
}

#canvas-minesweeper div table tr {
	flex-grow: 1;
	flex-basis: 100%;
	display: flex;
	margin: 0;
	padding: 0;
}

#canvas-minesweeper div table tr td {
	display: inline-block;
	flex-grow: 1;
	flex-basis: 100%;
	margin: 0;
	padding: 0;
}

#canvas-minesweeper div table tr td input[type="submit"] {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	background: #bcbcbc;
	border: 0.6vmin solid #7e7e7e;
	font-weight: bold;
	font-size: 6vmin;
	cursor: default;
}

#canvas-minesweeper div table tr td input[type="submit"][value="-"]:not(:active),
#canvas-minesweeper div table tr td input[type="submit"][value="?"],
#canvas-minesweeper div table tr td input[type="submit"][value="⚑"] {
	border-left-color: #ffffff;
	border-top-color: #ffffff;
	border-right-color: #000000;
	border-bottom-color: #000000;
}

#canvas-minesweeper div table tr td input[type="submit"][value="-"] {
	color: transparent;
	cursor: pointer;
}

#canvas-minesweeper div table tr td input[type="submit"][value="0"] {color: transparent;}
#canvas-minesweeper div table tr td input[type="submit"][value="1"] {color: blue;}
#canvas-minesweeper div table tr td input[type="submit"][value="2"] {color: green;}
#canvas-minesweeper div table tr td input[type="submit"][value="3"] {color: red;}
#canvas-minesweeper div table tr td input[type="submit"][value="4"] {color: darkblue;}
#canvas-minesweeper div table tr td input[type="submit"][value="5"] {color: brown;}
#canvas-minesweeper div table tr td input[type="submit"][value="6"] {color: darkcyan;}
#canvas-minesweeper div table tr td input[type="submit"][value="7"] {color: black;}
#canvas-minesweeper div table tr td input[type="submit"][value="8"] {color: grey;}

#canvas-minesweeper div table tr td input[type="submit"][value="⚑"],
#canvas-minesweeper div table tr td input[type="submit"][value="✸"] {font-size: 5vmin;}