@import url('https://fonts.googleapis.com/css?family=Raleway:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i');

:root {
    /* blues */
    --prussian-blue: #012a4aff;
    --indigo-dye: #013a63ff;
    --indigo-dye-2: #01497cff;
    --indigo-dye-3: #014f86ff;
    --ucla-blue: #2a6f97ff;
    --cerulean: #2c7da0ff;
    --air-force-blue: #468fafff;
    --air-superiority-blue: #61a5c2ff;
    --sky-blue: #89c2d9ff;
    --light-blue: #a9d6e5ff;

    /* greys */
    --eerie-black: #212529ff;
    --onyx: #343a40ff;
    --outer-space: #495057ff;
    --slate-gray: #6c757dff;
    --french-gray-2: #adb5bdff;
    --french-gray: #ced4daff;
    --platinum: #dee2e6ff;
    --antiflash-white: #e9ecefff;
    --seasalt: #f8f9faff;

    /* alerts */
    --engineering-orange: #d00000ff;
    --selective-yellow: #ffba08ff;
    --steel-blue: #3f88c5ff;
    /*--prussian-blue: #032b43ff;*/ /* already used as primary blue */
    --pine-green: #136f63ff;

    --blue-primary: var(--prussian-blue);
    --blue-primary-rgb: 3, 43, 67;
    --blue-100: var(--indigo-dye);
    --blue-200: var(--indigo-dye-2);
    --blue-300: var(--indigo-dye-3);
    --blue-400: var(--ucla-blue);
    --blue-500: var(--cerulean);
    --blue-600: var(--air-force-blue);
    --blue-700: var(--air-superiority-blue);
    --blue-800: var(--sky-blue);
    --blue-900: var(--light-blue);

    --grey-100: var(--eerie-black);
    --grey-200: var(--onyx);
    --grey-300: var(--outer-space);
    --grey-400: var(--slate-gray);
    --grey-500: var(--french-gray-2);
    --grey-600: var(--french-gray);
    --grey-700: var(--platinum);
    --grey-800: var(--antiflash-white);
    --grey-900: var(--seasalt);

    --grey-900-rgb: 248, 249, 250;

    --theme-danger: var(--engineering-orange);
    --theme-danger-light: #ffcccb;
    --theme-warning: var(--selective-yellow);
    --theme-warning-light: #fff0c8;
    --theme-info: var(--steel-blue);
    --theme-info-light: #c3d9f0;
    --theme-primary: var(--prussian-blue);
    --theme-primary-light: #b3c9d6;
    --theme-success: var(--pine-green);
    --theme-success-light: #b3d6d1;

    --button-color: var(--blue-300);
    --primary-white: #FFFFFA;
    --primary-white-rgb: 255, 255, 250;
    --hover-background: var(--grey-900);

    /* dimentions */
    --header-height: 4rem;
    --sidebar-width: 250px;

    --max-content-width: 1200px;

    --border-color: var(--grey-600);
    --border: 1px solid var(--border-color);
    --radius-small: 2px;
    --radius-large: 5px;
    --shadow-light: rgba(0, 0, 0, 0.2);
    --transition: all 200ms ease-in;
}

/* GENERAL */


ul {
    list-style: none;
    margin: 0; padding: 0;
}

button {
    font-family: unset;
}

/* dropdown */

.dropdown {
  position: relative;
}

.dropdown > button {
  border: 2px solid var(--button-color);
  color: var(--button-color);
  border-radius: 5px;
  padding: .5rem 1rem;
  background: transparent;
  cursor: pointer;
}

.dropdown > button:hover,
.dropdown.dropdown-menu-visible > button {
  background: var(--button-color);
  color: var(--primary-white);
}

.dropdown-menu {
  position: absolute;
  background: rgb(var(--primary-white-rgb));
  border-radius: 5px;
  bottom: 0;
  left: 0;
  /* start at the bottom and add a little extra */
  transform: translateY(calc(100% + .75rem));
  box-shadow: 0 5px 15px rgba(0,0,0,.2);
  min-width: 150px;
  z-index: 1050;
  height: 0;
  opacity: 0;
  overflow: hidden;
}

.dropdown-menu ul {
  padding: .5rem 0;

}

/* for logout buttons */
.dropdown-menu form,
.dropdown-menu button {
    width: 100%;
}

.dropdown-menu li a,
.dropdown-menu li button {
    font-size: .85rem;
    position: relative;
    padding: .5rem 1rem;
    display: flex;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    cursor: pointer;
}

.dropdown.dropdown-menu-visible .dropdown-menu {
    height: unset;
    opacity: 1;
}

.dropdown-right {
    left: unset;
    right: 0;
}

.dropdown-center {
  left: 50%;
  transform: translate(-50%, calc(100% + .75rem));
}

.dropdown-menu li {
  position: relative;
}

.dropdown-menu li:not(:last-of-type)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 85%;
    height: 1px;
    background: #ccc;
    transform: translateX(calc(15% / 2));
}

.dropdown-menu li button {
    border: none;
    background: transparent;
}

.dropdown-menu li a:hover,
.dropdown-menu li button:hover {
    color: var(--button-color);
}

.dropdown-menu li a::before,
.dropdown-menu li button::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: .2rem;
    background: var(--button-color);
    transition: var(--transition);
    transform: translateX(-100%);
    opacity: 0;
}

.dropdown-menu li a:hover::before,
.dropdown-menu li button:hover::before{
    transform: translateX(0);
    opacity: 1;
}

/* end dropdown */

/* forms */

.input-group {
    --label-size: .8rem;
    --input-padding-x: 1rem;
    --input-padding-y: .75rem;
    position: relative;
    margin-bottom: .5rem;
}

.input-group.check-group {
    display: grid;
    grid-template-columns: auto 1fr;  /* space for the input followed by label */
    align-items: start;
    justify-content: start;
}

.input-group.check-group input {
    order: 0;
}

.input-group.check-group label {
    order: 1;
}

.input-group label {
    font-size: var(--label-size);
    font-weight: 400;
}

.input-group:not(.block-label):not(.check-group) label {
    margin: 0;
    line-height: var(--label-size);
    position: absolute;
    top: calc(var(--label-size) / 2);
    left: var(--input-padding-x);
    width: max-content;
    background: var(--primary-white);
}

.input-group input:not([type='checkbox']):not([type='radio']),
.input-group select,
.input-group textarea {
    margin-top: var(--label-size);
    outline: none;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    width: 100%;
    padding: var(--input-padding-y) var(--input-padding-x);
    box-sizing: border-box;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.input-group input[type='checkbox'],
.input-group input[type='radio'] {
    float: left;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--theme-info)
}

.input-group small {
    margin-left: var(--input-padding-x);
}

.input-group.error input,
.input-group.error select,
.input-group.error textarea {
    border-color: var(--theme-danger)
}

a.form-btn,
button.form-btn {
    border: none;
    display: inline-block;
    outline: 1px solid var(--theme-info);
    border-radius: var(--radius-small);
    padding: .75rem 1.5rem;
    font-size: 1rem;
    font-style: inherit;
    background: transparent;
    color: var(--theme-info);
    text-decoration: none;
    margin-top: 1rem;
    margin-bottom: .5rem;
    cursor: pointer;
}

a:hover.form-btn,
button.form-btn:hover {
    outline: none;
    background: linear-gradient(45deg, var(--blue-400), var(--blue-800));
    color: var(--primary-white);
}

.errorlist {
    color: var(--theme-danger);
    list-style: initial;
    padding-left: 1rem;
    padding-top: .25rem;
}

.errorlist.nonform {
    padding: 1rem 1rem 1rem 2rem;
    border: 1px solid var(--theme-danger);
    border-radius: var(--radius-large);
    background: var(--theme-danger-light);
    font-weight: 500;
}

.check-as-btn input {
    position: absolute;
    opacity: 0;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    margin: 0;
    cursor: pointer;
    padding: .75rem 1.5rem;
    box-sizing: border-box;
}


.check-as-btn label {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: .5rem 1rem;
    outline: 1px solid;
    background: transparent;
    border-radius: var(--radius-large);
    transition: all 200ms ease-in;
    color: var(--theme-info);
}

.check-as-btn label {
    outline-color: var(--theme-info);
}

.check-as-btn input:checked + label {
    background: var(--theme-info);
    color: var(--primary-white);
}

/* end forms */

/* generic buttons */

a.btn,
button.btn {
    border: none;
    display: inline-block;
    border-radius: var(--radius-small);
    padding: .5rem 1.5rem;
    font-size: 1rem;
    font-style: inherit;
    background: var(--blue-primary);
    color: var(--primary-white);
    text-decoration: none;
    cursor: pointer;
}

a.btn.btn-hover-scale,
button.btn.btn-hover-scale {
    transition: transform ease-in 200ms;
}

a:hover.btn.btn-hover-scale,
button.btn.btn-hover-scale:hover {
    transform: scale(0.95);
}

.pulse-button {
    animation: pulse-btn 2s 1;
}

@keyframes pulse-btn {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--blue-primary-rgb),.7);
    }

    70% {
        box-shadow: 0 0 0  15px rgba(var(--blue-primary-rgb),0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(var(--blue-primary-rgb),0);
    }
}

.btn.btn-reverse {
    border-color: var(--blue-primary);
    background: var(--blue-900);
    color: var(--blue-primary);
}

.btn.btn-reverse:hover {
    background: var(--blue-700);
}

.btn.btn-small {
    padding: .35rem .75rem;
    font-size: .9rem;
}

/* end generic buttons */

/* icons */

.icon-control {
    color: inherit;
    text-decoration: none;
    margin-left: .25rem;
    font-size: 1rem;
}

/* end icons */

/* tags */

.tags {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
}

.tag {
    color: var(--theme-info);
    background: var(--theme-info-light);
    font-size: .85rem;
    padding: .15rem .35rem;
    display: inline-block;
    border-radius: var(--radius-small);
    border: 1px solid var(--theme-info);
    font-weight: bold;
}

a.tag {
    text-decoration: none;
}

/* end tags */

/* color */
.theme-danger {
    color: var(--theme-danger);
}

.theme-danger-light {
    color: var(--theme-danger-light);
}

.theme-warning {
    color: var(--theme-warning);
}

.theme-warning-light {
    color: var(--theme-warning-light);
}

.theme-info {
    color: var(--theme-info);
}

.theme-info-light {
    color: var(--theme-info-light);
}

.theme-primary {
    color: var(--theme-primary);
}

.theme-primary-light {
    color: var(--theme-primary-light);
}

.theme-success {
    color: var(--theme-success);
}

.theme-success-light {
    color: var(--theme-success-light);
}

.theme-secondary {
    color: var(--grey-300);
}

/* end color */

/* layout */

.title-control-group {
    display: flex;
    justify-content: space-between;
    align-items: start;
    column-gap: 2rem;
}

.title-control-group > * {
    margin: 0;
}

/* end layout */

/* spinner */

.spinner {
    transform: rotate(360deg);
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* end spinner */

/* trivia cards */

/* leet code cards: https://leetcode.com/explore/ */
.trivia-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-gap: 1rem;
}

.trivia-card {
    border-radius: var(--radius-large);
    box-shadow: 0 5px 15px var(--shadow-light);
    display: flex;
    flex-direction: column;
}

.trivia-card > * {
    flex: 0;
}

.trivia-card img {
    width: 100%;
    display: block;
    object-fit: cover;
    border-top-left-radius: var(--radius-large);
    border-top-right-radius: var(--radius-large);
}

.trivia-card .card-body {
    flex: 1;
    padding: .75rem 1rem;
}

.trivia-card .card-body .card-title {
    font-weight: 600;
}

.trivia-card .card-body .card-title,
.trivia-card .card-body p {
    margin-top: 0;
    margin-bottom: .5rem;
}

.trivia-card .card-body p {
    color: var(--grey-300);
}

.trivia-card .card-footer {
    padding: .75rem 1rem;
    display: flex;
    place-content: center;
}



.trivia-card .card-footer .btn {
    padding-left: 2rem;
    padding-right: 2rem;
}

/* end trivia cards */

/* END GENERAL */

/* BASE LAYOUT */

/* interferes with admin views */
/*html {*/
/*    background: var(--blue-primary);*/
/*}*/

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Raleway', system-ui;
    overflow-x: hidden;
    background: var(--primary-white);
    padding-top: 1px; /* for margin collapse protection */
}

h1, h2, h3, h4 {
    font-weight: 400;
}

.content {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 1rem;
    height: 100%;
}

body > header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    border-bottom: var(--border);
    box-sizing: border-box;
    background: rgba(var(--primary-white-rgb), .95);
    z-index: 1000;
}

body > header > .content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body > header .brand {
    font-size: 1.75rem;
    color: var(--blue-300);
    letter-spacing: 2px;
    width: var(--sidebar-width);
}

body > header .brand a {
    text-decoration: none;
    color: inherit;
}

/* END BASE LAYOUT