/* Navigation Bar */
.topnav {
    background-color: #333;
    overflow: hidden;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topnav a {
    float: left;
    display: block;
    color: #f2f2f2;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;
}

.topnav a:hover {
    background-color: #ddd;
    color: black;
}

.topnav a.active {
    background-color: #94c8d3;
    color: white;
}

.topnav .icon {
    display: none;
}

.topnav {
    background-color: #333;
    overflow: hidden;
    position: sticky;
    top: 0;
    z-index: 1000;
}


@media screen and (max-width: 600px) {
    .topnav a:not(:first-child) {
        display: none;
    }

    .topnav a.icon {
        float: right;
        display: block;
    }

    .topnav.responsive {
        position: relative;
    }

    .topnav.responsive .icon {
        position: absolute;
        right: 0;
        top: 0;
    }

    .topnav.responsive a {
        float: none;
        display: block;
        text-align: left;
    }
}

/* Navbar container */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px; /* Set a consistent height */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align buttons to the left */
    gap: 10px; /* Add spacing between buttons */
    padding: 0 20px; /* Add padding to prevent buttons from hitting screen edges */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Navbar buttons */
.navbar button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    padding: 10px 15px; /* Consistent padding for buttons */
    transition: color 0.3s ease;
    outline: none; /* Remove default focus outline */
}

/* Active button */
.navbar .active {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 15px; /* Match the padding of other buttons */
    border-radius: 9999px;
    font-size: 14px; /* Ensure consistent font size */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: auto; /* Ensure it doesn't shrink */
    box-sizing: border-box; /* Include padding and border in size */
}

/* Remove purple highlight on click */
.navbar button:focus,
.navbar button:active {
    outline: none;
    background: none;
    color: white;
    box-shadow: none;
}

/* Hover effect */
.navbar button:hover {
    color: #cccccc;
}

/* Navbar icons */
.navbar svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Responsive navbar for smaller screens */
@media screen and (max-width: 768px) {
    .navbar {
        flex-wrap: wrap; /* Allow wrapping of buttons */
        justify-content: center; /* Center buttons on smaller screens */
        padding: 10px; /* Adjust padding */
    }

    .navbar button {
        font-size: 12px; /* Reduce font size */
        padding: 8px 10px; /* Adjust padding for smaller buttons */
    }

    .navbar .active {
        padding: 8px 10px; /* Adjust padding for active button */
        font-size: 12px; /* Reduce font size */
    }
}

@media screen and (max-width: 480px) {
    .navbar {
        flex-direction: column; /* Stack buttons vertically */
        align-items: center; /* Center align buttons */
        gap: 10px; /* Add spacing between buttons */
        padding: 10px; /* Ensure padding on smaller screens */
    }

    .navbar button {
        font-size: 10px; /* Further reduce font size */
        padding: 6px 8px; /* Adjust padding */
    }

    .navbar .active {
        padding: 6px 8px; /* Adjust padding for active button */
        font-size: 10px; /* Further reduce font size */
    }
}