body {
    background-color: #f5f5f5;
}

.mui-appbar {
    background-color: #2196F3;
}

#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1em;
}

.photo-container {
    background-color: white;
    position: relative;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-icon::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 20px;
    border-color: transparent transparent transparent white;
    margin-left: 5px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

#modal-video {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.photo-container img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background-color: #eee;
}

.photo-info {
    padding: 16px;
}

.photo-info .caption {
    margin: 0 0 0.25em;
}

.photo-info .author {
    margin: 0;
}

.upload-section {
    padding: 2em 0;
}

#upload-form-container {
    text-align: left;
}

.photo-preview .mui-panel {
    margin-bottom: 1em;
}

.photo-preview img {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    background-color: #eee;
}

.photo-preview .mui-textfield {
    padding: 0 16px 16px;
}

.video-preview-icon {
    font-size: 3em;
    text-align: center;
    padding: 20px;
}

/* Mobile styles */
@media (max-width: 600px) {
    #gallery {
        grid-template-columns: 1fr;
    }

    .photo-container img {
        height: auto; /* Adjust height for mobile */
        object-fit: cover;
    }
}

/* Fullscreen Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

#progress-bar {
    width: 100%;
    margin-top: 1em;
}

.htmx-indicator{
  opacity:0;
  transition: opacity 200ms ease-in;
}
.htmx-request .htmx-indicator{
  opacity:1
}
.htmx-request.htmx-indicator{
  opacity:1
}