/* Glassmorphism primitives */
.glass-panel {
    background: rgba(11, 13, 20, 0.45) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s cubic-bezier(0.25, 1, 0.5, 1), background 0.3s ease !important;
}

.glass-panel:hover {
    background: rgba(16, 19, 28, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.1) !important;
}

/* 3D Tilt Wrapper */
.tilt-wrapper {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.tilt-element {
    will-change: transform;
    transition: transform 0.1s;
}

/* Dynamic Glowing Border (Requires JS tracking mouse X/Y) */
.glow-border {
    position: relative;
    overflow: visible;
}

.glow-border::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: radial-gradient(
        400px circle at var(--mouse-x, 0) var(--mouse-y, 0),
        rgba(59, 130, 246, 0.6),
        transparent 40%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s;
}

.glow-border:hover::before {
    opacity: 1;
}

/* Button Micro-interactions */
.btn {
    position: relative;
    overflow: hidden;
    transform: translateZ(0); /* Hardware acceleration */
}
.btn::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 300%; height: 300%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}
.btn:active {
    transform: scale(0.96) !important;
}
.btn:active::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    transition: 0s;
}
