/* General body styles */
body {
    font-family: 'Arial', sans-serif;
    padding: 0;
    margin: 0;
    background-color: #2c2c2c;
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease;
}

body.dark-mode {
    background-color: #1a1a1a;
}

/* Navigation styles */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #1f1f1f;
    color: #fff;
}

nav img {
    width: 160px;
    vertical-align: middle;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 30px;
}

nav ul li {
    margin: 0;
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: 1.1em;
    transition: color 0.3s, transform 0.3s;
    position: relative;
}

nav ul li a::before {
    content: '';
    position: absolute;
    width: 0%;
    height: 3px;
    bottom: -3px;
    left: 0;
    background-color: #FFD700;
    transition: width 0.3s;
}

nav ul li a:hover::before {
    width: 100%;
}

nav ul li a:hover {
    color: #FFD700;
    transform: translateY(-3px);
}

nav ul.mobile-menu {
    display: none;
    flex-direction: column;
    background-color: #1f1f1f;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    z-index: 10;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 8px 8px;
}

nav ul.mobile-menu.open {
    display: flex;
}

/* Form styles */
form {
    background-color: #252525;
    color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 500px;
    margin-bottom: 40px;
    margin-top: 2vh;
    display: flex;
    justify-content: center;
    flex-direction: column;
}   

label {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    color: #e0e0e0;
}

input, textarea, select, button {
    width: calc(100% - 24px);
    padding: 12px;
    margin-top: 12px;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: #444444;
    color: #fff;
    font-size: 1em;
    transition: border-color 0.3s, background-color 0.3s;
    resize: none;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #FFD700;
    background-color: #555;
}

/* Submit button */
button {
    background-color: #FFD700;
    color: #1f1f1f;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    font-weight: 600;
    margin-left: auto;
    margin-right: auto;
}

button:hover:not(.tagfield *) {
    background-color: #ffcc00;
    transform: translateY(-2px) scale(1.05);
}

.content{

    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Image grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 40px auto;
}

.image-item {
    background-color: #2d2d2d;
    border: 1px solid #1e1e1e;
    padding: 5px 5px 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
    cursor: pointer;
}

.image-item img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
}

.image-item a{
    color: white;
    text-decoration: underline;
    text-underline-offset: 1.5px;
}

.image-item:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

/* Image preview */

/* .image-preview {
    margin-top: 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
} */

.image-preview {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly; /* Gleichmäßige Verteilung */
    gap: 10px;
    margin-top: 10px;
}

.u-image-item {
    position: relative; /* Sicherstellen, dass die Positionierung korrekt ist */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid #ccc;
    padding: 0 10px;
    background-color: #333;
    cursor: grab;
    width: calc(25% - 10px); /* Gleichmäßige Verteilung, falls Spalten breiter definiert sind */
    min-width: 120px; /* Mindestbreite für kleinere Fenster */
    border-radius: 5px;
}

.u-image-item.dragging {
    opacity: 0.7; /* Klarere visuelle Rückmeldung */
    transform: scale(1.05); /* Optional: eine leichte Vergrößerung für Feedback */
    z-index: 1000; /* Über andere Elemente legen */
}

.drag-handle {
    font-size: 18px;
    cursor: grab;
    transform: translateY(6px);
}

.u-image-item .remove-image {
    position: absolute;
    top: -19px;
    right: -7px;
    background: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    outline: none;
    transform: scale(0.5);
}

.u-image-item .remove-image:hover {
    background: rgba(255, 0, 0, 0.9);
}

.u-image-item img {
    max-width: 100%; /* Innerhalb des Containers bleiben */
    max-height: 100px; /* Konstante maximale Höhe */
    object-fit: cover; /* Kein Verzerren der Bilder */
}

.image-preview img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.image-gallery{
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.image-gallery img{
    width: 100%;
    height: 80vh;
    border-radius: 25px;
    margin: 20px 0;
}

.galleryInfos{
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.deleteform{
    margin: 10px;
}

.checkfieldinput{

    display: flex;
}

.checkfieldinput label{

    margin-top: 0;
}

form a, p a{
    color: #FFD700;
    transition: 0.5s;
    text-underline-offset: 3px;

    &:hover{

        color: #a88f00;
    }

    &:before{
        content: "➧";
        bottom: 10px;
    }
}

input[type="checkbox"]{

    width: auto;
    height: auto;
    margin: auto 10px;
}

.aboutcontent{

    width: 80vw;
    margin: auto;
}

.postshortcut{

    background-color: #FFD700;
    color: black;
    padding: 20px 24px;
    border-radius: 25px;
    position: fixed;
    bottom: 25px;
    right: 25px;
}

/* Drag and drop area */
.drag-and-drop {
    width: 100%;
    padding: 20px;
    margin: 10px 0;
    border: 2px dashed #888;
    background-color: #3a3a3a;
    border-radius: 8px;
    text-align: center;
    color: #aaa;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    text-wrap-mode: nowrap;
    background-color: #444444;
    color: #fff;
    padding: 5px 8px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    margin-top: 10px;
    gap: 5px;
    overflow: hidden;
}

.tag .remove-tag {
    cursor: pointer;
    margin: 0;
    font-size: 12px;
    padding: 4px 8px;
}

.tag-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #252525;
    border-radius: 4px;
    max-height: 150px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    background-color: #717171;
}

.suggestion-item:hover {
    background-color: #313131;
}

.suggestion-item:hover{

    border: solid 1px #FFD700;
    border-radius: 10px;
}

div .pfp{
    width: 40px;
    height: 40px;
    border-radius: 100%;
    margin: 0 auto;
    object-fit: cover;
}

form .pfp{
    width: 150px;
    height: 150px;
    border-radius: 100%;
    margin: 0 auto;
    object-fit: cover;
}

.interactiveform{

    display: inline;
    padding: 0;

    button{

        width: fit-content;
    }
}

.tagfield{

    display: inline-block;
    position: relative;

    button{

        position: absolute;
        top: 1px;
        right: 0;
        width: fit-content;

        &:hover{

            width: fit-content;
        }
    }
}


.profileunderimage{

    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    margin-left: 5px;

    img{
        margin: 0;
    }
}

.fullGallery {
    display: flex;
    flex-direction: column;
    width: 90vw;
    margin: 20px auto;
    background-color: #1f1f1f;
    border-radius: 8px;
    padding: 20px;
    color: #FFD700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.imagePreview {
    background-color: #2c2c2c;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-bottom: 20px;
}

.imagePreview img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px;
}

.imageGallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumbnail {
    flex: 0 0 auto;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
}

.thumbnail img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.thumbnail:hover {
    transform: scale(1.05);
}

.galleryDetails {
    font-size: 14px;
    color: #e0e0e0;
    margin-top: 15px;
    border-top: 1px solid #FFD700;
    padding-top: 10px;
}

/*COOKIE BANNER*/

.cookie-banner {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #333;
    color: white;
    text-align: center;
    padding: 0 0 10px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;

    div{

        display: flex;
        gap: 5px;
        margin: 0 25px;
    }
}

.cookie-banner p {
    margin: 0;
    font-size: 14px;
}

.cookie-banner.hidden {
    display: none;
}

/* Alerts */
.alert {
    padding: 10px;
    margin: 30px;
    border: 1px solid transparent;
    border-radius: 6px;
    text-align: center; 
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.valid{

    color: green;
}

.invalid{

    color: red;
}

#password{

    position: relative;
}

#togglePassword{

    position: relative;
    right: -93%;
    top: -35px;
}

@media(min-width: 769px){

    /* Burger Menu */
    nav .burger {
        display: none;
        flex-direction: column;
        cursor: pointer;
    }
}

@media (max-width: 768px) {
    ul.nav-links {
        display: none;
        flex-direction: column;
        gap: 15px;
        position: absolute;
        top: 60px;
        right: 0;
        background-color: #1f1f1f;
        width: 95%;
        text-align: right;
        padding: 20px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        border-radius: 0 0 8px 8px;
    }

    ul.nav-links.open {
        display: flex;
    }
    
    .burger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
    }

    .burger div {
        width: 25px;
        height: 3px;
        background-color: #fff;
        margin: 4px;
        transition: all 0.3s ease;
    }

    .burger.toggle div:nth-child(1) {
        transform: rotate(-45deg) translate(-8px, 8px);
    }

    .burger.toggle div:nth-child(2) {
        opacity: 0;
    }

    .burger.toggle div:nth-child(3) {
        transform: rotate(45deg) translate(-7px, -7px);
    }

    .image-grid{
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .image-item img{
        width: 125px;
        height: 125px;
    }

    .image-item .pfp{

        width: 30px;
        height: 30px;
    }

    .cookie-banner{

        flex-direction: column;
        padding: 10px 0 10px 0;
        gap: 0;
    }

    form {
        width: 80%;
        padding-top: 5px;
    }
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: 1fr;
    }

    .image-item img{
        width: 100px;
        height: 100px;
    }

    .fullGallery{

        padding: 0;
    }
}

/* Animations */
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    0% { opacity: 0; transform: translateY(50px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
    70% { box-shadow: 0 0 15px 20px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}