/* Back to Top Button Styles */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--bs-primary, #0d6efd);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    border: none;
    text-decoration: none;
}

.back-to-top:hover {
    background-color: var(--bs-primary-dark, #0a58ca);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: white;
}

.back-to-top:active {
    transform: translateY(-1px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top i {
    font-size: 1.5rem;
    line-height: 1;
}

/* Pulsierender Effekt bei erstem Erscheinen */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

.back-to-top.pulse {
    animation: pulse 1.5s;
}

/* Anpassung für kleinere Bildschirme */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top i {
        font-size: 1.25rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .back-to-top {
        background-color: var(--bs-light, #f8f9fa);
        color: var(--bs-dark, #212529);
    }
    
    .back-to-top:hover {
        background-color: var(--bs-gray-200, #e9ecef);
        color: var(--bs-dark, #212529);
    }
}

/* Anpassung wenn Debug Panel aktiv ist */
body.debug-mode-active .back-to-top {
    bottom: 80px;
}

/* Smooth scroll behavior für die gesamte Seite */
html.smooth-scroll {
    scroll-behavior: smooth;
}

/* Anpassung für scrollbaren main-content */
.main-content {
    position: relative;
}