/* Lightbox Card Stack (Kartenstapel) */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 17, 21, 0.85); /* Dunkles, edles Overlay */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 2010;
    transition: color 0.3s, transform 0.3s;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.lightbox-stack {
    position: relative;
    width: 90vw;
    max-width: 500px;
    height: 70vh;
    max-height: 700px;
    perspective: 1500px; /* Tiefe für den 3D-Effekt */
}

.lightbox-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
    cursor: grab;
    border-top: 4px solid var(--secondary-color);
    transform-origin: bottom center;
}

.lightbox-card:active { cursor: grabbing; }
.lightbox-card img {
    width: 100%;
    height: calc(100% - 60px); /* Platz für Caption lassen */
    object-fit: cover;
}

.lightbox-card .caption {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Stapel-Positionen */
.lightbox-card[data-state="active"] { transform: translateY(0) scale(1) translateZ(0); opacity: 1; z-index: 10; }
.lightbox-card[data-state="next-1"] { transform: translateY(-40px) scale(0.92) translateZ(-50px); opacity: 0.7; z-index: 9; pointer-events: none; }
.lightbox-card[data-state="next-2"] { transform: translateY(-80px) scale(0.84) translateZ(-100px); opacity: 0.4; z-index: 8; pointer-events: none; }
.lightbox-card[data-state="hidden"] { transform: translateY(-120px) scale(0.75) translateZ(-150px); opacity: 0; z-index: 7; pointer-events: none; }

/* Animation, wenn die Karte nach unten "abgeworfen" wird */
.lightbox-card[data-state="discarded"] { transform: translateY(120vh) rotate(-15deg); opacity: 0; z-index: 11; pointer-events: none; }

.lightbox-hint { margin-top: 60px; color: rgba(255,255,255,0.7); font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase; text-align: center; font-family: var(--font-body); pointer-events: none; }
.swipe-icon { display: block; font-size: 1.5rem; margin-bottom: 5px; animation: bounce-down 2s infinite; }
@keyframes bounce-down { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
