/*
// All GUI markup for the GameBoy case and Tetris game graphics
//
// Version:	v1.5
//
// Created by Daniel Foerster in 04/2020
*/

/* ========================= HTML & BODY ==================================== */
html, body {
  margin: 0;
  padding: 0;
}

body {
  background-color: #000400;
  background-image: radial-gradient(rgba(0, 40, 0, 0.75), black 120%);
  color: #00BB00;
  font-family: 'Courier Prime', monospace;
  font-size: 0.9rem;
  text-shadow: none;
  padding: 30px;
}

* {
	box-sizing: border-box;
}

::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: #005000;
}
::-webkit-scrollbar-thumb {
  background: #00BB00;
}
::-webkit-scrollbar-thumb:hover {
  background: #00CC00;
}

/* ========================= MAIN GUI ELEMENTS ============================== */
/* Upper Half of GameBoy Case */
.tetris_top {
	position: relative;
  border: 1px solid gray;
	background-color: gray;
	border-radius: 15px 15px 3px 3px;
  margin: 0 auto;
	padding: 25px;
	width: 590px;
	height: 612px;
  display: block;
}

/* GameBoy Screen */
#gameCoreScreen {
	padding: 10px;
  margin: 0;
	width: 540px;
	height: 560px;
  background-color: #000400;
  background-image: radial-gradient(rgba(0, 40, 0, 0.75), black 120%);
}

/* Actual game render area in screen */
#gameCanvas {
  border: 1px solid #005500;
  background-color: #001700;
	margin: 0 20px 0 0;
	float: left;
  display: block;
	width: 300px;
	height: 540px;
}

/* Next shape preview in side screen */
#nextCanvas {
  border: 1px solid #005500;
  background-color: #001700;
	margin: 0 auto;
  display: block;
	width: 120px;
	height: 120px;
}

/* Right side of screen => Scores, Next Shape, Pause */
.tetris_side {
	background-color: #004500;
  margin: 0;
	float: left;
	padding: 10px;
  display: block;
	width: 200px;
	height: 540px;
}

/* Boxes for Scores, Next Piece and Options */
.tetris_scores, .tetris_next, .tetris_options {
	border-radius: 5px;
	background-color: #001700;
  margin: 0 0 10px 0;
	padding: 10px;
  display: block;
}

/* Divider between top and bottom half of GameBoy case */
.divider {
  border: 2px solid #333;
	border-radius: 3px;
	background-color: #333;
  margin: 0 auto;
	padding: 0;
  display: block;
	width: 580px;
	height: 9px;
}

/* Bottom half of GameBoy case */
.tetris_bottom {
	position: relative;
  border: 5px solid gray;
	border-radius: 3px 3px 15px 15px;
	background-color: gray;
	margin: 0 auto;
	padding: 10px;
  display: block;
	width: 590px;
	height: 230px;
}

/* ========================= SCREENS ======================================== */

.screen_title {
  display: flex;
  margin: 0 auto 20px auto;
  padding: 0;
  height: 25px;
}
.screen_title_left {
  background-color: #004400;
  height: 3px;
  width: 200px;
  border-radius: 1px 0 0 1px;
  margin: 11px 0 0 0;
  padding: 0;
}
.screen_title_right {
  background-color: #004400;
  height: 3px;
  width: 200px;
  border-radius: 0 1px 1px 0;
  margin: 11px 0 0 0;
  padding: 0;
}
.screen_title_text {
  border-radius: 4px;
  border-left: 2px solid #004400;
  border-right: 2px solid #004400;
  border-top: 1px solid #004400;
  border-bottom: 1px solid #004400;
  background-color: #002200;
  padding: 5px;
  margin: 0;
}

.intro {
  margin: 0 0 40px 0;
  padding: 0;
}

.standard_screen {
  margin: 0;
  padding: 20px;
	width: 540px;
	height: 560px;
  background-color: #000400;
  background-image: radial-gradient(rgba(0, 40, 0, 0.75), black 120%);
}

.start_screen {
  padding: 10px;
	width: 540px;
	height: 560px;
  background-color: #000400;
  background-image: url("./src/start_background_gray.png"), radial-gradient(rgba(0, 40, 0, 0.75), black 120%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 520px 540px;
}

.scrollbox {
  margin-top: 10px;
  padding: 0 10px 0 0;
  height: 85%;
  overflow: auto;
}

.game_over_screen, .pause_screen {
  border: 1px dotted #00AA00;
	margin: 0 20px 0 0;
	float: left;
	width: 300px;
	height: 540px;
}

.pause_screen p {
  text-align: center;
  margin: 250px auto;
}

.start_menu {
  clear: both;
  width: 300px;
  height: 140px;
  margin: 0 auto;
  padding: 5px 0;
  text-align: center;
}
.start_menu button {
  background-color: #002200;
  border: 1px solid #004400;
  color: #00aa00;
  font-family: 'Courier Prime', monospace;
  font-size: 1.1rem;
  border-radius: 10px;
  height: 30px;
  width: 280px;
  margin: 7px auto;
  padding: 2px 20px;
}
.start_menu button:focus {
  outline: 0;
  background-color: #003300;
  border: 2px solid #008800;
  color: #00bb00;
}
.start_menu button:hover {
  background-color: #003300;
}

.music_title {
  height: 25px;
  width: 140px;
  margin: 0 auto;
  padding: 5px 0 10px 0;
  background-color: #003300;
  border: 1px solid #004400;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  text-align: center;
}
#musicOptions {
  background-color: #002200;
  border: 1px solid #004400;
  border-radius: 10px;
  height: 34px;
  width: 325px;
  margin: 0 auto 50px auto;
  padding: 9px 20px;
}
#musicOptions:focus-within {
  padding: 8px 19px;
  background-color: #002800;
  border: 2px solid #008800;
}

/* Return to title from other screens */
.back_button_container, .continue_go_container , .continue_ne_container {
  position: absolute;
  bottom: 40px;
  left: 250px;
  text-align: center;
	font-size: 1.0rem;
}
.continue_go_container {
  left: 145px;
  top: 370px;
}
.continue_ne_container {
  left: 250px;
  top: 370px;
}
.back_button {
  background-color: #002200;
  border: 1px solid #004400;
  color: #00aa00;
  font-family: 'Courier Prime', monospace;
  font-size: 0.7rem;
  border-radius: 8px;
  height: 24px;
  width: 90px;
  padding: 2px;
}
.back_button:focus {
  outline: 0;
  background-color: #002500;
  border: 2px solid #008800;
  color: #00bb00;
}
.back_button:hover {
  background-color: #003300;
}

/* Name Entry */
.new_score {
	font: 2.0rem 'Stalinist One';
}
.your_score {
  width: 200px;
  height: 30px;
  margin: 50px auto;
  padding: 8px;
  border-radius: 10px;
  background-color: #002500;
}

/* ========================= TABLES ========================================= */

.controls_container {
  margin: 5px auto 0 auto;
  width: 380px;
  padding: 0;
  opacity: 0.8;
}

.controls_images {
  margin-bottom: 10px;
  text-align: center;
  padding: 0;
  opacity: 0.8;
}

.controls_images img {
  padding: 0 5px 5px 0;
  height: 65px;
}

.controls {
  width: 380px;
  text-align: center;
  border-spacing: 3px;
  border-collapse: separate;
  font-size: 0.8rem;
}

.controls th {
  background-color: #003500;
  padding: 4px;
  font-weight: normal;
}

.controls td {
  padding: 4px 15px 4px 15px;
  background-color: #002000;
}

.score_table {
  width: 500px;
  height: 400px;
  margin: 0;
  text-align: center;
  border-spacing: 3px;
  border-collapse: separate;
  font-size: 0.8rem;
}

.score_table th {
  background-color: #004400;
  padding: 2px;
}

.score_table_cell {
  padding: 2px 7px 2px 7px;
  background-color: #002000;
}

.score_table_cell_highlight {
  background-color: #FFBF00;
  color: #002900;
  opacity: 0.5;
  text-shadow: none;
}

.logo_start {
  margin: 50px auto;
	padding-top: 3px;
  border-radius: 20px;
	font: 4.5rem 'Stalinist One';
	text-align: center;
	color: #009900;
}

.logo_go {
  text-align: center;
  position: absolute;
  top: 200px;
  left: 90px;
	font: 2.5rem 'Stalinist One';
	color: #009900;
}

/* ========================= GUI CONTROLS & BUTTONS ========================= */

/* Battery LED with glow effect */
.glow {
	position: absolute;
	right: 25px;
	top: 0;
	font-size: 1.2rem;
	color: #ff9900;
	text-align: center;
	animation: glow 2s ease-in-out infinite alternate;
}

@-webkit-keyframes glow {
	from { text-shadow: 0 0  5px #995c00, 0 0 10px #663d00, 0 0 15px #331f00; color: #cc7a00; }
	to   { text-shadow: 0 0 10px #ff9900, 0 0 15px #cc7a00, 0 0 20px #995c00; color: #ffad33; }
}

/* Batery Label */
.battery {
	position: absolute;
	right: 45px;
	top: 7px;
	font-family: 'Varela Round', sans-serif;
	font-size: 0.7rem;
	font-weight: bold;
	color: #2e1e5d;
 	text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5);
}

/* GUI Dpad */
.dpad_container {
  border: 1px solid #666;
  border-radius: 100px;
  box-shadow: inset 0px 0px 5px rgba(0,0,0,0.7);
	float: left;
	margin: 5px 0 0 5px;
  padding: 15px;
}

.dpad {

}

/* Single button in Dpad */
.dpad_button, .dpad_center {
	width: 50px;
	height: 50px;
	text-align:center;
	font-size: 2.3rem;
	color: #383838;
	background-color: #333;
}

.dpad_button {
	border: 1px solid #303030;
	color: #444;
 	box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.7);
	cursor: pointer;
}

/* Home button */
.home_container {
  position: absolute;
  top: 20px;
  left: 275px;
  width: 40px;
  height: 40px;
  padding: 5px;
  border-radius: 20px;
  border: 1px solid #313131;
  box-shadow: inset 0px 0px 3px rgba(0,0,0,0.8);
}
.home_button {
  outline: 0;
	border: 1px solid #111;
	border-radius: 14px;
	width: 28px;
	height: 28px;
	background-color: #222;
  color: #888;
  font-size: 1.1rem;
 	box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.5);
	cursor: pointer;
}
.home_button:hover {
  background-color: #292929;
}
.home_button:active {
  border: 1px solid #666;
  transform: translateY(1px);
}
.home_text {
  position: absolute;
  top: 65px;
  left: 275px;
	color: #2e1e5d;
	font-family: 'Varela Round', sans-serif;
	font-weight: bold;
	font-size: 0.9rem;
 	text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5);
}

/*  Select and Start Button Container */
.SelSta_container {
  width: 180px;
  height: 80px;
	float: left;
	margin: 100px 0 0 10px;
  padding: 20px 0 0 0;
}

/* Button Design for SELECT and START */
.SelSta_button {
	transform: rotate(-30deg);
	border: 1px solid #666;
	border-radius: 5px;
	width: 55px;
	height: 20px;
	margin: 0 0 0 20px;
	background-color: #333;
 	box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.5);
	float: left;
	cursor: pointer;
}

/* Select button text */
.select_text {
	transform: rotate(-30deg);
	color: #2e1e5d;
	font-family: 'Varela Round', sans-serif;
	font-weight: bold;
	font-size: 0.9rem;
 	text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5);
	float: left;
	margin: 20px 0 0 -43px;
}

/* Start button text */
.start_text {
	transform: rotate(-30deg);
	color: #2e1e5d;
	font-family: 'Varela Round', sans-serif;
	font-weight: bold;
	font-size: 0.9rem;
 	text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5);
	float: left;
	margin: 20px 0 0 -39px;
}

/*  Select and Start Button Container */
.AB_container {
	transform: rotate(-30deg);
  position: absolute;
  right: 15px;
  top: 45px;
  border: 1px solid #666;
  border-radius: 40px;
  box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.7);
  width: 170px;
  height: 80px;
	float: left;
  margin: 0;
  padding: 10px;
}

/* Button Design for B and A */
.B_button, .A_button {
	border: 1px solid #420310;
	border-radius: 30px;
	width: 60px;
	height: 60px;
	background-color: #6a0017;
 	box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.7);
	float: left;
	cursor: pointer;
}

.A_button {
  margin-left: 28px;
}

/* AB text */
.B_text, .A_text {
  position: absolute;
	color: #2e1e5d;
	font-family: 'Varela Round', sans-serif;
	font-weight: bold;
	font-size: 1.3rem;
 	text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5);
}

/* B button text */
.B_text {
  top: 85px;
  left: 35px;
}

/* Start button text */
.A_text {
  top: 85px;
  left: 123px;
}

/* ========================= MISC. MARKUP =================================== */

/* Close button top right corner */
.close {
  float: right;
  font-size: 35px;
  font-weight: bold;
	margin-top: -2px;
	margin-right: 10px;
}

.close:hover, .close:focus {
	color: #009900;
	text-decoration: none;
	cursor: pointer;
}

.scores {
  border: 0;
  background-color: #002200;
  width: 90px;
  color: #00AA00;
  text-align: right;
  font-size: 1.0rem;
  margin-left: 10px;
}

/* Heading for sections like Scores, Options, Help, ... */
.heading {
	margin: -5px -5px 10px -5px;
	padding: 4px 0 4px 10px;
	border-left: 4px solid #00BB00;
	background: #003000;
	font-size: 0.9rem;
	text-shadow: none;
}

/* Copyright note in bottom right corner */
.copyright {
  position: absolute;
  bottom: 45px;
  left: 215px;
  opacity: 0.6;
	font-size: 0.8rem;
}
#showCL {
  cursor: pointer;
  color: #00ee00;
  opacity: 1.0;
  font-size: 0.7rem;
}
#showCL:hover { text-decoration: underline; }
/* -------> Start: W3C CSS Checkbox / Radio ------ */

/* The container */
.r_container {
  display: block;
  position: relative;
  padding-left: 30px;
  margin-right: 30px;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  float: left;
}

/* Hide the browser's default radio button */
.r_container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* Create a custom radio button */
.r_checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 15px;
  width: 15px;
  background-color: #004400;
  border-radius: 50%;
}

/* On mouse-over, add a grey background color */
.r_container:hover input ~ .r_checkmark {
  background-color: #006600;
}

/* When the radio button is checked, add a blue background */
.r_container input:checked ~ .r_checkmark {
  background-color: #006600;
}

/* Create the indicator (the dot/circle - hidden when not checked) */
.r_checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

/* Show the indicator (dot/circle) when checked */
.r_container input:checked ~ .r_checkmark:after {
  display: block;
}

/* Style the indicator (dot/circle) */
.r_container .r_checkmark:after {
 	top: 4px;
	left: 4px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #00cc00;
}

/* -------> End: W3C CSS Checkbox / Radio ------ */
