/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --active-font: sans-serif;
}

/* GLOBAL */
body {
    font-family: var(--active-font);
    background: #f5f5f5;
    color: #222;
    display: flex;
}

#subtitle {
    margin-bottom: 24px;
    font-size: small;
    color: rgb(255, 207, 0);
}

.image-preview {
    width: 100%;
    max-width: 600px;
    height: 350px;
    background: #ddd;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* MODAL OVERLAY */
.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

/* MODAL BOX */
.image-modal-content {
    background: #fff;
    padding: 20px;
    width: 80%;
    max-width: 700px;
    border-radius: 10px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

/* CLOSE BUTTON */
.image-modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    cursor: pointer;
}

/* Bild-Container für Delete-Button */
.image-item {
    position: relative;
}

.image-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
}

.image-item img:hover {
    transform: scale(1.05);
}

/* Delete-Button */
.image-delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-item:hover .image-delete-btn {
    opacity: 1;
}

/* UPLOAD */
.upload-label {
    display: inline-block;
    padding: 10px 15px;
    background: #222;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 16px;
}

.upload-label input {
    display: none;
}

/* GALLERY GRID */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.image-gallery img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
}

.image-gallery img:hover {
    transform: scale(1.05);
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px; /* Gesamtbreite */
    height: 100vh;
    background: #1f1f1f;
    color: #fff;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s ease;
    z-index: 1000;
    overflow: hidden;
}

/* Sidebar geschlossen → nur 35px sichtbar */
.sidebar.closed {
    transform: translateX(-365px); /* 400 - 35 */
}

/* SIDEBAR TOGGLE */
.sidebar-toggle {
    position: absolute;
    right: 5px;
    top: 15px;
    width: 30px;
    height: 30px;
    background: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SIDEBAR CONTENT */
.sidebar-content {
    flex: 1;
    width: 365px; /* Contentbereich */
    padding: 80px 5px 30px 25px; /* links 25px, rechts 5px */
    overflow-y: auto;
    scrollbar-width: none;
}

.sidebar-content::-webkit-scrollbar {
    display: none;
}

.sidebar-content h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    opacity: 0.95;
}

/* UPLOAD */
.sidebar-upload {
    margin-bottom: 30px;
}

.sidebar-upload label {
    font-size: 14px;
    opacity: 0.85;
    display: block;
    margin-bottom: 8px;
}

.sidebar-upload input {
    width: 100%;
    padding: 8px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
}

/* FONT LIST */
.sidebar-fontlist {
    background: #262626;
    padding: 18px 15px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #333;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.25);
}

.sidebar-fontlist h3 {
    margin-bottom: 15px;
    font-size: 15px;
    opacity: 0.9;
    letter-spacing: 0.3px;
}

.sidebar-fontlist ul {
    list-style: none;
}

/* WICHTIG: Tooltip soll raus dürfen */
.sidebar-fontlist li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid #333;
    font-size: 14px;
    white-space: nowrap;
    overflow: visible; /* Tooltip sichtbar */
    max-width: 100%;
    position: relative; /* Tooltip-Position */
}

.sidebar-fontlist li:last-child {
    border-bottom: none;
}

/* FONT NAME (ellipsis) */
.sidebar-fontlist li label {
    overflow: hidden; /* Ellipsis */
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
    display: inline-block;
    max-width: 240px;
}

/* TOOLTIP AM <li> – nicht am Label */
.sidebar-fontlist li:hover::after {
    content: attr(data-fullname);
    position: absolute;
    left: 0;
    top: -28px;
    background: #000;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 9999;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* ACTION BUTTONS */
.actions button {
    background: #333;
    border: none;
    color: #ccc;
    cursor: pointer;
    margin-left: 5px;
    font-size: 12px;
    padding: 3px 6px;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.actions button:hover {
    background: #444;
    color: #fff;
}

/* PAGE CONTENT */
.page {
    margin-left: 350px;
    width: calc(100% - 350px);
    transition: margin-left 0.35s ease, width 0.35s ease;
}

.sidebar.closed ~ .page {
    margin-left: 35px;
    width: calc(100% - 35px);
}

/* NAV */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    font-size: 22px;
    font-weight: bold;
}

.nav a {
    margin-left: 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 18px;
}

/* HERO */
.hero {
    position: relative;
    height: 90vh;
    background-image: url("images/default.png");
    background-size: cover;
    background-position: center -100px;
    /* background-position: center; */
    display: flex;
    align-items: center;
    padding: 60px;
    cursor: pointer;
    pointer-events: auto; /* Hero ist klickbar */
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    pointer-events: none; /* Overlay blockiert NICHTS */
}

.hero {
    z-index: 1;
}
.page {
    position: relative;
    z-index: 2;
}

/* Card bleibt oben drauf */
.hero-card {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.hero-card h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.hero-card h2 {
    font-size: 22px;
    margin-bottom: 15px;
}

.hero-card p {
    margin-bottom: 15px;
}

.btn {
    padding: 10px 20px;
    background: rgb(255, 207, 0);
    color: Black;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 18px;
    margin-top: 20px;
    font-family: var(--active-font);
}

.edit, .delete, #fontUpload {
    font-family: var(--active-font);
}

.hero-card .btn {
    display: block;
    margin-left: auto;
    margin-right: 24px;
}

/* FEATURES */
.features {
    display: flex;
    justify-content: space-around;
    padding: 60px 20px;
    gap: 20px;
}

.card {
    background: white;
    padding: 20px;
    width: 30%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.card h3 {
    margin-bottom: 10px;
}

/* SPLIT */
.split {
    display: flex;
    padding: 60px;
    gap: 40px;
}

.split-text {
    flex: 1;
}

.split-image {
    flex: 1;
}

.placeholder-image {
    background: #ddd;
    height: 300px;
    border-radius: 8px;
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 20px;
    background: #222;
    color: white;
    margin-top: 40px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .features {
        flex-direction: column;
    }

    .card {
        width: 100%;
    }

    .split {
        flex-direction: column;
    }

    .page {
        margin-left: 35px !important;
        width: calc(100% - 35px) !important;
    }
}
