
/* stylemasonry_modern.css */

body {
    background-color: var(--bg-color, #0f0f12);
    color: var(--text-color, white);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

/* --- BACKGROUND WRAPPER (für Sponsor L-Form Overlay Kompatibilität) --- */
#backgroundWrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9990;
    transition: width 0.5s ease, height 0.5s ease;
}

/* --- WALL CONTAINER --- */
#masonryWallContainer {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    width: 100%;
    height: 100%;
    gap: 15px;
    padding: 0 10px;
    overflow: hidden;
    justify-content: center;
    perspective: 1000px;
    background-color: var(--bg-color, #0f0f12);
}

/* --- COLUMNS --- */
.masonry-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    will-change: transform;
}

/* --- GRID ITEMS --- */
.grid-item {
    background: var(--post-color, rgba(40, 40, 45, 0.9));
    border-radius: 12px;
    width: 100%;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Media Wrapper - enthält Bild/Video + Overlay */
.grid-media-wrapper {
    position: relative;
    width: 100%;
}

.grid-media-wrapper img,
.grid-media-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.85;
    transition: opacity 0.3s;
}
.grid-item:hover .grid-media-wrapper img,
.grid-item:hover .grid-media-wrapper video {
    opacity: 1;
}

/* Grid Post Info - OVERLAY unten auf dem Bild (wie Demo) */
.grid-post-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.6) 70%, transparent);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Top-Zeile: Avatar, Name links, Likes rechts */
.grid-info-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
}

.grid-avatar {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.grid-name-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.grid-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-color, white);
    line-height: 1.2;
    text-align: left;
}

.grid-time {
    display: none; /* Zeit wird im Hintergrund-Stream nicht angezeigt */
}

.grid-likes-section {
    flex-shrink: 0;
}

.grid-description {
    font-size: 0.65rem;
    color: var(--text-color, rgba(255,255,255,0.9));
    line-height: 1.3;
    max-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

/* Challenge Badge und QR in der Info-Box */
.grid-badge-wrapper,
.grid-qr-wrapper {
    margin-top: 8px;
}

/* Grid Text-Only */
.grid-text-only {
    padding: 20px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--post-color, linear-gradient(135deg, #2c3e50, #4ca1af));
    text-align: center;
    color: var(--text-color, white);
    gap: 12px;
}

.text-content {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
}

/* Info-Bereich für Text-Only Posts (Overlay am unteren Rand wie bei Bildern) */
.grid-post-info-textonly {
    padding: 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.6) 70%, transparent);
}

.grid-post-info-textonly .grid-info-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.text-author {
    font-size: 0.85rem;
    color: var(--text-color, rgba(255, 255, 255, 0.85));
    font-weight: 600;
    font-style: italic;
    margin-top: 8px;
}

/* Challenge Badge für Grid - dezenter */
.challenge-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-top: 4px;
    backdrop-filter: blur(4px);
}

.challenge-icon {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Like Display für Grid - wie in Demo */
.like-display {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #ec4899;
    font-size: 0.8rem;
    font-weight: bold;
}

.like-display i {
    font-size: 12px;
    width: 12px;
    height: 13px;
    fill: currentColor;
}

/* Like QR Code für Grid */
.like-qr-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    padding: 4px;
    border-radius: 6px;
    max-width: 60px;
}

.like-qr-code img {
    width: 50px !important;
    height: 50px !important;
    display: block;
    opacity: 1 !important;
}

.like-qr-hint {
    font-size: 0.5rem;
    color: #000;
    text-align: center;
    margin-top: 2px;
    font-weight: 600;
}

/* --- ANIMATION KEYFRAMES --- */
@keyframes scrollUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@keyframes scrollDown {
    0% { transform: translateY(-50%); }
    100% { transform: translateY(0); }
}

/* --- SPOTLIGHT OVERLAY --- */
#masonrySpotlight {
    position: fixed;
    top: 0;
    left: var(--spotlight-offset-left, 0px);
    right: var(--spotlight-offset-right, 0px);
    bottom: var(--spotlight-offset-bottom, 0px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
}

.spotlight-card {
    background: var(--post-color, rgba(20, 20, 25, 0.98));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
    max-width: 85%;
    max-height: 90%;
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
}

.spotlight-card.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Spotlight Media Wrapper */
.spotlight-media-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
}

.spotlight-media-wrapper img,
.spotlight-media-wrapper video {
    display: block;
    max-width: 100%;
    object-fit: contain;
}

/* Spotlight Post Info - gleiche Struktur wie Grid */
.spotlight-post-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.7) 70%, transparent);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Spotlight Text-Only */
.spotlight-text-only {
    padding: 60px 40px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--post-color, linear-gradient(135deg, #2c3e50, #4ca1af));
    text-align: center;
    color: var(--text-color, white);
    gap: 20px;
}

.spotlight-text-only .text-content {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.4;
}

.spotlight-text-only .text-author {
    font-size: 1.2rem;
    color: var(--text-color, rgba(255, 255, 255, 0.85));
    font-weight: 600;
    font-style: italic;
    margin-top: 12px;
}

/* Spotlight Like Display - größer als Grid */
.spotlight-like-display {
    font-size: 1rem !important;
}

.spotlight-like-display i {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
}

/* Spotlight QR Code - größer als Grid */
.spotlight-qr-code img {
    width: 80px !important;
    height: 80px !important;
}

.spotlight-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.spotlight-avatar { width: 40px; height: 40px; border-radius: 50%; }
.spotlight-user { font-weight: 600; font-size: 1.1rem; color: var(--text-color, white); }
.spotlight-time { font-size: 0.8rem; color: var(--text-color, #aaa); }

.spotlight-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
    position: relative;
}
.spotlight-body img, .spotlight-body video {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.spotlight-footer {
    padding: 15px 20px;
    background: rgba(255,255,255,0.02);
}
.spotlight-desc { font-size: 1.2rem; margin-bottom: 10px; color: var(--text-color, #e0e0e0); }

.spotlight-footer-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.spotlight-likes {
    display: flex;
    gap: 5px;
    color: #ec4899;
    font-weight: bold;
    align-items: center;
    font-size: 1.1rem;
}

.spotlight-likes i {
    font-size: 1.2rem;
}

/* Spotlight Challenge Badge - dezenter */
.spotlight-challenge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.4);
    color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    backdrop-filter: blur(8px);
}

.spotlight-challenge .challenge-icon {
    font-size: 0.95rem;
    opacity: 0.85;
}

/* Spotlight QR Code */
.spotlight-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    padding: 8px;
    border-radius: 10px;
}

.spotlight-qr img {
    width: 80px !important;
    height: 80px !important;
    display: block;
}

.spotlight-qr-hint {
    font-size: 0.7rem;
    color: #000;
    text-align: center;
    margin-top: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

/* --- QR --- */
.modern-qr-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.modern-qr-panel img { width: 120px; height: 120px; }
.qr-label { color: black; font-weight: 800; font-size: 0.8rem; text-transform: uppercase; margin-bottom: 5px; }

/* --- LOGO POST (Grid) --- */
.grid-logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-align: center;
    border-radius: 12px;
}

.grid-logo-image {
    max-width: 90%;
    height: auto;
    object-fit: contain;
    opacity: 1 !important;
}

.grid-logo-description {
    margin-top: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.3;
    word-wrap: break-word;
}

/* --- LOGO POST (Spotlight) --- */
.spotlight-logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 30px;
    text-align: center;
    border-radius: 20px;
}

.spotlight-logo-image {
    max-width: 70%;
    max-height: 40vh;
    height: auto;
    object-fit: contain;
}

.spotlight-logo-description {
    margin-top: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

/* --- SPONSOR z-index overrides für Masonry Modern --- */
.sponsor-streamer {
    z-index: 9995 !important;
}
.sponsor-overlay-container {
    z-index: 9995 !important;
}
.sponsor-transition {
    z-index: 9998 !important;
}
.sponsor-watermark {
    z-index: 9993 !important;
}

/* --- SPONSOR POST (Spotlight) --- */
.spotlight-sponsor .sponsor-post {
    border-radius: 20px;
    overflow: hidden;
    min-height: 350px;
}

.spotlight-sponsor .sponsor-post-logo {
    max-height: 50vh;
    max-width: 80%;
}
