/* css/styles.css  - spielt in der user ansicht eigentlich eine untergeordnete Rolle, wird aber überall mit geladen. */

/* QR-Code-Container anpassen */
.qr-code {
    width: 15%;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.qr-code img {
    width: 80%; /* Reduzierte Größe für bessere Integration */
    height: auto;
    border: 2px solid #fff;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* Overlay-Stile */

/* Blur-Effekt für den Hauptinhalt wenn Overlay aktiv ist */
body.blur-background .swiper-container,
body.blur-background #backgroundPosts,
body.blur-background #timelineContainer,
body.blur-background #qrCode,
body.blur-background .qr-code,
body.blur-background #fullscreenToggle,
body.blur-background .postOver ,
body.blur-background .post {
    filter: blur(8px);
    transition: filter 0.5s ease;
}

/* Blur-Klasse für topx-Overlay */
body.blur-background-topx .swiper-container,
body.blur-background-topx #backgroundPosts,
body.blur-background-topx #timelineContainer,
body.blur-background-topx #qrCode,
body.blur-background-topx .qr-code,
body.blur-background-topx #fullscreenToggle ,
body.blur-background .postOver ,
body.blur-background .post {
    filter: blur(8px);
    transition: filter 0.5s ease;
}



/* Entferne den Filter vom Overlay selbst */
#slideshowOverlay {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999999999999999;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#slideshowOverlay.active {
    opacity: 1;
    visibility: visible;
}

/* Innerer Overlay-Bereich */
#slideshowOverlay > div {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 10px;
    color: #fff;
    text-align: center;
    max-width: 80%; /* Begrenzt die maximale Breite */
    max-height: 90%; /* Begrenzt die maximale Höhe */
    overflow: auto;
    word-wrap: break-word;
    box-shadow: 0 0 20px rgba(0,0,0,0.7);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.5s ease;
}

/* Overlay-Titel-Styling */
.overlay-title {
    font-size: calc(1.5rem + 1vw);
    font-weight: bold;
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
}

/* Overlay-Nachricht-Styling - größere und anpassungsfähigere Schriftgröße */
.overlay-message {
    font-size: calc(1rem + 0.8vw);
    line-height: 1.5;
    margin: 15px 0;
    width: 100%;
    text-align: center;
}


/* Medien im Overlay proportional skalieren */
#slideshowOverlay img,
#slideshowOverlay iframe,
#slideshowOverlay video {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain; /* Wichtig: Behält das Seitenverhältnis bei */
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Vollbild-Overlay: Container füllt gesamten Viewport */
#slideshowOverlay > div.fullscreen-overlay {
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    padding: 0;
    border-radius: 0;
    background-color: rgba(0, 0, 0, 1);
}

/* Vollbild-Overlay: Bild füllt Viewport (auch Hochformat) */
#slideshowOverlay > div.fullscreen-overlay img {
    max-width: 100vw;
    max-height: 100vh;
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin-bottom: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Wenn es nur Text gibt, mache ihn größer und auffälliger */
#slideshowOverlay > div:only-child .overlay-message:only-child {
    font-size: calc(1.5rem + 1vw);
    padding: 30px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Animationen */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInText {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes rotateProgress {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Progress Bar Styles */
.progress-container {
    width: 100%;
    background-color: rgba(221, 221, 221, 0.3);
    border-radius: 20px;
    overflow: hidden;
    margin: 15px 0;
    position: absolute;
    bottom: 10px;
    left: 0;
    height: 10px; /* Schmalere Leiste */
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    width: 100%;
    transition: width 1s linear;
}

/* Überarbeiteter Kreiszähler - mittig platziert und kleiner */
.countdown {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
}

.circular-progress {
    position: relative;
    width: 80px; /* Kleinere Größe */
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(#28a745 0deg, rgba(221, 221, 221, 0.3) 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.circular-progress:before {
    content: attr(data-time);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: bold;
    color: white;
}

/* Schließen-Button */
#slideshowOverlay .close-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 100;
}

#slideshowOverlay .close-overlay:hover {
    opacity: 1;
    transform: scale(1.1);
}


/* Animation für das Glücksrad */

.spin-animation {
    animation: spin 1.5s linear infinite;
}

/* Animation für bunten Countdown */
@keyframes colorful {
    0% { color: #f54291; transform: scale(1); }
    25% { color: #ff9c1a; transform: scale(1.2); }
    50% { color: #01c5c4; transform: scale(1); }
    75% { color: #b01eff; transform: scale(1.2); }
    100% { color: #f54291; transform: scale(1); }
}

.colorful-animation {
    animation: colorful 2s linear infinite;
}

/* Animation für Blitz-Effekt */
@keyframes flash {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}

.flash-animation {
    animation: flash 1s linear infinite;
    color: #ffc107;
}

/* Animation für Ladespinner */
@keyframes spin-pulse {
    0% { transform: rotate(0deg); opacity: 0.7; }
    50% { transform: rotate(180deg); opacity: 1; }
    100% { transform: rotate(360deg); opacity: 0.7; }
}

.spinner-animation {
    animation: spin-pulse 1.5s ease-in-out infinite;
}

/* Animation für Default-Effekt */
@keyframes default-effect {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.default-animation {
    animation: default-effect 1s ease-in-out infinite;
    color: #4361EE;
}        
/* Neue CSS-Regel für das Fade-Out */
.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
}


/* Like Button Styles */
.like-button {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.3s ease;
    color: var(--text-color, #fff);
}

.like-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.like-button i {
    font-size: 18px;
    margin-right: 5px;
    transition: transform 0.3s ease;
}

.like-button.liked i {
    color: #ff4d4d;
}

#qrCode.hidden,
#masonryQr.hidden,
#galaxyQr.hidden,
#scrapbookQr.hidden,
#streamQr.hidden,
#filmQr.hidden,
#newsQr.hidden,
.like-qr-code.hidden {
  opacity: 0;
  pointer-events: none;
  display: none !important;
}

/* Deaktivierte Like-Buttons */
.like-button.disabled,
.heart-button.disabled {
  opacity: 0.3;
  pointer-events: none;
  cursor: default;
}

/* Transition für sanftes Ein-/Ausblenden */
#qrCode,
.like-qr-code,
.like-button,
.heart-button {
  transition: opacity 0.3s ease-in-out;
}

.like-button:active i {
    transform: scale(1.3);
}

/* Animation für neue Likes */
@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

.heartbeat {
    animation: heartBeat 1s ease-in-out;
    color: #ff4d4d;
}

/* Fliegende Herzen Animation */
.flying-heart {
    position: absolute;
    pointer-events: none;
    animation: fly-heart 2s ease-in-out forwards;
    z-index: 1000;
    color: #ff4d4d;
    opacity: 0.8;
}

@keyframes fly-heart {
    0% {
        transform: scale(0.5) translateY(0) translateX(0) rotate(0deg);
        opacity: 0.8;
    }
    25% {
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5) translateY(-100px) translateX(var(--x-offset)) rotate(var(--rotation));
        opacity: 0;
    }
}

/* TopX Overlay Styles */
#topxOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#topxOverlay.active {
    opacity: 1;
    visibility: visible;
}

#topxContent {
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    background-color: rgba(40, 40, 40, 0.9);
    border-radius: 10px;
    color: #fff;
}

#topxContent h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.topx-images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.topx-image-container {
    position: relative;
    width: 300px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.topx-image-container:hover {
    transform: translateY(-5px);
}

.topx-image-container img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 5px;
    margin-bottom: 10px;
}

.topx-image-container .description {
    font-size: 0.9rem;
    margin-bottom: 10px;
    max-height: 60px;
    overflow: hidden;
}

.topx-image-container .like-count {
    display: inline-flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.topx-image-container .like-count i {
    color: #ff4d4d;
    margin-right: 5px;
}

.topx-rank {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 40px;
    height: 40px;
    background-color: #ff4d4d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

#topxOverlay .close-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

/* Tinder-Style Swipe Interface */
.swipe-container {
    position: relative;
    width: 300px;
    height: 450px;
    margin: 0 auto;
    overflow: hidden;
}

.swipe-card {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #fff;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: grab;
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

.swipe-card.swiping {
    transition: none;
}

.swipe-card-image {
    width: 100%;
    height: 70%;
    object-fit: cover;
}

.swipe-card-content {
    padding: 15px;
    height: 30%;
    overflow: auto;
}

.swipe-card-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.swipe-card-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.swipe-actions {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.swipe-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.swipe-dislike {
    background-color: #fe3c72;
    color: white;
}

.swipe-like {
    background-color: #27ae60;
    color: white;
}

.swipe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.swipe-overlay.like {
    color: #27ae60;
    right: 0;
    left: auto;
}

.swipe-overlay.dislike {
    color: #fe3c72;
    left: 0;
    right: auto;
}

/* Permanent display of TopX in the corner */
.topx-corner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 200px;
    max-height: 400px;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 10px;
    z-index: 1000;
    color: #fff;
    overflow: hidden;
}

.topx-corner h3 {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 5px;
}

.topx-corner-item {
    display: flex;
    align-items: center;
    padding: 5px;
    margin-bottom: 5px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
}

.topx-corner-item img {
    width: 100px;
    height: 40px;
    border-radius: 5px;
    object-fit: contain;
    margin-right: 10px;
}

.topx-corner-item .info {
    flex-grow: 1;
}

.topx-corner-item .rank {
    font-weight: bold;
    margin-right: 5px;
}

.topx-corner-item .likes {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.topx-corner-item .likes i {
    color: #ff4d4d;
    margin-right: 3px;
}

/* FÜR das QR-Code-Element */
.like-qr-code {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.language-switcher{
    display: none !important;
}
.like-qr-code img {
    width: 60px !important;
    height: 60px !important;
}

.like-qr-hint {
    font-size: 10px;
    margin-top: 2px;
    color: #333;
}

/* Fullscreen Toggle Button */
#fullscreenToggle {
    background-color: white;
    position: fixed;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 999999999;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}
#fullscreenToggle:hover {
    opacity: 0.7;
}
#fullscreenToggle svg {
    width: 100%;
    height: 100%;
    /*fill: currentColor;*/
}


/* Responsive Anpassungen */
@media (max-width: 768px) {
    #slideshowOverlay > div {
        max-width: 95%;
        padding: 20px;
    }
    
    .overlay-title {
        font-size: calc(1.2rem + 1vw);
    }
    
    .overlay-message {
        font-size: calc(1rem + 0.5vw);
    }
    
    .circular-progress {
        width: 60px;
        height: 60px;
    }
}