/* Global Styles */
body {
    margin: 0;
    padding: 7px;
    font-family: monospace;
    font-size: 12pt;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Color Schemes */
body.orange_black {
    background-color: black;
    color: orange;
}

body.white_black {
    background-color: black;
    color: white;
}

body.black_white {
    background-color: white;
    color: black;
}

/* Content and Layout */
#content {
    flex: 1;
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 60px 0; /* Adjust padding to account for header and footer */
    box-sizing: border-box; /* Ensure padding doesn't affect the overall width */
}

/* Header Styles */
#floating-header {
    padding: 30px;
    position: fixed;
    top: 0;
    width: 98%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#floating-header h1 {
    margin: 0;
    font-size: 1.5em;
}

#floating-header nav {
    margin-left: auto;
    padding-right: 50px;
}

/* Link and Button Styles */
a, .content-link, .button-link, button {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border: 2px solid;
    transition: all 0.3s ease;
    margin: 5px;
    cursor: pointer;
}

/* Adjust color based on background */
body.orange_black a, body.orange_black .content-link, body.orange_black .button-link, body.orange_black button {
    color: orange;
    background-color: black;
    border-color: orange;
}

body.white_black a, body.white_black .content-link, body.white_black .button-link, body.white_black button {
    color: white;
    background-color: black;
    border-color: white;
}

body.black_white a, body.black_white .content-link, body.black_white .button-link, body.black_white button {
    color: black;
    background-color: white;
    border-color: black;
}

/* Hover effects for all schemes */
a:hover, .content-link:hover, .button-link:hover, button:hover {
    color: currentColor;
    background-color: rgba(255, 255, 255, 0.2); /* Light overlay for contrast */
    border-color: currentColor;
}

/* Specific Overrides for Navigation Links */
#floating-header nav a {
    /* Use current color scheme for text, invert for background */
    color: currentColor;
    background-color: rgba(255, 255, 255, 0.1); /* Light overlay for contrast */
    border-color: currentColor;
}

#floating-header nav a:hover {
    color: currentColor;
    background-color: rgba(255, 255, 255, 0.3); /* More transparent on hover */
    border-color: currentColor;
}

/* Select Dropdown */
select {
    /* Use text color for border, ensure background contrast */
    color: currentColor;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid currentColor;
    padding: 5px;
    margin-left: 10px;
}

select:hover {
    opacity: 0.7;
}

/* Footer Styles */
footer#floating-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    z-index: 1000;
    /* Use current color scheme */
    background: rgba(0, 0, 0, 0.8); /* Semi-transparent for contrast */
    color: currentColor;
}

footer#floating-footer p {
    width: 90%;
    margin: 0 auto;
    word-wrap: break-word;
    white-space: normal;
    overflow-wrap: break-word;
}

/* File Upload Styles */
.file-upload {
    position: relative;
    display: inline-block;
}

.file-upload input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload .button-link {
    border-color: black; /* Only difference from global style */
}

.file-upload .button-link:hover {
    color: currentColor;
    background-color: rgba(255, 255, 255, 0.2);
    border-color: currentColor;
}

/* Form Styles */
.responsive-form table {
    width: 100%;
}

.responsive-form td {
    width: 100%;
    padding: 5px 0;
}

.responsive-form input[type="text"], 
.responsive-form textarea, 
.responsive-form select {
    width: 100%;
    max-width: 100%;
    /* Ensure text color contrasts with background across schemes */
    body.orange_black & { background-color: rgba(255, 165, 0, 0.1); color: orange; }
    body.white_black & { background-color: rgba(255, 255, 255, 0.1); color: white; }
    body.black_white & { background-color: rgba(0, 0, 0, 0.1); color: black; }
    box-sizing: border-box;
}

/* Images */
.image-sepia {
    filter: sepia(100%) hue-rotate(180deg) brightness(1.2);
    -webkit-filter: sepia(100%) hue-rotate(180deg) brightness(1.2);
    max-width: 100%;
    height: auto;
}

/* Post Styles */
.post {
    min-height: auto; /* Allows the height to adjust to content */
}

.post[data-content] p {
    opacity: 0.5;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    #floating-header h1 {
        font-size: 1.2em;
    }
    
    #floating-header nav a {
        margin-left: 10px;
    }
    
    #floating-header nav {
        padding-right: 10px;
    }

    #content {
        padding: 50px 0; /* Adjust padding for smaller screens */
    }
    
    .responsive-form td {
        padding: 3px 0;
    }
}

/* Latest Changes / Additions */

/* Content Links */
.content-link {
    display: inline; /* Override default block display for in-text links */
    padding: 0; /* Remove padding for in-text links */
    border-bottom: 2px solid currentColor; /* Use current color for underline */
    font-size: inherit; /* Reset font size to inherit from parent */
    vertical-align: middle;
    color: currentColor; /* Ensure text color matches scheme */
}

.content-link:hover {
    background-color: transparent; /* Don't change background for in-text links */
    border-bottom-color: rgba(255, 255, 255, 0.8); /* Lighten border on hover for visibility */
}
