/* --- Global Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: rgb(27, 27, 27);
    color: white; /* Added to keep text legible over black bg globally */
}

/* --- Lockscreen --- */
.lockscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgb(27, 27, 27);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#password {
    outline: none;
    height: 200px;
    width: 700px;
    border: 3px solid white;
    border-radius: 25px;
    font-size: 80px;
}

/* --- Header & Nav --- */
header {
    margin: 0 20px 20px 20px;
    padding-bottom: 15px;
    padding-top: 15px;
    border-bottom: 1px solid white;
    display: flex;
    align-items: center;
}

header h1 {
    flex: 1;
    color: white;
}

.navbar {
    display: flex;
    justify-content: flex-end;
    flex: 1;
}

.navbar a, 
.navbar div {
    display: inline-flex;
    margin: 0 16px;
    color: white;
    font-size: 30px;
    text-decoration: none;
}

input[type="text"] {
    background-color: #fff;
    height: 35px;
    width: 300px;
    outline: none;
    border: 1px solid black;
    border-radius: 10px;
}

/* --- File Input Area --- */
.input-div {
    text-align: center;
}

#upload_btn {
    border: 1px solid black;
    height: 35px;
    width: 150px;
    background-color: #fff;
    border-radius: 10px;
}

/* --- Main Gallery Container --- */
.container {
    position: relative;
    min-height: 100vh;
    background: rgb(27, 27, 27);
}

.image-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    padding: 10px;
}

.image-container .image,
.image-container .video {
    aspect-ratio: 1;
    width: 20%;
    overflow: hidden;
    cursor: pointer;
}

.image-container .image img,
.image-container .video video {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: 0.2s linear;
}

.image-container .image:hover img,
.image-container .video:hover video {
    transform: scale(1.1);
}

/* --- Popup Modal --- */
.popup-image {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: 100;
    display: none;
    background-color: rgba(1, 1, 1, 0.8);
}

.popup-image span {
    position: absolute;
    top: 110px;
    right: 25px;
    font-size: 60px;
    font-weight: bolder;
    color: white;
    cursor: pointer;
    z-index: 100;
}

.popup-image img,
.popup-image video { 
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 5px solid white;
    border-radius: 5px;
    height: 900px;
    object-fit: cover;
    display: none; 
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .popup-image img {
        width: 95%;
    }
}

/* --- Upload window --- */

.upload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9;
    display: none;

}

.upload {
    position:fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid white;
    background-color: rgb(27, 27, 27);
    height: 70vh;
    width: 100vh;
    z-index: 10;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 100px;
    gap: 20px;
}

#close_btn {
    position: absolute;
    top: 0%;
    left: 100%;
    transform: translate(-100%, 0%);
    border: none;
    color: white;
    background-color: rgb(27, 27, 27);
}

.preview {
    width: 50%;
    height: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tags-and-submit {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

#tags {
}

#imageToUpload {
}
