﻿:root {
    --sand-color: #edd0aa;
    --frame-color: #004E6A;
}

/* Overlay Styling */
#spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.spinner-overlay-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.spinner-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

/* Hourglass Styling */
.hourglass {
    width: 60px;
    height: 80px;
}

    .hourglass .frame {
        position: absolute;
        width: 60px;
        height: 65px;
        border-radius: 4px;
        border-top: 3px solid var(--frame-color);
        border-bottom: 3px solid var(--frame-color);
        animation: Rotation 3s infinite; /* Reduced duration */
    }

@keyframes Rotation {
    90% {
        transform: none;
    }

    100% {
        transform: rotate(180deg);
    }
}

.hourglass .top {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 30px;
    clip-path: polygon(45% 100%, 55% 100%, 100% 0, 0 0);
}

    .hourglass .top::before {
        content: '';
        position: absolute;
        width: 50px;
        height: 30px;
        background: var(--sand-color);
        animation: Sand-Falling 3s infinite; /* Reduced duration */
        transform: translateY(40%);
    }

@keyframes Sand-Falling {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(100%);
    }
}

.hourglass .top::after {
    content: '';
    position: absolute;
    left: -5px;
    width: 60px;
    height: 60px;
    transform: rotate(-90deg);
    background: conic-gradient(from 0, #fff 0, transparent 90deg, #fff 180deg);
}

.hourglass .bottom {
    position: absolute;
    left: 50%;
    top: 30px;
    transform: translateX(-50%);
    width: 50px;
    height: 30px;
    clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%);
}

    .hourglass .bottom::before {
        content: '';
        position: absolute;
        left: 50%;
        width: 50px;
        height: 30px;
        background: var(--sand-color);
        animation: Sand-Filling 3s infinite; /* Reduced duration */
        border-radius: 50% 50% 0 0;
        transform: translate(-50%, 15px);
    }

@keyframes Sand-Filling {
    0% {
        transform: translate(-50%, 60px);
    }

    100% {
        border-radius: 50% 50% 0 0;
        transform: translate(-50%);
    }
}

.hourglass .bottom .glass {
    position: absolute;
    top: -20px;
    left: -5px;
    width: 60px;
    height: 60px;
    transform: rotate(-270deg);
    background: conic-gradient(from 0, #fff 0, transparent 90deg, #fff 180deg);
}

.hourglass .drip {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    animation: Fade-Drip 3s infinite; /* Reduced duration */
}

    .hourglass .drip::before {
        content: '';
        position: absolute;
        left: -0.5px;
        width: 1px;
        height: 50px;
        background: repeating-linear-gradient(to bottom, var(--sand-color), var(--sand-color) 2px, transparent 2px, transparent 4px);
        animation: drip 3s infinite; /* Reduced duration */
        transform: translateY(-20px);
    }

@keyframes Fade-Drip {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes drip {
    0% {
        transform: translateY(-60px);
    }

    100% {
        transform: translateY(0);
    }
}

/* Animation for questions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
