* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    font-size: clamp(1.4rem, 1.267rem + 0.278vw, 1.6rem);
    background-color: #181818;
    overflow: hidden;
    /* Prevent the page from having overall scroll */
    height: 100vh;
    /* Fit entire screen */
    width: 100vw;
}

.container {
    display: flex;
    height: 100vh;
    width: 100%;
    background-color: #181818;
}

.sidebar {
    width: 350px;
    background-color: #1b2326;
    padding: 1rem 0;
    overflow-y: auto;
    /* Allows the sidebar to scroll independently */
}

.logo img {
    max-width: 80%;
    margin-bottom: 1rem;
}

ul {
    list-style: none;
    padding: 0;
    width: 100%;
}

li {
    text-align: left;
    padding: 10px 15px;
    cursor: pointer;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

li.locked {
    color: gray;
    cursor: not-allowed;
}

li.completed {
    color: #45e5db;
}

li.selected {
    background-color: #282c34;
    /* Highlight selected menu item */
}

li:hover:not(.locked) {
    background-color: #3a3f47;
}

.content {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
    /* Allows the content area to scroll independently */
    color: #ffffff;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
}

.challenge-container {
    flex-grow: 1;
    padding-bottom: 40vh;
    padding-top: 40vh;
    /* Add padding to allow scrolling to the last element */
}

.challenge {
    background-color: #161c1e;
    border-radius: 32px;
    padding: 2rem;
    box-shadow: 0px 50px 100px rgba(69, 229, 219, 0.15);
    width: 90%;
    /* max-width: 800px; */
    box-sizing: border-box;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.3s, filter 0.3s, box-shadow 0.3s;
    cursor: pointer;

    /* Allow clicking to select */
}

.story {
    background-color: #161c1e;
    border-radius: 32px;
    padding: 2rem;
    box-shadow: 0px 50px 100px rgba(69, 229, 219, 0.15);
    width: 90%;
    max-width: 800px;
    max-width: 90%;
    box-sizing: border-box;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.3s, filter 0.3s, box-shadow 0.3s;
    cursor: pointer;

    /* Allow clicking to select */
}

.challenge.unavailable {
    background-color: #2c2c2c;
    color: #999999;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: not-allowed;
}

.challenge.unavailable .lock-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.challenge img {
    width: auto;
    height: auto;
    max-width: 70%;
    max-height: 50vh;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.story img {
    width: auto;
    height: auto;
    max-width: 70%;
    max-height: 50vh;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.challenge h2 {
    color: #45e5db;
}

.story h2 {
    color: #fdd835;
}

.hint {
    margin-top: 1rem;
    padding: 1rem;
    border-left: 4px solid #45e5db;
    background-color: #161c1e;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    /* Increased gap between hint and button */
}

button {
    border: none;
    padding: 15px 20px;
    border-radius: 32px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    margin-right: 10px;
    width: 100%;
    /* Make the button fill the entire width of the container */
}

button.complete-btn {
    background-color: #fdd835;
    /* Yellow color for the "Mark as Completed" button */
    color: #181818;
}

button.complete-btn:hover {
    background-color: #ffea61;
}

button.clear-btn {
    background-color: #4caf50;
    /* Green color for the "Clear Completion" button */
    color: #ffffff;
}

button.clear-btn:after {
    content: ' ✓';
}

button.clear-btn:hover {
    background-color: #66bb6a;
}

.challenge.selected {
    box-shadow: 0 0 20px 5px #45e5db;
    /* Glow-like border for selected challenge */
    transform: scale(1.02);
    /* Slightly smaller scale to ensure it fits the container */
}

.challenge:not(.selected) {
    transform: scale(0.95);
    filter: brightness(0.6);
    pointer-events: none;
    /* Disable interaction for non-selected challenges */
}

.story.selected {
    box-shadow: 0 0 20px 5px #fdd835;
    /* Glow-like border for selected challenge */
    transform: scale(1.02);
    /* Slightly smaller scale to ensure it fits the container */
}

.story:not(.selected) {
    transform: scale(0.95);
    filter: brightness(0.6);
    pointer-events: none;
    /* Disable interaction for non-selected challenges */
}

.footer {
    background-color: #181818;
    color: grey;
    text-align: center;
    padding: 1rem 0;
    font-size: 0.8rem;
}