* {
	box-sizing: border-box;
}

html {
	height: 100%;
	overflow-y: scroll;
	margin: 0;
	padding: 0;
}

body {
	background: #0d1117;
	background-attachment: fixed;
	margin: 0;
	padding: 0;
	display: flex;
	flex-flow: column;
	width: 100%;
	min-width: 1100px;
	height: 100%;
	font-family: 'Mako';
	color: #c9d1d9;
}

/*
	Header and header menus styling
*/
#header {
	width: 100%;
	height: 100%;
	min-height: 110px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background-color: rgba(22, 27, 34, 0.95);
	border-bottom: 1px solid #30363d;
}

#inp, #options, #next_step, #previous_step, #help {
	width: 20%;
	min-width: 220px;
	height: 100px;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	text-align: center;
	margin-left: -500px;
}

#options, #next_step, #previous_step, #help {
	opacity: 0;
}

/* 
	The main regular expression input field and corresponding convert button
*/
#inp {
	position: relative;
}
#convert {
	width: 200px;
	font-size: 20px;
	margin: 10px auto;
	display: block;
	cursor: pointer;
	outline: none;
	background: none;
	border: 2px solid rgba(32, 178, 170, 0.7);
	color: #c9d1d9;
	font-family: 'Mako';
}

#convert:hover {
	border: 2px solid rgb(32, 178, 170);
	background: rgba(32, 178, 170, 0.08);
}

#convert:disabled {
	cursor: default;
	border: 2px solid rgba(32, 178, 170, 0.3);
	color: #484f58;
}

#regularExpression {
	background-color: rgba(22, 27, 34, 0.8);
	border: 1px solid #30363d;
	border-radius: 0px;
	width: 192px;
	font-size: 30px;
	display: block;
	margin: 10px auto;
	padding: 2px 4px;
	color: #e6edf3;
}

#regularExpression:focus {
	outline: none;
	border-color: #20b2aa;
}

#validBorder, #invalidBorder {
	pointer-events: none;
	position: absolute;
	transform: translate(-50%);
	margin: 10px 0 0 0;
}

.greenPath, .redPath {
	stroke-dashoffset: 240px;
	stroke-dasharray: 240px;
	transition: stroke-dashoffset 1s;
}

.enabled {
	stroke-dashoffset: 0px;
}

#options1, #options2, #options3 {
	margin: 5px auto;
}

#help {
	display: flex;
	flex-flow: column;
}

#help button {
	margin: 10px 10px 0 10px;
	width: 50px;
}

.githubbutton img {
	vertical-align: middle;
	padding: 5px 0;
	filter: invert(1) brightness(0.8);
}

#line {
	display:none;
	background-color: #30363d;
	min-height: 1px;
	width: 100%;
	bottom: 0%;
	opacity: 0;
	margin: 0;
}

.beginbuttons {
	width: 200px;
	margin: -5px auto;
	display: flex;
	flex-flow: row;
	font-size: 14px;
}

.helpbutton2 {
	border-bottom: 1px solid #58a6ff;
	width: 30px;
	margin-right: 47px;
	text-align: left;
	cursor: pointer;
	color: #58a6ff;
}

.examplebutton {
	border-bottom: 1px solid #58a6ff;
	width: 123px;
	text-align: right;
	cursor: pointer;
	color: #58a6ff;
}


#header button {
	cursor: pointer;
	outline: none;
	background: none;
	border: 2px solid rgba(32, 178, 170, 0.7);
	font-family: 'Mako';
	padding-top: 0;
	padding-bottom: 0;
	color: #c9d1d9;
}

#header button:hover {
	border: 2px solid rgb(32, 178, 170);
	background: rgba(32, 178, 170, 0.08);
}

#header button:active {
	background: rgba(32, 178, 170, 0.18);
}

#header button:disabled {
	cursor: default;
	border: 2px solid rgba(32, 178, 170, 0.3);
	color: #484f58;
}

/*
	Styling for the automaton itself
*/
#FA {
	display: none;
	min-height: 300px;
	min-width: 1100px;
	width: 100%;
	flex: 1 1 auto;
	position: relative;
	overflow: hidden;
	background-color: #0d1117;
}

#FA svg {
	overflow: hidden;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* Disappear animation when converting another expression */
svg.disappear {
	-webkit-animation: disap 0.9s;
	animation: disap 0.9s;
	animation-fill-mode: forwards;
}

@keyframes disap {
	0% {transform: scale(1)}
	65% {transform: scale(1.15)}
	100% {transform: scale(0)}
}

@-webkit-keyframes disap {
	0% {transform: scale(1)}
	65% {transform: scale(1.15)}
	100% {transform: scale(0)}
}

/*
	Buttons to go to the next or previous step
*/
#stepr, #stepl {
	opacity: 0;
  flex-direction: row;
  justify-content: center;
	height: 80px;
	width: 190px;
	margin: 10px auto;
	border: 1px solid rgb(32, 178, 170);
}

.step {
	display: none;
}

.stepbutton:hover {
	cursor: pointer;
}

.step:hover .buttonPath {
	-webkit-animation: glow 4s infinite;
	animation: glow 4s infinite;
}

@keyframes glow {
	0% {stroke-dashoffset: 56.85}
	65% {stroke-dashoffset: -56.85}
	100% {stroke-dashoffset: -56.85}
}

@-webkit-keyframes glow {
	0% {stroke-dashoffset: 56.85}
	65% {stroke-dashoffset: -56.85}
	100% {stroke-dashoffset: -56.85}
}

.steptext {
	font-size: 24px;
	font-weight: 800;
	color: rgba(32, 178, 170, 1);
	display: flex;
	justify-content: center;
	flex-direction: column;
}

.buttonPath {
	stroke-dasharray: 56.85;
	stroke-dashoffset: 56.85;
}

#stepmatch {
	margin-top: 10px;
}

#stepmatch div {
	margin: 5px;
}

#stepmatch input {
	height: 20px;
	max-width: 150px;
	background-color: rgba(22, 27, 34, 0.8);
	border: 1px solid #30363d;
	border-radius: 0px;
	font-size: 17px;
	color: #e6edf3;
}

#stepmatch button {
	height: 24px;
}

#stepmatch input:focus {
	outline: none;
	border-color: #20b2aa;
}

/*
	Message with info about next step
*/
#step_message, #error_message {
	width: 100%;
	min-width: 1100px;
	margin: 0;
	height: 24px;
	min-height: 24px;
	text-align: center;
	background-color: rgba(22, 27, 34, 0.9);
	color: #8b949e;
	border-bottom: 1px solid #21262d;
}

#error_message {
	height: auto;
	min-height: 0px;
	color: #f85149;
}

/*
	Infoboxes
*/
ellipse {
	transition: rx 0.6s 0.9s, ry 0.6s 0.9s;
}

.selected_small {
	transition: rx 0.6s 0.3s, ry 0.6s 0.3s;
	rx: 20px;
	ry: 20px;
}

.selected_big {
	transition: rx 0.6s 0.3s, ry 0.6s 0.3s;
	rx: 23px;
	ry: 23px;
}

.info_path {
	transition: stroke-dashoffset 1.1s, fill-opacity 0.2s;
	fill-opacity: 0;
}

.info_path_selected {
	transition: stroke-dashoffset 1.1s 0.7s, fill-opacity 0.2s 1.4s;
	fill-opacity: 1;
	stroke-dashoffset: 0 !important;
}

.info_text {
	transition: opacity 0.2s;
	opacity: 0;
}

.info_text_selected {
	transition: opacity 0.2s 1.4s;
	opacity: 1;
}

.info_text_big {
	font-size: 10.5px;
	font-weigth: 500;
}

.info_text_small {
	font-size: 7.5px;
}

.info_box {
	pointer-events: none;
}

.info_rect {
	pointer-events: none;
}

.info_rect_selected {
	pointer-events: all;
}

/*
	DFA Animation Table
*/
#table_container {
	width: 20%;
	min-width: 390px;
	height: 100%;
	display: flex;
	flex-flow: column;
	border-left: 1px solid #30363d;
	border-right: 1px solid #30363d;
	overflow: auto;
	background-color: #161b22;
	color: #c9d1d9;
}

.table_row {
	display: flex;
	flex-flow: row;
	justify-content: space-between;
}

#table_head div {
	font-size: 20px;
	font-weight: 700;
	color: #e6edf3;
}

.table_text_left {
	min-width: 35%;
	width: 35%;
	padding: 5px;
	vertical-align: middle;
	text-align: center;
	white-space: nowrap;
	border-bottom: 1px solid #30363d;
	border-right: 1px solid #30363d;
}

.table_text_right {
	width: 65%;
	padding: 5px;
	vertical-align: middle;
	text-align: center;
	white-space: nowrap;
	border-bottom: 1px solid #30363d;
}

/*
	Help menu
*/
.helpmenu {
	display: none;
	z-index: 1;
	padding: 5px 10px 20px 5px;
}

.helpmenu_selected {
	display: block;
}

.bigbox {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 50%;
	height: 50%;
	min-width: 780px;
	min-height: 560px;
	background: #161b22;
	border-radius: 10px;
	border: 1px solid #30363d;
	color: #c9d1d9;
	box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

@media (max-width: 1100px) {
	.bigbox {
		left: 150px;
		transform: translate(0, -50%);
	}
}
@media (max-height: 800px) {
	.bigbox {
		top: 100px;
		bottom: 100px;
		transform: translate(-50%, 0);
	}
}
@media (max-width: 1100px) and (max-height: 800px) {
	.bigbox {
		left: 150px;
		top: 100px;
		bottom: 100px;
		transform: none;
	}
}

.helpheader {
	height: 30px;
	width: 100%;
	background: #1c2128;
	border-radius: 10px 10px 0 0;
	position: relative;
	border-bottom: 1px solid #30363d;
}

.helptitle {
	width: 15%;
	font-size: 22px;
	margin: 10px;
	padding-left: 1%;
	color: #e6edf3;
}

.helpexit {
	position: absolute;
	right: 0;
}

.helpexit:hover {
	cursor: pointer;
}

.helpexit line {
	stroke: #8b949e;
}

.helpbody {
	height: 530px;
	width: 100%;
	display: flex;
	flex-flow: row;
}

.helptabs {
	width: 15%;
	height: 100%;
	display: flex;
	flex-flow: column;
	align-items: center;
	background: #1c2128;
	border-right: 1px solid #30363d;
}

.helpcontent {
	width: 85%;
	height: 100%;
	position: relative;
	overflow-y: scroll;
	padding-right: 15px;
	padding-left: 5px;
	border: 1px solid #21262d;
	border-radius: 2px;
	color: #c9d1d9;
}

.helpsectionbutton {
	width: 80%;
	text-align: center;
	margin: 10px;
	background: none;
	border: 1px solid #30363d;
	color: #8b949e;
	cursor: pointer;
	border-radius: 4px;
	padding: 5px;
	font-family: 'Mako';
}

.helpsectionbutton:hover {
	border-color: #20b2aa;
	color: #20b2aa;
	background: rgba(32, 178, 170, 0.08);
}

.regularExpressionText {
	font-weight: 600;
	color: #58a6ff;
	display: inline-block;
}

h2 {
	margin-top: 0;
	margin-bottom: 5px;
	color: #e6edf3;
}

a {
	color: #58a6ff;
}

a:visited {
	color: #a371f7;
}

.helpcontent div {
	margin-bottom: 30px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0d1117;
}

::-webkit-scrollbar-thumb {
  background: #30363d;
}

::-webkit-scrollbar-thumb:hover {
  background: #484f58;
}

/*
	Starting screen popup
*/
#startpopup {
	text-align: center;
	opacity: 0;
}

#intro_screen {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 20px 30px;
	box-sizing: border-box;
}

#college_logo {
	margin-bottom: 14px;
	filter: drop-shadow(0 2px 12px rgba(32, 178, 170, 0.25));
}

.pop1 {
	font-size: 28px;
	font-weight: bold;
	color: #e6edf3;
	margin: 6px 0;
	line-height: 1.3;
}

.pop2 {
	font-size: 16px;
	color: #20b2aa;
	margin: 4px 0;
	letter-spacing: 0.4px;
}

.pop_divider {
	width: 60px;
	height: 2px;
	background: linear-gradient(90deg, transparent, #20b2aa, transparent);
	margin: 14px auto;
	border-radius: 2px;
}

.pop3 {
	font-size: 15px;
	color: #8b949e;
	margin: 4px 0;
}

.pop4 {
	font-size: 13px;
	color: #484f58;
	margin: 12px 0 0 0;
}

.pop4 b {
	color: #8b949e;
}

#startbutton {
	margin-top: 18px;
	padding: 11px 52px;
	font-size: 19px;
	font-family: 'Mako', sans-serif;
	cursor: pointer;
	background: rgba(32, 178, 170, 0.1);
	border: 2px solid rgba(32, 178, 170, 0.7);
	border-radius: 4px;
	color: #20b2aa;
	letter-spacing: 2px;
	transition: background 0.2s, border-color 0.2s, transform 0.1s, color 0.2s;
}

#startbutton:hover {
	background: rgba(32, 178, 170, 0.2);
	border-color: #20b2aa;
	color: #7fffd4;
	transform: scale(1.04);
}

#startbutton:active {
	background: rgba(32, 178, 170, 0.3);
	transform: scale(0.98);
}