:root {
    --brand-black: #000000;
    --brand-white: #ffffff;
    --brand-light-gray: #747474;
    --brand-dark-gray: #484848;
    --brand-green: #78be20;
    --brand-gold: #ffc627;
    --brand-blue: #00a3e0;

    --old-brand-green: #78be20;
    --old-brand-gold: #ffc627;
    --old-brand-blue: #00a3e0;
}

.theme-old {
    --brand-green: #b5e853;
    --brand-gold: #b5e853;
    --brand-blue: #63c0f5;
    --old-brand-green: #b5e853;
    --old-brand-gold: #b5e853;
    --old-brand-blue: #63c0f5;
    /* --old-brand-gold: #f4bf75; */
}

.brand-black {
    color: var(--brand-black) !important;
}

.brand-white {
    color: var(--brand-white) !important;
}

.brand-light-gray {
    color: var(--brand-light-gray) !important;
}

.brand-dark-gray {
    color: var(--brand-dark-gray) !important;
}

.brand-green {
    color: var(--brand-green) !important;
}

.brand-gold {
    color: var(--brand-gold) !important;
}

.brand-blue {
    color: var(--brand-blue) !important;
}

.brand-dot {
    color: var(--brand-black);
    background: linear-gradient(to right,
        transparent 10%,
        var(--brand-gold) 10%,
        var(--brand-gold) 90%,
        transparent 90%);
    display: inline-block;
}

.brand-dot-white {
    color: var(--brand-black);
    background: linear-gradient(to right,
        transparent 10%,
        var(--brand-white) 10%,
        var(--brand-white) 90%,
        transparent 90%);
    display: inline-block;
}

.brand-mono, .nav-link {
    font-family: 'Space Mono', monospace;
}

.brand-mono-bold {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
}

.brand-blink {
    animation: brand-blinker 12s step-end infinite;
}

body {
    background: #101010;
}

.container {
    font-family: 'Space Grotesk', Helvetica, sans-serif;
    font-weight: 100;
    font-size: 1.2rem;
}

b {
    font-weight: 700;
}

h1, h2, h3, h4 {
    font-family: 'Space Grotesk';
    font-weight: 500;
    color: var(--brand-green);
}

.wordmark {
    white-space: nowrap;
}

.wordmark-large {
    font-size: clamp(1rem, 10vw, 5rem);
    white-space: nowrap;
}

body, table, .form-control:focus, .close {
    color: #eaeaea !important;
}

nav {
    padding: 0.25rem 1rem !important;
    background-color: #272727;
    border-bottom: 1px dashed var(--brand-light-gray);
}

.nav-link, .navbar-pulldown {
    color: var(--brand-gold) !important;
}

.navbar > .container {
    justify-content: space-evenly;
}

a {
    color: var(--old-brand-blue);
    text-shadow: 0 0 5px rgba(104,182,255,0.15);
}

a:hover {
    text-decoration: none;
}

h4 {
    color: var(--old-brand-blue);
    text-shadow: rgba(104, 182, 255, 0.15) 0px 0px 5px;
}

p[data-hide="true"] {
  font-size: 1px;
  opacity: 0;
}

.close-link {
    border: none;
    background-color: inherit;
    padding: 0.5em 1em;
}

.navbar-hiding {
    animation: 0.25s linear 0s navbar-slide-out;
    animation-fill-mode: forwards;
}

.navbar-hidden {
    display: none;
}

.main-navbar-hidden {
    padding-top: 0 !important;
}

.navbar-pulldown {
    display: none;
}

.navbar-pulldown.navbar-pulldown-shown {
    display: block;
    position: fixed;
    background-color: inherit;
    font-size: 0; /* remove "inline magic space" */
    border-radius: 0.5rem;
    cursor: pointer;
    top: 0.25rem;
    right: 0.25rem;
}

.navbar-pulldown > * {
    font-size: 2rem;
}

.modal-dialog {
    margin-top: 15%;
}

.modal-content {
    border: 1px dashed var(--brand-light-gray);
}

.nav-tabs {
    border-bottom: 1px solid #6c757d;
}

.nav-link.active {
    border-color: #6c757d #6c757d #151515 !important;
}

.nav-link:hover:not(.active) {
    border-color: #6c757d !important;
}

.challenge-button {
    margin-bottom: 1.5rem !important
}

.challenge-button > p {
    margin-top: 1rem;
}

.challenge-name {
    padding-bottom: 1rem;
}

.challenge-button > span, .challenge-value {
    display: none;
}

.challenge-icon {
    width: 2.5rem;
}

/* Styles for greying out the challenges button if it is disabled */
.accordion-item-header:has(.disabled)  {
    opacity: 0.6 !important;
}

.btn.disabled .accordion-item-name {
    color: #aaa;
}

/* Styles for switching the text on hover for disabled buttons */
.challenge-button-2 {
    display: flex;
}

.challenge-text-wrapper {
    position: relative;
}

.challenge-name-text, .challenge-locked-text {
    transition: opacity 0.4s ease-in-out;
}

.challenge-name-text {
    opacity: 1;
    position: absolute;
}

.challenge-locked-text {
    opacity: 0;
    position: absolute;
    white-space: nowrap;
}

.invisible-placeholder {
    opacity: 0;
    display: relative;
}

.button-wrapper:hover .disabled .challenge-name-text {
    opacity: 0;
}

.button-wrapper:hover .disabled .challenge-locked-text {
    opacity: 1;
}

.jumbotron, .nav-link.active, .form-control {
    background-color: inherit !important;
}

.table-striped tbody tr:nth-of-type(2n+1) {
    background-color: rgba(255,255,255,0.1);
}

.card-body {
  text-align: center;
  position: relative;
}

.card-body .progress-bar {
  background-color: var(--old-brand-blue);
  opacity: 30%;
  height: 8%;
  width: 0;
  margin: 0;
  position: absolute;
  left: 0;
  bottom: 0;
  transition: all 0.2s ease;
  container: progress-bar / inline-size;
}

.card-body .progress-bar .progress-bar-text {
  opacity: 0%;
  font-size: 0.75em;
  transition: all 0.2s ease;
}

@container progress-bar (width < 2em) {
  .progress-bar-text {
    margin-left: calc(100% + 0.5em);
  }
}

.card-small:hover .card-body .progress-bar .progress-bar-text {
  opacity: 100%;
}


.card-small:hover .card-body .progress-bar {
  opacity: 100%;
}

.card-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0px;
}

.card-small {
    width: 13em;
    height: 13em;
    margin: 0.5em;
    padding: 0em;
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    transition: all 0.2s ease;
}

.card-active {
    box-shadow:0 0 20px gold;
}

.card-hidden {
    box-shadow:0 0 20px grey;
}

.card-small:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.10);
}

.card-text {
    position: absolute;
    left: 50%;
    bottom: 0%;
    top: 75%;
    transform: translate(-50%, -50%);
    width: 100%;
    color: #eaeaea;
    font-size: 0.75em;
}

.card-icon {
    width: calc(100% - 40px);
    font-size: 64px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0px 0px 3px black);
}

.card-icon > img {
    width: 75%;
}

.accordion-item {
    margin-bottom: 0.5em;
    background-color: inherit;
}

.accordion-item-header {
    padding: .75rem 1.25rem;
    background-color: rgba(255,255,255,0.1);
}

.accordion-item-body {
    padding: 1.25rem;
    background-color: rgba(255,255,255,0.03);
}

.accordion-item-name {
    margin: 0px;
    padding: 0px !important;
    float: left;
    white-space: normal;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    flex-grow: 1;
    flex-wrap: wrap;
}

.challenge-active {
    color: rgb(255,40,245) !important;
}

.challenge-solved {
    -webkit-text-stroke: 1px #222;
    -webkit-text-fill-color: var(--old-brand-green);
}

.challenge-unsolved {
    text-shadow: none;
    -webkit-text-stroke: 1px #222;
    -webkit-text-fill-color: rgba(255,255,255,0.25);
}

.challenge-header-right {
    font-size: 0.75em;
    color: #ddd;
}

.scoreboard-symbol {
    margin: auto;
    height: 3em;
    filter: drop-shadow(0px 0px 3px white);
}

.scoreboard-belt {
    height: 1.5em;
    filter: drop-shadow(0px 0px 3px black);
}

.scoreboard-row-me {
    background-color: rgba(255,255,255,0.3) !important;
    border: 2px solid rgba(255,255,255,0.8);
}

.scoreboard-page {
    display: inline-block;
    padding: 0.5em 1em 0.5em 1em;
}

.scoreboard-page-unselected > a {
    color: gray;
}

.scoreboard-page-selected > a {
    font-weight: bold;
}

.scoreboard tr {
    display: flex;
}

.discord-avatar {
    display: block;
    margin: auto;
    width: 128px;
    border-radius: 50%;
}

#syllabus ul li {
  list-style-image:url('../img/bullet.png');
}

table {
  width: 100%;
  margin: 0 0 20px 0;
}

th {
  text-align: left;
  border-bottom: 1px dashed var(--brand-light-gray);
  padding: 5px 10px;
}

td {
  padding: 5px 10px;
}

hr {
  height: 0;
  border: 0;
  border-bottom: 1px dashed var(--brand-light-gray);
}

.module-dojo a {
    color: var(--old-brand-green);
}

.module-due-date {
    font-size: 1.25em;
}

pre {
    background: #1e1e1e;
    color: #cccccc;
    padding: 0px 0px 0px 0px;
}

code {
    color: #61afef;
}

.hljs {
    display: block;
    overflow-x: auto;
    padding: .5em;
    color: #abb2bf; /* Adjusted text color for better visibility */
    background: #1e1e1e; /* Dark background color */
}

.hljs-comment, .hljs-quote {
    color: #5c6370; /* Adjusted comment color */
    font-style: italic;
}

.hljs-keyword, .hljs-selector-tag, .hljs-subst {
    color: #c678dd; /* Adjusted keyword color */
    font-weight: bold;
}

.hljs-literal, .hljs-number, .hljs-tag .hljs-attr, .hljs-template-variable, .hljs-variable {
    color: #d19a66; /* Adjusted literal and variable color */
}

.hljs-doctag, .hljs-string {
    color: #98c379; /* Adjusted string color */
}

.hljs-section, .hljs-selector-id, .hljs-title {
    color: #61afef; /* Adjusted section and title color */
    font-weight: bold;
}

.hljs-subst {
    font-weight: 400;
}

.hljs-constructor {
    color: #abb2bf; /* Adjusted class and type color */
}

.hljs-class .hljs-title, .hljs-type {
    color: #e5c07b; /* Adjusted class and type color */
    font-weight: bold;
}

.hljs-attribute, .hljs-name, .hljs-tag {
    color: #61afef; /* Adjusted attribute, name, and tag color */
    font-weight: 400;
}

.hljs-link, .hljs-regexp {
    color: #56b6c2; /* Adjusted link and regexp color */
}

.hljs-bullet, .hljs-symbol {
    color: #61afef; /* Adjusted bullet and symbol color */
}

.hljs-built_in, .hljs-builtin-name, .hljs-params {
    color: #61afef; /* Adjusted built-in and builtin-name color */
}

.hljs-meta {
    color: #abb2bf; /* Adjusted meta color */
    font-weight: bold;
}

.hljs-deletion {
    background: #392b3b; /* Adjusted deletion background color */
}

.hljs-addition {
    background: #29323c; /* Adjusted addition background color */
}

.hljs-emphasis {
    font-style: italic;
}

.hljs-strong {
    font-weight: bold;
}

.popup-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: flex-end;
    align-items: flex-end;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.popup-content {
    position: relative;
    background-color: var(--brand-black);
    padding: 2.5rem 1.5rem 1.5rem;
    border-radius: 10px 10px 0 0;
    text-align: center;
    width: 340px;
    margin: 0 20px 0px 0;
    color: #FFFFFF;
    border-left: 2px solid var(--brand-green);
    border-right: 2px solid var(--brand-green);
    border-top: 2px solid var(--brand-green);
    box-shadow: 0 0 20px rgba(120,190,32,0.3);
    transform: translateY(100%);
    animation: slideUp 0.3s ease-out forwards;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.popup-content h1 {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.8rem;
    margin: 0.5rem 0;
}

.popup-content p {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.25rem;
    margin: 0.5rem 0;
}

.emoji-display {
    font-size: 4rem;
    margin: 1rem 0;
    line-height: 1;
}

.belt-image {
    width: 150px;
    height: auto;
    margin: 0 auto;
}

.logo-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: auto;
    opacity: 0.2;
    z-index: 0;
    margin: 0;
}


.popup-content>*:not(.logo-image) {
    position: relative;
    z-index: 1;
}

.social-share {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.share-button {
    display: inline-flex;
    align-items: center;
    margin-top: 0.5rem;
    gap: 0.5rem;
    background-color: var(--brand-black);
    color: #FFFFFF !important;
    padding: 0.5rem 1rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    border-radius: 20px;
    text-decoration: none;
    border: 1px solid var(--brand-green);
    transition: all 0.3s ease;
}

.share-button img {
    height: 16px;
    width: auto;
    filter: brightness(0) invert(1);
}

.share-button:hover {
    background-color: var(--brand-dark-gray);
    border: 1px solid var(--brand-green);
}


.survey-prompt {
    vertical-align: middle;
    padding: 0px 15px;
    font-weight: bold;
}

.survey-thumb .fa {
    cursor: pointer;
    font-size: 36px;
    vertical-align: middle;
    padding: 0.5rem 0.6rem;
}

.survey-thumb .fa:hover {
    color: var(--brand-gold);
    transition: all .1s ease-in-out;
    transform: scale(1.05);
}

.survey {
    position:relative;
    padding:.75rem 0rem;
}

.survey-multiplechoice {
    display: inline;
    text-align: left;
}

.survey-multiplechoice div {
    border: 1px var(--brand-gold);
    background: none;
    padding: 6px 15px;
    cursor: pointer;
    display: block;
    user-select: none;
}

.survey-multiplechoice div:hover {
    transition: all .1s ease-in-out;
    background-color: var(--brand-gold);
}

.survey-freeresponse-row {
    padding: 0px 30px;
    padding-top: 10px;
}

.survey-text-input {
    border-color: #6c757d;
    color: #856404;
    box-shadow: none !important;
}

.survey-text-input:focus {
    border-width: 2px;
    border-color: var(--brand-gold) !important;
    color: #856404 !important;
}

.survey-submit:hover {
    background-color: var(--brand-gold);
    color: #856404;
    border-color: var(--brand-gold);
}



#closePopup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--brand-green);
    cursor: pointer;
}

.activity-graph {
    position: relative;
    font-family: 'Space Mono', monospace;
    padding: 6px;
    margin: 0.5rem;
    background: var(--brand-black);
    border-radius: 6px;
    margin-inline: auto;
    width: 100%;
    box-sizing: border-box;
    max-width: 642px;
    border: 1px solid var(--brand-green);
    overflow: hidden;
}

.activity-graph h3 {
    font-size: 0.9rem;
    text-align: left;
    padding-left: 2px;
}

.streak {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0.5rem;
    padding-right: 2px;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: var(--brand-green);
}

.grid-wrapper {
    position: relative;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-black) var(--brand-dark-gray);
}

.month-label {
    position: absolute;
    margin-left: 5px;
}

.grid-container {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, 10px);
    align-content: space-evenly;
    gap: 2px;
    justify-items: stretch;
    align-items: stretch;
    max-width: 100%;
    padding: 3px;
}

.activity-cell {
    width: 100%;
    height: 10px;
    aspect-ratio: 1 / 1;
    border-radius: 2px;
    background-color: #1e1e1e;
    transition: transform 0.2s ease;
    position: relative;
    transform-origin: center;
}

.activity-cell.level-1 { background-color: rgba(120, 190, 32, 0.25); }
.activity-cell.level-2 { background-color: rgba(120, 190, 32, 0.5); }
.activity-cell.level-3 { background-color: rgba(120, 190, 32, 0.75); }
.activity-cell.level-4 { background-color: var(--brand-green); }

.activity-cell:hover {
    transform: scale(1.3);
    z-index: 5;
    box-shadow: 0 0 5px var(--brand-black);
}

.legend {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    margin-left: 4px;
    font-size: 0.7rem;
    color: var(--dojo-text-color);
}

.legend-cells {
    display: flex;
    gap: 2px;
}

.legend-cells .activity-cell {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(4, 265px);
    gap: 12px;
    margin: 6px auto;
    font-family: 'Space Grotesk';
    text-transform: none;
    font-size: 16px;
    line-height: 1.2;
    padding: 6px;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

.stat-card {
    background: linear-gradient(110deg, rgba(0, 0, 0, 1) 0%, rgb(8, 8, 8) 60%, rgb(17, 17, 17) 100%);
    border: 1px solid var(--brand-black);
    padding: 16px;
    border-radius: 8px;
    height: 185px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
}

.stat-card-header {
    font-size: 16px;
    color: var(--brand-green);
    text-transform: none;
    text-align: left;
    padding: 0;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    height: calc(100% - 32px);
}

.stat-box:nth-child(1) { /* Total Solves */
    grid-column: 1;
    grid-row: 1;
}

.stat-box:nth-child(2) { /* Hacking Now */
    grid-column: 2;
    grid-row: 1;
}

.stat-box:nth-child(3) { /* Unique Hackers */
    grid-column: 1;
    grid-row: 2;
}

.stat-box:nth-child(4) { /* Challenges */
    grid-column: 2;
    grid-row: 2;
}

.stat-box {
    padding: 8px;
    border-left: 2px solid var(--brand-green);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px 0 0 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.stat-label {
    font-size: 10px;
    color: var(--brand-light-gray);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-white);
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    line-height: 1.1;
}

.stat-trend {
    margin-left: 6px;
    font-size: 10px;
    white-space: nowrap;
    padding: 2px 2px;
}

.trend-up {
    color: var(--brand-green);
}

.trend-down {
    color: #ff4444;
}

.trend-neutral {
    color: var(--brand-light-gray);
}

.chart-container {
    height: calc(100% - 32px);
    margin: 4px 0;
    padding: 2px;
    max-height: 170px;
    overflow: hidden;
}

.recent-activity, .recent-awards {
    height: calc(100% - 32px);
    max-height: 160px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
    padding: 4px;
}
/* scrollbar styles for stats */
.recent-activity::-webkit-scrollbar,
.recent-awards::-webkit-scrollbar {
    width: 4px;
}

.recent-activity::-webkit-scrollbar-track,
.recent-awards::-webkit-scrollbar-track {
    background: transparent;
}

.recent-activity::-webkit-scrollbar-thumb,
.recent-awards::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
}

.recent-activity::-webkit-scrollbar-thumb:hover,
.recent-awards::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

.recent-item {
    padding: 8px 6px;
    border-bottom: 1px solid #1a1a1a;
    font-size: 12px;
    color: var(--brand-white);
    transition: background 0.2s ease;
    margin-bottom: 2px;
}

.recent-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.recent-item:last-child {
    border-bottom: none;
}

.recent-time {
    color: var(--brand-light-gray);
    font-size: 10px;
    margin-top: 2px;
}

@keyframes navbar-slide-out {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
        display: hidden;
    }
}

@keyframes brand-blinker {
    0% {
        color: var(--brand-black);
        background: var(--brand-gold);
    }
    5% {
        color: var(--brand-green);
        background: transparent;
    }
    10% {
        color: var(--brand-black);
        background: var(--brand-gold);
    }
    15% {
        color: var(--brand-green);
        background: transparent;
    }
    20% {
        color: var(--brand-black);
        background: var(--brand-gold);
    }
    25% {
        color: var(--brand-green);
        background: transparent;
    }
    30% {
        color: var(--brand-black);
        background: var(--brand-gold);
    }
    35% {
        color: var(--brand-green);
        background: transparent;
    }
    40% {
        color: var(--brand-black);
        background: var(--brand-gold);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(120%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        background-color: rgba(0, 0, 0, 0);
    }
    to {
        background-color: rgba(0, 0, 0, 0.8);
    }
}
