:root {
	--player0-color: #ff3333;
	--player1-color: #33ff33;
	--player2-color: #ffaa33;
	--player3-color: #33ffff;
}
html.high-contrast {
	--player0-color: #ff3333;
	--player1-color: #ffffff;
	--player2-color: #555555;
	--player3-color: #33aaaa;
}
html {
	cursor: url('../images/cursor.svg') 18 3, default;
}
html.game {
	overflow: hidden;
	height: 100%;
	width: 100%;
}
body {
	width: 500px;
	margin: auto;
}
button, input, label {
	cursor: inherit;
}
label.disabled {
	visibility: hidden;
}
body {
	background-color: black;
	color: white;
	font-family: sans-serif;
}
h1 {
	line-height: 1;
	width: 500px;
	margin: 25px auto 10px auto;
	padding: 0;
	text-align: center;
	font-size: 50pt;
}
h1 img {
	width: 100%;
}
a {
	color: #bbf;
}
a:hover {
	color: #eef;
}
#about {
	margin: 20px auto;
	width: 500px;
	text-align: justify;
}
#intro {
	margin: 25px auto;
	width: 500px;
	text-align: center;
}
#intro table {
	margin: auto;
	text-align: left;
}
#intro caption {
	margin-top: 30px;
	font-weight: bold;
}
#intro th.player0, span.player0 {
	color: var(--player0-color);
}
#intro th.player1, span.player1 {
	color: var(--player1-color);
}
#intro th.player2, span.player2 {
	color: var(--player2-color);
}
#intro th.player3, span.player3 {
	color: var(--player3-color);
}
#intro label {
	font-size: 0.8em;
	position: relative;
	display: inline-block;
	min-width: 50px;
	margin: 0;
	padding: 5px 20px 5px 10px;
	border: 2px solid;
	border-color: #88a #224 #224 #88a;
}
#intro input[type="radio"] {
	position: absolute;
	opacity: 0;
}
#intro input[type="radio"]:checked + label {
	background-color: #448;
}
#intro input[type="radio"]:checked + label::after {
	content: '\2713';
	color: white;
	position: absolute;
	top: 6px;
	right: 3px;
	font-size: 12pt;
	font-weight: bold;
	line-height: 1em;
}
#intro input[type="radio"]:focus + label {
	outline: 1px solid white;
}
#intro input[type="radio"]:checked + span > label {
	background-color: #448;
}
#intro input[type="radio"]:checked + span > label::after {
	content: '\2713';
	color: white;
	position: absolute;
	top: 6px;
	right: 3px;
	font-size: 12pt;
	font-weight: bold;
	line-height: 1em;
}
#intro input[type="radio"]:focus + span > label {
	outline: 1px solid white;
}
#intro button {
	font-size: 18pt;
	line-height: 1;
	margin: 20px;
	padding: 10px;
	background-color: black;
	color: white;
	border: 2px solid;
	border-color: #88a #224 #224 #88a;
}
#intro button:focus {
	outline: 1px solid white;
}
#intro button:active {
	background-color: #448;
	outline: none;
}
#status {
	width: 500px;
	height: 60px;
	margin: 10px auto;
	font-size: 20pt;
}
#status button {
	font-size: 20pt;
	line-height: 1;
	padding: 10px;
	background-color: black;
	color: white;
	border: 2px solid;
	border-color: #88a #224 #224 #88a;
}
#board {
	margin: 10px auto;
	width: 500px;
	height: 300px;
	display: grid;
	grid-template-columns: repeat(10, 1fr);
	grid-template-rows: repeat(6, 1fr);
	transition-property: transform;
	transition-duration: 2000ms;
}
#board.start {
	transform: scale(5) rotate(0.5turn);
}
.cell {
	background-color: transparent;
	border: 1px solid white;
	outline: none;
	position: relative;
}
.cell.filled {
	background-color: #202464;
	border-color: #88a #002 #002 #88a;
	border-width: 2px;
}
html.high-contrast .cell.filled {
	background-color: #aaa;
	border-color: #ddd #666 #666 #ddd;
}
.atom {
	transition-property: transform, left, top;
	transition-duration: 100ms;
	border-radius: 50%;
	position: absolute;
	width: 18px;
	height: 18px;
	box-shadow: -1px 0px 0px black, 0px -1px 0px black, 1px 0px 0px black, 0px 1px 0px black;
}
.atom.atom1.pos1 {
	left: 15px;
	top: 15px;
}
.atom.atom1.pos2 {
	left: 6px;
	top: 15px;
}
.atom.atom1.pos3 {
	left: 6px;
	top: 7px;
}
.atom.atom1.pos4 {
	left: 6px;
	top: 6px;
}
.atom.atom2.pos1 {
	left: 24px;
	top: 15px;
}
.atom.atom2.pos2 {
	left: 24px;
	top: 7px;
}
.atom.atom2.pos3 {
	left: 24px;
	top: 6px;
}
.atom.atom3.pos1 {
	left: 15px;
	top: 23px;
}
.atom.atom3.pos2 {
	left: 6px;
	top: 24px;
}
.atom.atom4.pos1 {
	left: 24px;
	top: 24px;
}
.atom.atom5.pos1 {
	left: 15px;
	top: 15px;
	visibility: hidden;
}
.atom.size0 {
	transform: scale(0.1);
}
.atom.player0 {
	background: radial-gradient(circle at 4px 6px, #ddd, var(--player0-color) 20%, #000);
}
.atom.player1 {
	background: radial-gradient(circle at 4px 6px, #ddd, var(--player1-color) 20%, #000);
}
.atom.player2 {
	background: radial-gradient(circle at 4px 6px, #ddd, var(--player2-color) 20%, #000);
}
.atom.player3 {
	background: radial-gradient(circle at 4px 6px, #ddd, var(--player3-color) 20%, #000);
}
html.shaped-atoms .atom.player1, html.shaped-atoms .player.player1:before {
	border-radius: 15%;
}
html.shaped-atoms .atom.player2, html.shaped-atoms .player.player2:before {
	transform: rotate(45deg);
	border-radius: 15%;
}
html.shaped-atoms .atom.player2.size0 {
	transform: rotate(45deg) scale(0.1);
}
html.shaped-atoms .atom.player3, html.shaped-atoms .player.player3:before {
	border-radius: 30% 100%;
}
.explosion {
	transition-property: transform, opacity, background-color;
	transition-duration: 200ms;
	width: 50px;
	height: 50px;
	border-radius: 25px;
	position: absolute;
	top: 0;
	left: 0;
}
.explosion.start {
	opacity: 1;
	transform: scale(0.1);
	background-color: white;
}
.explosion.end {
	opacity: 0;
	background-color: white;
}
#playerList {
	margin: auto;
	width: 500px;
}
.player-container {
    display: flex;
    align-items: center;
}
.player {
	width: 40px;
	height: 30px;
	margin: 25px 5px 5px 5px;
	position: relative;
	float: left;
	border-radius: 20px 20px 0 0;
	border: 1px solid black;
}
.player:before {
	content: '';
	position: absolute;
	margin: -25px 5px 0 5px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 1px solid black;
}
.player.active {
	box-shadow: 0 0 20px white;
}
.player.active:before {
	box-shadow: 0 -2px 13px white;
}
.player.dead:after {
	content: 'X';
	position: absolute;
	margin-top: -158px;
	width: 45px;
	height: 65px;
	background-color: rgba(0, 0, 0, 0.8);
	color: red;
	font-size: 60px;
}
.player.player0, .player.player0:before {
	background-color: var(--player0-color);
}
.player.player1, .player.player1:before {
	background-color: var(--player1-color);
}
.player.player2, .player.player2:before {
	background-color: var(--player2-color);
}
.player.player3, .player.player3:before {
	background-color: var(--player3-color);
}
.player > .cells {
    margin-top: 32px;
    text-align: center;
    margin-right: 2px;
    font-size: 10pt;
}
.player > .atoms {
    text-align: center;
    margin-right: 2px;
    font-size: 10pt;
}
.player > .name {
    margin-right: 2px;
    font-size: 12pt;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 32px;
    text-align: center;
}

.player > .name-highlight {
    font-weight: bold;
    text-decoration: underline;
}

.player > .name-cpu {
    font-size: 10pt;
}

.player > .rank {
    height: 32px;
    text-align: center;
    font-size: 12pt;
}

.progress {
    float: right;
}
.progress > * {
    text-align: right;
}
div#instructions {
	position: fixed;
	left: 5px;
	right: 5px;
	top: 5px;
	bottom: 5px;
	border: 1px solid white;
	background: black;
	overflow-y: scroll;
}
div.image-row {
	display: flex;
    justify-content: center;
}

.input-form div {
    display: grid;
    gap: 1rem;
    margin: 2rem;
    grid-template-columns: auto 1fr;
}
.input-form .input-group {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    align-items: baseline;
}
.input-form .submit-group {
    display: grid;
    grid-column: 1 / span 2;
    justify-self: center;
}
.input-form button {
    font-size: 18pt;
    line-height: 1;
    padding: 10px;
    background-color: black;
    color: white;
    border: 2px solid;
    border-color: #88a #224 #224 #88a;
}

.quickgrid[theme=default] .sort-indicator {
    filter: invert(100%) sepia(0%) saturate(7500%) hue-rotate(151deg) brightness(115%) contrast(102%);
}

.link-home {
    margin-right: 5px;
}

