:root {
    --box-width: 8.5rem; /* Global variable for box width */
}


body{
    font-family: 'Arial Black', Gadget, sans-serif;
    background-color: rgb(208, 199, 199);
}

h1 {
    font-family: Snell Roundhand, cursive;
    font-size: 60px;
}

#title {
    display: inline; /* or inline-block */
}

#title span {
    display: inline;
    vertical-align: baseline; /* Ensures alignment with parent text */
}

h1#title span {
    display: inline !important;
}

#landing-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Ensure the section fits within the viewport */
    overflow: hidden; /* Prevent content overflow */
    padding: 0 20px; /* Add padding to prevent content from touching edges */
}

#intro {
    max-width: 80%; /* Reduce the width of the h1 to fit within boundaries */
    padding: 10px 15px; /* Adjust padding for better fit */
    box-sizing: border-box; /* Ensure padding is included in the element's size */
    z-index: 1; /* Ensure it appears above background images */
    position: relative;
    text-align: center;
    margin: 0;
}

#title {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    margin-bottom: 20px; /* Add spacing below the title */
}

#face-image {
    float: left; /* Position #face-image to the left */
    position: static;
    margin-right: 40px; /* Add spacing between #face-image and #game_area */
    margin-left: 15vw;
    margin-top: 40px;
    display: flex;
    justify-content: flex-end; /* Align content (image) to the right */
    align-items: center; /* Vertically center the content */
    width: 364px; /* Fixed width */
    height: 515px; /* Fixed height */
}

#game_area {
    display: flex;
    flex-direction: column; /* Stack content vertically */
    align-items: flex-start; /* Align content to the left */
    margin-top: 20px;
    gap: 40px;
}

#guess {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
}

#input-area {
    display: flex;
    gap: 10px;
    align-items: center;

}

#input-boxes {
    display: flex;
    flex-direction: column;
    align-items: left;
    margin-left: 5px;
    min-width: 2.5 * var(--box-width);
    flex: 1;
}

.result-box {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 10px;
    width: 100%;
    max-width: 600px;
}

.hint-box {
    display: flex;
    align-items: center; /* Vertically center the text */
    justify-content: center; /* Horizontally center the text */
    flex: 1;
    text-align: center;
    border: 2px solid black;
    background-color: rgba(255, 255, 255, 0.667); /* Default background */
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    padding: 5px;
    margin: 0 5px;
    box-sizing: border-box;
    min-width: var(--box-width); /* Use global variable for width */
    max-width: var(--box-width); /* Use global variable for width */
    min-height: 4.5rem;
    color: white; /* Ensure hint text is white */
}

.hint-box.inactive {
    opacity: 0.3;
    background-color: rgba(200, 200, 200, 0.3);
}

.hint-box.active {
    /* border-color: #0066cc; */
    border-width: 3px;
}

.legend-cat{
    display: flex;
    align-items: center; /* Vertically center the text */
    justify-content: center; /* Horizontally center the text */
    font-size: 1rem;
    flex: 1;
    text-align: center;
    border: 2px solid black;
    background-color: rgba(255, 255, 255, 0.667);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    padding: 5px;
    margin: 0 5px;
    box-sizing: border-box;
    min-width: var(--box-width); /* Use global variable for width */
    max-width: var(--box-width); /* Use global variable for width */
    min-height: 2rem;
}

input {
    font-size: 1.2rem;
    width: 356px; /* This sets the minimum width of the input box */
    align-items: center;
    direction: ltr;
    text-align: center;
    background-color: white;
    border: 2px solid #0A3161;
    border-radius: 5px;
    font-family: 'Arial Black', Gadget, sans-serif;
    padding: 10px;
    box-sizing: border-box;
}

input:disabled {
    background-color: #d3d3d3;
    color: #808080;
    cursor: not-allowed;
    opacity: 0.6;
}

#legend {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    width: 100%;
    max-width: 600px;
}

#reset {
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgb(255, 255, 255);
    background-color: white;
    border: 2px solid #0A3161;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Arial Black', Gadget, sans-serif;
    font-size: 1.2rem;
    white-space: nowrap;
    width: 355px;
    padding: 10px;
    box-sizing: border-box;
    height: auto;
}

#reset:hover {
    cursor: pointer;
    text-decoration: underline;
    background-color: #b6b6b6;
}

#sitter-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#sitter-popup-content {
    position: relative;
    background-color:  rgb(208, 199, 199);
    padding: 20px;
    border-radius: 10px;
    width: 80vw; /* Fixed width */
    height: 80vh; /* Fixed height */
    display: flex;
    flex-direction: row; /* Ensure image stays on the left side */
    overflow: hidden;
    justify-content: space-between; /* Add spacing between elements */
    align-items: center; /* Vertically align elements */
    gap: 20px; /* Add spacing between child elements */
}

#sitter-popup-content > div {
    flex: 1; /* Ensure equal space for all child elements */
}

#sitter-popup-content img {
    width: 70%; /* Ensure the image takes up the desired width */
    height: auto; /* Maintain aspect ratio */
    object-fit: contain;
    border-radius: 10px;
    /* Center the image in the parent div */
    display: block;
    margin: 0 auto;
}

#sitter-popup-content img {
    width: 70%; /* Ensure the image takes up the desired width */
    height: auto; /* Maintain aspect ratio */
    object-fit: contain;
    border-radius: 10px;
    /* Center the image in the parent div */
    display: block;
    margin: 0 auto;
}


#sitter-popup.hidden {
    display: none;
}

#close-popup {
    margin-top: 10px;
    padding: 5px 10px;
    border: none;
    background-color: #B31942;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

#close-popup:hover {
    background-color: #900d36;
}

#portrait-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 20px;

    border-radius: 10px;
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */
}

#portrait-gallery h2 {
    width: 100%;
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2px;
}
#portrait-gallery h3 {
    width: 100%;
    text-align: center;
    font-size: 1rem;
    margin-bottom: 20px;
    opacity: 0.4;
}

.gallery-image {
    margin: 10px;
    border-radius: 5px;
    width: 100px;
    height: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

#tooltip {
    position: fixed;
    background-color: #0A3161;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1002; /* Higher z-index to ensure it appears above other elements */
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transform: translate(0, -100%); /* Position above the cursor by default */
}

#sitter-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}



#sitter-popup-content > div {
    flex: 1; /* Ensure equal space for all child elements */
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    z-index: 1001;
}

.close-btn:hover {
    color: #000;
}

.hidden {
    display: none !important;
}

.page {
    position: relative; /* Ensure relative positioning for pseudo-elements */
    height: 100vh;
    max-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow: auto;
    box-sizing: border-box;
}

.page::after {
    content: "";
    position: absolute;
    bottom: 10px; /* 10px above the end of the section */
    left: 5%; /* Leave space on the sides */
    right: 5%; /* Leave space on the sides */
    height: 2px; /* Thin line */
    background-color: black; /* Line color */
}

/* Ensure the first page section centers its content */
.page:first-child {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0; /* Remove padding to maximize space */
}

#landing-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Send behind the intro text */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.landing-image {
    position: absolute;
    width: 300px; /* Large size for the images */
    height: auto;
    opacity: 1;
    transition: opacity 5s ease-out; /* Slow fade-out effect */
}




.isolated-face-img {
    display: left;
    margin-right: auto;
    margin-left: 0;
}

.scroll-arrow {
    width: 100%;
    text-align: center;
    font-size: 2rem;
    color: #0A3161;
    cursor: pointer;
}

.scroll-arrow:hover {
    color: #B31942;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}
