:root {
    /* Existing color and font variables */
    --primary-color: #430A5C;
    --secondary-color: #9116C8;
    --tertiary-color: #f1f1f1;
    --font-family: 'Open Sans', sans-serif;
    --text-color: white;
    --menu-bg-color: #f9f9f9;
    --menu-text-color: black;
    --menu-hover-bg-color:#a95ace;
    --footer-text-color: #aaa;
    --test-color: #d18329;
    --warning-color: red;
}

body {
    font-family: var(--font-family);
    font-size: 20px;
    color: var(--text-color);
    background: linear-gradient(45deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.top-element {
    flex: 0 0 20%;
    display: flex;
    align-items: center; 
    justify-content: center; 
}

.top-content {
    padding: 10px;
    text-align: center; 
    display: flex;
    flex-direction: column;
    align-items: center; 
}



.bottom-element {
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 10px;
  overflow-y: auto;
}

.bottom-content {
    padding: 10px; /* Add padding as needed */
    flex-direction: column;
    display: flex;
    flex-grow: 1;
    align-items: center; /* Center horizontally */
    justify-content: center; /* Center vertically */
}



.title {
  font-size: 30px;
  font-weight: bold;
}


.logo-and-signin {
    text-align: center;
}

.signin-button {
    margin-top: 20px;
}

.signin-button a {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.signin-button a:hover {
    background-color: var(--secondary-color);
}
.top-right-logo {
    position: absolute;
    top: 10px; /* Adjust as needed */
    right: 10px; /* Adjust as needed */
}


.login-page .responsive-logo {
    width: 30%; /* Or whatever your original size was */
    height: auto;
}


.center-logo {
    width: 100px; /* Adjust the pixel value as needed */
    height: auto;
}

.responsive-logo {
    width: 50px; /* Adjust the pixel value as needed */
    height: auto;
}

.top-left-logo {
    position: absolute;
    top: 10px;
    left: 10px;
}

.user-menu {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 20;
}

.menu-button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 6px 12px 6px 7px;
    color: var(--text-color);
    background: rgba(67, 10, 92, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(25, 4, 35, 0.22);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.menu-button:hover,
.menu-button[aria-expanded="true"] {
    background: rgba(87, 17, 116, 0.96);
    border-color: rgba(255, 255, 255, 0.55);
}

.menu-button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.95);
    outline-offset: 3px;
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    color: var(--primary-color);
    background: white;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.user-name {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-chevron {
    font-size: 14px;
    transition: transform 160ms ease;
}

.menu-button[aria-expanded="true"] .menu-chevron {
    transform: rotate(180deg);
}

.menu-content {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 210px;
    box-sizing: border-box;
    overflow: hidden;
    color: var(--menu-text-color);
    background: var(--menu-bg-color);
    border: 1px solid rgba(67, 10, 92, 0.14);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(25, 4, 35, 0.28);
}

.menu-content[hidden] {
    display: none;
}

.menu-user-name {
    display: none;
    padding: 13px 16px 10px;
    color: #615568;
    border-bottom: 1px solid #e8e2eb;
    font-size: 13px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.menu-content a {
    color: var(--menu-text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 15px;
    font-weight: 600;
}

.menu-content a:hover,
.menu-content a:focus-visible {
    color: var(--primary-color);
    background-color: var(--tertiary-color);
    outline: none;
}

.menu-content .sign-out-link {
    color: #8a2030;
    border-top: 1px solid #e8e2eb;
}

.menu-content .sign-out-link:hover,
.menu-content .sign-out-link:focus-visible {
    color: #741827;
    background: #fff1f3;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

footer {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 0.8em; /* Smaller text */
    color: var(--footer-text-color);
}

.centered-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}


.api-grid {
    display: grid;
    gap: 10px; /* Adjust the gap between items as necessary */
    justify-content: center;
    align-items: center;
    max-width: calc(100% - 20px); /* Ensures some padding on the sides */
    padding: 10px;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Default layout */
}


.api-grid button {
    width: 100px; /* Sets the width of the button */
    height: 100px; /* Sets the height of the button, making it square */
    padding: 10px; /* Add padding to create space inside the button */
    margin: 5px; /* Adds some space around the buttons */
    overflow: hidden; /* Hides any overflow that doesn't fit in the button */
    display: flex; /* Enables the use of flexbox for centering */
    justify-content: center; /* Centers content horizontally and vertically */
    align-items: center; /* Centers content vertically */
    text-align: center; /* Ensures the text is centered if it wraps */
    border: 1px solid transparent; /* Defines a border; make transparent or set color */
    background-color: var(--primary-color); /* Uses your primary color variable */
    color: var(--text-color); /* Uses your text color variable */
    cursor: pointer; /* Changes cursor to pointer to indicate button */
    transition: background-color 0.3s; /* Smooth transition for background color */
    position: relative; /* Needed for absolute positioning of the pseudo-element */
    border-radius: 5px;
    font-weight: bold;
}

.api-grid button:hover {
    background-color: var(--secondary-color); /* Changes background on hover */
}


.upload-zone {
  border: 2px dashed var(--primary-color);
  border-radius: 5px;
  padding: 20px;
  text-align: center;
  margin-top: 20px;
  cursor: pointer;
}
.upload-label {
  display: block;
  padding: 20px;
  background-color: var(--tertiary-color);
  color: var(--primary-color);
}

.floating-window {
    position: fixed; /* Fixed position */
    right: 20px;     /* 20px from the right */
    top: 25%;        /* 25% from the top */
    width: 300px;    /* Width of the window */
    height: 50vh; /* Max height is 50% of the viewport height */
    font-size: 15px;
    color: var(--primary-color);
    background-color: var(--tertiary-color);
    border: 1px solid var(--primary-color);
    box-shadow: 0px 0px 10px var(--footer-text-color);
    padding: 15px;
    z-index: 1000;   /* Ensures it floats above other content */
    overflow-y: auto; /* Enables vertical scrolling */
    opacity: 0; 
    visibility: hidden;
    transition: opacity 1s, visibility 1s; 
}

.warning {
  color: var(--warning-color);
}

.trashcan-button {
    position: sticky;
    top: 5px; /* Adjust as needed */
    right: 5px; /* Adjust as needed */
    margin-left: auto;
    background-color: var(--menu-hover-bg-color);
    border: none;
    cursor: pointer;
    font-size: 16px; /* Adjust the size of the emoji/icon */
    border-radius: 50%;
    width: 30px; /* Adjust as needed */
    height: 30px; /* Adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Optional: Style for hover effect */
.trashcan-button:hover {
    background-color: var(--secondary-color);
}



.loader {
    border: 5px solid var(--secondary-color);
    border-top: 5px solid var(--tertiary-color);
    border-radius: 80%;
    width: 20px;
    height: 20px;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(720deg); }
}

@media screen and (max-width: 768px) {
    body {
      font-size: 18px; /* Increase base font size */
    }

  .login-page .responsive-logo,
  .other-page .responsive-logo {
      width: 40%; /* Increase logo size */
  }

  .menu-button {
      padding: 6px 9px 6px 7px;
  }

  .user-name {
      display: none;
  }

  .menu-user-name {
      display: block;
  }

  .menu-content {
      min-width: min(240px, calc(100vw - 32px));
  }

  .menu-content a {
      padding: 14px 16px;
  }
    /* Smaller base font size for better readability */
    body {
        font-size: 16px;
    }

    /* Adjust heading sizes */
    h1, h2 {
        font-size: 1.5em;
    }

    /* Padding to avoid edge-to-edge content */
    .centered-page {
        padding: 10px;
    }

    /* Adjust spacing for elements */
    .signin-button, .user-menu {
        margin-top: 15px;
    }

    /* Smaller text and adjusted positioning for the footer */
    footer {
        font-size: 0.7em;
        right: 5px;
        bottom: 5px;
    }

      .api-grid {
          grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
      }

  .api-grid div button {
      font-size: clamp(12px, 5vw, 24px); /* Adjust font size for smaller screens */
  }
  
}
