body {
  background-color: wheat;
  color: black;
  font-family: Verdana, sans-serif;
  margin: 0;
  padding: 0;
}

.page-container {
  padding-top: 20px;
  min-height: 100vh;
}

.centre {
  display: flex;
  justify-content: center;
  align-items: center;
}

.down {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pfp{
  height: 20%;
  width: 20%;
  border-radius: 100%;
}
@media only screen and (max-width:768px){
    .pfp{
        height: 30%;
        width: 30%;
        border-radius: 100%;
    }
}
.username {
  margin-top: 8px;
  font-size: 500%;
  font-weight: 600;
  color: #283C5D;
  text-align: center;
  font-family: 'Caveat', sans-serif;
  letter-spacing: 0.5px;
}

.dropdown {
  display: inline-block;
  position: relative;
  cursor: pointer;
  user-select: none;
  padding:30px;
}
.dropdown-label {
  padding: 10px;
  background: #f0f0f0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
}
.arrow {
  display: inline-block;
  transition: transform 0.2s;
  font-size: 16px;
}
.dropdown.open .arrow {
  transform: rotate(90deg);
}
.dropdown-content {
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  border-radius: 4px;
  min-width: 140px;
  padding: 10px;
  z-index: 99;
}
.dropdown.open .dropdown-content {
  display: block;
}
.dropdown-content a {
  display: block;
  padding: 8px 10px;
  color: #333;
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.2s;
}
.dropdown-content a:hover {
  background: #f1f1f1;
}


.image-container {
    border: 3px solid white;
    padding: 50px;
    width: 400px;
    max-width: 90%;
    color: white;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.image-container h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.image-display {
    border: 3px solid gold;
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
}

.image-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.image-link.active {
    opacity: 1;
}

.image-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}



.artwork-container {
    border: 3px solid white;
    padding: 50px;
    width: 400px;
    max-width: 90%;
    color: white;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.artwork-container h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.artwork-display {
    border: 3px solid gold;
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
}

.artwork-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.artwork-link.active {
    opacity: 1;
}

.artwork-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.flex-container {
  display: flex;
  flex-direction: column; /* Default: up to down */
}

@media only screen and (min-width: 768px) {
  .flex-container {
      display: flex;
    flex-direction: row; /* Left to right on larger devices */
  }
}






/* Basic body styling */

header h1 {
    text-align: center;
    color: #333;
}

/* The main container for all the gallery items */
#gallery-container {
    display: flex; /* This is the key to the layout! */
    flex-wrap: wrap; /* Allows items to wrap to the next line */
    justify-content: center; /* Centers the items on the line */
    gap: 20px; /* The space between the "invisible boxes" */
    padding: 20px;
}

/* This is the "invisible box" or card */
.gallery-item {
    background-color: #ffffff; /* White background for the card */
    border: 1px solid #ddd;
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Subtle shadow for depth */
    width: 250px; /* Define a fixed width for each item */
    height: auto;
    text-align: center;
    overflow: hidden; /* Ensures image corners are also rounded */
    cursor: pointer; /* Changes the mouse to a pointer on hover */
    transition: transform 0.2s ease-in-out; /* Smooth hover effect */
}

/* A subtle lift effect when you hover over an item */
.gallery-item:hover {
    transform: translateY(-5px);
}

/* The image inside the card */
.gallery-item img {
    max-width: 100%; /* Makes sure the image is never wider than its container */
    height: auto; /* Maintains the aspect ratio */
    display: block; /* Removes any extra space below the image */
}

/* The title text below the image */
.gallery-item .title {
    padding: 15px 10px;
    font-size: 1em;
    font-weight: bold;
    color: #444;
    display: block;
}

/* --- Full-Screen Popup Styles --- */

/* Overlay: Dims the background and covers the entire screen */
#popup-overlay {
    /* Critical positioning and layering */
    position: fixed; /* Stays in place even if the user scrolls */
    top: 0;
    left: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    
    /* Darken background */
    background-color: rgba(0, 0, 0, 0.8); /* Black with 80% opacity for darkening */
    
    /* Ensure it's above all other content and prevents interaction with background */
    z-index: 10000; /* Use a very high z-index to guarantee it's on top */
    
    /* Centering the content */
    display: flex; /* Use flexbox to center the child (popup-content) */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    
    /* Hidden by default, with fade-in transition */
    visibility: hidden; /* Hide element entirely when not active */
    opacity: 0; /* Start fully transparent */
    /* Add pointer-events: none when hidden to absolutely prevent interaction */
    pointer-events: none; 
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* Make overlay visible and trigger fade-in */
#popup-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto; /* Enable interaction when active */
}

/* Popup Content Container */
#popup-content {
    background-color: #fefefe;
    padding: 20px;
    border-radius: 8px;
    position: relative; /* For positioning the close button relative to this container */
    max-width: 90%; /* Limit content width */
    max-height: 90vh; /* Limit content height (90% of viewport height) */
    overflow-y: auto; /* Enable scrolling if content overflows */
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.4), 0 12px 40px 0 rgba(0,0,0,0.3); /* Stronger shadow */
    
    /* Flexbox for inner content (image and title) */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center inner items */

    /* Animation for pop-in effect */
    transform: scale(0.9); /* Start slightly smaller */
    transition: transform 0.3s ease-in-out; /* Smooth pop-in */
}

/* Trigger pop-in animation when active */
#popup-overlay.active #popup-content {
    transform: scale(1); /* Scale to original size */
}

/* Close Button (X) */
.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px; /* Slightly larger for better clickability */
    font-weight: bold;
    color: #666; /* Softer color than pure black */
    cursor: pointer;
    z-index: 10001; /* Ensure button is above popup content */
    background: none; /* Remove any default button background */
    border: none; /* Remove any default button border */
    line-height: 1; /* Ensures vertical alignment of 'x' */
    padding: 5px; /* Increase clickable area without changing visual size too much */
    display: block; /* Ensure it behaves like a block element for positioning */
}

.close-button:hover,
.close-button:focus {
    color: #000;
}

/* Inner content for image and title within the popup */
#popup-inner-content {
    /* Optional: Add some padding if content touches edges too much */
    padding-top: 10px; /* Give space below close button */
    display: flex; /* Make sure inner content also centers items */
    flex-direction: column;
    align-items: center;
    width: 100%; /* Take full width of parent */
}

/* Image within the popup */
#popup-inner-content img {
    max-width: 100%; /* Ensure image fits within popup */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Remove extra space below image */
    margin-bottom: 15px; /* Space between image and title */
    border-radius: 4px;
    object-fit: contain; /* Ensure the whole image is visible, not cropped */
    max-height: 70vh; /* Prevent very tall images from stretching the popup too much */
}

/* Title within the popup */
#popup-inner-content h2 {
    margin-top: 0;
    color: #333;
    text-align: center;
    word-break: break-word; /* Prevents long words from overflowing */
    padding: 0 10px; /* Add horizontal padding to title */
}















































