/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: content-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root{
    --white:white;
    --black:black;
    --red:red;
    --blue:blue;
    --green:green;
    --dark-red:dark-red;

    --page-background-color: slategray;

    --font-basic-color: snow;
    --font-cold-color: #cccccc;
    --font-light-color: #888888;
    --font-dark-color: #222222;
    --font-error-color: var(--red);
    --font-errordark-color: var(--dark-red);

    --background-cold-color: #cccccc;
    --background-light-color: #888888;
    --background-normal-color: #666666;
    --background-middle-color: #444444;
    --background-dark-color: #333333;
    --background-darkest-color: #2c2c2c;

    --border-cold-color: #cccccc;
    --border-light-color: #888888;
    --border-medium-color: #444444;
    --border-dark-color: var(--black);
}

/*First the basics*/
body {
    min-height: 100%;
    height: 100vh;
    color: var(--font-basic-color);
    background-color: var(--page-background-color);
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
    cursor: default;
    font-family: 'Arial', sans-serif;
}

a {
    text-decoration: none;
    color: black;
}


::-webkit-scrollbar {
    background-color: lightgrey;
    width: 1vw;
}

::-webkit-scrollbar-thumb {
    background: grey;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #222222;
}




.link:hover {
        text-decoration: underline;
}
/* Navbar Container */
.navbar {
    display: flex;
    align-items: center;
    background-color: var(--background-dark-color);
    padding: 10px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Navbar Inner Container */
.navbar_in {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Distribute items between the left, center, and right */
    width: 98%;
    margin: 0 auto; /* Ensure the container is centered within the navbar */
}

/* Navbar Title (Centered) */
.navbar_head {
    padding: 5px;
    border-radius: 20px;
    font-size: 1.4rem;
    color: var(--font-basic-color);
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    margin: 0 10px 0 45% ; /* Center the title */

    @media (max-width: 1000px){
        margin: 0 10px 0 40% ; /* Center the title */
    }
    @media (max-width: 600px){
        margin: 0 10px 0 15% ; /* Center the title */
    }
}

/* Navbar Toggle Button */
.navbar_toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-right: 20px; /* Add some spacing from the dark mode toggler */
}



/* Navbar Items (Positioned Near Center but Slightly Right) */
.navbar_items {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 40%;
    border: 1px solid var(--border-light-color);
    transform: translateX(-50%) translateY(-20px); /* Adjust vertical alignment */
    background-color: var(--background-middle-color);
    padding: 10px;
    width: 190px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 3;
    margin-left: 50px; /* Move it slightly to the right of the center */

    @media (max-width: 800px) {
        left: 30%;
    }
    @media (max-width: 520px) {
        left: 20%;
    }
    @media (max-width: 450px) {
        left: 15%;
    }
    @media (max-width: 420px) {
        left: 15%;
        .dropdown_menu{
            left: 90%;
        }
    }
}

.navbar_items.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Navbar List */
.navbar_ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.navbar_li:not(:last-child)::after {
        content: '';
        display: block;
        height: 4px;
}
/* General Hover Effect for Navbar Items */
.navbar_li:hover {
    background-color: var(--background-light-color);
    transition: background-color 0.3s ease;
}


/* Ensure Navbar Items Have Consistent Styling */
.navbar_li {
    border: 1px solid var(--border-light-color);
    position: relative;
    display: block;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px; /* Default border radius */
    transition: background-color 0.3s ease; /* Smooth transition for hover effect */
}

/* Rounded Corners for First and Last Items */
.navbar_li:first-child {
    border-radius: 20px 20px 5px 5px;
}
.navbar_li:last-child {
    border-radius: 5px 5px 20px 20px;
}



.navbar_item {
    width: 100%;
    height: 100%;
    font-size: 1.4rem;
    color: var(--font-basic-color);
    text-decoration: none;
}

/* Dropdown Menu */
.dropdown_menu {
    display: none;
    position: absolute;
    width: 170px;
    top: 0;
    left: 105%;
    list-style: none;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--border-light-color);
    background-color: var(--background-middle-color);
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 0;
    transform: translateY(-20px);
    z-index: 3;
}

.dropdown_menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown_item {
    font-size: 1.2rem;
    color: var(--font-basic-color);
    text-decoration: none;
}



/* Dropdown Menu Items Hover Effect */
.dropdown_li:hover {
    background-color: var(--background-light-color);
    transition: background-color 0.3s ease;
}

/* Dropdown Menu Items */
.dropdown_li {
    cursor: pointer;
    padding: 5px 10px;
    border: 1px solid var(--border-light-color);
    border-radius: 5px; /* Default border radius */
    transition: background-color 0.3s ease; /* Smooth transition for hover effect */
}

/* Rounded Corners for First and Last Dropdown Items */
.dropdown_li:first-child {
    border-radius: 20px 20px 5px 5px;
}
.dropdown_li:last-child {
    border-radius: 5px 5px 20px 20px;
}

#navbarHelp {
    margin-bottom: 50px;
    visibility: hidden;
}







/* Dark mode toggler */
.darkmode-slider {
    display: flex;
    align-items: center;
    margin-left: auto; /* Push it to the right */
    margin-right: 20px;
    padding: 10px;
}

/* Hidden checkbox */
.darkmode-slider .switch input {
    display: none;
}

/* Slider base */
.darkmode-slider .switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

/* Track background */
.darkmode-slider .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    background-color: #ccc;
    transition: background-color 0.4s;
    border-radius: 34px;
}

/* Slider thumb */
.darkmode-slider .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--white);
    transition: transform 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Checked state */
.darkmode-slider #darkModeToggle:checked + .slider {
    background-color: #4CAF50;
}

.darkmode-slider #darkModeToggle:checked + .slider:before {
    transform: translateX(26px);
}











/*Footer*/
footer {
    position: fixed;
    color: var(--font-basic-color);
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--background-middle-color);
    padding: 10px 20px;
    text-align: center;
    border-top: 1px solid var(--border-dark-color);
    z-index: 101; /* Ensure it stays on top of other content */
}

.footer_in {
    position: relative;
    display: flex;
    right: 3%;
    justify-content: center;
    align-items: center;
}

.footer_in_in {
    width: 80%;
    text-align: center;
}

footer h5, footer h6 {
    margin: 5px 0;
}

#footerHelp {
    margin-top: 50px;
    visibility: hidden;
}


/*my custom "popup box" I also use it for errors and stuff*/
.modal {
    display: none;
    position: fixed;
    color: var(--font-dark-color);
    z-index: 102;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--black); /* Fallback color */
    background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
    align-items: center;
    justify-content: center;
}

/* Modal Content */
.modal-content {
    background-color: var(--background-light-color);
    margin: auto;
    padding: 20px;
    border: 2px solid var(--border-dark-color);
    border-radius: 25px;
    width: min(70%, 500px);
}

.modal-error {
    color: var(--font-error-color);
    text-shadow: 0.5px 0.5px 1px var(--font-errordark-color);
    background-color: black;
}

/* Add Animation */
.modal-content, .modal-footer {
    animation: zoom 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }
    to {
        transform: scale(1)
    }
}

/* The Close Button */
.modal-button {
    background-color: var(--background-normal-color);
    color: var(--font-dark-color);
    font-size: 120%;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin: 10px;
    width: 50px;
    border-radius: 5px;
}

.modal-button:hover {
    transition: background-color 0.5s ease;
    background-color: var(--background-dark-color);
    color: var(--font-light-color);
}


