@font-face {
    font-family: 'Barlow';
    font-style: normal;
    font-display: swap;
    src: url(fonts/Barlow-Regular.woff2) format('woff2');
}

@font-face {
    font-family: 'BBH Sans Bogle';
    font-style: normal;
    font-display: swap;
    src: url(fonts/BBHSansBogle-Regular.woff2) format('woff2');
}

:root {
    --hover-color: rgb(27, 27, 27);
    --scrollbar-color: rgb(65, 65, 65);
    --accent-color: #d39800;
    --main-font: "BBH Sans Bogle", sans-serif;
    --second-font: "Barlow", sans-serif;
}

::selection {
    background-color: var(--accent-color);
    color: white;
}

html,
body {
    margin: 0;
    padding: 0;
}

html.no-scroll {
    overflow: hidden;
}

body {
    font-family: var(--main-font);
    background-color: black;
    color: white;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

header {
    display: flex;
    justify-content: center;
    font-size: 40px;
    padding: 40px 5px 0 5px;
    -webkit-animation: slide-in-top 0.8s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
    animation: slide-in-top 0.8s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

.image-container {
    display: flex;
    justify-content: center;
    overflow: hidden;
    position: relative;
    -webkit-animation: swing-in-top-fwd 1s cubic-bezier(0.175, 0.885, 0.320, 1.275) both 0.5s;
    animation: swing-in-top-fwd 1s cubic-bezier(0.175, 0.885, 0.320, 1.275) both 0.5s;
}

.image-title {
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 23px;
    display: flex;
    justify-content: center;
    -webkit-animation: fade-in 1.2s cubic-bezier(0.390, 0.575, 0.565, 1.000) both 0.8s;
    animation: fade-in 1.2s cubic-bezier(0.390, 0.575, 0.565, 1.000) both 0.8s;
}

.image-container img {
    height: 550px;
    max-width: 90%;
    object-fit: cover;
    object-position: center;
    border-radius: 7px;
    filter: blur(20px);
    transition: filter 0.5s ease;
    user-select: none;
}

.image-container img.visible {
    filter: blur(0px);
}

#viewButton {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: 0.5s opacity;
    opacity: 1;
}

#viewButton.hidden {
    opacity: 0;
}

#viewButton button {
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.463);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    transition: 0.3s;
    user-select: none;
}

#viewButton button:hover {
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.677);
}

.control {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    -webkit-animation: fade-in 1.2s cubic-bezier(0.390, 0.575, 0.565, 1.000) both 0.8s;
    animation: fade-in 1.2s cubic-bezier(0.390, 0.575, 0.565, 1.000) both 0.8s;
}

.control button {
    padding: 11px 16px;
    border: 2px solid white;
    font-size: 18px;
    border-radius: 25px;
    background-color: black;
    color: white;
    transition: 0.3s;
}

.control button:hover {
    cursor: pointer;
    background-color: var(--hover-color);
}

#imageName {
    font-family: sans-serif;
    padding-left: 5px;
    max-width: 55%;
    overflow-y: hidden;
    overflow-x: scroll;
    white-space: nowrap;
}

#imageName::-webkit-scrollbar {
    height: 4px;
    background-color: var(--scrollbar-color);
}

/* Upload-Formular zentrieren */
.upload-form {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 10px;
    gap: 15px;
    font-family: sans-serif;
    -webkit-animation: slide-in-bottom 1s cubic-bezier(0.250, 0.460, 0.450, 0.940) both 1s;
    animation: slide-in-bottom 1s cubic-bezier(0.250, 0.460, 0.450, 0.940) both 1s;
}

/* Label als Button */
.custom-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--accent-color);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.custom-upload:hover {
    background-color: var(--accent-color);
    transform: scale(1.05);
}

/* Das eigentliche File-Input unsichtbar machen */
#fileUpload {
    display: none;
}

.current-size {
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px 10px;
    letter-spacing: 1.5px;
    font-size: 18px;
    -webkit-animation: slide-in-top 0.8s cubic-bezier(0.250, 0.460, 0.450, 0.940) both 0.1s;
    animation: slide-in-top 0.8s cubic-bezier(0.250, 0.460, 0.450, 0.940) both 0.1s;
}

.login-container {
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px 10px;
    z-index: 2;
    -webkit-animation: slide-in-top 0.8s cubic-bezier(0.250, 0.460, 0.450, 0.940) both 0.1s;
    animation: slide-in-top 0.8s cubic-bezier(0.250, 0.460, 0.450, 0.940) both 0.1s;
}

.login-container button {
    color: rgb(0, 133, 228);
    padding: 0px 5px;
    background-color: black;
    border: none;
    border-radius: 6px;
    transition: background-color 0.4s ease;
    font-size: 18px;
}

.login-container button:hover {
    cursor: pointer;
    text-decoration: underline;
}

.comment-wrapper {
    overflow: hidden;
    width: fit-content;
    height: 300px;
    border-radius: 7px 7px 0 0;
}

.comments-container {
    width: 50vw;
    height: 300px;
    background-color: rgb(29, 29, 29);
    overflow: hidden;
    align-self: center;
    padding: 8px 15px;
    border-radius: 7px 7px 0 0;
    display: flex;
    align-items: center;
}

.comment-scroll {
    width: 100%;
    height: 290px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: scroll;
}

.comment-scroll::-webkit-scrollbar {
    display: none;
}

.comment {
    border-radius: 7px;
    width: 90%;
    padding: 10px;
    min-height: 30px;
    display: flex;
    align-items: center;
    position: relative;
    background-color: rgb(215, 136, 18);
    font-family: var(--second-font);
    font-weight: 600;
}

.comment::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: -9px;
    width: 0;
    height: 0;
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-top: 17px solid rgb(215, 136, 18);
    transform: rotate(42deg);
}


.comment-over {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    -webkit-animation: fade-in 1.2s cubic-bezier(0.390, 0.575, 0.565, 1.000) both 0.8s;
    animation: fade-in 1.2s cubic-bezier(0.390, 0.575, 0.565, 1.000) both 0.8s;
}

.comment-input {
    width: calc(50vw + 30px);
    display: flex;
    justify-content: center;
    margin-top: -1px;
}

.comment-input input {
    width: 100%;
    border: none;
    border-top: 1px solid rgb(74, 74, 74);
    outline: none;
    padding: 10px 14px;
    background-color: rgb(29, 29, 29);
    color: white;
    font-size: 18px;
    border-radius: 0 0 0 7px;
}

.comment-input button {
    background-color: rgb(29, 29, 29);
    border: none;
    border-top: 1px solid rgb(74, 74, 74);
    color: var(--accent-color);
    font-size: 22px;
    border-bottom-right-radius: 7px;
    transition: 0.3s;
}

.comment-input button:hover {
    cursor: pointer;
    color: color-mix(in srgb, var(--accent-color) 60%, white);
}

.no-comment,
.no-image {
    font-style: italic;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: sans-serif;
    text-align: center;
}

.no-image {
    margin-top: 10%;
    margin-bottom: 15px;
}

.image-action {
    margin: 10px 0;
    display: flex;
    justify-content: center;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    -webkit-animation: fade-in 1.2s cubic-bezier(0.390, 0.575, 0.565, 1.000) both 0.8s;
    animation: fade-in 1.2s cubic-bezier(0.390, 0.575, 0.565, 1.000) both 0.8s;
}

.image-action button {
    background-color: transparent;
    color: rgb(71, 139, 192);
    font-size: 17px;
    border: none;
    transition: 0.3s;
}

.image-action button:hover {
    cursor: pointer;
    color: rgb(59, 118, 164);
}

.overlay {
    background-color: rgba(0, 0, 0, 0.807);
    position: fixed;
    width: 100vw;
    height: 100vh;
    display: none;
    justify-content: center;
    align-items: center;
    -webkit-animation: fade-in 0.7s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
    animation: fade-in 0.7s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
    z-index: 999;
}

.popup {
    background: linear-gradient(135deg, #212121 0%, #3c3c3c 100%);
    padding: 20px 30px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 50vw;
    position: relative;
    -webkit-animation: flip-in-hor-bottom 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both 0.1s;
    animation: flip-in-hor-bottom 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both 0.1s;
}

.popup label {
    margin-bottom: -8px;
    font-size: 16px;
    color: #dfdfdf;
    font-weight: normal;
    cursor: pointer;
    font-family: var(--second-font);
}

.popup input,
.input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #cdd5df;
    outline: none;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    color: #333;
    background-color: #ffffff;
    transition: border-color 0.3s, box-shadow 0.3s;
    transition: 0.3s;
}

.popup input:focus,
.input:focus {
    background-color: #ffffff;
}

.popup form{
    margin-bottom: 0;
}

.popup-button-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.popup-inputs-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.popup-title {
    font-size: 30px;
    display: flex;
    justify-content: center;
    letter-spacing: 1px;
}

.button {
    background-color: transparent;
    color: white;
    padding: 14px 30px;
    border: 1px solid rgb(196, 196, 196);
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.1s, box-shadow 0.3s;
    letter-spacing: 0.5px;
    flex: 1;
}

.button:hover {
    background-color: #4e4e4e;
    box-shadow: 0 8px 20px rgba(170, 170, 170, 0.3);
}

.button:active {
    transform: translateY(1px);
    box-shadow: 0 4px 10px rgba(170, 170, 170, 0.3);
}

.close-x {
    position: absolute;
    right: 15px;
    top: 7px;
    font-size: 19px;
    transition: 0.3s;
    padding: 3px;
    border-radius: 20px;
    z-index: 6;
}

.close-x:hover {
    cursor: pointer;
    background-color: rgba(188, 18, 2, 0.901);
}

.preview {
    display: flex;
    justify-content: center;
}

.preview img {
    max-width: 90%;
    max-height: 230px;
    object-fit: cover;
    object-position: center;
    border-radius: 7px;
}

.image-fullscreen {
    display: flex;
    justify-content: center;
    position: relative;
    -webkit-animation: swing-in-top-fwd 0.5s cubic-bezier(0.175, 0.885, 0.320, 1.275) both 0.2s;
    animation: swing-in-top-fwd 0.5s cubic-bezier(0.175, 0.885, 0.320, 1.275) both 0.2s;
}

/* Image Loader */
.image-loader-container {
    position: absolute;
    z-index: 6;
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.829);
    -webkit-animation: fade-in 0.8s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
    animation: fade-in 0.8s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
    z-index: 99999;
}

.image-loader {
    width: 45px;
    aspect-ratio: 1;
    --c: no-repeat linear-gradient(rgb(255, 255, 255) 0 0);
    background:
        var(--c) 0% 50%,
        var(--c) 50% 50%,
        var(--c) 100% 50%;
    background-size: 20% 100%;
    animation: image-loader-animation 1s infinite linear;
}

@keyframes image-loader-animation {
    0% {
        background-size: 20% 100%, 20% 100%, 20% 100%
    }

    33% {
        background-size: 20% 10%, 20% 100%, 20% 100%
    }

    50% {
        background-size: 20% 100%, 20% 10%, 20% 100%
    }

    66% {
        background-size: 20% 100%, 20% 100%, 20% 10%
    }

    100% {
        background-size: 20% 100%, 20% 100%, 20% 100%
    }
}

#imageUploadLoader {
    display: none;
    top: 0;
    left: 0;
}

.image-fullscreen img {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 8px;
    user-select: none;
    align-self: center;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease, width 0.5s ease, height 0.5s ease;
}

.fullscreen-second-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.bild-kommentar-container {
    display: none;
    justify-content: center;
    position: absolute;
    bottom: 0;
    width: 0;
    overflow: hidden;
    -webkit-animation: slide-in-bottom 1s cubic-bezier(0.250, 0.460, 0.450, 0.940) both 0.3s;
    animation: slide-in-bottom 1s cubic-bezier(0.250, 0.460, 0.450, 0.940) both 0.3s;
}

.bild-kommentar {
    background-color: rgba(0, 0, 0, 0.795);
    padding: 5px 7px;
    width: 100%;
    text-align: center;
    font-size: 15px;
    font-family: var(--second-font);
    padding: 8px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.rotate-container {
    position: absolute;
    display: none;
    padding: 10px;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.588);
    color: white;
    font-size: 17px;
    bottom: 5px;
    left: 7px;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.284);
    transition: 0.4s;
    z-index: 6;
}

.rotate-container:hover {
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.841);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.381);
}

#rotateIcon {
    transition: transform 0.5s ease;
}

.zeichen-zaehler {
    font-size: 14px;
    color: rgb(0, 166, 0);
    transition: 0.3s;
}

.login-error {
    text-align: center;
    display: none;
    color: rgb(255, 0, 0);
    justify-content: center;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: -10px 0;
}

.error-display {
    position: fixed;
    top: 10px;
    width: 50%;
    background-color: rgba(148, 0, 0, 0.882);
    backdrop-filter: blur(3px);
    align-self: center;
    padding: 15px 8px;
    z-index: 9999999;
    color: white;
    overflow: hidden;
    border-radius: 8px;
    display: none;
    flex-direction: row;
    align-items: center;
    user-select: none;
    -webkit-animation: slide-in-top 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
    animation: slide-in-top 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

.error-display.success {
    background-color: rgb(0, 111, 0);
}

#errorDisplayText {
    width: calc(100% - 70px);
    display: flex;
    justify-content: center;
    font-size: 18px;
    font-family: sans-serif;
    font-weight: 600;
    text-align: center;
    word-break: keep-all;
    overflow-wrap: normal;
    padding: 0 10px;
}

#errorDisplayIcon {
    font-size: 30px;
    margin-left: 5px;
}

@media only screen and (max-width: 680px) {
    .popup {
        width: 80vw;
    }

    .comments-container {
        width: 85vw;
    }

    .comment-input {
        width: calc(85vw + 30px);
    }

    #imageName::-webkit-scrollbar {
        height: 2px;
    }

    .close-x {
        right: 7px;
    }

    .image-container img {
        height: 400px;
        max-width: 90%;
    }

    .fullscreen-second-overlay {
        height: 92%;
        align-self: flex-start;
    }

    .error-display {
        width: 90%;
    }
}