.space-invaders-2 .body {
	padding: 0 10px;
}

.space-invaders-2 .info {
	margin-bottom: 2em;
}

.space-invaders-2 .controls {
	margin: 6px auto;
	width: 528px;
}

.space-invaders-2 .rules {
	margin: 2em 0;
}

.space-invaders-2 .rules p {
	text-indent: 1.4em;
}

.space-invaders-2 .si2-button {
	padding: 2px 10px;
}

.space-invaders-2 #si2-game {
	width: 520px;
	height: 400px;
	position: relative;
	background: #000;
	font-family: serif;
	border: 4px solid #aaa;
	overflow: hidden;
	font-family: Helvetica, Arial;
	margin: 0 auto;
}
.space-invaders-2 .si2-info {
	text-transform: uppercase;
	color: #fff;
	font-size: 16px;
	line-height: 30px;
	margin: 3px 0 0 8px;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	height: 30px;
}

.space-invaders-2 .si2-info span {
	color: #0f0;
	font-weight: bold;
}

.space-invaders-2 .si2-ships span {
	background: url('/space-invaders-2/ship.gif') no-repeat 0 -16px transparent;
	width: 30px;
	height: 16px;
	margin-right: 5px;
	display: inline-block;
}

.space-invaders-2 .si2-game-start, .space-invaders-2 .si2-game-over, .space-invaders-2 .si2-game-pause {
	position: absolute;
	top: 80px;
	width: 100%;
	font-size: 16px;
	color: #fff;
	text-align: center;
	background: #000;
	z-index: 100;
}

.space-invaders-2 .si2-game-over, .space-invaders-2 .si2-game-pause {
	display: none;
	top: 140px;
}
.space-invaders-2 .si2-panel-text {
	margin: 1em 0;
}

.space-invaders-2 .si2-title {
	font-size: 26px;
	color: #0f0;
	font-style: italic;
	font-weight: bold;
	letter-spacing: 6px;
}

.space-invaders-2 .si2-panels {
	display: table;
	margin-top: 10px;
}

.space-invaders-2 .si2-panel {
	width: 50%;
	display: table-cell;
}
.space-invaders-2 .si2-panel p {
	margin-left: 2em;
}
.space-invaders-2 .si2-panel ul {
	list-style: none;
	padding: 0;
	margin: 10px 0;
}

.space-invaders-2 .si2-panel ul li {
	margin-bottom: 10px;
}

.space-invaders-2 .bullet-ship {
	background-color: #ffffff;
	height: 5px;
	width: 2px;
}

.space-invaders-2 .bullet-enemy {
	background-color: #ffff00;
	height: 6px;
	width: 2px;
}
.space-invaders-2 .rules p {
	margin-bottom: 1em;
}

.space-invaders-2 .rules h2 {
	line-height: 2em;
	font-size: 130%;
	font-weight: normal;
}


.space-invaders-2 .si2-device {
	display: grid;
	grid-template-columns: 55px 530px 55px;
	margin: 0 auto;
}

.space-invaders-2 .left-controlls, .space-invaders-2 .right-controlls{
	width: 55px;
	position: relative;
	height: 400px;
	user-select: none;
}
.space-invaders-2 .virtual-button {
	width: 50px;
	height: 50px;
	color: #fff;
	text-align: center;
	line-height: 50px;
	font-size: 20px;
	border: 1px dotted rgb(39, 5, 5);
	border-radius: 50px;
	cursor: pointer;
	position: absolute;
	bottom: 0;
}
.space-invaders-2 .virtual-button.si2-fire {
	bottom: 60px;
}
.space-invaders-2 .toggle-full-screen {
	/* display: none; */
}

.space-invaders-2 .si2-device:fullscreen .left-controlls, .space-invaders-2 .si2-device:fullscreen .right-controlls {
	display: block;
}

@media (max-width: 660px) {

}

@media (max-width: 660px) and (orientation: landscape) {

}

@media (max-width: 660px) and (orientation: portrait) {
	.space-invaders-2 .si2-device:fullscreen #si2-game {
		transform: rotate(90deg);
		margin: 0 auto;
	}
}

/* Settings modal styles */
.space-invaders-2 .si2-settings-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.8);
	justify-content: center;
	align-items: center;
	z-index: 1002;
	padding: 10px;
	box-sizing: border-box;
}

.space-invaders-2 .si2-modal-content {
	background-color: #000;
	border: 4px solid #aaa;
	border-radius: 0;
	text-align: center;
	color: #fff;
	max-width: 400px;
	width: 90%;
	max-height: 90%;
	overflow-y: auto;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
	font-family: Helvetica, Arial;
}

.space-invaders-2 .si2-modal-header {
	background-color: #333;
	color: #fff;
	padding: 15px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 2px solid #aaa;
}

.space-invaders-2 .si2-modal-header h2 {
	margin: 0;
	font-size: 18px;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 2px;
}

.space-invaders-2 .si2-close-button {
	background: none;
	border: none;
	color: #fff;
	font-size: 24px;
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s;
}

.space-invaders-2 .si2-close-button:hover {
	color: #0f0;
}

.space-invaders-2 .si2-modal-body {
	padding: 20px;
}

.space-invaders-2 .si2-setting-item {
	margin-bottom: 20px;
	text-align: left;
}

.space-invaders-2 .si2-setting-item:last-child {
	margin-bottom: 0;
}

.space-invaders-2 .si2-setting-item p {
	margin: 0 0 10px 0;
	font-size: 14px;
	color: #fff;
	text-align: center;
}

.space-invaders-2 .si2-danger-button {
	background-color: #800;
	color: #fff;
	border: 2px solid #a00;
}

.space-invaders-2 .si2-danger-button:hover {
	background-color: #a00;
	border-color: #c00;
}

.space-invaders-2 .si2-settings {
	margin-left: 10px;
}

/* Mobile settings modal adjustments */
@media screen and (max-width: 600px) {
	.space-invaders-2 .si2-modal-content {
		max-width: 95%;
	}

	.space-invaders-2 .si2-modal-header {
		padding: 12px 15px;
	}

	.space-invaders-2 .si2-modal-header h2 {
		font-size: 16px;
	}

	.space-invaders-2 .si2-modal-body {
		padding: 15px;
	}

	.space-invaders-2 .si2-setting-item p {
		font-size: 13px;
	}

	.space-invaders-2 .si2-danger-button {
		font-size: 13px;
		padding: 6px 12px;
	}
}

/* Celebration animation for new best score */
.space-invaders-2 #si2-celebration {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 4rem;
	z-index: 1000;
	pointer-events: none;
	display: none;
	animation: si2-celebrate 2s ease-out forwards;
}

@keyframes si2-celebrate {
	0% {
		opacity: 0;
		transform: translate(-50%, -50%) scale(0.5);
	}
	20% {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1.2);
	}
	40% {
		transform: translate(-50%, -50%) scale(1);
	}
	60% {
		transform: translate(-50%, -50%) scale(1.1);
	}
	80% {
		transform: translate(-50%, -50%) scale(1);
	}
	100% {
		opacity: 0;
		transform: translate(-50%, -50%) scale(0.8);
	}
}
