/* -----------------------------------------------------
    CSS Variables
-------------------------------------------------------- */
:root {
    --main-color: #D56924;
    --main-color-light: #D8891A;
    --main-color-dark: rgb(19, 120, 19);
    --accent-color-primary: #fff;      /* white */
    --accent-color-secondary: #fff; /* sky blue */
    --accent-color-tertiary: #fff;   /* burnt orange */
}


.backup_root {
    --main-color: #745a5d;
    --main-color-light: #7e6467;
    --main-color-dark: #62484b;
    --accent-color-primary: #fff;      /* white */
    --accent-color-secondary: #a5c9c9; /* sky blue */
    --accent-color-tertiary: #d9814f;   /* burnt orange */
}


/* -----------------------------------------------------
    Default layout styles
-------------------------------------------------------- */
* {margin: 0px; padding: 0px;}

html{
    overflow-x: hidden;
}

body {
    background: #373737;
    font-size: 16px;
    -webkit-overflow-scrolling: touch;
}

#main_wrapper {
    position: relative;
}

#main_wrapper .bg_style {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

#bg_1 {
    background: url(../images/BG_HD.jpg) center center / cover no-repeat; 
}


#main_cover {
	width: 80em;
    height: 100vh;
    position: fixed;
    top: 0;
    left: calc(50% - 40em);
}

#click_blocker_answers {
    display:none;
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.screen {
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.screen.fullheight .wrapper {
    width: 80em;
}

.screen.fullwidth .wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.screen .button_wrapper {
    margin-top: 2em;
}



/* -----------------------------------------------------
    Default text styles
-------------------------------------------------------- */
p {
    font-size: 1.125em;
    margin-top: 1.1em;
    margin-bottom: 1.1em;
    line-height: 1.33em;
    font-weight: lighter;
    color: var(--accent-color-primary);
}


ul {
    margin-top: 1em;
    margin-bottom: 1em;
    line-height: 1.25;
}

li {
    font-size: 1.125em;
    margin-top: 5px;
    margin-bottom: 5px;
    line-height: 150%;
    margin-left: 19px;
}

h1 {
    font-family: PlayfairDisplay, Baskerville, Georgia, Serif;
    font-size: clamp(3.5em, 9vw, 3.8em);
    font-weight: bold;
    line-height: 1.4em;
    color: var(--accent-color-secondary);
}


h2 {
    font-family: PlayfairDisplay, Baskerville, Georgia, Serif;
	font-size: 1.875em;
    font-weight: normal;
    font-style: italic;
    line-height: 1.4em;
    color: var(--accent-color-primary);
}

h3 {
    font-family: PlayfairDisplay, Baskerville, Georgia, Serif;
	font-size: 1.35em;
    font-weight: normal;
    font-style: italic;
    line-height: 1.4em;
    color: var(--accent-color-primary);
}


#main_wrapper a {
    color: var(--accent-color-secondary);
    text-decoration: underline;
}

#main_wrapper a:visited {
    color: var(--accent-color-secondary);
}


.nomargin { margin: 0 !important; }
.notopmargin, .nomargintop {margin-top: 0 !important;}
.nobottommargin, .nomarginbottom {margin-bottom: 0 !important;}


.p300 {	font-size: 18.75em;}



/* -----------------------------------------------------
    Content box styles
------------------------------------------------------- */
.box {
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: var(--main-color);
}

.fullheight .box {
    height: 100%;
    box-shadow: 0px 14px 35.34px 2.66px rgba(0, 0, 0, 0.34);
}

.fullwidth .box {
    width: 100%;
    min-height: 80vh;
    box-shadow: 0px 0px 35.34px 2.66px rgba(0, 0, 0, 0.34);
    padding: 2em;
}

.box .content {
    max-width: 60em;
	width:100%;
}



/* -----------------------------------------------------
    Button styles
-------------------------------------------------------- */
.button_wrapper {
    text-align: center;
}

.button {
    cursor: pointer;
    display: inline-block;
    border: solid 0.0625em var(--accent-color-primary);
    border-radius: 1.8125em;
    margin: 0.5em 0.6em;
    padding: 0.56em 1.11em;
    min-width: 10em;
    transition: all 0.4s;
}

.button p {
    font-family: PlayfairDisplay, Baskerville, Times New Roman, Serif;
    font-size: 1.3em;
    color: var(--accent-color-primary);
    line-height: 100%;
    margin: 0;
    user-select: none;
}

.button:hover {
    background: var(--accent-color-primary);
}

.button:hover p {
    color: var(--main-color);
}

.validation-error p {
	color:red;
	font-style: italic;
	display: none;
}



/* -----------------------------------------------------
    Misc Generic Styles
-------------------------------------------------------- */
.left {text-align: left;}
.center {text-align: center;}
.right {text-align: right;}

.emphasis_box {
    background: var(--main-color-dark);
    padding: 2em 3em;
    border-radius: 1.5em;
    margin: 2.75em 0;
}

#landscape_block {
    display: none;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    max-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: black;
    align-items: center;
    justify-content: center;
    padding: 0 2em;
    box-sizing: border-box;
    text-align: center;
    z-index: 20;
}


.svg_main_color_dark {fill: var(--main-color-dark);}
.svg_accent_color_secondary {fill: var(--accent-color-secondary);}

.svg_stroke_main_color_dark {stroke: var(--main-color-dark);}
.svg_stroke_accent_color_secondary {stroke: var(--accent-color-secondary);}

.content {transform: scale(0.80);}

/* -----------------------------------------------------
    Title Screen Styles
-------------------------------------------------------- */
#title_screen {
	position: relative;
}

#title_screen .logo {
	max-width:50%;
    height: auto;
    margin: 0 auto 2em;
    display: block;
}

#title_screen img {
	max-width: 100%;
	height: auto;
}

#title_screen .content {
	position: relative;
}

h3#game_closed,
h3#empty_leaderboard {
    margin-top: 1em;
}

h3#game_closed {
    display: none;
}

#leaderboard {
	margin-top:2em;
	margin-bottom:2em;
	columns: 19em 2; /* make sure scores are at least 19em in width so they stay on one line, will naturally revert to single column on narrow screens */
	column-gap: 1em;
    text-align: left;
}

#leaderboard div {
	break-inside: avoid;
}

#leaderboard .item {
    display: flex;
    border: .3em solid rgba(0,0,0,0);
    box-sizing: content-box;
    background: var(--main-color-light);
    border-radius: 1em;
    margin-bottom: 0.8em;
}

#leaderboard .item .name {
	padding:.25em 1.5em;
	box-sizing: border-box;
	width: 80%;
}

#leaderboard .item .score {
	text-align: center;
	padding:.25em 1.5em;
	box-sizing: border-box;
	width: 20%;
	min-width: 7em;
}

#leaderboard p {
	font-size: 1.625em;
    margin: 0.25em 0;
}

#leaderboard .item .name p {
    font-family: PlayfairDisplay, Baskerville, Georgia, Serif;
	font-weight: bold;
}

#leaderboard .item .score p {
	color: var(--accent-color-secondary);
}

#leaderboard .item.highlight {
	border-color: var(--accent-color-secondary);
}

#leaderboard .item.highlight p {
	font-weight:bold;
}

.disclaimer {
	margin-top:3em;
}



/* -----------------------------------------------------
    Instructions / Ready to Play Screen
-------------------------------------------------------- */
#instructions_top_text, #powerup_top_text {
    width: 80%;
    margin: 0 auto;
}

#instructions .hint_wrapper {
  display: flex;
  align-items: center;
}

#instructions .powerup_instructions_wrapper h3 {
    color: var(--accent-color-tertiary);
}

#instructions .powerup_instructions {
    display: flex;
    align-items: center;
    margin-top: 1em;
    flex-basis: 50%;
}

#instructions .powerup_instructions .text {
    text-align: left;
    padding-right: 1em;
}

#instructions .powerup_instructions .text p {
    margin: 3px 0;
}

#instructions .powerup {
    width: 6em;
    height: 6em;
    margin-right: 1.5em;
    flex-shrink: 0;
}

#instructions .powerup svg {
    width: 100%;
    height: auto;
}

#start_button_wrapper {
	transition:opacity .5s;
}
#start_button_wrapper .button {
	transition:filter .5s;
}
#instructions .no_click {
	cursor: not-allowed;
	width: max-content;
	margin: 2em auto 0 auto;
	opacity: .5;	
}
#instructions .no_click .button {
	pointer-events: none;
	cursor: not-allowed;
	filter: grayscale(1);
}



/* -----------------------------------------------------
    Tutorial
-------------------------------------------------------- */

#tutorial_blocker {
    position: absolute;
    background: rgba(0,0,0,0.5);
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    z-index: 10;
}

.callout {
    background-color: var(--accent-color-tertiary);
    position: absolute;
    text-align: center;
    padding: 1em 1em 0 1em;
    border-radius: 0.5em;
    box-shadow: 0px 0px 15px 0px rgba(0,0,0,0.3);   
    width: 20em;  
    box-sizing: border-box;
    top: calc(100% + 2em);
    left: calc(50% - 10em); 
}

.callout.top {
    top: unset;
    bottom: calc(100% + 2em);
}

/* Need the direct child selector > to avoid styling button text. */
.callout > p {
    font-family: Lato, Verdana, Arial, Sans-Serif;
    font-size: 1.5em;
    font-style: italic;
    padding: 0;
    margin: 0;
    user-select: none;

    color: #222;
}

.callout .tutorial_next {
    display: inline-block;
    cursor: pointer;
    user-select: none;

    color: #222;
}

.callout .tutorial_next:not(.button) {
    width: 0.625em;
    height: 1.125em;
    padding: 0.7em 1em 1em;
    xbackground-color: var(--accent-color-primary);
    background-color: #222;
    -webkit-mask: url(../images/Next.svg) 50% 50% / 22% auto no-repeat;
    mask: url(../images/Next.svg) 50% 50% / 22% auto no-repeat;
}


.callout .notch {
    width: 1.6em;
    height: 1.5em;
    position: absolute;
    top: -1.3em;
    left: calc(50% - .8em);
    background-color: var(--accent-color-tertiary);
    -webkit-mask: url(../images/Triangle.svg) 50% 50% / contain no-repeat;
    mask: url(../images/Triangle.svg) 50% 50% / contain no-repeat;
}

.callout.top .notch {
    transform: rotate(180deg);
    top: unset;
    bottom: -1.3em;
}

#tutorial_answer .button {
    min-width: unset;
    margin-top: 1em;
    margin-bottom: 1em;
}

#tutorial_answer .button > p {
    color: #222;
}

.tutorial_active #quiz_top_bar {
    position: static !important;
}

.tutorial_active #click_reset_time,
.tutorial_active #click_5050 {
    pointer-events: none !important;
}

#tutorial_powerup_time {
    left: calc(50% - 11.8125em);
}
#tutorial_powerup_50 {
    left: calc(50% - 7.375em);
}




/* -----------------------------------------------------
    Dot Loading / Countdown Screen
-------------------------------------------------------- */
#countdown_loader {
    z-index: 10;
    height: 100vh;
}

#countdown_loader .cover {
    min-height: unset;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.5);
}

.countdown_num {
    width: 20em;
    height: 20em;
    text-align: center;
    position: absolute;
    top: calc(50% - 14em);
    left: calc(50% - 10em);
    z-index: 11;    
}

.countdown_num p {
    font-family: PlayfairDisplay, Baskerville, Georgia, Serif;
    font-weight: bold;
    line-height: 100% !important;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.8);
    margin: 0;    
    user-select: none;
}


/* -----------------------------------------------------
    Start Round Screens
-------------------------------------------------------- */
#start_round_screen h1 {
    font-size: clamp(5em, 14vw, 6.875em);
    line-height: 1.25em;
}



/* -----------------------------------------------------
    Quiz Wrapper Width
-------------------------------------------------------- */

#quiz_top_bar .wrapper,
.question_wrapper,
#question_count_wrapper {
    width: min(60em, 90vw);
}



/* -----------------------------------------------------
    Quiz Question/Answer Styles
-------------------------------------------------------- */

.question_wrapper {
    margin: 1.875em auto 3.75em auto;
    padding: 0;
    text-align: center;
}

.question_text p {
    font-family: PlayfairDisplay, Baskerville, Georgia, Serif;
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 1.5em;
    text-align: center;
    line-height: 140%;
}

.answer_style p {
    font-family: Lato, Verdana, Arial, Sans-Serif;
    font-size: 1.5em;
    padding: 0.75em 0.5625em;
    margin: 0;
    z-index: 1;    
    user-select: none;
}

.answer_text_wrapper {
    width: inherit;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
    grid-gap: 1em;
}

.answer_style {
    min-height: 4.75em;
    text-align: center;
    background: var(--main-color-dark);
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0.8em;
    overflow: hidden;
}

.answer_style .answer_hover {
    width: 30vw;
    height: 30vw;
    min-width: 110%;
    min-height: 100%;
    background-color: var(--main-color-light);
    position: absolute;
    transition: all .4s ease;
    transform-origin: 50% 50%;
    transform: scale(0);
    opacity: 0.5;
    border-radius: 50%;
}

@media (hover: hover) {
    .answer_style:hover > .answer_hover,
    .answer_style.hovered > .answer_hover {
        transform: scale(1);
        opacity: 1;
    }
  }

.answer_style.no_hover {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.answer_style.no_hover:hover > .answer_hover {
    transform: scaleX(0);
    opacity: 0;
}

.answer_style.quiz-selected {
    background: var(--main-color-light);
}

#quiz-submit-button {
    display: inline-block;
    background: var(--accent-color-primary);
    font-size: 1.4em;
    font-weight: bold;
    padding: 0.1em 0.5em;
    cursor: pointer;
    margin-top: 2em;
}




/* -----------------------------------------------------
    Full screen w/ dark cover
-------------------------------------------------------- */
.full_screen {
  position: absolute;
  top: 0;
  width: 100vw;
  min-height: 100%;
}

.full_screen .cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;
  background-color: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.full_screen .cover .wrapper {
  max-width: 80vw;
}

.full_screen .button_wrapper {
  margin-top: 2.5em;
  text-align: center;
}



/* -----------------------------------------------------
    Quiz & UI bar styles
-------------------------------------------------------- */
#quiz .fail, #quiz .pass {
    position:absolute;
    top: 150px;
    left: 250px;
}

#click_blocker {
    width: 302px;
    height: 75px;
    position:absolute;
    top: 0;
    right: 0;
    display: none;
}

#quiz, #quiz_tutorial {
    position: relative;
}

/* TOP BAR */
#quiz_top_bar {
    width: 100vw;
    padding-top: 8vh;
}

#quiz_top_bar .wrapper {
    margin: 0 auto;
}

/* HEADER TEXT */
#header_text {
    width: 100%;
    text-align: center;
    position: relative;
}

#header_text .header_round_style {
    font-size: 3.125em;
}

#header_wrapper {
    width: 100%;
    display: grid;
    grid-template-columns: auto max-content;
    grid-gap: 1em;
    align-items: center;
    margin-top: 1.25em;
}

/* TIMER BAR */
#timer_wrapper {
    width: 100%;
    height: 0.5em;
    position: relative;
    display: flex;
    align-items: center;
}

#timer_wrapper .inner {
    width: 100%;
    height: 0.5em;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 0.3125em;
}

#background_bar {
    background: var(--main-color-dark);
    width: 100%;
    height: 0.125em;
    position: relative;
}

#quiz_timer_bar {
    width: 100%;
    height: 100%;
    background-color: var(--accent-color-secondary);
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 0.3125em;
    overflow: hidden;
}

#quiz_timer_bar .red {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: #F91313;
    display: none;
}

#quiz_timer_bar .yellow {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: #fdb813;
    display: none;
}

/* POWER UPS */
#powerups_wrapper {
    display: flex;
    position: relative;
}

#powerups_wrapper .powerup {
    position: relative;
    cursor: pointer;
    margin-left: 0.8125em;
    transition: filter 0.1s;
}

#powerups_wrapper .powerup svg {
    width: 3.625em;
    height: auto;
    position: relative;
    user-select: none;
}

#powerups_wrapper .powerup.hasnt_clicked:hover {
    filter: brightness(1.3);
}

#click_5050:not(.hasnt_clicked),
#click_reset_time:not(.hasnt_clicked) {
    filter: grayscale(1) brightness(1.3);
    cursor: default;
}

#click_5050:not(.hasnt_clicked) img,
#click_reset_time:not(.hasnt_clicked) img {
    opacity: 0.5;
}

/* BOTTOM BAR */
#quiz_bottom_bar {
    width: 100vw;
    padding-bottom: 20px;
}

#question_count_wrapper {
    margin: 0 auto;
    position: relative;
}

#question_count {
    display: flex;
    justify-content: center;
    height: auto;
}

#question_count div {
    width: 1.35em;
    height: 1.35em;
    border-radius: 50%;
    position: relative;
    display: inline-block;
    margin-right: 0.5em;
    background: radial-gradient(ellipse at center, 
                var(--main-color) 46%,
                var(--main-color-dark) 47%,
                var(--main-color-dark) 58%,
                var(--main-color) 59%);
}

#question_count div.full {
    background: radial-gradient(ellipse at center, 
                var(--accent-color-tertiary) 46%,
                var(--main-color) 47%,
                var(--main-color) 62%,
                var(--main-color) 66%);
}

#question_count div.current {
    background: radial-gradient(ellipse at center, 
                var(--accent-color-tertiary) 46%,
                var(--main-color) 47%,
                var(--main-color) 62%,
                var(--accent-color-tertiary) 66%);
}


/* -----------------------------------------------------
    Quiz Tutorial UI
-------------------------------------------------------- */

#quiz_tutorial .answer_text_wrapper {
    position: relative;

}

#quiz_tutorial .answer_text_wrapper .answer_style {
    pointer-events: none;

}

/* -----------------------------------------------------
    Level Results Styles
-------------------------------------------------------- */
.level_results {
    text-align: center;
}

.level_results .score_circle_wrapper {
    width: 32.25em;
    height: 32.25em;
    margin: 0 auto 2.5em;
    position: relative;
    display: flex;
    align-items: center;
}

.percent_circle_container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.percent_circle {
    width: 100%;
    height: 100%;
}

.level_results .score_circle_wrapper .text {
    width: 100%;
    position: relative;
}

.level_results .score_circle_wrapper .text p {
    font-family: PlayfairDisplay, Baskerville, Georgia, Serif;
    font-size: 10.5em;
    line-height: 1em;
    font-weight: bold;
    margin: 0;
    color: var(--accent-color-secondary);
}

.level_results .score_circle_wrapper .text p .percent_sign {
    font-size: 70%;
}


/* -----------------------------------------------------
    Game Results Screen
-------------------------------------------------------- */
#game_results .emphasis_box h2 {
  margin-top: 0.5em;
}

#game_results .info_wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

#game_results .info_column {
    margin-top: 2em;
    flex-basis: 48%;
	max-width: 48%;
	text-align: left;
}

#game_results .info_column label {
    color: var(--accent-color-primary);
    line-height: 140%;
    font-size: 1.25em;
}
#game_results .info_column label.error {
	display: block;
	font-size: 1em;
	margin-top: 0.25em;
    color: #111;
    font-style: italic;
}

#game_results .info_column input[type=text], #game_results .info_column input[type=email] {
    line-height: 140%;
    font-size: 1.25em;
	padding: 0.25em 1em;
}
#game_results .info_column input::placeholder {
	color: var(--main-color-dark);
	font-style:italic;
}

#game_results .info_column input {
    margin-top: 0.25em;
    xborder: 0.12em solid var(--main-color-light); /* leaving in case it's needed in the future */
    border: none;
    background-color: var(--main-color-light);
    width: 100%;
    box-sizing: border-box;
    border-radius: 0.4em;
    color: var(--accent-color-primary);
    font-family: Lato, Verdana, Arial, Sans-Serif;
}

#game_results .info_column input.error {
	xborder-color: red; /* leaving in case it's needed in the future */
}

#game_results .info_column input:focus {
	outline:  var(--accent-color-secondary) auto 1px;
}

#game_results h1 {
    font-size: min(6.875em, 20vw);
    line-height: 1.25em;
}



/* -----------------------------------------------------
    Generic course error
-------------------------------------------------------- */
#course_error {
    position: fixed;
    text-align: center;
    z-index: 15;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #e5E4E3;
    min-height: 100vh;
}

#course_error .wrapper {
    padding: 2em;
}

#course_error * {
    color: #2d2d2d !important;
}

#course_error .button {
    border-color: #2d2d2d;
}