:root {
    --zvv-blue: #3b82f6;
    --zvv-dark-blue: #1e3a8a;
    --card-bg: rgba(30, 41, 59, 0.5);
    --card-border: rgba(255, 255, 255, 0.1);
}

body {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    color-scheme: dark;
}

/* Custom Scrollbar for Dropdown */
#location-list::-webkit-scrollbar {
    width: 8px;
}

#location-list::-webkit-scrollbar-track {
    background: transparent;
}

#location-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

#location-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
    background-clip: padding-box;
}

/* Fun Bouncing Tram Animation */
@keyframes tram-bounce {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-10px) rotate(-2deg);
    }
}

.tram-bounce {
    display: inline-block;
    animation: tram-bounce 1s infinite ease-in-out;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
}

/* Custom Loading/Refresh Feel */
#departure-list {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.htmx-request #departure-list {
    opacity: 0.4;
    filter: blur(4px);
    transform: scale(0.98);
}

.htmx-request #refresh-icon {
    animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Glassmorphism utility */
.glass {
    background-color: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    /* Force hardware acceleration to prevent rendering artifacts */
    transform: translateZ(0);
    will-change: backdrop-filter;
}