html {
    height: 100%;
}
body { 
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    color: #eee;
    background: #121212;
    font-family: Times, serif;
}
a {
    color: #eee;
}
#container {
    display: flex;
    width: 100%;
    height: 100%;
}
#control-pane {
    width: 35%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: auto;
    border-right: 1px solid #333;
}
#graph {
    width: 65%;
    height: 100%;
    background: #3336;
}

.header {
    display: flex;
    margin-bottom: 4px;
}
.menu-container {
    flex:1;
    text-align: left;
    margin-left:8px;
    margin-top:4px;
    cursor: pointer;
}
.menu-expand {
    width: 20px;
    height: 2px;
    box-shadow: inset 0 0 0 32px,0 -6px,0 6px;
    display: inline-block;
    margin-top: 14px;
}
.main-header {
    flex:1;
    text-align: center;
}
.stats-container {
    flex:1;
    text-align: right;
    margin-right: 8px;
}
.exit-container {
    flex: 1;
    text-align: left;
    margin-left: 8px;
    margin-top: 2px;
}
.stats-button {
    position: relative;
    display: inline-block;
    border-top-width: 0;
    border-right-width: 0;
    border-color: transparent;
    box-shadow: -2px 2px;
    width: 30px;
    height: 22px;
    margin: 4px 0 8px 4px;
    overflow: hidden;
    box-sizing: border-box;
    cursor: pointer;
    padding: 0;
}
.stats-button::before {
    content: '';
    position: absolute;
    left: 2px;
    bottom: 0;
    width: 4px;
    height: 15px;
    box-shadow: inset 0 -8px 0 0,6px 0,12px 7px,18px 5px;
}
.exit-arrow {
    cursor: pointer;
    box-sizing: border-box;
    position: relative;
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 2px solid;
    border-radius: 4px
}
.exit-arrow::after,
.exit-arrow::before {
    content: "";
    display: block;
    box-sizing: border-box;
    position: absolute;
    left: 6px
}
.exit-arrow::after {
    width: 10px;
    height: 10px;
    border-bottom: 2px solid;
    border-left: 2px solid;
    transform: rotate(45deg);
    bottom: 8px
}
.exit-arrow::before {
    width: 14px;
    height: 2px;
    bottom: 12px;
    background: #eee;
}
.tabs {
    display: flex;
    margin-bottom: 10px;
}
.tabs div {
    flex: 1;
    padding: 12px;
}
.menu {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
}
.menu-item {
    font-size: 22px;
    height: 60px;
    cursor: pointer;
}
.menu-item-text {
    cursor: pointer;
}
.menu-item-clickable {
    text-decoration: underline;
}
#menu-button {
    display: block;
    width: 25%;
    height: 100%;
    cursor: pointer;
}
.authn-button {
    text-decoration: underline;
    cursor: pointer;
}
.recommendations {
    margin:0;
    max-width: 98%;
    overflow-wrap: break-word;
}
.recommendation {
    margin-right: 6px;
    cursor: pointer;
    font-size: 20px;
}
.recommendation-message {
    font-size: 16px;
    margin-right: 4px;
}
#control-pane input[type=text]{
    width: 150px;
    opacity: 0.85;
    border-radius: 4px;
}
.faq-link {
    text-decoration: underline;
    cursor: pointer;
}
.faq {
    margin-left: auto;
    margin-right: auto;
    max-width: 80%;
    font-size: 18px
}
ul {
    list-style-type: none;
    padding: 0;
}
h1 {
    margin:2px 0 0 0;
}
h2 {
    margin-bottom: 4px;
    font-size: 26px;
}
h2 span {
    font-weight: normal;
}
.circle {
    width: 46px;
    height: 44px;
    border-radius: 50%;
    margin-bottom: 4px;
    font-size: 14px;
    text-align: center;
    line-height: 44px;
    color: black;
    margin: 0 1px;
}
#legend {
    font-size: 14px;
    text-align: center;
    margin-left: 8px;
    margin-right: 8px;
}
#level-container {
    display: flex;
    justify-content: center;
    align-items: center;
}
/*TODO: use classes to make this sane again*/
#examples {
    margin-top: 0;
}
#examples h2 {
    margin-top: 16px;
}
#examples ul li {
    font-size: 16px;
    margin-bottom: 12px;
}
#examples ul {
    margin-left: 0px;
    margin-right: 4px;
}
p.example-line {
    margin-top: 4px;
    margin-bottom: 4px;
}
.base-example {
    opacity: 0.85;
}
p.target-example {
    font-size: 22px;
    display: flex;
    cursor: pointer;
}
.context {
    margin: 0;
    margin-bottom: 12px;
    font-size: 14px;
    opacity: 0.8;
}
.transcription-example {
    display: none;
}
#controls {
    margin-bottom: 0;
    margin-top: 0;
    display: flex;
}
.control {
    margin: 0;
    line-height: 28px;
}
.control.center {
    margin-left:auto;
    margin-right: auto;
}
#example-container {
    flex-grow: 1;
    margin-left: 8px;
    margin-right: 8px;
}
#study-container {
    flex-grow: 1;
    margin-left: 8px;
    margin-right: 8px;
}
#cards-due {
    max-width: fit-content;
}
.sentence-container {
    max-width: 80%;
    min-width: 80%;
}
.walkthrough p {
    margin-top: 20px;
    margin-bottom: 20px;
}

.text-button {
    font-size: 16px;
    background-color: #eee;
    margin-left: 4px;
    padding: 6px;
    color: black;
    border-radius: 6px;
    user-select: none;
    white-space: nowrap;
    -webkit-user-select: none;
}
p .text-button.listen {
    align-self: flex-start;
    vertical-align: top;
}
h2 .text-button {
    vertical-align: middle;
}
/*TODO refactor this...too much repetition, selectors too specific */
#examples ul.definition li {
    margin-top: 4px;
    margin-bottom: 4px;
    font-size: 18px;
}

.tab {
    font-size: 18px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.tab.active {
    font-weight: bold;
    border-bottom: 1px solid #eee;
    background-color: #333;
}

#study-call-to-action {
    cursor: default;
}
#study-call-to-action span a {
    color:black;
}

.study-call-to-action {
    text-align: center;
    background-color: #eeee;
    color: black;
    padding: 8px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 6px;
    user-select: none;
    -webkit-user-select: none;
}
#result-buttons{
    width: 100%;
}
#result-buttons li {
    width: 75%;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 20px;
    border-radius: 10px;
    margin-right: auto;
    margin-left: auto;
    font-size: 20px;
}
#wrong-button {
    background-color: #ff635f;
    color: black;
    border: 1px solid #3333;
    user-select: none;
    -webkit-user-select: none;
}
#right-button {
    background-color: #6de200;
    border:1px solid #3333;
    color: black;
    user-select: none;
    -webkit-user-select: none;
}
#card-question-container {
    display: flex;
}
#card-question-container a {
    font-size: 28px;
    vertical-align: text-top;
    cursor: pointer;
}
#card-answer {
    font-size: 24px;
    width: 95%;
}
.card-detail {
    font-size: 16px;
    margin: 10px auto;
    text-align: center;
    width: 80%;
}
.card-detail p {
    margin: 0 2px;
}
.related-cards {
    font-size: 20px;
}
p.related-card {
    margin: 6px auto;
}
.related-card-performance {
    font-size: 16px;
}
#delete-card-button {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
    width: 50%;
    margin-top: 30px;
}
#explain-text {
    margin-top: 0;
}
main.auth-form {
    width: 275px;
    margin-left:auto;
    margin-right:auto;
}
.auth-form li {
    margin-bottom:30px;
    margin-top: 12px;
}
.auth-form input {
    font-size: 16px;
}
.auth-form input[type=email] {
    height:28px;
    width:270px;
}
.auth-form input[type=password] {
    height:28px;
    width:270px;
}
.auth-form input[type=submit] {
    width: 100%;
    height: 28px;
    font-size: 18px;
    cursor: pointer;
}
.auth-form label {
    font-size: 22px;
}
.auth-form img {
    cursor: pointer;
}
.auth-form h1 {
    font-size: 30px;
}
.auth-form #forgot-password {
    font-size: 18px;
    text-decoration: underline;
    text-align: center;
    cursor: pointer;
}
.auth-form #alternate-signins {
    font-size: 18px;
}
.auth-form .secondary-signin-link {
    text-decoration: underline;
    cursor: pointer;
    font-size: 18px;
    line-height: 28px;
    max-width: 130px;
}
.example-warning {
    max-width: 95%;
}
#controls input {
    font-size: 16px;
}
select {
    font-size: 16px;
}
.result-indicator-wrong {
    background-color: #ff635f;
    color: black;
}
.result-indicator-right {
    background-color: #6de200;
    color: black;
}
#landing {
    text-align: center;
    max-width: 60%;
    margin-left: auto;
    margin-right: auto;
    height: 100%;
}
/* TODO make this auto-updating */
.language-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 200px 200px 200px 40px;
    margin-top: 20px;
    margin-bottom: 40px;
}
.language-grid-selected {
    grid-template-columns: 1fr;
    transition: grid-template-columns 1s;
}
.language-selected {
    grid-column: 1/2;
}
.language-card {
    text-align: center;
    margin: 8px;
    border: 1px solid #3333;
    font-size: 30px;
    margin-bottom: 40px;
    cursor: pointer;
    color:#121212;
}
.language-name {
    font-size: 24px;
    height: 120px;
    margin: 0;
}
.language-nickname {
    font-size: 16px;
    height: 20px;
    line-height: 20px;
    margin: 0;
}
.language-message {
    grid-column: 1/3;
}
@media (hover: hover) {
    .text-button:hover {
        color: black;
        cursor: pointer;
        background-color: #68aaee;
        transition: background-color 300ms;
    }
    .tab:hover {
        background-color: #3333;
    }
    .tab.active:hover {
        background-color: #333;
    }
    #result-buttons li:hover {
        border: 1px solid white;
        transition: border 500ms;
    }
    #show-answer-button:hover {
        background-color: #68aaee;
        transition: background-color 300ms;
    }
}
.bar-chart {
    display: grid;
    width: 600px;
    height: 400px;
    margin: 0 auto;
    grid-template-rows: repeat(100, 1fr) 1px 20px;
    column-gap: 6px;
    font-size: 14px;
}
.hours.bar-chart {
    height: 300px;
    width: 85%;
    overflow-x: scroll;
    overflow-y: hidden;
}
.bar-chart-separator {
    background: white;
}
.bar-chart-x-label {
    margin-top: 2px;
}
.bar-chart-y-label {
    grid-column: 1;
    text-align: right;
}
@media (max-width:1024px)  {
    #control-pane {
        width: 50%;
    }
    #graph {
        width: 50%;
    }
    .tab {
        font-size: 16px;
    }
    .hours.bar-chart {
        height: 250px;
        width: 100%;
    }
}
@media (max-width:664px)  {
    #container {
        display: block;
    }
    #control-pane {
        width: 100%;
        height: 50%;
        border-right: 0;
        border-bottom: 1px solid #333;
    }
    #graph {
        width: 100%;
        height: 50%;
    }
    h1 {
        font-size: 26px;
    }
    .tab {
        font-size: 16px;
    }
    .study-call-to-action {
        font-size: 18px;
    }
    #result-buttons li {
        padding: 10px;
        font-size: 22px;
    }
    h2 {
        font-size: 30px;
    }
    #card-question-container a {
        font-size: 30px;
    }
    .bar-chart {
        width: 100%;
        height: 250px;
        font-size: 12px;
    }
    .menu-item {
        font-size: 20px;
    }
    .menu {
        width: 98%;
        margin-left: auto;
        margin-right: auto;
    }

    #landing {
        max-width: 98%;
    }
}
@media (max-width:360px)  {
    .text-button {
        font-size: 12px;
    }
    .study-call-to-action {
        font-size: 14px;
    }
    h2 {
        font-size: 24px;
    }
    .menu-item {
        font-size: 18px;
    }
    #controls input[type=submit] {
        font-size: 12px;
    }
    #control-pane input[type=text] {
        width: 30px;
    }
}
header.stats-header {
    text-align: center;
}
header.stats-header a {
    text-decoration: none;
}
main.stats {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    max-width:98%;
}
main.stats section h2 {
    font-size: 20px;
}
main.stats section p {
    font-size: 18px;
}
#hourly-graph {
    padding-bottom: 40px;
}
.month-indicator {
    width: 16px;
}
.calendar-day {
    border: 1px solid black;
    color: black;
    background-color: #333;
    width: 16px;
    height: 16px;
    margin: 3px;
    border-radius: 4px;
}
.calendar-day.s {
    background-color: #4000bf;
}
.calendar-day.m {
    background-color: #6a0095;
}
.calendar-day.l {
    background-color: #95006a;
}
.calendar-day.xl {
    background-color: #bf0040;
}
.calendar-day.xxl {
    background-color: #ff0000;
}
.calendar-day.epic {
    background-color: #ff00ff;
}
.calendar-day.future {
    opacity: 0.4;
}
.calendar-day-dummy {
    opacity: 0;
}
.calendar {
    display: grid;
    max-width: 95%;
    overflow: scroll;
    margin: 0 auto;
}
/* TODO probably should be like .level1, .level2 or something */
.blue {
    background-color: #68aaee;
}
.green {
    background-color: #6de200;
}
.yellow {
    background-color: #fff249;
}
.red {
    background-color: #ff635f;
}
.orange {
    background-color: #ff9b35;
}
.purple {
    background-color: #de68ee;
}
@media (prefers-color-scheme: light) {
    #control-pane {
        border-right: 1px solid #3333;
    }
    .text-button {
        background-color: #eee;
        border: 1px solid #3333;
        opacity: 1;
    }
    .tab {
        background-color: #eee;
    }
    .tab.active {
        border-bottom: 1px solid #3333;
        background-color: white;
    }
    .study-call-to-action {
        background-color: #eee;
        border: 1px solid #3333;
    }
    body {
        color: black;
        background: white;
    }
    a {
        color: black;
    }
    #graph {
        background: #f9f9f9;
    }
    .exit-arrow::before {
        background: black;
    }
    .calendar-day {
        background-color: #eee;
    }
    .bar-chart-separator {
        background: black;
    }
}
@media (prefers-color-scheme: light) and (max-width:664px) {
    #control-pane {
        border-bottom: 1px solid #3333;
        border-right: 0;
    }
}
@media (prefers-color-scheme: light) and (hover: hover){
    .tab:hover {
        background-color: #f5f5f5;
    }
    .tab.active:hover {
        background-color: white;
    }
    #result-buttons li:hover {
        transition: border 500ms;
    }
}