*,
*:before,
*:after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
}
body {
  font-size: 16px;
  font-family: Lato, sans-serif;
  color: #555;
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: box;
  display: flex;
  min-width: 800px;
}
.section {
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: box;
  display: flex;
  -webkit-box-align: center;
  -moz-box-align: center;
  -o-box-align: center;
  -ms-flex-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -moz-box-pack: center;
  -o-box-pack: center;
  -ms-flex-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}
#sidebar {
  width: 240px;
  border-right: 1px solid #eee;
  background: #f8f8f8;
  position: relative;
}
#board-section {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -o-box-flex: 1;
  box-flex: 1;
  -webkit-flex: 1;
  -ms-flex: 1;
  flex: 1;
}
#footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  text-align: center;
}
#footer a {
  color: #cacaca;
  font-style: italic;
  text-decoration: none;
}
#control .btn {
  margin: 0 auto;
  width: 120px;
  height: 50px;
  font-size: 32px;
  line-height: 50px;
}
#control .btn:nth-child(n+2) {
  margin-top: 20px;
}
#control #play-pause-btn {
  -webkit-border-radius: 2px;
  border-radius: 2px;
  text-align: center;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: pointer;
  background: #57abdb;
  color: #fff;
  -webkit-box-shadow: 0 2px #3198d3;
  box-shadow: 0 2px #3198d3;
  overflow: hidden;
  -webkit-transition: background 0.25s, opacity 0.25s;
  -moz-transition: background 0.25s, opacity 0.25s;
  -o-transition: background 0.25s, opacity 0.25s;
  -ms-transition: background 0.25s, opacity 0.25s;
  transition: background 0.25s, opacity 0.25s;
}
#control #play-pause-btn:hover {
  background: #70b8e0;
}
#control #play-pause-btn:active {
  -webkit-box-shadow: none;
  box-shadow: none;
  -webkit-transform: translateY(2px);
  -moz-transform: translateY(2px);
  -o-transform: translateY(2px);
  -ms-transform: translateY(2px);
  transform: translateY(2px);
}
#control #play-pause-btn .icons {
  -webkit-transition: -webkit-transform 0.25s;
  -moz-transition: -moz-transform 0.25s;
  -o-transition: -o-transform 0.25s;
  -ms-transition: -ms-transform 0.25s;
  transition: transform 0.25s;
}
#control #play-pause-btn.playing {
  -webkit-border-radius: 2px;
  border-radius: 2px;
  text-align: center;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: pointer;
  background: #f2d925;
  color: #fff;
  -webkit-box-shadow: 0 2px #e0c60d;
  box-shadow: 0 2px #e0c60d;
  overflow: hidden;
  -webkit-transition: background 0.25s, opacity 0.25s;
  -moz-transition: background 0.25s, opacity 0.25s;
  -o-transition: background 0.25s, opacity 0.25s;
  -ms-transition: background 0.25s, opacity 0.25s;
  transition: background 0.25s, opacity 0.25s;
}
#control #play-pause-btn.playing:hover {
  background: #f4df46;
}
#control #play-pause-btn.playing:active {
  -webkit-box-shadow: none;
  box-shadow: none;
  -webkit-transform: translateY(2px);
  -moz-transform: translateY(2px);
  -o-transform: translateY(2px);
  -ms-transform: translateY(2px);
  transform: translateY(2px);
}
#control #play-pause-btn.playing .icons {
  -webkit-transform: translateY(-50px);
  -moz-transform: translateY(-50px);
  -o-transform: translateY(-50px);
  -ms-transform: translateY(-50px);
  transform: translateY(-50px);
}
#control #play-pause-btn.disabled {
  opacity: 0.5;
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
  filter: alpha(opacity=50);
}
#control #reset-btn {
  -webkit-border-radius: 2px;
  border-radius: 2px;
  text-align: center;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: pointer;
  background: #e55f5c;
  color: #fff;
  -webkit-box-shadow: 0 2px #de3632;
  box-shadow: 0 2px #de3632;
  overflow: hidden;
  -webkit-transition: background 0.25s, opacity 0.25s;
  -moz-transition: background 0.25s, opacity 0.25s;
  -o-transition: background 0.25s, opacity 0.25s;
  -ms-transition: background 0.25s, opacity 0.25s;
  transition: background 0.25s, opacity 0.25s;
}
#control #reset-btn:hover {
  background: #e97774;
}
#control #reset-btn:active {
  -webkit-box-shadow: none;
  box-shadow: none;
  -webkit-transform: translateY(2px);
  -moz-transform: translateY(2px);
  -o-transform: translateY(2px);
  -ms-transform: translateY(2px);
  transform: translateY(2px);
}
#control .board-size {
  margin-top: 40px;
  border-top: 1px solid #cacaca;
  padding-top: 40px;
  width: 160px;
  text-align: center;
}
#control .icon-grid {
  margin-bottom: 20px;
  font-size: 32px;
}
#control .icon-times {
  color: #cacaca;
  margin: 0 5px;
  vertical-align: middle;
}
#control input {
  width: 40px;
  background: transparent;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
  border-bottom: 1px solid #cacaca;
  text-align: center;
  vertical-align: middle;
  font-size: 24px;
  color: inherit;
  -webkit-transition: background 0.25s;
  -moz-transition: background 0.25s;
  -o-transition: background 0.25s;
  -ms-transition: background 0.25s;
  transition: background 0.25s;
}
#control input:focus {
  background: rgba(242,217,37,0.25);
}
#board-section {
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -o-box-orient: vertical;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
}
#board-section #board {
  margin: 20px 0;
}
#board-section #border {
  stroke: #cacaca;
  fill: none;
}
#board-section .grid {
  stroke: #cacaca;
}
#board-section .piece {
  fill: #70b8e0;
}
#board-section .piece-shadow {
  fill: #57abdb;
  -webkit-transform: translateY(2px);
  -moz-transform: translateY(2px);
  -o-transform: translateY(2px);
  -ms-transform: translateY(2px);
  transform: translateY(2px);
}
#board-section .arrow {
  font-family: 'icomoon';
  fill: #eee;
  -webkit-transition: fill 0.25s;
  -moz-transition: fill 0.25s;
  -o-transition: fill 0.25s;
  -ms-transition: fill 0.25s;
  transition: fill 0.25s;
}
#board-section .arrow.visited {
  fill: #f2d925;
}
#board-section .arrow.active {
  fill: #55c68d;
}
#board-section .msg {
  display: -webkit-box;
  display: -moz-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: box;
  display: flex;
  -webkit-box-align: center;
  -moz-box-align: center;
  -o-box-align: center;
  -ms-flex-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -moz-box-pack: center;
  -o-box-pack: center;
  -ms-flex-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 0 20px;
  -webkit-border-radius: 2px;
  border-radius: 2px;
  height: 0;
  opacity: 0;
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
  filter: alpha(opacity=0);
  -webkit-transform: translateY(20px);
  -moz-transform: translateY(20px);
  -o-transform: translateY(20px);
  -ms-transform: translateY(20px);
  transform: translateY(20px);
  -webkit-transition: height 0.25s 0.25s, opacity 0.25s, -webkit-transform 0.25s;
  -moz-transition: height 0.25s 0.25s, opacity 0.25s, -moz-transform 0.25s;
  -o-transition: height 0.25s 0.25s, opacity 0.25s, -o-transform 0.25s;
  -ms-transition: height 0.25s 0.25s, opacity 0.25s, -ms-transform 0.25s;
  transition: height 0.25s 0.25s, opacity 0.25s, transform 0.25s;
  color: #fff;
}
#board-section .msg.loop {
  background: #55c68d;
}
#board-section .msg.off {
  background: #e55f5c;
}
#board-section.finished .msg {
  -webkit-transition: height 0.25s, opacity 0.25s 0.25s, -webkit-transform 0.25s 0.25s;
  -moz-transition: height 0.25s, opacity 0.25s 0.25s, -moz-transform 0.25s 0.25s;
  -o-transition: height 0.25s, opacity 0.25s 0.25s, -o-transform 0.25s 0.25s;
  -ms-transition: height 0.25s, opacity 0.25s 0.25s, -ms-transform 0.25s 0.25s;
  transition: height 0.25s, opacity 0.25s 0.25s, transform 0.25s 0.25s;
}
#board-section.finished.loop .msg.loop {
  height: 50px;
  opacity: 1;
  -ms-filter: none;
  filter: none;
  -webkit-transform: translateY(0);
  -moz-transform: translateY(0);
  -o-transform: translateY(0);
  -ms-transform: translateY(0);
  transform: translateY(0);
}
#board-section.finished.loop .arrow.visited {
  fill: #55c68d;
}
#board-section.finished.off .msg.off {
  height: 50px;
  opacity: 1;
  -ms-filter: none;
  filter: none;
  -webkit-transform: translateY(0);
  -moz-transform: translateY(0);
  -o-transform: translateY(0);
  -ms-transform: translateY(0);
  transform: translateY(0);
}
#board-section.finished.off .arrow.visited {
  fill: #e55f5c;
}
