body {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    background-color: rgb(30, 30, 50);
    color: white;
    text-align: center;
}

button {
    border-radius: 8px;
    padding: 10px 24px;
    background-color: rgb(42, 42, 160);
    color: white;
    border: none;
    font-size: large;
    cursor: pointer;
}

div {
    width: fit-content;
    margin: auto;
    border-radius: 8px;
    padding: 10px 24px;
}

input {
    border-radius: 8px;
    padding: 5px 15px;
    background-color: rgb(20, 20, 40);
    color: white;
    font-size: large;
    border: none;
}

#loader {
    padding: 0 !important;
    border: 16px solid #f3f3f3; /* Light grey */
    border-top: 16px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    -webkit-animation: spin 2s linear infinite; /* Safari */
}

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

/* Safari */
@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

#uploadOverlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

#photo-view-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    overflow: auto;
}

#uploadBox {
    background: rgb(50, 50, 100);
    padding: 20px;
    border-radius: 10px;
    max-width: 400px;
    margin: 100px auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#view-box {
    background: rgb(50, 50, 100);
    padding: 20px;
    border-radius: 10px;
    max-width: 90vw;
    margin: 20px auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#photo-album {
    width: 90vw;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 4px;
    background-color: rgb(50, 50, 100);
}

#photo-album img {
    display: block;
    width: 100px;
    height: 100px;
    object-fit: cover;
    object-position: center;
    box-sizing: border-box;
    border-radius: 15px;
}

#photo-view-img {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain; /* scale image to fit inside without cropping */
    display: block;
}