
header {
    background: #454eea;
    color: #fff;
    padding: 18px 10px;
    margin-bottom: 20px;
    text-anchor: middle;
    position: relative;
    display: flex;
}
header h1 {
    margin: 0;
    display: inline-block;
    font-size: 3em;
    color: #ffd600;
    font-weight: 600;

    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    pointer-events: none;
}
header .user-info {
    position: absolute;
    top: 50%;
    right: 20px;
    /*text-align: left;*/
    transform: translate(0, -50%);
    display: inline-block;
    font-size: 1em;
    margin-left: auto;

}
header a {
    color: #ffd600;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
}

header a:hover {
    text-decoration: underline;
}

header .logo {
    margin-right: auto;
}

#control_bar {
    /*background-color: #2d3648;*/
    display: block;
    text-align: center;
    /*height: 100px;*/
    border-radius: unset;
}

.controls {
    background: #fff;
    padding: 18px 22px;
    margin-bottom: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(69,78,234,0.07);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}
.controls select,
.controls input,
.controls button {
    padding: 10px;
    margin-right: 10px;
    font-size: 15px;
    border-radius: 5px;
    border: 1px solid #e1e6ef;
    background: #fcfcfc;
    font-family: inherit;
}
.controls button,
.controls input[type="submit"],
.controls input[type="checkbox"],
.controls input[type="reset"]{
    cursor: pointer;
    background: #454eea;
    color: #fff;
    border: none;
}
.controls button:hover,
.controls input[type="submit"]:hover,
.controls input[type="reset"]:hover {
    background: #3820a7;
}



.main-photo {
    background: #fff;
    padding: 24px 0;
    margin-bottom: 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(69,78,234,0.04);
}
.preview img {
    max-width: 120px;
    border: 2.5px solid #ebedf2;
    border-radius: 7px;
    background: #f5f7fb;
    box-shadow: 0 0 10px #888;
    /*margin-bottom: 50%;*/
}
.preview {
    display: inline-block;
    max-width: 120px;
}

.slide_advance {
    position: absolute;
    top: 50%;
    background-color: rgba(0, 0, 0, .2);
    cursor: pointer;
    color: #ffd600;
    padding: 10px;
    margin: auto;
    border: 2.5px solid transparent;
}

.slide_advance input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    /*color: #ffd600;*/
    /*color: transparent;*/
    border: 2px solid #ffd600;
    border-radius: 2px;
    margin: 0;
    margin-left: 4px;
    transform: translate(0, 5px);
}
.slide_advance input[type="checkbox"]:hover {
    /*background-color: rgba(0, 0, 0, .4);*/
    /*border-width: 4px;*/
    border-radius: 3px;
    background-color: rgba(0, 0, 0, .6);
}

.slide_advance input[type="checkbox"]:checked::before {
    position: absolute;
    content: "✓";
    /*text-align: right;*/
    /*text-anchor: middle;*/
    color: #ffd600;
    transform: translate(2px, 0);
    background-color: unset;
    /*background-color: rgba(0, 0, 0, .6);*/
}



.slide_advance:hover {
    background-color: rgba(0, 0, 0, .6);
    transition-duration: 0.6s;
    border-color: #ffd600;
    border-radius: 4px;
}

#photo-display {
    display: inline-block;
    position: relative;
    margin: auto;
}

#photo-display img{
    /*max-width: 100%;*/
    background: #f5f7fb;
    max-width: 50vw;
    max-height: 460px;
    min-height: 200px;
    animation: grow;
    animation-delay: 0;
    animation-duration: 1s;
    animation-timing-function: ease-out;
}


#image_description {
    padding: 10px;
    max-width: 400px;
    margin: auto;
}

@keyframes grow {
    from {
        opacity: 0;
        min-height: 100px;
        max-height: 100px;
    }
    to {
        /*max-height: 460px;*/
    }
}

#photo_box {
    position: relative;
    border: 2.5px solid #ebedf2;
    border-radius: 7px;
    box-shadow: 0 0 10px #888;
    margin-inline: 10px;
}
.main-photo p {
    margin-top: 16px;
    font-style: italic;
    color: #888;
    font-size: 1.01em;
}

.thumbnail-section {
    background: #fff;
    padding: 24px 10px;
    border-radius: 8px;

}
.thumbnail-section h2 {
    margin-top: 0;
    margin-bottom: 18px;
    color: #454eea;
}
.thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    /*padding-left: 20px;*/
    max-height: 440px;
    overflow: scroll;
}
.thumbnail {
    max-width: 178px;
    /*max-width: min-content;*/
    height: 132px;
    cursor: pointer;
    margin-inline: auto;
    transition: border 0.2s;
    display: inline-flex;
    background: #eceffb;
    border: 3px solid transparent;
    border-radius: 5px;
    object-fit: cover;
    flex-direction: row;
    flex: 0 1 min-content;
}

.thumbnail:hover {
    border-color: #ffd600;
    z-index: 1000;
    /*max-width: unset;*/

    transition-delay: 150ms; /* small delay to prevent jiggle on mouse drag */
    transition-duration: 1000ms;
    transition-property: max-width, margin-right, transform, flex;
    transition-timing-function: ease-in-out;
    flex: 1 0 max-content;
}
.thumbnail.active {
    border-color: #2196F3;
}
.no-photos {
    color: #999;
    font-style: italic;
    padding: 28px 0;
    text-align: center;
}



@media (max-width: 600px) {
    .main-photo img,
    .thumbnail {
        max-width: 96vw;
        height: 90px;
    }
    .controls { flex-direction: column; gap: 10px; }
}
