body {
    background-color: var(--color-primary-a0);
    display: grid; 
    grid-template-columns: 16em 1fr 1fr 1fr;
    grid-template-rows: 15% 1fr 1fr 1fr 1fr;
    gap: 0px 0px; 
    justify-content: stretch;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
}

#side_bar {
    grid-area: 2 / 1 / 6 / 2;
    background-color: var(--color-primary-a10);
    z-index: 5;
    transform: translateX(-256px);
    transition: all 0.5s ease-in-out;
    position: fixed;
    height: 100%;
    width: 16em;
    top: 6em;
    display: flex;
    flex-direction: column;
}

#side_bar.open {
    transform: translateX(0);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.2);
}

#sidebar_button {
    cursor: pointer;
    position: fixed;
    right: 32px;
    top: 32px;
    background-color: transparent;
    border: none;
}

#title_bar {
    grid-area: 1 / 1 / 2 / 6;
    background-color: var(--color-primary-a20);
    padding-left: 32px;
    position: fixed;
    width: 100%;
    height: 6em;
    z-index: 2;
    transition: filter 0.5s ease-in-out;
}

#title_bar h1{
    padding-top: 12px;
}
#main_area {
    box-sizing: border-box;
    grid-area: 2 / 1 / 6 / 6;
    position: absolute;
    top: 6em;
    max-width: 100vw; /* Ensure it uses the full viewport width */
    height: calc(100vh - 6em); /* Ensure it uses the full viewport height minus the title bar */
    margin: 0; /* Remove auto margin */
    padding: 32px;
    padding-left: 24px; /* Simplified padding */
    padding-right: 24px; /* Simplified padding */
    padding-top: 3vh;
    display: flex; /* This helps children stretch properly */
    flex-direction: column;
    transition:
        transform 0.5s ease-in-out,
        filter 0.5s ease-in-out;
    pointer-events: all;
    overflow: auto; /* Ensure content is scrollable if it overflows */
    overflow-x: hidden;
}

/* #main_area p, #main_area h1, #main_area h2, #main_area h3, #main_area h4, #main_area h5, #main_area h6, #main_area li, #main_area ul { */
    /* margin-left: 1%; */
/* } */

#main_area h2 {
    margin-bottom: 0;
}

#main_area.shifted {
    transform: translateX(16em);
    filter: blur(4px);
    pointer-events: none;
}

#main_area.shifted #close_button {
    pointer-events: all;
}

#main_area::-webkit-scrollbar {
    width: 8px;
}

#main_area::-webkit-scrollbar-track {
    background: var(--color-scrollbar-0);
}

#main_area::-webkit-scrollbar-thumb {
    background: var(--color-scrollbar-1);
}

#main_area::-webkit-scrollbar-thumb:hover {
    background: var(--color-scrollbar-2);
}

#close_button {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    pointer-events: none;
}

#trigger_welcome_animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-selected-1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    pointer-events: none;
    animation: welcome_animation 2.5s ease-out forwards;
}

#no_welcome_animation {
    opacity: 0;
}

@keyframes welcome_animation {
    0% {
        opacity: 1;
        visibility: visible;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

.circle_anim {
    position: absolute;
    border-radius: 50%;
    background: var(--color-primary-a0);
    transform: scale(0);
    transition: transform 1.5s ease-in-out, background 1s ease-in;
}

.hover_obj {
    transition: all 0.2s ease-in-out;
}

.hover_obj:focus {
    outline: none;
}

.hover_obj:hover {
    transform: scale(1.25);
}

.hover_obj:active {
    transform: scale(0.85);
}

.side_bar_container {
    max-width: 600px;
    margin: 0 auto;
    padding: 32px;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}

.side_bar_item {
    background-color: var(--color-primary-a0);
    padding: 20px;
    padding-top: 4px;
    border-radius: 32px;
    border: 2px solid #00000000;
    height: 150px;
    display: flex;
    flex-shrink: 0;
    transition: all 0.3s ease-in-out;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.side_bar_item.visited {
    border: 2px solid var(--color-visited-2);
}

.side_bar_item:hover {
    border: 2px solid var(--color-selected-2);
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.side_bar_item p {
    color: #ffffff;
    margin-top: 32px;
    z-index: 1;
    font-weight: 700;
    text-shadow: 0 0 4px #000000;
    text-align: center;
}

.side_bar_item .sidebar_img {
    background-size: 152px;
    border-radius: 16px;
    margin-top: 16px;
    z-index: 0;
    position: fixed;
    width: 150px;
    height: 136px;
}

fade {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    display: flex;
    width: 100%;
    bottom: 0;
    height: 100%;
    background-image: linear-gradient(180deg, rgba(0,0,0,0) 75%, var(--color-fade) 100%);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Circular Spotify', sans-serif;
    color: var(--color-text-1);
    font-weight: 800;
}

li {
    padding-bottom: 8px;
}

a:link {
    color: var(--color-selected-2);
}

a:hover, a:active {
    color: var(--color-selected-3);
}

a:visited {
    color: var(--color-visited-1);
}

p, li {
    font-family: 'Circular Spotify', sans-serif;
    color: var(--color-text-1);
    font-weight: 400;
}

#current_project {
    background-color: var(--color-primary-a10);
    color: var(--color-text-1);
    padding: 20px;
    padding-top: 12px;
    padding-bottom: 12px;
    border-radius: 32px;
    border: 2px solid #00000000;
    height: 150px;
    display: flex;
    flex-shrink: 0;
    transition: all 0.3s ease-in-out;
    align-items: center;
    justify-content: center;
    width: 148px;
    margin-left: 24px;
    margin-left: 2.5%;
}

#current_project:hover {
    border: 2px solid var(--color-selected-2);
    transform: translateY(-8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

#chips-container {
    margin-top: auto;
}

#social_chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, 32px);
    gap: 40px;
    justify-content: left;
    margin-top: auto;
    padding: 32px;
    padding-top: 0px;
    transform: translateY(-96px);
}

.circular_chip {
    background-color: var(--color-primary-a0);
    z-index: 2;
    width: 32px;
    height: 32px;
    position: relative;
    padding: 8px;
    border-radius: 32px;
    align-items: center;
    text-align: center;
    padding: auto;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

#spotify:hover {
    background-color: #1DB954;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

#youtube:hover {
    background-color: #ff5757;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

#steam:hover {
    background-color: #2d4883;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

#marquee.glass-marquee {
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
    height: 0px;
    padding: 0 24px;
    font-family: 'Circular Spotify', sans-serif;
    color: rgba(255, 255, 255, 1.0);

    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.15);

    background: rgba(37, 43, 52, 0.4);
    backdrop-filter: blur(3px) saturate(160%);
    -webkit-backdrop-filter: blur(30px) saturate(160%);
    border-radius: 24px;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.1),
        0 8px 32px rgba(0, 0, 0, 0.2);

    background-image: 
        linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.25), transparent 160%);

    display: flex;
    align-items: center;
    transition: height 0.6s ease-in-out;
    position: absolute;
    z-index: 100;
    margin: 16px 16px 0 0;
}

#marquee {
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
    height: 0px;
    background-color: #f0f0f0;
    padding: 0 0;
    font-family: 'Circular Spotify', sans-serif;
    border-radius: 16px;
    color: var(--color-text-1);
    background-color: var(--color-primary-a10);
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: height 1s ease-in-out;
    position: absolute;
    z-index: 100;
    margin: 16px;
    margin-left: 0;
    margin-top: 0;
    margin-bottom: 0;
}

#marquee_text {
    display: inline-block;
    padding-left: 100%;
    animation: scroll 10s linear infinite;
    margin-top: 4px;
    position: absolute;
    white-space: nowrap;
}

@keyframes scroll {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    overflow: hidden;
}

.modal-content {
    position: absolute;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.5);
    will-change: transform;
    cursor: grab;
}

.modal-content:active {
    cursor: grabbing;
}

.preview-box {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: var(--color-primary-a10);
    padding: 10px;
    z-index: 998;
    box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    max-width: 60%;
    max-height: 64px;
    border-radius: 12px;
    border: 2px solid var(--color-selected-1);
    border-width: 2px;
    color: var(--color-text-1);
    font-family: 'Circular Spotify', sans-serif;
    font-weight: 200;
    transform: translateY(calc(100% + 10px));
    transition: transform 0.3s ease-in-out;
    overflow: hidden;
}

.styled-custom-link {
    font-family: 'Circular Spotify', sans-serif;
    color: var(--color-selected-2);
    text-decoration: underline;
    cursor: pointer;
}

#main_area .styled-custom-link-fancy {
    border-radius: 16px;
    padding: 14px;
    background-color: var(--color-primary-a20);
    display: inline-block;
    font-family: 'Circular Spotify', sans-serif;
    color: #d0e9ff;
    text-decoration: underline;
    text-decoration-color: var(--color-selected-2);
    text-decoration-thickness: 2px;
    cursor: pointer;
    border: 2px solid var(--color-primary-a20);
    transition: border 0.3s ease-in-out,
                opacity 0.3s ease-in-out,
                filter 0.3s ease-in-out;
}

@media (max-width: 1250px) {
    #main_area .styled-custom-link-fancy.change-size {
        display: block;
    }
}

#main_area .styled-custom-link-fancy.visited {
    text-decoration-color: var(--color-visited-1);
}

#main_area .styled-custom-link-fancy:hover {
    border: 2px solid var(--color-selected-2);
}

#empty-halls-text {
    font-family: 'VCR';
    font-size: 16px;
    line-height: 1.25em;
    text-shadow:
    -2px -2px 0 black,
    2px -2px 0 black,
    -2px  2px 0 black,
    2px  2px 0 black,
    -2px  0px 0 black,
    2px  0px 0 black,
    0px -2px 0 black,
    0px  2px 0 black;
}

#tsbm-text {
    font-family: 'OldePixel';
    font-size: 12px;
}

.switch-long {
    position: relative;
    display: inline-block;
    width: 192px;
    height: 34px;
}

.switch-long input, .switch-short input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-short {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 34px;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-primary-a20);
    border-radius: 34px;
    transition: background-color 0.4s ease-in-out;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: transform 0.4s ease-in-out;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-selected-2);
}

.switch-short input:checked + .slider:before {
    transform: translateX(46px);
}

.switch-long input:checked + .slider:before {
    transform: translateX(158px);
}

#settings_chip {
    display: flex;
    background-color: var(--color-primary-a0);
    width: calc(100% - 128px);
    height: 36px;
    border-radius: 18px;
    transform: translateY(-112px);
    margin-left: 64px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid var(--color-primary-a0);
    transition: all 0.3s ease-in-out;
}

#settings_chip:hover {
    border: 2px solid var(--color-selected-2);
    transform: translateY(-116px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

#fancy-scroll-container {
    flex-direction: column;
}

#home-header-container {
    position: relative;
    display: inline-block;
    width: 100%;
    overflow: hidden;
    height: 65vh;
}

#home-header-container {
    width: 100%;
    display: block;
}

#home-header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50vh;
    width: 100%;
    color: white;
    font-family: 'Circular Spotify', sans-serif;
    font-weight: 800;
    font-size: 64px;
    text-shadow: 0 0 16px #000000bf;
    z-index: 50;
    margin: 0;
    margin-top: 64px;
    position: absolute;
    overflow: hidden;
}

#home-header h1 {
    margin: 0;
    padding: 0;
    text-align: center;
}

#fade-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(180deg, rgba(0,0,0,0) 0%, var(--color-fade) 100%);
}

#home-header-container #frontpage_design {
    margin: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#home-text-content {
    padding: 16px;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
}

#home-text-content p {
    max-width: 1250px;
    text-align: center;
}

#main_area .active_current {
    border: 2px solid #3dba522f;
}

#main_area .active_current:hover {
    border: 2px solid var(--color-selected-2);
}

#page-header {
    transition: all 0.3s ease-in-out;
    opacity: 1;
    margin-top: 0px;
    max-height: 200px;
    filter: blur(0px);
}

#page-header.scrolled  {
    filter: blur(8px);
    overflow: hidden;
    opacity: 0;
    max-height: 0px;
}