/* /styles/extras.css */

/* ##################### */
/*  GitHub link tooltip  */
/* ##################### */
.github-link {
    position: relative;
}

.github-link::after {
    content: "Go on, peek inside...";
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.github-link.show-tooltip::after {
    opacity: 1;
    visibility: visible;
}

/* ###################### */
/*  Sleep mode animation  */
/* ###################### */
.sleep-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 5s ease-in-out;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sleep-overlay.blur {
    opacity: 0.3;
    visibility: visible;
    backdrop-filter: blur(10px);
}

.sleep-overlay.blank {
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(20px);
}

.sleep-overlay.waking {
    transition: all 0.3s ease-out !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Heartbeat Monitor Styles */
.heart-rate {
    width: 300px;
    height: 146px;
    position: relative;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.sleep-overlay.show-heartbeat .heart-rate {
    opacity: 1;
}

.fade-in {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #000;
    top: 0;
    right: 0;
    animation: heartRateIn 2.5s linear infinite;
}

.fade-out {
    position: absolute;
    width: 120%;
    height: 100%;
    top: 0;
    left: -120%;
    animation: heartRateOut 2.5s linear infinite;
    background: linear-gradient(to right,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 1) 80%,
            rgba(0, 0, 0, 0) 100%);
}

@keyframes heartRateIn {
    0% {
        width: 100%;
    }

    50% {
        width: 0;
    }

    100% {
        width: 0;
    }
}

@keyframes heartRateOut {
    0% {
        left: -120%;
    }

    30% {
        left: -120%;
    }

    100% {
        left: 0;
    }
}

