/* body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
} */

:root {
    --primary-color: #435fda;
    --secondary-color: #d8415c;
    --body-font-size: 16px;
    --line-height: 1.5;
    --content-width: 480px;
    /* --background-color: #fff; */
    --background-color-secondary: #f8f8f9;
    --text-color: #060914;
    --text-color--muted: #71737f;
    --line-color: #ededef;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #657bdb;
        --primary-color--translucent: rgba(85, 106, 195, 0.3);
        --secondary-color: #d93d59;
        --background-color: #060913;
        --background-color-secondary: #0f1424;
        --text-color: #e4e4e7;
        --text-color--muted: #838690;
        --line-color: #303341;
    }
}

html {
    font-size: 100%;
    background-color: var(--background-color);
    /* color: var(--text-color); */
}

body {
    font-family: "Geomanist", sans-serif;
    font-size: var(--body-font-size);
    line-height: var(--line-height);
    padding: .5em .5em 2em .5em;
    margin: 0;
}

.wrapper {
    max-width: var(--content-width);
    margin: calc(var(--line-height) * .5em) auto 0 auto;
}

.results {
    margin-top: .5em;
    text-align: center;
}

.results>div {
    margin-bottom: .5em;
}

@media (min-width: 440px) {
    :root {
        --body-font-size: 18px;
        --line-height: 1.5;
    }

    .results {
        display: flex;
        justify-content: space-between;
        column-gap: 1em;
    }

    .results>div {
        margin-bottom: 0;
    }
}

.choose-gender {
    display: flex;
    align-items: stretch;
    margin-bottom: 2em;
}

.segmented-control {
    flex: 1;
    text-align: center;
    line-height: 2em;
    border: 1px solid var(--line-color);
}

.segmented-control:first-child {
    border-radius: 0.5em 0 0 0.5em;
}

.segmented-control:last-child {
    border-radius: 0 0.5em 0.5em 0;
}

.results {
    color: var(--text-color--muted) !important;
}

.results span {
    font-weight: 500;
    color: var(--text-color--muted) !important;
}

/* The crazy stuff that needs to be here for the custom input styling */
input[type="range"] {
    -webkit-appearance: none;
    margin: 18px 0;
    width: 100%;
    transition: all 0.265ms ease-out;
}

input[type="range"]:not(:last-of-type) {
    margin-top: 0;
    margin-bottom: 2.5em;
}

input[type="range"]:focus {
    outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: var(--line-color);
}

input[type="range"]::-webkit-slider-thumb {
    box-shadow: 0 0 8px 1px var(--secondary-color),
        0 0 16px 4px var(--background-color);
    border: 3px solid #fff;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -8px;
}

input[type="range"]:focus::-webkit-slider-runnable-track {
    background: var(--secondary-color);
}

input[type="radio"] {
    -webkit-appearance: none;
    display: none;
}

.segmented-control input[type="radio"]+label {
    border: 1px solid rgba(0, 0, 0, 0);
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
    color: var(--text-color--muted);
}

.segmented-control input[type="radio"]:checked+label {
    background-color: var(--line-color);
    width: 100%;
    height: 100%;
    display: block;
    color: var(--text-color);
}

.segmented-control input[type="radio"]:focus+label {
    border: 1px solid var(--secondary-color);
}

.segmented-control:first-child input[type="radio"]:checked+label {
    border-radius: 0.5em 0 0 0.5em;
}

.segmented-control:last-child input[type="radio"]:checked+label {
    border-radius: 0 0.5em 0.5em 0;
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: var(--line-color);
}

input[type=range]::-moz-range-thumb {
    box-shadow: 0 0 8px 1px var(--secondary-color),
        0 0 16px 4px var(--background-color);
    border: 3px solid #fff;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -8px;
}

/* Container style to center the button */
.saveSettings {
    display: block;
    /* Makes the button a block element */
    width: 200px;
    /* Specifies a fixed width for the button */
    margin: 20px auto;
    /* Centers the button horizontally */
    padding: 10px 20px;
    /* Adds some padding inside the button */
    font-size: 16px;
    /* Sets the font size */
    color: white;
    /* Sets the text color to white */
    background-color: #007BFF;
    /* Sets a blue background color */
    border: none;
    /* Removes the border */
    border-radius: 5px;
    /* Rounds the corners of the button */
    cursor: pointer;
    /* Changes the mouse cursor to a pointer when hovering */
    transition: background-color 0.3s;
    /* Smooth transition for background color */
}

.saveSettings:hover {
    background-color: #0056b3;
    /* Darker blue on hover for better interaction feedback */
}



.resetSettings {
    display: block;
    width: 200px;
    margin: 20px auto;
    padding: 10px 20px;
    font-size: 16px;
    color: white;
    background-color: #dc3545;
    /* Typically red to indicate a reset or delete action */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.resetSettings:hover {
    background-color: #c82333;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    margin: auto;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    text-align: left;
}

.close-button {
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.helpButton {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.helpButton:hover {
    background-color: #0056b3;
}

@media screen and (max-width: 400px) {
    .light-mode .modal-content {
        background-color: #ffffff;
        /* Ensures a clean, light background */
        color: #333;
        /* Softer black for readability */
        width: 90%;
        /* Slightly wider for smaller screens */
        margin: 10% auto;
        /* Adds spacing at the top for better visibility */
        padding: 15px;
        /* Provides sufficient padding inside the modal */
        border-radius: 8px;
        /* Slightly rounded corners for a modern look */
        font-size: 14px;
        /* Optimized font size for readability on small screens */
        line-height: 1.6;
        /* Improves text readability */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        /* Subtle shadow for depth */
    }

    .dark-mode .modal-content {
        background-color: #333;
        /* Dark background for better contrast */
        color: #fff;
        /* White text for better visibility */
        width: 90%;
        /* Slightly wider for smaller screens */
        margin: 10% auto;
        /* Adds spacing at the top for better visibility */
        padding: 15px;
        /* Provides sufficient padding inside the modal */
        border-radius: 8px;
        /* Slightly rounded corners for a modern look */
        font-size: 14px;
        /* Optimized font size for readability on small screens */
        line-height: 1.6;
        /* Improves text readability */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        /* Subtle shadow for depth */
    }

    .close-button {
        font-size: 1.2rem;
        /* Scales the close button appropriately */
        margin-top: -10px;
        /* Aligns better within smaller modal content */
    }

    .dark-mode .close-button {
        color: #fff;
        font-size: 1.2rem;
        /* Scales the close button appropriately */
        margin-top: -10px;
        /* Aligns better within smaller modal content */
    }

    ul {
        padding-left: 20px;
        /* Ensures bullet lists are indented */
    }

    .dark-mode ul {
        padding-left: 20px;
        /* Ensures bullet lists are indented */
    }

    p,
    ul,
    li {
        margin-bottom: 10px;
        /* Adds spacing between paragraphs and lists */
    }

    .dark-mode p,
    .dark-mode ul,
    .dark-mode li {
        margin-bottom: 10px;
        /* Adds spacing between paragraphs and lists */
    }

    .helpButton {
        font-size: 14px;
        /* Smaller font size for smaller screens */
        padding: 8px 15px;
        /* Scales down padding */
    }

    .dark-mode .helpButton {
        font-size: 14px;
        /* Smaller font size for smaller screens */
        padding: 8px 15px;
        /* Scales down padding */
    }
}