/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

#test-width {
  opacity: 0;
  position: absolute;
  top: -666;
  left: -666;
}
html, 
body {
    height: 100%;
    width:100%;
}
body {
  overflow: hidden;
  background-color: #efefef;
  display: flex;
  justify-content: center;
  align-content: center;
  align-items: center;
}

body {
  font-family: 'Martel';
  font-weight: 400;
}

#test-width,
#container {
  font-size: 2.5em;
  
}

#page {
  height:100%;
  width:100%;
  max-width: 600px;
  max-height: 600px;
  min-height: 350px;
  min-width: 350px;
}

#chapter {
  display: flex;
  align-content: center;
  align-items: center;
  flex-wrap: nowrap;
  height: 100%;
  padding:0 1em;
  overflow:hidden;
}

#bookTitle, #subTitle, #wordsTitle {
  display: block;
  padding-left:2.5em;
  margin:0.3em 0;
  }

.bricks #bookTitle span,
.bricks #wordsTitle span,
.bricks #subTitle span {
  background-color: #f5c527;
}

#wrapper {
  border: 1px solid #333;
  position: relative;
  border-radius: 2px;
  height:100%;
}

#words {
  color: #333;
}
body.night #words, body.night #chapterTitle {
  color: #efefef;
}    
body.night #container {
  background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8));
}

#container {
  color: #333;
  border-top: 2px solid #333;
  border-bottom: 2px solid #333;
  position: relative;
  cursor: pointer;
  height:100%;
  width: 100%;
  display: flex;
  align-items: center;
}
#container.start {
  padding-left:0 !important;
}

#container.start::before,
#container.start::after {
  width: 0px;
}

#container::before {
  position: absolute;
  top: -1px;
  left: 170px;
  height: 38px;
  width: 2px;
  content: " ";
  transform: rotate(0deg);
}

#container::after {
  position: absolute;
  bottom: -1px;
  left: 170px;
  height: 38px;
  width: 2px;
  content: " ";
  transform: rotate(0deg);

}

.progress-bar {
  width: 0%;
  cursor: pointer;
  position: absolute;
  top: 0px;
  height: 100%;
  opacity: 0.1;
}

.bricks {
  background-color: #2a2828 !important;
  background-image: linear-gradient(335deg, #f5c527 23px, transparent 23px),
    linear-gradient(155deg, #f5c527 23px, transparent 23px),
    linear-gradient(335deg, #f5c527 23px, transparent 23px),
    linear-gradient(155deg, #f5c527 23px, transparent 23px);
  background-size: 58px 58px;
  background-position: 0px 2px, 4px 35px, 29px 31px, 34px 6px;
}

.flex-container {
  height:100%;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-flex-wrap: nowrap;
  -ms-flex-wrap: nowrap;
  flex-wrap: nowrap;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-align-content: stretch;
  -ms-flex-line-pack: stretch;
  align-content: stretch;
  -webkit-align-items: stretch;
  -ms-flex-align: stretch;
  align-items: stretch;
}

.flex-item{
  height: 25%;
  display: flex;
  align-items: center;
  align-content: center;
  justify-content: left;
}

.flex-item:nth-child(1) {
  align-items: flex-start;
  align-content: flex-start;
  justify-content: center;
  flex-direction: column;
}

.flex-item:nth-child(2) {
  position: relative;
  height: 50%;
}


  .flex-container:after {
    display: block;
    content: " ";
    margin: 0px;
    flex: 999 999 auto;
  }