/* Reset some basic elements */
body, html {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Dark mode by default */
body {
    font-family: Arial, sans-serif;
    background-color: #333;
    color: #fff;
    margin: 0;
    padding: 10px;
    transition: background-color 0.3s, color 0.3s;
}

/* Light mode theme */
body.light-mode {
    background-color: #FFF;
    color: #333;
}

/* Header with logo image */
header {
    width: 100%;
    padding: 10px 0;
}

/* Make the image clickable to return home */
header a img {
    cursor: pointer;
    float: left; /* Aligns the image to the left */
}

/* Navigation Menu */
nav {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 10px;
}

nav a {
    color: #FFF;
    text-decoration: none;
    padding: 8px;
    margin: 0 5px;
    background: rgba(0,0,0,0.3);
    border-radius: 5px;
}

nav a:hover {
    background: rgba(255,255,255,0.5);
    color: black;
}

/* Toggle switch for Light/Dark Mode */
.switch {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex; /* Flex layout for inline label and switch */
    align-items: center; /* Vertically align elements */
    z-index: 1000;
}

.switch label {
    margin-right: 10px; /* Space between label text and switch */
    color: #fff; /* Ensuring text color is visible */
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: relative; /* Relative to the flex container */
    cursor: pointer;
    width: 60px;
    height: 34px;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Responsive design for navigation to become a dropdown menu on smaller screens */
@media (max-width: 768px) {
    nav {
        position: static; /* Allows the nav to flow in document order, below the image */
        text-align: center;
        background: rgba(0, 0, 0, 0.8);
    }
    nav a {
        display: block;
        margin: 5px 0;
    }
}
