/* Apple TV-style 3D Hover Effect */
.tilt-3d {
    position: relative;
    transform-style: preserve-3d;
    --glow-x: 50%;
    --glow-y: 50%;
}

/* Cursor-following shine/reflection effect */
.tilt-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse 150px 100px at var(--glow-x) var(--glow-y),
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.1) 40%,
        rgba(255, 255, 255, 0) 70%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
    border-radius: inherit;
}

.tilt-3d-active::before {
    opacity: 1;
}

/* Soft shadow on hover */
.tilt-3d-active {
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 10px 20px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* No shadow variant (keeps shine effect) */
.tilt-no-shadow.tilt-3d-active {
    box-shadow: none;
}

/* Ensure child content stays above shine */
.tilt-3d > * {
    position: relative;
    z-index: 5;
}

/* Disable on touch devices */
@media (hover: none) and (pointer: coarse) {
    .tilt-3d {
        transform: none !important;
    }
    .tilt-3d::before {
        display: none;
    }
    .tilt-3d-active {
        box-shadow: none !important;
    }
}
