* {
    font-family: "TeXGyreAdventor", "Century Gothic", "Didact Gothic",
        "Segoe UI Emoji", sans-serif;
}

#background_img {
    /* set the background image */
    /* fill the entire screen */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* center the image */
    /* background-image: url("../images/bg.webp"); */
    background-size: cover;
    background-position: center;
    /* make the image darker */

    /* make the image stay in the background */
    z-index: -2;
}

#background_shader {
    /* set the background image */
    /* fill the entire screen */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* center the image */
    background-size: cover;
    background-position: center;
    /* make the image darker */
    background-color: rgba(0, 0, 0, 0.5);
    /* make the image stay in the background */
    z-index: -1;
}
#title {
    /* stay in the center of the screen */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
#frame,
#iframe {
    /* fill the screen */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.menu {
    position: absolute;
    bottom: 20px; /* Align the menu to the bottom of the screen */
    left: 0;
    width: 100%;
    display: flex; /* Align items next to each other */
    justify-content: center; /* Center the menu horizontally */
    gap: 20px; /* Add some space between menu items */
}

.menu-item {
    background-color: black;
    color: white;
    width: 150px;
    padding: 10px;
    text-align: center;
    position: relative; /* Necessary for positioning submenu on top */
    cursor: pointer;
    transition: 0.3s;
    list-style-type: none; /* Remove bullet points */
}

.menu-item:hover {
    background-color: white;
    color: black;
}
.submenu {
    display: block; /* Change from 'none' to 'block' */
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    list-style-type: none; /* Remove bullet points */
    padding: 0; /* Ensure no padding on submenu */
    margin: 0; /* Ensure no margin on submenu */
    z-index: 1;
    overflow: hidden;
    max-height: 0; /* Initially set height to 0 for transition */
    opacity: 0; /* Initially hidden */
    transition: max-height 0.5s ease, opacity 0.5s ease; /* Smooth height and opacity transition */
}

.submenu.show {
    max-height: 400px; /*Adjust this based on how tall your submenu is */
    opacity: 1; /* Fully visible */
}

.submenu .menu-subitem {
    padding: 10px;
    width: 100%;
    background-color: black;
    color: white;
    text-align: center;
    cursor: pointer;
    margin: 0; /* Ensure no margin on submenu items */
    list-style-type: none;
    box-sizing: border-box; /* Ensure padding doesn't affect width */
    /* margin-bottom: 5px; */
}

.submenu .menu-subitem:hover {
    background-color: white;
    color: black;
    transition: 0.3s;
}

.absolute-item {
    padding: 10px;
    width: 150px;
    background-color: black;
    color: white;
    text-align: center;
    cursor: pointer;
    margin: 0; /* Ensure no margin on submenu items */
    position: fixed;
    left: 10px;
    bottom: 10px;
    z-index: 100;
}

.absolute-item:hover {
    background-color: white;
    color: black;
    transition: 0.3s;
}
#doc {
    flex-direction: column;
    height: 100vh;
    position: fixed;
    visibility: hidden;
    display: flex;
    top: 0;
    background-color: #000000;
    opacity: 0.85;
    z-index: 2;
    transition: left 0.3s ease-in-out; /* Add transition for the sliding effect */
}

/* Title Section */
#doc-title {
    padding: 20px;
    color: #ffffff;
    text-align: center;
    font-size: 2em;
    font-weight: 600;
    border-bottom: #848484 1px solid;
}

/* Content Section */
#doc-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    color: #ffffff;
    line-height: 1.6;
    font-size: 1.1em;
}

/* Optional styles for content */
#doc-content p {
    margin-bottom: 1em;
}

#doc-content ul {
    margin-top: 10px;
    padding-left: 20px;
}

#doc-content img {
    max-width: 100%;
    height: auto;
    margin-top: 10px;
}

/* Scrollbar styling */
#doc-content::-webkit-scrollbar {
    width: 8px;
}

#doc-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#doc-content::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

/* Desktop view: when width is larger than height */
/* @media (min-width: 768px) {
    #doc {
        width: 25vw;
        top: 0;
        left: -25vw;
    }
} */

/* Mobile view: full width */
/* @media (max-width: 767px) {
    #doc {
        width: 100vw;
        left: -100vw;
        position: fixed;
    }
} */
#doc.active {
    left: 0; /* Move into the viewport */
}

#base.active {
    visibility: visible;
}
#base {
    visibility: hidden;
}

#frame.active {
    visibility: visible;
}
#frame {
    visibility: hidden;
}
#doc.active {
    visibility: visible;
}
